patch-2.0.36 linux/arch/i386/boot/setup.S
Next file: linux/arch/i386/boot/tools/build.c
Previous file: linux/arch/i386/boot/compressed/misc.c
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Sun Nov 15 10:32:45 1998
- Orig file:
v2.0.35/linux/arch/i386/boot/setup.S
- Orig date:
Sat Mar 30 10:58:57 1996
diff -u --recursive --new-file v2.0.35/linux/arch/i386/boot/setup.S linux/arch/i386/boot/setup.S
@@ -232,6 +232,29 @@
loader_ok:
! Get memory size (extended mem, kB)
+#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
+
+ and ebx, #0xffff ! clear sign extend
+ shl ebx, 6 ! and go from 64k to 1k chunks
+ mov [0x1e0],ebx ! store extended memory size
+
+ 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.
+
+oldstylemem:
+ pop ebx
+#endif
mov ah,#0x88
int 0x15
mov [2],ax
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov