/* If a timeout is specified in StartupAllAps(), a timer is set, which invokes this procedure periodically to check whether all APs have finished. */
STATIC VOID EFIAPI CheckAllAPsStatus(IN EFI_EVENT Event, IN VOID *Context)
/* If a timeout is specified in StartupAllAps(), a timer is set, which invokes this procedure periodically to check whether all APs have finished. */
STATIC VOID EFIAPI CheckAllAPsStatus(IN EFI_EVENT Event, IN VOID *Context)
{
  EFI_STATUS  Status;
  UINTN       Index;
  mCpuMpData.AllTimeTaken += POLL_INTERVAL_US;
  for (Index = 0; Index < mCpuMpData.NumberOfProcessors; Index++) {
    UpdateApStatus (Index);
  }
  if (mCpuMpData.AllTimeoutActive && (mCpuMpData.AllTimeTaken > mCpuMpData.AllTimeout)) {
    ProcessStartupAllAPsTimeout ();
    mCpuMpData.FinishCount = mCpuMpData.StartCount;
  }
  if (mCpuMpData.FinishCount != mCpuMpData.StartCount) {
    return;
  }
  gBS->SetTimer (
         mCpuMpData.CheckAllAPsEvent,
         TimerCancel,
         0
         );
  if (mCpuMpData.FailedListIndex == 0) {
    if (mCpuMpData.FailedList != NULL) {
    }
  }
  Status = gBS->SignalEvent (mCpuMpData.AllWaitEvent);
  ASSERT_EFI_ERROR (Status);
  mCpuMpData.AllWaitEvent = NULL;
}