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:
Jeff Fan 2016-11-14 10:30:03 +08:00
parent d67cbc6604
commit cb33bde4ac
1 changed files with 5 additions and 0 deletions

View File

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