diff options
author | Yanbo Huang <yanbo.huang@intel.com> | 2024-07-05 17:54:19 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-07-05 17:55:48 +0000 |
commit | 4efcd654ecd94b91bd45da79583f114a0fa12a87 (patch) | |
tree | f79790c0afeb7491d9ec13bffc94c3c61ed153f4 | |
parent | a3359ffb25ce70ee90822f6886136bf0d200406e (diff) | |
download | edk2-4efcd654ecd94b91bd45da79583f114a0fa12a87.tar.gz |
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>
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 10 | ||||
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 11 | ||||
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 1 | ||||
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/SyncTimer.c | 19 |
4 files changed, 13 insertions, 28 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c index 570e99177f..10baf3ceb9 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c @@ -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);
)
{
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h index 8409891b1d..315a33d578 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h @@ -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
);
/**
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf index 3c4518da7b..f0598b0364 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf @@ -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
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SyncTimer.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SyncTimer.c index 8d29ba7326..0c070c5736 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SyncTimer.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SyncTimer.c @@ -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);
}
|