Writing Multi-Segment Kernel

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
skada
Posts: 4
Joined: Sun May 30, 2010 7:26 am

Writing Multi-Segment Kernel

Post 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 ?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Writing Multi-Segment Kernel

Post 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?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply