[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
i386 start routine
I am playing with multiboot 2 support for our kernel, and I get a crash
involving stuff beyond my x86 knowledge.
The thing happens in the start routine (from
src/sys/arch/i386/i386/locore.S) at the time the kernel has been copied
to high memory and we try to jump there:
* 3. Enable paging and the rest of it.
pushl $begin /* jump to high mem */
The CR0 change cause the memory pointed by the stack pointer to be
unmapped. As a result, the pushl $begin does not push begin adddress on
the stack, and ret launches us in the twilight zone.
Why enabling protected mode and paging makes a mapping disapear?
Main Index |
Thread Index |