diff options
author | Olivier Martin <olivier.martin@arm.com> | 2014-07-04 14:41:30 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-07-04 14:41:30 +0000 |
commit | 1b0ac0dedf19041512de152f047cc5a943598521 (patch) | |
tree | 6047781ccdb5a7eaacab3907d4971a8b440b50f4 /ArmPkg/Include | |
parent | f5241b5725aab99189c733df6b03687656f8b1e8 (diff) | |
download | edk2-1b0ac0dedf19041512de152f047cc5a943598521.tar.gz edk2-1b0ac0dedf19041512de152f047cc5a943598521.tar.bz2 edk2-1b0ac0dedf19041512de152f047cc5a943598521.zip |
ArmPkg/ArmGic: Returned the InterruptId in ArmGicAcknowledgeInterrupt()
The InterruptId has a different width for GicV2 and GicV3 (respectively
10bit and 24bit).
The function prototype has been changed to return this value to make the
caller GIC architecture version independent. Otherwise, we would have need
to expose a different mask to allow the caller to retrieve this value from
the read register.
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@15628 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Include')
-rw-r--r-- | ArmPkg/Include/Library/ArmGicLib.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/ArmPkg/Include/Library/ArmGicLib.h b/ArmPkg/Include/Library/ArmGicLib.h index f2d4c7b27c..e3ef228dba 100644 --- a/ArmPkg/Include/Library/ArmGicLib.h +++ b/ArmPkg/Include/Library/ArmGicLib.h @@ -140,10 +140,24 @@ ArmGicSendSgiTo ( IN INTN SgiId
);
+/*
+ * Acknowledge and return the value of the Interrupt Acknowledge Register
+ *
+ * InterruptId is returned separately from the register value because in
+ * the GICv2 the register value contains the CpuId and InterruptId while
+ * in the GICv3 the register value is only the InterruptId.
+ *
+ * @param GicInterruptInterfaceBase Base Address of the GIC CPU Interface
+ * @param InterruptId InterruptId read from the Interrupt Acknowledge Register
+ *
+ * @retval value returned by the Interrupt Acknowledge Register
+ *
+ */
UINTN
EFIAPI
ArmGicAcknowledgeInterrupt (
- IN UINTN GicInterruptInterfaceBase
+ IN UINTN GicInterruptInterfaceBase,
+ OUT UINTN *InterruptId
);
VOID
|