Re: [edk2] Why does UEFI firmware on x64 not initialize "long mode" GDT?

2016-06-07 Thread Brett Stahlman
, Laszlo Ersek <ler...@redhat.com> wrote: > On 06/07/16 17:35, Andrew Fish wrote: >> >>> On Jun 7, 2016, at 8:31 AM, Brett Stahlman <brettstahl...@gmail.com> wrote: >>> >>> Ah. I think I may have found the answer to at least part of my >>>

Re: [edk2] Why does UEFI firmware on x64 not initialize "long mode" GDT?

2016-06-07 Thread Brett Stahlman
g the interpretation of the segment limits (e.g., L and D/B) are "don't cares" in IA32e 64-bit mode. But what about fields not directly related to limit checks: e.g., P (Present) flag, and DPL (Descriptor Privilege Level)? Do their values not matter either? Thanks, Brett S. On Tue, Jun 7, 2

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

2016-06-07 Thread Brett Stahlman
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: