Writing Multi-Segment Kernel
Posted: Sun May 30, 2010 11:46 am
Hello,
Instead of fixing gdt entries at 0 & 4GB... if I segment such that my kernel mode code starts at 1FFFF and end at FFFFF and data above that, when I flush gdt with new entries, my eip will jump by 1FFFF. And there is no code there! .. how should I compile my kernel so that all the code after long jmp is written @ 1FFFF ?
Instead of fixing gdt entries at 0 & 4GB... if I segment such that my kernel mode code starts at 1FFFF and end at FFFFF and data above that, when I flush gdt with new entries, my eip will jump by 1FFFF. And there is no code there! .. how should I compile my kernel so that all the code after long jmp is written @ 1FFFF ?