Page 1 of 1
Protected Mode and the GDT
Posted: Fri Jun 27, 2003 11:00 pm
by Neo
I know about the GDT, LDT and IDT and what they do but I'm unsure of their layout. Which of the three are needed when switching to Protected Mode and how are they set up (layout). Thank you in advance for your help.
-Neo
RE:Protected Mode and the GDT
Posted: Sat Jun 28, 2003 11:00 pm
by carbonBased
The GDT is, without a doubt, required. You cannot access memmory without the GDT.
The IDT is, debatebly, required. You cannot service interrutps (whether they be software or hardware) without an IDT (typically with at least 32 entries defined). If you execute "sti" without such an IDT, you'll probably triple fault. You'll also find it incredible hard to interphaze most hardware without an IDT defined.
The LDT is strictly optional. My OS doesn't currently use an LDT, nor will it ever. The LDT is, more or less, an additional GDT, but local to each process.
Cheers,
Jeff