summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/PrePi
diff options
context:
space:
mode:
authorOlivier Martin <olivier.martin@arm.com>2014-07-04 11:13:27 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2014-07-04 11:13:27 +0000
commit2ca815a4952ca3ef3bdb01f5dd2a1ee0a57ac319 (patch)
treed89c29f40fbc07ae1b88ecc6d99936745303eb96 /ArmPlatformPkg/PrePi
parentd80401a16f250486baab14f02b044cf2cc1ac949 (diff)
downloadedk2-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 'ArmPlatformPkg/PrePi')
-rw-r--r--ArmPlatformPkg/PrePi/MainMPCore.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ArmPlatformPkg/PrePi/MainMPCore.c b/ArmPlatformPkg/PrePi/MainMPCore.c
index 5868993d57..3db3ce6857 100644
--- a/ArmPlatformPkg/PrePi/MainMPCore.c
+++ b/ArmPlatformPkg/PrePi/MainMPCore.c
@@ -55,6 +55,7 @@ SecondaryMain (
UINT32 CoreId;
VOID (*SecondaryStart)(VOID);
UINTN SecondaryEntryAddr;
+ UINTN Interrupt;
ClusterId = GET_CLUSTER_ID(MpId);
CoreId = GET_CORE_ID(MpId);
@@ -87,7 +88,12 @@ SecondaryMain (
SecondaryEntryAddr = MmioRead32 (ArmCoreInfoTable[Index].MailboxGetAddress);
// Acknowledge the interrupt and send End of Interrupt signal.
- ArmGicAcknowledgeInterrupt (PcdGet32(PcdGicDistributorBase), PcdGet32(PcdGicInterruptInterfaceBase), NULL, NULL);
+ Interrupt = ArmGicAcknowledgeInterrupt (PcdGet32 (PcdGicInterruptInterfaceBase));
+ // Check if it is a valid interrupt ID
+ if ((Interrupt & ARM_GIC_ICCIAR_ACKINTID) < ArmGicGetMaxNumInterrupts (PcdGet32 (PcdGicDistributorBase))) {
+ // Got a valid SGI number hence signal End of Interrupt
+ ArmGicEndOfInterrupt (PcdGet32 (PcdGicInterruptInterfaceBase), Interrupt);
+ }
} while (SecondaryEntryAddr == 0);
// Jump to secondary core entry point.