summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Library
diff options
context:
space:
mode:
authorZhiguang Liu <zhiguang.liu@intel.com>2024-07-23 09:49:03 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-07-24 02:47:34 +0000
commit3912aa3d32dbd8a684d78d23bb938b3dc920d300 (patch)
tree13798e6af351873fe67d3aac0f5863ba0d0d6ba3 /UefiCpuPkg/Library
parent9f06e5c7021c02afac4698adbb49d482cb606e3e (diff)
downloadedk2-3912aa3d32dbd8a684d78d23bb938b3dc920d300.tar.gz
edk2-3912aa3d32dbd8a684d78d23bb938b3dc920d300.tar.bz2
edk2-3912aa3d32dbd8a684d78d23bb938b3dc920d300.zip
UefiCpuPkg: Combine the code to set ApInitDone
In previoud commit, we remove the ApInitReconfig status. Now there are only two status ApInitConfig and ApInitDone. Only the very first waking up AP needs to set ApInitConfig status. Therefore, if this is not the first wake up, set ApInitDone status Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Diffstat (limited to 'UefiCpuPkg/Library')
-rw-r--r--UefiCpuPkg/Library/MpInitLib/MpLib.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index 8b2bacb65e..7eee646312 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
@@ -2237,6 +2237,7 @@ MpInitLibInitialize (
// APs have been wakeup before, just get the CPU Information
// from HOB
//
+ CpuMpData->InitFlag = ApInitDone;
if (CpuMpData->UseSevEsAPMethod) {
AmdSevUpdateCpuMpData (CpuMpData);
}
@@ -2280,7 +2281,6 @@ MpInitLibInitialize (
ASSERT (CpuMpData->ApLoopMode != ApInHltLoop);
CpuMpData->FinishedCount = 0;
- CpuMpData->InitFlag = ApInitDone;
CpuMpData->EnableExecuteDisableForSwitchContext = IsBspExecuteDisableEnabled ();
SaveCpuMpData (CpuMpData);
//
@@ -2355,10 +2355,6 @@ MpInitLibInitialize (
CpuPause ();
}
- if (FirstMpHandOff != NULL) {
- CpuMpData->InitFlag = ApInitDone;
- }
-
for (Index = 0; Index < CpuMpData->CpuCount; Index++) {
SetApState (&CpuMpData->CpuData[Index], CpuStateIdle);
}