]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/PL390Gic: Introduced PcdGicSgiIntId to define which SGI is used for core synch...
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 26 Mar 2012 10:46:25 +0000 (10:46 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 26 Mar 2012 10:46:25 +0000 (10:46 +0000)
By default this PCD is set to use SGI #0.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13123 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/ArmPkg.dec
ArmPkg/Drivers/PL390Gic/PL390Gic.c
ArmPkg/Drivers/PL390Gic/PL390GicLib.inf
ArmPkg/Drivers/PL390Gic/PL390GicSecLib.inf

index c12de9481beebc97b03dbb169ee2361bcec4aa63..65d42748773ac182ff2c208c120cbe64d3cf3e53 100644 (file)
@@ -83,6 +83,7 @@
   gArmTokenSpaceGuid.PcdGicDistributorBase|0|UINT32|0x0000000C\r
   gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0|UINT32|0x0000000D\r
   gArmTokenSpaceGuid.PcdGicNumInterrupts|96|UINT32|0x00000023\r
+  gArmTokenSpaceGuid.PcdGicSgiIntId|0|UINT32|0x00000025\r
 \r
   #\r
   # ARM Secure Firmware PCDs\r
index 9da5cc4b591aa8a43c11c2ebcc2b6ae9ebc202f2..25daabeb1d0bd722835b4c212664b389b827b806 100644 (file)
@@ -15,6 +15,7 @@
 #include <Uefi.h>\r
 #include <Library/IoLib.h>\r
 #include <Library/ArmGicLib.h>\r
+#include <Library/PcdLib.h>\r
 \r
 VOID\r
 EFIAPI\r
@@ -24,7 +25,7 @@ ArmGicSendSgiTo (
   IN  INTN          CPUTargetList\r
   )\r
 {\r
-  MmioWrite32 (GicDistributorBase + ARM_GIC_ICDSGIR, ((TargetListFilter & 0x3) << 24) | ((CPUTargetList & 0xFF) << 16));\r
+  MmioWrite32 (GicDistributorBase + ARM_GIC_ICDSGIR, ((TargetListFilter & 0x3) << 24) | ((CPUTargetList & 0xFF) << 16) | PcdGet32(PcdGicSgiIntId));\r
 }\r
 \r
 UINT32\r
@@ -39,7 +40,7 @@ ArmGicAcknowledgeSgiFrom (
   InterruptId = MmioRead32 (GicInterruptInterfaceBase + ARM_GIC_ICCIAR);\r
 \r
   // Check if the Interrupt ID is valid, The read from Interrupt Ack register returns CPU ID and Interrupt ID\r
-  if (((CoreId & 0x7) << 10) == (InterruptId & 0x1C00)) {\r
+  if ((((CoreId & 0x7) << 10) | PcdGet32(PcdGicSgiIntId)) == InterruptId) {\r
     // Got SGI number 0 hence signal End of Interrupt by writing to ICCEOIR\r
     MmioWrite32 (GicInterruptInterfaceBase + ARM_GIC_ICCEIOR, InterruptId);\r
     return 1;\r
index cae5c2b24c6bd37b3f69ad294db2edfff194d4a2..805ed4fcc71115ba34467b320d0759b2e687089d 100644 (file)
@@ -26,3 +26,6 @@
 [Packages]\r
   ArmPkg/ArmPkg.dec\r
   MdePkg/MdePkg.dec\r
+\r
+[FixedPcd]\r
+  gArmTokenSpaceGuid.PcdGicSgiIntId\r
index cf575e4cf2ab411865f49efc14e46187686f93a0..13085221ca83dba8ff09fed29275fdd70fcb8c9f 100644 (file)
@@ -34,4 +34,4 @@
 \r
 [FixedPcd.common]\r
   gArmTokenSpaceGuid.PcdGicNumInterrupts\r
-  \r
+  gArmTokenSpaceGuid.PcdGicSgiIntId\r