[Fw_Os_Forum] Why does UEFI firmware on x64 not initialize "long mode" GDT?

Aaron.Pop at congatec.com Aaron.Pop at congatec.com
Mon Jun 6 18:30:04 EDT 2016

Hi Brett, 

Since this question is in relation to the EDK2's QEMU (OVMF) project, you 
might get a better answer by emailing the EDK2 development list.


From:   Brett Stahlman <brettstahlman at gmail.com>
To:     fw_os_forum at mailman.uefi.org
Date:   06/06/2016 03:14 PM
Subject:        [Fw_Os_Forum] Why does UEFI firmware on x64 not initialize 
"long   mode" GDT?
Sent by:        fw_os_forum-bounces at mailman.uefi.org

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:


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?

Brett S.
Fw_os_forum mailing list
Fw_os_forum at mailman.uefi.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mailman.uefi.org/pipermail/fw_os_forum/attachments/20160606/680ec080/attachment.html>

More information about the Fw_os_forum mailing list