Page 1 of 1

Writing Multi-Segment Kernel

Posted: Sun May 30, 2010 11:46 am
by skada
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 ?

Re: Writing Multi-Segment Kernel

Posted: Sun May 30, 2010 12:48 pm
by Combuster
If your segment base already is some value, and you want the linear address to be the same value, what should the offset be?