Page 1 of 1

A few questions on GDT LDT IDT

Posted: Wed Nov 12, 2008 7:16 am
by miyano2005
Hello guys,
I am a newbie in OSdev. I have read about the GDT,LDT,IDT and other things like this.
What I am not certain about is whether the base address of ,say the GDT, you load into GDTR register is a linear address (virtual address) or a physical address?
If it is a linear address(virtual address), does that imply we have to have enabled and set up all the relevant registers in the paging unit before this base address value is loaded?
Thanks.

Re: A few questions on GDT LDT IDT

Posted: Wed Nov 12, 2008 7:35 am
by osmosys
The values of GDTR, IDTR are the actual physical address. This physical address values get loaded into segment selectors.

Re: A few questions on GDT LDT IDT

Posted: Wed Nov 12, 2008 7:37 am
by CodeCat
Descriptor tables contain linear addresses only. The address translation process goes as follows:

selector -> GDT entry + offset -> linear address -> page directory + page table + page offset -> physical address
interrupt vector -> IDT entry -> linear address -> page directory + page table + page offset -> physical address

A segment can't be more than 4GB, while you can access more than 4GB using PAE page tables. So the reverse would make no sense.