diff options
-rw-r--r-- | ArmPkg/ArmPkg.dec | 1 | ||||
-rw-r--r-- | ArmPkg/Drivers/PL390Gic/PL390Gic.c | 5 | ||||
-rw-r--r-- | ArmPkg/Drivers/PL390Gic/PL390GicLib.inf | 3 | ||||
-rw-r--r-- | ArmPkg/Drivers/PL390Gic/PL390GicSecLib.inf | 2 |
4 files changed, 8 insertions, 3 deletions
diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec index c12de9481b..65d4274877 100644 --- a/ArmPkg/ArmPkg.dec +++ b/ArmPkg/ArmPkg.dec @@ -83,6 +83,7 @@ gArmTokenSpaceGuid.PcdGicDistributorBase|0|UINT32|0x0000000C
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0|UINT32|0x0000000D
gArmTokenSpaceGuid.PcdGicNumInterrupts|96|UINT32|0x00000023
+ gArmTokenSpaceGuid.PcdGicSgiIntId|0|UINT32|0x00000025
#
# ARM Secure Firmware PCDs
diff --git a/ArmPkg/Drivers/PL390Gic/PL390Gic.c b/ArmPkg/Drivers/PL390Gic/PL390Gic.c index 9da5cc4b59..25daabeb1d 100644 --- a/ArmPkg/Drivers/PL390Gic/PL390Gic.c +++ b/ArmPkg/Drivers/PL390Gic/PL390Gic.c @@ -15,6 +15,7 @@ #include <Uefi.h>
#include <Library/IoLib.h>
#include <Library/ArmGicLib.h>
+#include <Library/PcdLib.h>
VOID
EFIAPI
@@ -24,7 +25,7 @@ ArmGicSendSgiTo ( IN INTN CPUTargetList
)
{
- MmioWrite32 (GicDistributorBase + ARM_GIC_ICDSGIR, ((TargetListFilter & 0x3) << 24) | ((CPUTargetList & 0xFF) << 16));
+ MmioWrite32 (GicDistributorBase + ARM_GIC_ICDSGIR, ((TargetListFilter & 0x3) << 24) | ((CPUTargetList & 0xFF) << 16) | PcdGet32(PcdGicSgiIntId));
}
UINT32
@@ -39,7 +40,7 @@ ArmGicAcknowledgeSgiFrom ( InterruptId = MmioRead32 (GicInterruptInterfaceBase + ARM_GIC_ICCIAR);
// Check if the Interrupt ID is valid, The read from Interrupt Ack register returns CPU ID and Interrupt ID
- if (((CoreId & 0x7) << 10) == (InterruptId & 0x1C00)) {
+ if ((((CoreId & 0x7) << 10) | PcdGet32(PcdGicSgiIntId)) == InterruptId) {
// Got SGI number 0 hence signal End of Interrupt by writing to ICCEOIR
MmioWrite32 (GicInterruptInterfaceBase + ARM_GIC_ICCEIOR, InterruptId);
return 1;
diff --git a/ArmPkg/Drivers/PL390Gic/PL390GicLib.inf b/ArmPkg/Drivers/PL390Gic/PL390GicLib.inf index cae5c2b24c..805ed4fcc7 100644 --- a/ArmPkg/Drivers/PL390Gic/PL390GicLib.inf +++ b/ArmPkg/Drivers/PL390Gic/PL390GicLib.inf @@ -26,3 +26,6 @@ [Packages]
ArmPkg/ArmPkg.dec
MdePkg/MdePkg.dec
+
+[FixedPcd]
+ gArmTokenSpaceGuid.PcdGicSgiIntId
diff --git a/ArmPkg/Drivers/PL390Gic/PL390GicSecLib.inf b/ArmPkg/Drivers/PL390Gic/PL390GicSecLib.inf index cf575e4cf2..13085221ca 100644 --- a/ArmPkg/Drivers/PL390Gic/PL390GicSecLib.inf +++ b/ArmPkg/Drivers/PL390Gic/PL390GicSecLib.inf @@ -34,4 +34,4 @@ [FixedPcd.common]
gArmTokenSpaceGuid.PcdGicNumInterrupts
-
+ gArmTokenSpaceGuid.PcdGicSgiIntId
|