diff options
author | Olivier Martin <olivier.martin@arm.com> | 2014-07-04 11:13:27 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-07-04 11:13:27 +0000 |
commit | 2ca815a4952ca3ef3bdb01f5dd2a1ee0a57ac319 (patch) | |
tree | d89c29f40fbc07ae1b88ecc6d99936745303eb96 /ArmPkg/Drivers | |
parent | d80401a16f250486baab14f02b044cf2cc1ac949 (diff) | |
download | edk2-2ca815a4952ca3ef3bdb01f5dd2a1ee0a57ac319.tar.gz edk2-2ca815a4952ca3ef3bdb01f5dd2a1ee0a57ac319.tar.bz2 edk2-2ca815a4952ca3ef3bdb01f5dd2a1ee0a57ac319.zip |
ArmPkg/ArmGic: Move out the EndOfInterrupt from the interrupt acknowledgement
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@15619 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Drivers')
-rw-r--r-- | ArmPkg/Drivers/ArmGic/ArmGic.c | 29 | ||||
-rw-r--r-- | ArmPkg/Drivers/ArmGic/ArmGicDxe.c | 4 | ||||
-rw-r--r-- | ArmPkg/Drivers/ArmGic/ArmGicDxe.inf | 2 |
3 files changed, 7 insertions, 28 deletions
diff --git a/ArmPkg/Drivers/ArmGic/ArmGic.c b/ArmPkg/Drivers/ArmGic/ArmGic.c index 25bd376027..1717368a7e 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGic.c +++ b/ArmPkg/Drivers/ArmGic/ArmGic.c @@ -1,6 +1,6 @@ /** @file
*
-* Copyright (c) 2011-2012, ARM Limited. All rights reserved.
+* Copyright (c) 2011-2013, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
@@ -38,35 +38,14 @@ ArmGicSendSgiTo ( MmioWrite32 (GicDistributorBase + ARM_GIC_ICDSGIR, ((TargetListFilter & 0x3) << 24) | ((CPUTargetList & 0xFF) << 16) | SgiId);
}
-RETURN_STATUS
+UINTN
EFIAPI
ArmGicAcknowledgeInterrupt (
- IN UINTN GicDistributorBase,
- IN UINTN GicInterruptInterfaceBase,
- OUT UINTN *CoreId,
- OUT UINTN *InterruptId
+ IN UINTN GicInterruptInterfaceBase
)
{
- UINT32 Interrupt;
-
// Read the Interrupt Acknowledge Register
- Interrupt = MmioRead32 (GicInterruptInterfaceBase + ARM_GIC_ICCIAR);
-
- // 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
- ArmGicEndOfInterrupt (GicInterruptInterfaceBase, Interrupt);
-
- if (CoreId) {
- *CoreId = (Interrupt >> 10) & 0x7;
- }
- if (InterruptId) {
- *InterruptId = Interrupt & 0x3FF;
- }
- return RETURN_SUCCESS;
- } else {
- return RETURN_INVALID_PARAMETER;
- }
+ return MmioRead32 (GicInterruptInterfaceBase + ARM_GIC_ICCIAR);
}
VOID
diff --git a/ArmPkg/Drivers/ArmGic/ArmGicDxe.c b/ArmPkg/Drivers/ArmGic/ArmGicDxe.c index e227f19940..9608c314ed 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicDxe.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicDxe.c @@ -252,10 +252,10 @@ IrqInterruptHandler ( UINT32 GicInterrupt;
HARDWARE_INTERRUPT_HANDLER InterruptHandler;
- GicInterrupt = MmioRead32 (PcdGet32(PcdGicInterruptInterfaceBase) + ARM_GIC_ICCIAR);
+ GicInterrupt = ArmGicAcknowledgeInterrupt (PcdGet32(PcdGicInterruptInterfaceBase));
// Special Interrupts (ID1020-ID1023) have an Interrupt ID greater than the number of interrupt (ie: Spurious interrupt).
- if (GicInterrupt >= mGicNumInterrupts) {
+ if ((GicInterrupt & ARM_GIC_ICCIAR_ACKINTID) >= mGicNumInterrupts) {
// The special interrupt do not need to be acknowledge
return;
}
diff --git a/ArmPkg/Drivers/ArmGic/ArmGicDxe.inf b/ArmPkg/Drivers/ArmGic/ArmGicDxe.inf index 9dc557a037..3974f3c37d 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicDxe.inf +++ b/ArmPkg/Drivers/ArmGic/ArmGicDxe.inf @@ -1,7 +1,7 @@ #/** @file
#
# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
-# Copyright (c) 2012, ARM Ltd. All rights reserved.<BR>
+# Copyright (c) 2012 - 2013, ARM Ltd. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
|