@@ -60,3 +60,8 @@
gArmVirtualizationTokenSpaceGuid.PcdFwCfgSelectorAddress|0x0|UINT64|0x00000004
gArmVirtualizationTokenSpaceGuid.PcdFwCfgDataAddress|0x0|UINT64|0x00000005
+
+ #
+ # Supported GIC revision (2, 3, ...)
+ #
+ gArmVirtualizationTokenSpaceGuid.PcdArmGicRevision|0x0|UINT32|0x00000006
@@ -171,6 +171,7 @@
gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
gArmTokenSpaceGuid.PcdGicRedistributorBase|0x0
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
+ gArmVirtualizationTokenSpaceGuid.PcdArmGicRevision|0x0
## PL031 RealTimeClock
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0
@@ -263,6 +263,7 @@ InitializeVirtFdtDxe (
PcdSet32 (PcdGicDistributorBase, (UINT32)DistBase);
PcdSet32 (PcdGicInterruptInterfaceBase, (UINT32)CpuBase);
+ PcdSet32 (PcdArmGicRevision, 2);
DEBUG ((EFI_D_INFO, "Found GIC @ 0x%Lx/0x%Lx\n", DistBase, CpuBase));
break;
@@ -289,6 +290,7 @@ InitializeVirtFdtDxe (
PcdSet32 (PcdGicDistributorBase, (UINT32)DistBase);
PcdSet32 (PcdGicRedistributorBase, (UINT32)RedistBase);
+ PcdSet32 (PcdArmGicRevision, 3);
DEBUG ((EFI_D_INFO, "Found GIC v3 (re)distributor @ 0x%Lx (0x%Lx)\n",
DistBase, RedistBase));
@@ -52,6 +52,7 @@
gArmVirtualizationTokenSpaceGuid.PcdArmPsciMethod
gArmVirtualizationTokenSpaceGuid.PcdFwCfgSelectorAddress
gArmVirtualizationTokenSpaceGuid.PcdFwCfgDataAddress
+ gArmVirtualizationTokenSpaceGuid.PcdArmGicRevision
gArmTokenSpaceGuid.PcdGicDistributorBase
gArmTokenSpaceGuid.PcdGicRedistributorBase
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
In order to allow a ArmGicArchLib to be implemented that returns the supported GIC revision based on the device tree, add handling to VirtFdtDxe to record the GIC revision at DT parsing time. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec | 5 +++++ ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc | 1 + ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c | 2 ++ ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf | 1 + 4 files changed, 9 insertions(+)