ArmPkg/Drivers/ArmGic: Introduced ArmGicEndOfInterrupt()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15618 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Olivier Martin 2014-07-04 11:11:53 +00:00 committed by oliviermartin
parent e1f2dfec34
commit d80401a16f
4 changed files with 20 additions and 3 deletions

View File

@ -55,7 +55,7 @@ ArmGicAcknowledgeInterrupt (
// Check if it is a valid interrupt ID
if ((Interrupt & 0x3FF) < ArmGicGetMaxNumInterrupts (GicDistributorBase)) {
// Got a valid SGI number hence signal End of Interrupt by writing to ICCEOIR
MmioWrite32 (GicInterruptInterfaceBase + ARM_GIC_ICCEIOR, Interrupt);
ArmGicEndOfInterrupt (GicInterruptInterfaceBase, Interrupt);
if (CoreId) {
*CoreId = (Interrupt >> 10) & 0x7;
@ -68,3 +68,13 @@ ArmGicAcknowledgeInterrupt (
return RETURN_INVALID_PARAMETER;
}
}
VOID
EFIAPI
ArmGicEndOfInterrupt (
IN UINTN GicInterruptInterfaceBase,
IN UINTN Source
)
{
MmioWrite32 (GicInterruptInterfaceBase + ARM_GIC_ICCEIOR, Source);
}

View File

@ -227,7 +227,7 @@ EndOfInterrupt (
return EFI_UNSUPPORTED;
}
MmioWrite32 (PcdGet32(PcdGicInterruptInterfaceBase) + ARM_GIC_ICCEIOR, Source);
ArmGicEndOfInterrupt (PcdGet32(PcdGicInterruptInterfaceBase), Source);
return EFI_SUCCESS;
}

View File

@ -45,7 +45,7 @@ ArmGicSetupNonSecure (
// Only try to clear valid interrupts. Ignore spurious interrupts.
while ((InterruptId & 0x3FF) < ArmGicGetMaxNumInterrupts (GicDistributorBase)) {
// Some of the SGI's are still pending, read Ack register and send End of Interrupt Signal
MmioWrite32 (GicInterruptInterfaceBase + ARM_GIC_ICCEIOR, InterruptId);
ArmGicEndOfInterrupt (GicInterruptInterfaceBase, InterruptId);
// Next
InterruptId = MmioRead32 (GicInterruptInterfaceBase + ARM_GIC_ICCIAR);

View File

@ -137,6 +137,13 @@ ArmGicAcknowledgeInterrupt (
OUT UINTN *InterruptId
);
VOID
EFIAPI
ArmGicEndOfInterrupt (
IN UINTN GicInterruptInterfaceBase,
IN UINTN Source
);
UINTN
EFIAPI
ArmGicSetPriorityMask (