Page 1 of 1

intel IA32e 64 bit mode confusion

Posted: Tue Jun 05, 2007 3:14 pm
by Zacariaz
Well, lets take it from the start.

Before entering, what intel call, IA32e 64 bit mode, one must first enter protected mode. So far so good. In order to do that one must set some descriptors and stuff, change a bit, and then we are in protected mode, and now the comfusion starts, bacause the intel manual states that: "in 64 bit mode segmentation is generally (but not completely) disabled" What does the middle part really mean? Further more in 64 bit mode discriptors is expanded to 80 bit, and wont that cause trouble as the previously loaded discriptors is 48 bit? Is paging really disabled? do you have to use pages? etc.
I have many more questions, but i guess the real question is if somebody know a guide/tutorial or simple sourcecode avalible.

Maybe i just have no idea what im talking about, but ill hope for an answer.

Thanks

Posted: Tue Jun 05, 2007 3:50 pm
by Combuster
for long mode, limit checking is disabled, and the base is used only for FS and GS.

When loading the gdt (or idt), the bits that are not specified are filled in with zeroes by the processor, so that when lgdt is issued from real/protected mode the top 32 bits of the base are zeroed out.

Re: intel IA32e 64 bit mode confusion

Posted: Thu Jun 07, 2007 5:23 am
by bluecode
Zacariaz wrote:Further more in 64 bit mode discriptors is expanded to 80 bit, and wont that cause trouble as the previously loaded discriptors is 48 bit?
The GDT descriptors are still 8byte, but most of the information is ignored (look in the intel/amd manual, there is a nice colourfull diagramm). But the IDT descriptors are 18Byte wide and look quite different. The base address of fs/gs is not taken from the descriptor but from some weired MSR.
Is paging really disabled? do you have to use pages?
yes, paging must be enabled, otherwise your not in long mode.