On March 3, 2022 11:12 AM, Wang Jian wrote: > > Hi Min, > > I think the PCD should not be dynamic. Dynamic PCD is used for those > features which can be changed at boot time. But, for Intel processor, it > should always stay as FALSE. So there's no need to make it dynamic. > FixedAtBuild should be fine. > I realize this PCD is not necessary. According to [TDX] Sec 10.1.5, IA32_EFER.NXE is initialized to 1. So in the function EnableExecuteDisableBit @ MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c, we can check if BIT11 is set before calling AsmWriteMsr64. It looks like: VOID EnableExecuteDisableBit ( VOID ) { UINT64 MsrRegisters;
MsrRegisters = AsmReadMsr64 (0xC0000080); if ((MsrRegisters & BIT11) == 0) { MsrRegisters |= BIT11; AsmWriteMsr64 (0xC0000080, MsrRegisters); } } [TDX] https://www.intel.com/content/dam/develop/external/us/en/documents/tdx-module-1.0-public-spec-v0.931.pdf Thanks Min -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#87270): https://edk2.groups.io/g/devel/message/87270 Mute This Topic: https://groups.io/mt/89446174/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-