mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/MpInitLib: Force sending INIT-SIPI-SIPI to reset APs
If BSP found APs timeout happened when AP executing AP task, BSP will reset APs by WakeUpAP(). However, if ApLoopMode is ApMwaitLoop or ApRunLoop, WakeUpAp() will try to write semaphore in memory to wake up AP. It cannot wake up APs actually if APs still executing AP task. This fix is to set ApInitReconfig flag to force BSP to send INIT-SIPI-SIPI to wake up APs. Cc: Feng Tian <feng.tian@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
This commit is contained in:
parent
d67cbc6604
commit
cb33bde4ac
|
@ -899,7 +899,12 @@ ResetProcessorToIdleState (
|
||||||
|
|
||||||
CpuMpData = GetCpuMpData ();
|
CpuMpData = GetCpuMpData ();
|
||||||
|
|
||||||
|
CpuMpData->InitFlag = ApInitReconfig;
|
||||||
WakeUpAP (CpuMpData, FALSE, ProcessorNumber, NULL, NULL);
|
WakeUpAP (CpuMpData, FALSE, ProcessorNumber, NULL, NULL);
|
||||||
|
while (CpuMpData->FinishedCount < 1) {
|
||||||
|
CpuPause ();
|
||||||
|
}
|
||||||
|
CpuMpData->InitFlag = ApInitDone;
|
||||||
|
|
||||||
SetApState (&CpuMpData->CpuData[ProcessorNumber], CpuStateIdle);
|
SetApState (&CpuMpData->CpuData[ProcessorNumber], CpuStateIdle);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue