mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/MpInitLib: Move timeout delay to WakupAp()
After sending the 1st broadcast INIT-SIPI-SIPI, BSP will collect APs count after one specified timeout delay. However, WakupAp() will restore reset vector immediately after sending 1st broadcast INIT-SIPI-SIPI. Some processors may not complete executing reset vector code. This fix is to move MicroSecondDelay() from CollectProcessorCount() to the place that is after sending 1st broadcast INIT-SIPI-SIPI and before FreeResetVector() in WakupAp(). Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@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
1219c85df4
commit
c119221060
|
@ -513,10 +513,6 @@ CollectProcessorCount (
|
||||||
CpuMpData->InitFlag = ApInitConfig;
|
CpuMpData->InitFlag = ApInitConfig;
|
||||||
CpuMpData->X2ApicEnable = FALSE;
|
CpuMpData->X2ApicEnable = FALSE;
|
||||||
WakeUpAP (CpuMpData, TRUE, 0, NULL, NULL);
|
WakeUpAP (CpuMpData, TRUE, 0, NULL, NULL);
|
||||||
//
|
|
||||||
// Wait for AP task to complete and then exit.
|
|
||||||
//
|
|
||||||
MicroSecondDelay (PcdGet32(PcdCpuApInitTimeOutInMicroSeconds));
|
|
||||||
CpuMpData->InitFlag = ApInitDone;
|
CpuMpData->InitFlag = ApInitDone;
|
||||||
ASSERT (CpuMpData->CpuCount <= PcdGet32 (PcdCpuMaxLogicalProcessorNumber));
|
ASSERT (CpuMpData->CpuCount <= PcdGet32 (PcdCpuMaxLogicalProcessorNumber));
|
||||||
//
|
//
|
||||||
|
@ -863,7 +859,12 @@ WakeUpAP (
|
||||||
//
|
//
|
||||||
SendInitSipiSipiAllExcludingSelf ((UINT32) ExchangeInfo->BufferStart);
|
SendInitSipiSipiAllExcludingSelf ((UINT32) ExchangeInfo->BufferStart);
|
||||||
}
|
}
|
||||||
if (CpuMpData->InitFlag != ApInitConfig) {
|
if (CpuMpData->InitFlag == ApInitConfig) {
|
||||||
|
//
|
||||||
|
// Wait for all potential APs waken up in one specified period
|
||||||
|
//
|
||||||
|
MicroSecondDelay (PcdGet32(PcdCpuApInitTimeOutInMicroSeconds));
|
||||||
|
} else {
|
||||||
//
|
//
|
||||||
// Wait all APs waken up if this is not the 1st broadcast of SIPI
|
// Wait all APs waken up if this is not the 1st broadcast of SIPI
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue