Revert "UefiCpuPkg/PiSmmCpuDxeSmm: Consume PcdCpuSmmApSyncTimeout2"

This reverts commit cb3134612d11102fe066c94c8fa7edb20d62c1a8.
Intel server platform sync this commit will hit conflict since our code base is old.
We don't want to cherry-pick the dependent patches to avoid potential issue.
We need to revert this commit first and then fix the conflict and reapply the change.
Sorry for the incovenience.

Signed-off-by: Yanbo Huang <yanbo.huang@intel.com>
This commit is contained in:
Yanbo Huang 2024-07-05 17:54:19 +08:00 committed by mergify[bot]
parent a3359ffb25
commit 4efcd654ec
4 changed files with 13 additions and 28 deletions

View File

@ -1,7 +1,7 @@
/** @file
SMM MP service implementation
Copyright (c) 2009 - 2024, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2023, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@ -268,7 +268,7 @@ SmmWaitForApArrival (
// Sync with APs 1st timeout
//
for (Timer = StartSyncTimer ();
!IsSyncTimerTimeout (Timer, mTimeoutTicker) && !(LmceEn && LmceSignal);
!IsSyncTimerTimeout (Timer) && !(LmceEn && LmceSignal);
)
{
mSmmMpSyncData->AllApArrivedWithException = AllCpusInSmmExceptBlockedDisabled ();
@ -309,7 +309,7 @@ SmmWaitForApArrival (
// Sync with APs 2nd timeout.
//
for (Timer = StartSyncTimer ();
!IsSyncTimerTimeout (Timer, mTimeoutTicker2);
!IsSyncTimerTimeout (Timer);
)
{
mSmmMpSyncData->AllApArrivedWithException = AllCpusInSmmExceptBlockedDisabled ();
@ -736,7 +736,7 @@ APHandler (
// Timeout BSP
//
for (Timer = StartSyncTimer ();
!IsSyncTimerTimeout (Timer, mTimeoutTicker) &&
!IsSyncTimerTimeout (Timer) &&
!(*mSmmMpSyncData->InsideSmm);
)
{
@ -764,7 +764,7 @@ APHandler (
// Now clock BSP for the 2nd time
//
for (Timer = StartSyncTimer ();
!IsSyncTimerTimeout (Timer, mTimeoutTicker2) &&
!IsSyncTimerTimeout (Timer) &&
!(*mSmmMpSyncData->InsideSmm);
)
{

View File

@ -471,9 +471,6 @@ extern BOOLEAN mSmmDebugAgentSupport;
//
extern UINT64 mAddressEncMask;
extern UINT64 mTimeoutTicker;
extern UINT64 mTimeoutTicker2;
/**
Create 4G PageTable in SMRAM.
@ -536,17 +533,15 @@ StartSyncTimer (
);
/**
Check if the SMM AP Sync Timer is timeout specified by Timeout.
Check if the SMM AP Sync timer is timeout.
@param Timer The start timer from the begin.
@param Timeout The timeout ticker to wait.
@param Timer The start timer from the begin.
**/
BOOLEAN
EFIAPI
IsSyncTimerTimeout (
IN UINT64 Timer,
IN UINT64 Timeout
IN UINT64 Timer
);
/**

View File

@ -134,7 +134,6 @@
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmProfileSize ## SOMETIMES_CONSUMES
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize ## CONSUMES
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmApSyncTimeout ## CONSUMES
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmApSyncTimeout2 ## CONSUMES
gUefiCpuPkgTokenSpaceGuid.PcdCpuHotPlugDataAddress ## SOMETIMES_PRODUCES
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmCodeAccessCheckEnable ## CONSUMES
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmSyncMode ## CONSUMES

View File

@ -1,7 +1,7 @@
/** @file
SMM Timer feature support
Copyright (c) 2009 - 2024, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -9,9 +9,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include "PiSmmCpuDxeSmm.h"
UINT64 mTimeoutTicker = 0;
UINT64 mTimeoutTicker2 = 0;
//
// Number of counts in a roll-over cycle of the performance counter.
//
@ -39,10 +36,6 @@ InitializeSmmTimer (
MultU64x64 (TimerFrequency, PcdGet64 (PcdCpuSmmApSyncTimeout)),
1000 * 1000
);
mTimeoutTicker2 = DivU64x32 (
MultU64x64 (TimerFrequency, PcdGet64 (PcdCpuSmmApSyncTimeout2)),
1000 * 1000
);
if (End < Start) {
mCountDown = TRUE;
mCycle = Start - End;
@ -66,17 +59,15 @@ StartSyncTimer (
}
/**
Check if the SMM AP Sync Timer is timeout specified by Timeout.
Check if the SMM AP Sync timer is timeout.
@param Timer The start timer from the begin.
@param Timeout The timeout ticker to wait.
@param Timer The start timer from the begin.
**/
BOOLEAN
EFIAPI
IsSyncTimerTimeout (
IN UINT64 Timer,
IN UINT64 Timeout
IN UINT64 Timer
)
{
UINT64 CurrentTimer;
@ -114,5 +105,5 @@ IsSyncTimerTimeout (
}
}
return (BOOLEAN)(Delta >= Timeout);
return (BOOLEAN)(Delta >= mTimeoutTicker);
}