mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 07:04:28 +02:00
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:
parent
e1f2dfec34
commit
d80401a16f
@ -55,7 +55,7 @@ ArmGicAcknowledgeInterrupt (
|
|||||||
// Check if it is a valid interrupt ID
|
// Check if it is a valid interrupt ID
|
||||||
if ((Interrupt & 0x3FF) < ArmGicGetMaxNumInterrupts (GicDistributorBase)) {
|
if ((Interrupt & 0x3FF) < ArmGicGetMaxNumInterrupts (GicDistributorBase)) {
|
||||||
// Got a valid SGI number hence signal End of Interrupt by writing to ICCEOIR
|
// 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) {
|
if (CoreId) {
|
||||||
*CoreId = (Interrupt >> 10) & 0x7;
|
*CoreId = (Interrupt >> 10) & 0x7;
|
||||||
@ -68,3 +68,13 @@ ArmGicAcknowledgeInterrupt (
|
|||||||
return RETURN_INVALID_PARAMETER;
|
return RETURN_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
ArmGicEndOfInterrupt (
|
||||||
|
IN UINTN GicInterruptInterfaceBase,
|
||||||
|
IN UINTN Source
|
||||||
|
)
|
||||||
|
{
|
||||||
|
MmioWrite32 (GicInterruptInterfaceBase + ARM_GIC_ICCEIOR, Source);
|
||||||
|
}
|
||||||
|
@ -227,7 +227,7 @@ EndOfInterrupt (
|
|||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
MmioWrite32 (PcdGet32(PcdGicInterruptInterfaceBase) + ARM_GIC_ICCEIOR, Source);
|
ArmGicEndOfInterrupt (PcdGet32(PcdGicInterruptInterfaceBase), Source);
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ ArmGicSetupNonSecure (
|
|||||||
// Only try to clear valid interrupts. Ignore spurious interrupts.
|
// Only try to clear valid interrupts. Ignore spurious interrupts.
|
||||||
while ((InterruptId & 0x3FF) < ArmGicGetMaxNumInterrupts (GicDistributorBase)) {
|
while ((InterruptId & 0x3FF) < ArmGicGetMaxNumInterrupts (GicDistributorBase)) {
|
||||||
// Some of the SGI's are still pending, read Ack register and send End of Interrupt Signal
|
// 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
|
// Next
|
||||||
InterruptId = MmioRead32 (GicInterruptInterfaceBase + ARM_GIC_ICCIAR);
|
InterruptId = MmioRead32 (GicInterruptInterfaceBase + ARM_GIC_ICCIAR);
|
||||||
|
@ -137,6 +137,13 @@ ArmGicAcknowledgeInterrupt (
|
|||||||
OUT UINTN *InterruptId
|
OUT UINTN *InterruptId
|
||||||
);
|
);
|
||||||
|
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
ArmGicEndOfInterrupt (
|
||||||
|
IN UINTN GicInterruptInterfaceBase,
|
||||||
|
IN UINTN Source
|
||||||
|
);
|
||||||
|
|
||||||
UINTN
|
UINTN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ArmGicSetPriorityMask (
|
ArmGicSetPriorityMask (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user