diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c index 2ebf4543c3..391b64e9f2 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c @@ -1,7 +1,7 @@ /** @file Implementation of SMM CPU Services Protocol. -Copyright (c) 2011 - 2022, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -421,11 +421,18 @@ SmmCpuRendezvous ( goto ON_EXIT; } - // - // There are some APs outside SMM, Wait for all avaiable APs to arrive. - // - SmmWaitForApArrival (); - Status = mSmmMpSyncData->AllApArrivedWithException ? EFI_SUCCESS : EFI_TIMEOUT; + if ((mSmmMpSyncData->EffectiveSyncMode != SmmCpuSyncModeTradition) && !SmmCpuFeaturesNeedConfigureMtrrs ()) { + // + // There are some APs outside SMM, Wait for all avaiable APs to arrive. + // + SmmWaitForApArrival (); + Status = mSmmMpSyncData->AllApArrivedWithException ? EFI_SUCCESS : EFI_TIMEOUT; + } else { + // + // BSP has already waitted for APs to arrive SMM if SmmCpuSyncMode selected or need config MTRR. + // + Status = EFI_TIMEOUT; + } ON_EXIT: if (!mSmmMpSyncData->AllApArrivedWithException) {