summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
index 324e85d6b5..bd2c9f841b 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
@@ -627,13 +627,13 @@ BSPHandler (
*mSmmMpSyncData->InsideSmm = FALSE;
ReleaseAllAPs ();
- //
- // Wait for all APs to complete their pending tasks
- //
- SmmCpuSyncWaitForAPs (mSmmMpSyncData->SyncContext, ApCount, CpuIndex);
-
if (SmmCpuFeaturesNeedConfigureMtrrs ()) {
//
+ // Wait for all APs the readiness to program MTRRs
+ //
+ SmmCpuSyncWaitForAPs (mSmmMpSyncData->SyncContext, ApCount, CpuIndex);
+
+ //
// Signal APs to restore MTRRs
//
ReleaseAllAPs ();
@@ -643,13 +643,13 @@ BSPHandler (
//
SmmCpuFeaturesReenableSmrr ();
MtrrSetAllMtrrs (&Mtrrs);
-
- //
- // Wait for all APs to complete MTRR programming
- //
- SmmCpuSyncWaitForAPs (mSmmMpSyncData->SyncContext, ApCount, CpuIndex);
}
+ //
+ // Wait for all APs to complete their pending tasks including MTRR programming if needed.
+ //
+ SmmCpuSyncWaitForAPs (mSmmMpSyncData->SyncContext, ApCount, CpuIndex);
+
if (mSmmDebugAgentSupport) {
//
// Stop source level debug in BSP handler, the code below will not be