Trivial Change (E820map) : arch/i386/boot/setup.S
Hi,
After reading the e820 method from Ralf Brown's interrupt list(
http://www.ctyme.com/intr/rb-1741.htm)
it seems that the es register wont get thrashed. So there is no need to repatedly execute (for getting each map entry) the following two lines inside jmpe820: of seutp.S and thus can be moved out as below. Is there any reason to do it inside?
pushw %ds
popw %es
jmpe820:
movl $0x0000e820, %eax # e820, upper word zeroed
movl $SMAP, %edx # ascii 'SMAP'
movl $20, %ecx # size of the e820rec
# pushw %ds # data record.
# popw %esDiff
-------
===== setup.S 1.22 vs edited =====
318a319,320
Quoted 2 lines
pushw %ds
popw %es
324,325c326,327
< pushw %ds # data record. < popw %es
---
Quoted 2 lines
# pushw %ds # data record.
# popw %es
1156d1157
<
Tested in my i386 machine and here is the relevant portion of dmesg after boot.
Quoted 5 lines
Linux version 2.6.0-test1 (root@feynman) (gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)) #14 Thu Jul 17 01:05:15 SGT 2003 Video mode to be used for restore is f00
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 -000000000009f800(usable)
BIOS-e820:000000000009f800-00000000000a0000(reserved)
Quoted 8 lines
BIOS-e820:
00000000000e0000- 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 -0000000017ff0000(usable)
BIOS-e820:0000000017ff0000-0000000017ffec00(ACPI data)
BIOS-e820:0000000017ffec00- 0000000018000000 (ACPI NVS)
BIOS-e820:00000000fff80000- 0000000100000000 (reserved)
0MB HIGHMEM available.
383MB LOWMEM available.
On node 0 totalpages: 98288
Regards,
-Romit
Quoted 7 lines · Romit Dasgupta
Hi,
After reading the e820 method from Ralf Brown's interrupt list(http://www.ctyme.com/intr/rb-1741.htm)
it seems that the es register wont get thrashed. So there is no need to repatedly execute (for getting each map entry) the following two lines inside jmpe820: ofseutp.Sand thus can be moved out as below. Is there any reason to do it inside?
Yes - BIOSes and the specification are only distant relatives. We get all sorts of fun from them - 0 sized regions, system ROM reported as RAM, E801 returns in the wrong registers and so on