summaryrefslogtreecommitdiff
path: root/ArmPkg
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Drivers/ArmGic/ArmGic.c12
-rw-r--r--ArmPkg/Drivers/ArmGic/ArmGicDxe.c2
-rw-r--r--ArmPkg/Drivers/ArmGic/ArmGicSec.c2
-rw-r--r--ArmPkg/Include/Library/ArmGicLib.h7
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 (