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>
This commit is contained in:
Zhiguang Liu 2024-07-23 09:49:03 +08:00 committed by mergify[bot]
parent 9f06e5c702
commit 3912aa3d32
1 changed files with 1 additions and 5 deletions

View File

@ -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);
}