]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
UefiCpuPkg/PiSmmCpuDxeSmm: Shouldn't use gSmst->CurrentlyExecutingCpu
[mirror_edk2.git] / UefiCpuPkg / PiSmmCpuDxeSmm / PiSmmCpuDxeSmm.c
index e210c8d44659357e02e6989021148e57842e287c..c351875262b495728b795e96883a671fa9b83518 100644 (file)
@@ -1386,7 +1386,7 @@ ConfigSmmCodeAccessCheck (
   //\r
   // Check to see if the Feature Control MSR is supported on this CPU\r
   //\r
-  Index = gSmst->CurrentlyExecutingCpu;\r
+  Index = gSmmCpuPrivate->SmmCoreEntryContext.CurrentlyExecutingCpu;\r
   if (!SmmCpuFeaturesIsSmmRegisterSupported (Index, SmmRegFeatureControl)) {\r
     mSmmCodeAccessCheckEnable = FALSE;\r
     return;\r
@@ -1428,7 +1428,7 @@ ConfigSmmCodeAccessCheck (
   // Enable SMM Code Access Check feature for the APs.\r
   //\r
   for (Index = 0; Index < gSmst->NumberOfCpus; Index++) {\r
-    if (Index != gSmst->CurrentlyExecutingCpu) {\r
+    if (Index != gSmmCpuPrivate->SmmCoreEntryContext.CurrentlyExecutingCpu) {\r
 \r
       //\r
       // Acquire Config SMM Code Access Check spin lock.  The AP will release the\r