On 12/12/19 12:57 AM, Ni, Ray via Groups.Io wrote: > Is the 16bit code segment descriptor needed in early DXE before CpuDxe (DXE > MP)?
I don't believe it is. I did this to keep all of the CS descriptors consistent since the ones here seemed to line up with the ones in UefiCpuPkg/CpuDxe/CpuGdt.c. I can remove this change if that isn't a requirement. Thanks, Tom > >> -----Original Message----- >> From: Tom Lendacky <thomas.lenda...@amd.com> >> Sent: Thursday, November 21, 2019 4:07 AM >> To: devel@edk2.groups.io >> Cc: Justen, Jordan L <jordan.l.jus...@intel.com>; Laszlo Ersek >> <ler...@redhat.com>; Ard Biesheuvel >> <ard.biesheu...@linaro.org>; Kinney, Michael D <michael.d.kin...@intel.com>; >> Gao, Liming <liming....@intel.com>; Dong, >> Eric <eric.d...@intel.com>; Ni, Ray <ray...@intel.com>; Brijesh Singh >> <brijesh.si...@amd.com>; Wang, Jian J >> <jian.j.w...@intel.com>; Wu, Hao A <hao.a...@intel.com>; Bi, Dandan >> <dandan...@intel.com> >> Subject: [RFC PATCH v3 33/43] MdeModulePkg: Reserve a 16-bit protected mode >> code segment descriptor >> >> BZ: >> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2198&data=02%7C01%7Cthomas.lendacky%40amd.com%7C8ec88e8912cd4b99eb0f08d77ed09b2c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637117306738013792&sdata=PwSQc53mtPMUTALaRhQrcQzGI3ooPUMhcktYLi1ezfk%3D&reserved=0 >> >> SEV-ES guest AP boot support needs to transition from 64-bit long mode >> into 16-bit real mode. This will require a 16-bit code segment descriptor. >> Reserve one of the spare segment descriptors (0x28) for this purpose. >> >> Cc: Jian J Wang <jian.j.w...@intel.com> >> Cc: Hao A Wu <hao.a...@intel.com> >> Cc: Dandan Bi <dandan...@intel.com> >> Cc: Liming Gao <liming....@intel.com> >> Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> >> --- >> MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c >> b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c >> index 284b34818ca7..c9cf2e36214f 100644 >> --- a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c >> +++ b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c >> @@ -33,7 +33,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED IA32_GDT gGdtEntries[] = { >> /* 0x10 */ {{0xffff, 0, 0, 0xf, 1, 0, 1, 0xf, 0, 0, 1, 1, 0}}, >> //linear code segment descriptor >> /* 0x18 */ {{0xffff, 0, 0, 0x3, 1, 0, 1, 0xf, 0, 0, 1, 1, 0}}, >> //system data segment descriptor >> /* 0x20 */ {{0xffff, 0, 0, 0xa, 1, 0, 1, 0xf, 0, 0, 1, 1, 0}}, >> //system code segment descriptor >> -/* 0x28 */ {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, >> //spare segment descriptor >> +/* 0x28 */ {{0xffff, 0, 0, 0xa, 1, 0, 1, 0xf, 0, 0, 0, 1, 0}}, >> //system code16 segment descriptor >> /* 0x30 */ {{0xffff, 0, 0, 0x2, 1, 0, 1, 0xf, 0, 0, 1, 1, 0}}, >> //system data segment descriptor >> /* 0x38 */ {{0xffff, 0, 0, 0xa, 1, 0, 1, 0xf, 0, 1, 0, 1, 0}}, >> //system code segment descriptor >> /* 0x40 */ {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, >> //spare segment descriptor >> -- >> 2.17.1 > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52181): https://edk2.groups.io/g/devel/message/52181 Mute This Topic: https://groups.io/mt/60973140/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-