IDT/GDT

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
Whatever5k

IDT/GDT

Post 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?
PlayOS

Re:IDT/GDT

Post 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! 8)

http://osdev.neopages.net/tutorials/pm.php
http://my.execpc.com/~geezer/os/
Whatever5k

Re:IDT/GDT

Post 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...
Post Reply