http://www.osdev.org/wiki/Higher_Half_bare_bones
and noticed it used 4mb pages. I know that you can have your kernel at the 3gb limit with 4k pages so I know it cannot be a requirement. I tried taking the "4mb specific" stuff out mostly
1) changing the PDE to 3 ( keeps present/rw, removes 4mb)
2) commented out the 3 lines that or cr4 with the 4mb
the shift and the rest were ok for 4k or 4mb pages ( i think ) so I did not touch those
Has anyone else modded that code to work for 4k pages or is it not possible?
Edit: forgot the debugging info!
It dies at:
Code: Select all
Next at t=10238627
(0) [0x00100280] 0008:100280 (unk. ctxt): lea ecx, dword ptr ds:0xc0100288 ; 8d0d880210c0
Code: Select all
; Start fetching instructions in kernel space.
lea ecx, [StartInHigherHalf]
jmp ecx ; NOTE: Must be absolute jump!