Exemplo n.º 1
0
VOID
DisableInterruptSource (
  VOID
  )
{
  UINTN Bank;
  UINTN Bit;

  Bank = gVector / 32;
  Bit  = 1UL << (gVector % 32);

  MmioWrite32 (INTCPS_MIR_SET(Bank), Bit);
}
Exemplo n.º 2
0
/**
  Disable interrupt source Source.

  @param This     Instance pointer for this protocol
  @param Source   Hardware source of the interrupt

  @retval EFI_SUCCESS       Source interrupt disabled.
  @retval EFI_DEVICE_ERROR  Hardware could not be programmed.

**/
EFI_STATUS
EFIAPI
DisableInterruptSource (
  IN EFI_HARDWARE_INTERRUPT_PROTOCOL    *This,
  IN HARDWARE_INTERRUPT_SOURCE          Source
  )
{
  UINTN Bank;
  UINTN Bit;
  
  if (Source > MAX_VECTOR) {
    ASSERT(FALSE);
    return EFI_UNSUPPORTED;
  }
  
  Bank = Source / 32;
  Bit  = 1UL << (Source % 32);
  
  MmioWrite32 (INTCPS_MIR_SET(Bank), Bit);
  
  return EFI_SUCCESS;
}