diff options
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c index 546c94bae5..b19906b610 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c @@ -234,10 +234,9 @@ SmmWaitForApArrival ( {
UINT64 Timer;
UINTN Index;
- BOOLEAN LmceEn;
- BOOLEAN LmceSignal;
UINT32 DelayedCount;
UINT32 BlockedCount;
+ BOOLEAN SyncNeeded;
PERF_FUNCTION_BEGIN ();
@@ -246,11 +245,9 @@ SmmWaitForApArrival ( ASSERT (SmmCpuSyncGetArrivedCpuCount (mSmmMpSyncData->SyncContext) <= mNumberOfCpus);
- LmceEn = FALSE;
- LmceSignal = FALSE;
- if (mMachineCheckSupported) {
- LmceEn = IsLmceOsEnabled ();
- LmceSignal = IsLmceSignaled ();
+ SyncNeeded = IsCpuSyncAlwaysNeeded ();
+ if (!SyncNeeded) {
+ SyncNeeded = !(mMachineCheckSupported && IsLmceOsEnabled () && IsLmceSignaled ());
}
//
@@ -268,7 +265,7 @@ SmmWaitForApArrival ( // Sync with APs 1st timeout
//
for (Timer = StartSyncTimer ();
- !IsSyncTimerTimeout (Timer, mTimeoutTicker) && !(LmceEn && LmceSignal);
+ !IsSyncTimerTimeout (Timer, mTimeoutTicker) && SyncNeeded;
)
{
mSmmMpSyncData->AllApArrivedWithException = AllCpusInSmmExceptBlockedDisabled ();
|