diff options
author | Chen Fan <chen.fan.fnst@cn.fujitsu.com> | 2014-11-13 18:28:48 +0000 |
---|---|---|
committer | jljusten <jljusten@Edk2> | 2014-11-13 18:28:48 +0000 |
commit | e4aaf764281d12cb8bfe605393a5520e00715838 (patch) | |
tree | b626a7eb5525c9fa71acf44ad89203b43c354081 /UefiCpuPkg | |
parent | d16cf36d2a226cf6a527099407b6b0b70a0f9faa (diff) | |
download | edk2-e4aaf764281d12cb8bfe605393a5520e00715838.tar.gz edk2-e4aaf764281d12cb8bfe605393a5520e00715838.tar.bz2 edk2-e4aaf764281d12cb8bfe605393a5520e00715838.zip |
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
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/CpuDxe/CpuMp.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c b/UefiCpuPkg/CpuDxe/CpuMp.c index a37e45aebd..3e30d7417d 100644 --- a/UefiCpuPkg/CpuDxe/CpuMp.c +++ b/UefiCpuPkg/CpuDxe/CpuMp.c @@ -1231,6 +1231,7 @@ CheckAllAPsStatus ( {
CPU_DATA_BLOCK *CpuData;
UINTN Number;
+ EFI_STATUS Status;
if (mMpSystemData.TimeoutActive) {
mMpSystemData.Timeout -= gPollInterval;
@@ -1240,6 +1241,16 @@ CheckAllAPsStatus ( return;
}
+ //
+ // avoid next timer enter.
+ //
+ Status = gBS->SetTimer (
+ mMpSystemData.CheckAllAPsEvent,
+ TimerCancel,
+ 0
+ );
+ ASSERT_EFI_ERROR (Status);
+
if (mMpSystemData.WaitEvent != NULL) {
CheckAndUpdateAllAPsToIdleState ();
//
@@ -1254,13 +1265,15 @@ CheckAllAPsStatus ( }
if (mMpSystemData.FinishCount != mMpSystemData.StartCount) {
- return;
+ goto EXIT;
}
mMpSystemData.TimeoutActive = FALSE;
gBS->SignalEvent (mMpSystemData.WaitEvent);
mMpSystemData.WaitEvent = NULL;
mStopCheckAllAPsStatus = TRUE;
+
+ goto EXIT;
}
//
@@ -1286,6 +1299,14 @@ CheckAllAPsStatus ( CheckThisAPStatus (NULL, (VOID *)CpuData);
}
}
+
+EXIT:
+ Status = gBS->SetTimer (
+ mMpSystemData.CheckAllAPsEvent,
+ TimerPeriodic,
+ EFI_TIMER_PERIOD_MICROSECONDS (100)
+ );
+ ASSERT_EFI_ERROR (Status);
}
/**
|