mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/MpService: avoid next timer getting into CheckAllAPsStatus()
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16364 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d16cf36d2a
commit
e4aaf76428
|
@ -1231,6 +1231,7 @@ CheckAllAPsStatus (
|
||||||
{
|
{
|
||||||
CPU_DATA_BLOCK *CpuData;
|
CPU_DATA_BLOCK *CpuData;
|
||||||
UINTN Number;
|
UINTN Number;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
if (mMpSystemData.TimeoutActive) {
|
if (mMpSystemData.TimeoutActive) {
|
||||||
mMpSystemData.Timeout -= gPollInterval;
|
mMpSystemData.Timeout -= gPollInterval;
|
||||||
|
@ -1240,6 +1241,16 @@ CheckAllAPsStatus (
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// avoid next timer enter.
|
||||||
|
//
|
||||||
|
Status = gBS->SetTimer (
|
||||||
|
mMpSystemData.CheckAllAPsEvent,
|
||||||
|
TimerCancel,
|
||||||
|
0
|
||||||
|
);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
if (mMpSystemData.WaitEvent != NULL) {
|
if (mMpSystemData.WaitEvent != NULL) {
|
||||||
CheckAndUpdateAllAPsToIdleState ();
|
CheckAndUpdateAllAPsToIdleState ();
|
||||||
//
|
//
|
||||||
|
@ -1254,13 +1265,15 @@ CheckAllAPsStatus (
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mMpSystemData.FinishCount != mMpSystemData.StartCount) {
|
if (mMpSystemData.FinishCount != mMpSystemData.StartCount) {
|
||||||
return;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
mMpSystemData.TimeoutActive = FALSE;
|
mMpSystemData.TimeoutActive = FALSE;
|
||||||
gBS->SignalEvent (mMpSystemData.WaitEvent);
|
gBS->SignalEvent (mMpSystemData.WaitEvent);
|
||||||
mMpSystemData.WaitEvent = NULL;
|
mMpSystemData.WaitEvent = NULL;
|
||||||
mStopCheckAllAPsStatus = TRUE;
|
mStopCheckAllAPsStatus = TRUE;
|
||||||
|
|
||||||
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1286,6 +1299,14 @@ CheckAllAPsStatus (
|
||||||
CheckThisAPStatus (NULL, (VOID *)CpuData);
|
CheckThisAPStatus (NULL, (VOID *)CpuData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EXIT:
|
||||||
|
Status = gBS->SetTimer (
|
||||||
|
mMpSystemData.CheckAllAPsEvent,
|
||||||
|
TimerPeriodic,
|
||||||
|
EFI_TIMER_PERIOD_MICROSECONDS (100)
|
||||||
|
);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue