diff options
author | Zhiguang Liu <zhiguang.liu@intel.com> | 2024-07-23 09:49:03 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-07-24 02:47:34 +0000 |
commit | 3912aa3d32dbd8a684d78d23bb938b3dc920d300 (patch) | |
tree | 13798e6af351873fe67d3aac0f5863ba0d0d6ba3 /UefiCpuPkg/Library | |
parent | 9f06e5c7021c02afac4698adbb49d482cb606e3e (diff) | |
download | edk2-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.c | 6 |
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);
}
|