Page 1 of 1
IDT/GDT
Posted: Mon Aug 26, 2002 10:22 am
by Whatever5k
Do I have to build up a GDT and a IDT, even when I'm already in Protected Mode (i.e. GRUB loaded my kernel)?
In fact, what is the GDT and the IDT? What for do I need them?
Re:IDT/GDT
Posted: Mon Aug 26, 2002 3:55 pm
by PlayOS
As long as you find out where GRUB has put the GDT and make certain you do not overwrite it then you should be OK.
Protected Mode cannot function if a valid GDT does not exist (IDT is optional, but will be needed eventually) because the GDT (Global Descriptor Table) is the center of all memory management, you must know something about selectors to access memory in Protected Mode and the GDT is where these selectors are kept, there is also an LDT (Local Descriptor Table) that you can use but it is not needed, below are some places to find more info. Search through this FAQ also as there is an enormous amount of excellent help buried in here about the GDT, IDT and other stuff you will encounter.
Good Luck!
http://osdev.neopages.net/tutorials/pm.php
http://my.execpc.com/~geezer/os/
Re:IDT/GDT
Posted: Tue Aug 27, 2002 7:30 am
by Whatever5k
Uhm, I've looked around nevertheless and found this answer:
The Multiboot standard only builds up a GDT temporarily, so I have to build a GDT myself...