X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=UefiCpuPkg%2FPiSmmCpuDxeSmm%2FSmmProfile.c;h=b4fe0bc23b6cb6f9d0b0a53050d5255700366456;hp=c90167f160608fa79bafd663cfb90909181f8052;hb=3c5ce64f23c437e671259385d0ea2fdcf3a44aef;hpb=890d9ee554b793633114a00971aeafba9e35b04f diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c index c90167f160..b4fe0bc23b 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c @@ -31,6 +31,11 @@ UINTN mSmmProfileSize; // UINTN mMsrDsAreaSize = SMM_PROFILE_DTS_SIZE; +// +// The flag indicates if execute-disable is supported by processor. +// +BOOLEAN mXdSupported = TRUE; + // // The flag indicates if execute-disable is enabled on processor. // @@ -1010,6 +1015,7 @@ CheckFeatureSupported ( // Extended CPUID functions are not supported on this processor. // mXdSupported = FALSE; + PatchInstructionX86 (gPatchXdSupported, mXdSupported, 1); } AsmCpuid (CPUID_EXTENDED_CPU_SIG, NULL, NULL, NULL, &RegEdx); @@ -1018,6 +1024,7 @@ CheckFeatureSupported ( // Execute Disable Bit feature is not supported on this processor. // mXdSupported = FALSE; + PatchInstructionX86 (gPatchXdSupported, mXdSupported, 1); } }