summaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-07-29 03:58:24 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-07-29 03:58:24 +0000
commit1c5c0c934f91fbce2825acbb849e98781e774c1d (patch)
tree12b5ae03516d4103bc070e4579ae1f7f71c27d24 /arch/i386
parent4fe70c31de87823ac9e804f4795589ba74dc6971 (diff)
Merge with 2.1.47. Some more cleanup and module fixes.
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/boot/setup.S68
-rw-r--r--arch/i386/config.in5
-rw-r--r--arch/i386/defconfig2
-rw-r--r--arch/i386/kernel/setup.c15
4 files changed, 46 insertions, 44 deletions
diff --git a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S
index 32d852efc..7553ce943 100644
--- a/arch/i386/boot/setup.S
+++ b/arch/i386/boot/setup.S
@@ -26,6 +26,10 @@
!
! Video handling moved to video.S by Martin Mares, March 1996
! <mj@k332.feld.cvut.cz>
+!
+! Extended memory detection scheme retwiddled by orc@pell.chi.il.us (david
+! parsons) to avoid loadlin confusion, July 1997
+!
#define __ASSEMBLY__
#include <linux/config.h>
@@ -241,53 +245,39 @@ loader_panic_mess:
loader_ok:
! Get memory size (extended mem, kB)
-#ifdef STANDARD_MEMORY_BIOS_CALL
- mov ah,#0x88
- int 0x15
- mov [2],ax
-#else
- push ax
- push cx
- push dx
- ! which bootloader ?
- seg cs
- mov al,byte ptr type_of_loader
- and al,#0xf0
- cmp al,#0x10
- jne try_xe801 ! not Loadlin
- seg cs
- cmp byte ptr type_of_loader,#0x16
- jbe oldstylemem ! Loadlin <= 1.6 don't like that
-try_xe801:
- mov ax,#0xe801
- int 0x15
- jc oldstylemem
+#ifndef STANDARD_MEMORY_BIOS_CALL
+ push ebx
+
+ xor ebx,ebx ! preload new memory slot with 0k
+ mov [0x1e0], ebx
+
+ mov ax,#0xe801
+ int 0x15
+ jc oldstylemem
-! memory size is (ax+(64*bx)) * 1024; we store bx+(ax/64)
+! memory size is in 1k chunksizes, to avoid confusing loadlin.
+! we store the 0xe801 memory size in a completely different place,
+! because it will most likely be longer than 16 bits.
+! (use 1e0 because that's what Larry Augustine uses in his
+! alternative new memory detection scheme, and it's sensible
+! to write everything into the same place.)
- mov [2],bx ! store extended memory size
- xor dx,dx
- mov cx,#64 ! convert lower memory size from K into
- div cx ! 64k chunks.
+ and ebx, #0xffff ! clear sign extend
+ shl ebx, 6 ! and go from 64k to 1k chunks
+ mov [0x1e0],ebx ! store extended memory size
- add [2],ax ! add lower memory into total size.
- jmp gotmem
+ and eax, #0xffff ! clear sign extend
+ add [0x1e0],eax ! and add lower memory into total size.
+
+ ! and fall into the old memory detection code to populate the
+ ! compatability slot.
+ pop ebx
oldstylemem:
+#endif
mov ah,#0x88
int 0x15
- or ax,ax ! some BIOSes report ZERO for 64meg
- mov word ptr [2],#0x400
- jz gotmem
- mov cx,#64 ! got memory size in kbytes, so we need to
- xor dx,dx ! adjust to 64k chunks for the system.
- div cx
mov [2],ax
-gotmem:
- pop dx
- pop cx
- pop ax
-#endif
! Set the keyboard repeat rate to the max
diff --git a/arch/i386/config.in b/arch/i386/config.in
index 1612b614f..887407c61 100644
--- a/arch/i386/config.in
+++ b/arch/i386/config.in
@@ -46,7 +46,10 @@ choice 'Processor type' \
PPro CONFIG_M686" Pentium
bool 'Video mode selection support' CONFIG_VIDEO_SELECT
-tristate 'Parallel port support' CONFIG_PNP_PARPORT
+tristate 'Parallel port support' CONFIG_PARPORT
+if [ "$CONFIG_PARPORT" != "n" ]; then
+ dep_tristate ' PC-style hardware' CONFIG_PARPORT_PC $CONFIG_PARPORT
+fi
endmenu
diff --git a/arch/i386/defconfig b/arch/i386/defconfig
index 6e7700c91..430d6b971 100644
--- a/arch/i386/defconfig
+++ b/arch/i386/defconfig
@@ -31,7 +31,7 @@ CONFIG_BINFMT_MISC=y
# CONFIG_M586 is not set
CONFIG_M686=y
# CONFIG_VIDEO_SELECT is not set
-# CONFIG_PNP_PARPORT is not set
+# CONFIG_PARPORT is not set
#
# Plug and Play support
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 4dd8edf76..d4800f987 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -92,6 +92,9 @@ extern char empty_zero_page[PAGE_SIZE];
*/
#define PARAM empty_zero_page
#define EXT_MEM_K (*(unsigned short *) (PARAM+2))
+#ifndef STANDARD_MEMORY_BIOS_CALL
+#define ALT_MEM_K (*(unsigned long *) (PARAM+0x1e0))
+#endif
#ifdef CONFIG_APM
#define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+64))
#endif
@@ -120,6 +123,7 @@ __initfunc(void setup_arch(char **cmdline_p,
unsigned long * memory_start_p, unsigned long * memory_end_p))
{
unsigned long memory_start, memory_end;
+ unsigned long memory_alt_end;
char c = ' ', *to = command_line, *from = COMMAND_LINE;
int len = 0;
static unsigned char smptrap=0;
@@ -143,10 +147,15 @@ __initfunc(void setup_arch(char **cmdline_p,
BIOS_revision = SYS_DESC_TABLE.table[2];
}
aux_device_present = AUX_DEVICE_INFO;
-#ifdef STANDARD_MEMORY_BIOS_CALL
memory_end = (1<<20) + (EXT_MEM_K<<10);
-#else
- memory_end = (1<<20) + (EXT_MEM_K*64L*1024L); /* 64kb chunks */
+#ifndef STANDARD_MEMORY_BIOS_CALL
+ memory_alt_end = (1<<20) + (ALT_MEM_K<<10);
+ if (memory_alt_end > memory_end) {
+ printk("Memory: sized by int13 0e801h\n");
+ memory_end = memory_alt_end;
+ }
+ else
+ printk("Memory: sized by int13 088h\n");
#endif
memory_end &= PAGE_MASK;
#ifdef CONFIG_BLK_DEV_RAM