linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Trivial Change (E820map) : arch/i386/boot/setup.S
@ 2003-07-16 17:33 Romit Dasgupta
  2003-07-16 18:18 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Romit Dasgupta @ 2003-07-16 17:33 UTC (permalink / raw)
  To: linux-kernel

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    %es


Diff
-------

===== setup.S 1.22 vs edited =====
318a319,320
 >       pushw   %ds
 >       popw    %es
324,325c326,327
<       pushw   %ds                             # data record.
<       popw    %es
---
 > #       pushw %ds                             # data record.
 > #       popw  %es
1156d1157
<


Tested in my i386 machine and here is the relevant portion of dmesg 
after boot.

> 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)
>  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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Trivial Change (E820map) : arch/i386/boot/setup.S
  2003-07-16 17:33 Trivial Change (E820map) : arch/i386/boot/setup.S Romit Dasgupta
@ 2003-07-16 18:18 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2003-07-16 18:18 UTC (permalink / raw)
  To: Romit Dasgupta; +Cc: Linux Kernel Mailing List

On Mer, 2003-07-16 at 18:33, Romit Dasgupta wrote:
> 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?

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-16 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-16 17:33 Trivial Change (E820map) : arch/i386/boot/setup.S Romit Dasgupta
2003-07-16 18:18 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).