third_party/edk2/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
/**
  Checks APs status and updates APs status if needed.

**/
Checks APs status and updates APs status if needed.
Checks APs status and updates APs status if needed .
VOID
CheckAndUpdateApsStatus (
  VOID
  )
{
  UINTN                   ProcessorNumber;
  EFI_STATUS              Status;
  CPU_MP_DATA             *CpuMpData;
  CpuMpData = GetCpuMpData ();
  if (CpuMpData->WaitEvent != NULL) {
    Status = CheckAllAPs ();
    if (Status != EFI_NOT_READY) {
      Status = gBS->SignalEvent (CpuMpData->WaitEvent);
      CpuMpData->WaitEvent = NULL;
    }
  }
  for (ProcessorNumber = 0; ProcessorNumber < CpuMpData->CpuCount; ProcessorNumber++) {
    if (CpuMpData->CpuData[ProcessorNumber].WaitEvent == NULL) {
      continue;
    }
    Status = CheckThisAP (ProcessorNumber);
    if (Status != EFI_NOT_READY) {
      gBS->SignalEvent (CpuMpData->CpuData[ProcessorNumber].WaitEvent);
     CpuMpData->CpuData[ProcessorNumber].WaitEvent = NULL;
    }
  }
}
VOID CheckAndUpdateApsStatus ( VOID ) { UINTN ProcessorNumber ; EFI_STATUS Status ; CPU_MP_DATA * CpuMpData ; CpuMpData = GetCpuMpData ( ) ; if ( CpuMpData -> WaitEvent != NULL ) { Status = CheckAllAPs ( ) ; if ( Status != EFI_NOT_READY ) { Status = gBS -> SignalEvent ( CpuMpData -> WaitEvent ) ; CpuMpData -> WaitEvent = NULL ; } } for ( ProcessorNumber = 0 ; ProcessorNumber < CpuMpData -> CpuCount ; ProcessorNumber ++ ) { if ( CpuMpData -> CpuData [ ProcessorNumber ] . WaitEvent == NULL ) { continue ; } Status = CheckThisAP ( ProcessorNumber ) ; if ( Status != EFI_NOT_READY ) { gBS -> SignalEvent ( CpuMpData -> CpuData [ ProcessorNumber ] . WaitEvent ) ; CpuMpData -> CpuData [ ProcessorNumber ] . WaitEvent = NULL ; } } }
Checks APs status and updates APs status if needed.
Checks APs status and updates APs status if needed .
//
 // First, check whether pending StartupAllAPs() exists.
 //
 //
 // If all APs finish for StartupAllAPs(), signal the WaitEvent for it.
 //
 //
 // Second, check whether pending StartupThisAPs() callings exist.
 //
