[Fw_Os_Forum] Why does UEFI firmware on x64 not initialize "long mode" GDT?
Brett Stahlman
brettstahlman at gmail.com
Mon Jun 6 18:14:36 EDT 2016
Just inside my 64-bit x64 EFI boot loader, I print out the contents of
the GDT to see how it was initialized by the firmware. I've tried
running the boot loader both in QEMU (OVMF) and VMware ESXi. In both
cases, the first 5 descriptors after the leading null descriptor look
like this:
0x000000000000ffff
Note all the leading zeroes: in particular, flags such as D/B and L
being clear seem to suggest a GDT that's inappropriate for 64-bit long
mode. I've verified by looking at CR* registers and such that the
firmware has indeed placed me in IA32e "long mode" with identity
paging. This is what I would expect, in light of section 2.3.4 in the
UEFI spec. But why does the GDT have all leading 0's?
Thanks,
Brett S.
More information about the Fw_os_forum
mailing list