strange stuff in arch/i386/kernel/head.S

Cyrille Chepelov (chepelov@rip.ens-cachan.fr)
Mon, 9 Nov 1998 23:06:14 +0100 (MET)


I finally found a buffer to bring a little kb of data (currently 104
bytes, actually) from real to protected mode -- the area at (PARAM + 2048
+ 256).

I did loose a lot of time, however, because of this snippet in head.S :

/*
* Copy bootup parameters out of the way. First 2kB of
* _empty_zero_page is for boot parameters, second 2kB
* is for the command line.
*/
movl $0x90000,%esi
movl $ SYMBOL_NAME(empty_zero_page),%edi
movl $512,%ecx
cld
rep
movsl
xorl %eax,%eax
movl $512,%ecx
rep
stosl
cmpw $(CL_MAGIC),CL_MAGIC_ADDR
jne 1f
movl $ SYMBOL_NAME(empty_zero_page)+2048,%edi
movzwl CL_OFFSET,%esi
addl $(CL_BASE_ADDR),%esi
movl $2048,%ecx
rep
movsb
1:

If the kernel only uses the first 256 bytes of the command line, why do
the {boot|kernel}/setup.[Sc] claim 2K for it ?
What is the CL_MAGIC stuff supposed to do ?
I replaced the code above with simply :
movl $0x90000,%esi
movl $ SYMBOL_NAME(empty_zero_page),%edi
movl $1024,%ecx
cld
rep
movsl
Now I have both my command line parsed *and* the int15/E820 memory map
visible in kernel mode. I must have missed something, but what ?

(I also have to understand why my ASUS TX97-XE, which is claimed to be
ACPI compliant, reports no AddressRangeACPI, has no "RSD PTR " table in
the first meg, has no FACP nowhere. I just looove this.)

-- Cyrille

------------------------------
Je me demande pourquoi les gens me regardent comme ēa, dans le RER...
les cheveux bleus, sūrement !

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/