/* DXE Core will disable interrupts and turn off the timer and disable interrupts after all the event handlers have run. */
STATIC VOID EFIAPI GicV2ExitBootServicesEvent(IN EFI_EVENT Event, IN VOID *Context)
/* DXE Core will disable interrupts and turn off the timer and disable interrupts after all the event handlers have run. */
STATIC VOID EFIAPI GicV2ExitBootServicesEvent(IN EFI_EVENT Event, IN VOID *Context)
{
  UINTN  Index;
  UINTN  GicInterrupt;
  for (Index = 0; Index < mGicNumInterrupts; Index++) {
    GicV2DisableInterruptSource (&gHardwareInterruptV2Protocol, Index);
  }
  do {
    GicInterrupt = ArmGicV2AcknowledgeInterrupt (mGicInterruptInterfaceBase);
    if ((GicInterrupt & ARM_GIC_ICCIAR_ACKINTID) < mGicNumInterrupts) {
      GicV2EndOfInterrupt (&gHardwareInterruptV2Protocol, GicInterrupt);
    }
  } while (!ARM_GIC_IS_SPECIAL_INTERRUPTS (GicInterrupt));
  ArmGicV2DisableInterruptInterface (mGicInterruptInterfaceBase);
  ArmGicDisableDistributor (mGicDistributorBase);
}