]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
UefiCpuPkg/CommonFeature: Skip locking when the feature is disabled
[mirror_edk2.git] / UefiCpuPkg / PiSmmCpuDxeSmm / PiSmmCpuDxeSmm.c
index fbf74e8d90f953cea4cd69da3bccadd1c6dcc609..19979d5418e85dabac919c3268136b4de975b70d 100644 (file)
@@ -237,6 +237,11 @@ SmmReadSaveState (
   if ((CpuIndex >= gSmst->NumberOfCpus) || (Buffer == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
+  //\r
+  // The AsmLfence() call here is to ensure the above check for the CpuIndex\r
+  // has been completed before the execution of subsequent codes.\r
+  //\r
+  AsmLfence ();\r
 \r
   //\r
   // Check for special EFI_SMM_SAVE_STATE_REGISTER_PROCESSOR_ID\r