diff options
Diffstat (limited to 'ArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.c')
-rwxr-xr-x | ArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.c b/ArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.c index f8f91e8fcd..f42f518722 100755 --- a/ArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.c +++ b/ArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.c @@ -31,6 +31,7 @@ NonSecureWaitForFirmware ( )
{
VOID (*secondary_start)(VOID);
+ UINTN Interrupt;
// The secondary cores will execute the firmware once wake from WFI.
secondary_start = (VOID (*)())PcdGet32(PcdFvBaseAddress);
@@ -38,7 +39,12 @@ NonSecureWaitForFirmware ( ArmCallWFI();
// 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);
+ }
// Jump to secondary core entry point.
secondary_start ();
|