Revision: 16364
http://sourceforge.net/p/edk2/code/16364
Author: jljusten
Date: 2014-11-13 18:28:48 +0000 (Thu, 13 Nov 2014)
Log Message:
-----------
UefiCpuPkg/MpService: avoid next timer getting into CheckAllAPsStatus()
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <[email protected]>
Reviewed-by: Jeff Fan <[email protected]>
Modified Paths:
--------------
trunk/edk2/UefiCpuPkg/CpuDxe/CpuMp.c
Modified: trunk/edk2/UefiCpuPkg/CpuDxe/CpuMp.c
===================================================================
--- trunk/edk2/UefiCpuPkg/CpuDxe/CpuMp.c 2014-11-13 18:28:33 UTC (rev
16363)
+++ trunk/edk2/UefiCpuPkg/CpuDxe/CpuMp.c 2014-11-13 18:28:48 UTC (rev
16364)
@@ -1231,6 +1231,7 @@
{
CPU_DATA_BLOCK *CpuData;
UINTN Number;
+ EFI_STATUS Status;
if (mMpSystemData.TimeoutActive) {
mMpSystemData.Timeout -= gPollInterval;
@@ -1240,6 +1241,16 @@
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 @@
}
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 @@
CheckThisAPStatus (NULL, (VOID *)CpuData);
}
}
+
+EXIT:
+ Status = gBS->SetTimer (
+ mMpSystemData.CheckAllAPsEvent,
+ TimerPeriodic,
+ EFI_TIMER_PERIOD_MICROSECONDS (100)
+ );
+ ASSERT_EFI_ERROR (Status);
}
/**
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits