diff options
author | Olivier Martin <olivier.martin@arm.com> | 2014-07-04 11:11:53 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-07-04 11:11:53 +0000 |
commit | d80401a16f250486baab14f02b044cf2cc1ac949 (patch) | |
tree | 280ea7e9849a6421c2c0a8e3c677a9a9e41bdd63 /ArmPkg | |
parent | e1f2dfec3483e276d267f5ca3540c1505d631c60 (diff) | |
download | edk2-platforms-d80401a16f250486baab14f02b044cf2cc1ac949.tar.xz |
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
Diffstat (limited to 'ArmPkg')
-rw-r--r-- | ArmPkg/Drivers/ArmGic/ArmGic.c | 12 | ||||
-rw-r--r-- | ArmPkg/Drivers/ArmGic/ArmGicDxe.c | 2 | ||||
-rw-r--r-- | ArmPkg/Drivers/ArmGic/ArmGicSec.c | 2 | ||||
-rw-r--r-- | ArmPkg/Include/Library/ArmGicLib.h | 7 |
4 files changed, 20 insertions, 3 deletions
diff --git a/ArmPkg/Drivers/ArmGic/ArmGic.c b/ArmPkg/Drivers/ArmGic/ArmGic.c index 8a10d113f7..25bd376027 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGic.c +++ b/ArmPkg/Drivers/ArmGic/ArmGic.c @@ -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);
+}
diff --git a/ArmPkg/Drivers/ArmGic/ArmGicDxe.c b/ArmPkg/Drivers/ArmGic/ArmGicDxe.c index 111ce14438..e227f19940 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicDxe.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicDxe.c @@ -227,7 +227,7 @@ EndOfInterrupt ( return EFI_UNSUPPORTED;
}
- MmioWrite32 (PcdGet32(PcdGicInterruptInterfaceBase) + ARM_GIC_ICCEIOR, Source);
+ ArmGicEndOfInterrupt (PcdGet32(PcdGicInterruptInterfaceBase), Source);
return EFI_SUCCESS;
}
diff --git a/ArmPkg/Drivers/ArmGic/ArmGicSec.c b/ArmPkg/Drivers/ArmGic/ArmGicSec.c index bae76e441b..f249eac36a 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicSec.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicSec.c @@ -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);
diff --git a/ArmPkg/Include/Library/ArmGicLib.h b/ArmPkg/Include/Library/ArmGicLib.h index 3280cf8eeb..b35d4a794c 100644 --- a/ArmPkg/Include/Library/ArmGicLib.h +++ b/ArmPkg/Include/Library/ArmGicLib.h @@ -137,6 +137,13 @@ ArmGicAcknowledgeInterrupt ( OUT UINTN *InterruptId
);
+VOID
+EFIAPI
+ArmGicEndOfInterrupt (
+ IN UINTN GicInterruptInterfaceBase,
+ IN UINTN Source
+ );
+
UINTN
EFIAPI
ArmGicSetPriorityMask (
|