]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c
UefiCpuPkg/PiSmmCpu: Add NULL func for 2 new APIs in SmmCpuFeaturesLib.
[mirror_edk2.git] / ArmVirtPkg / VirtFdtDxe / VirtFdtDxe.c
index c9a181a871b8cf2ca555553c649c383bdcc0ec74..74f80d1d2b78bc30c1e2a56eb3e15b688f4b31a2 100644 (file)
@@ -302,6 +302,8 @@ InitializeVirtFdtDxe (
   UINT64                         FwCfgSelectorSize;\r
   UINT64                         FwCfgDataAddress;\r
   UINT64                         FwCfgDataSize;\r
+  UINT64                         FwCfgDmaAddress;\r
+  UINT64                         FwCfgDmaSize;\r
 \r
   Hob = GetFirstGuidHob(&gFdtHobGuid);\r
   if (Hob == NULL || GET_GUID_HOB_DATA_SIZE (Hob) != sizeof (UINT64)) {\r
@@ -382,6 +384,19 @@ InitializeVirtFdtDxe (
 \r
       DEBUG ((EFI_D_INFO, "Found FwCfg @ 0x%Lx/0x%Lx\n", FwCfgSelectorAddress,\r
         FwCfgDataAddress));\r
+\r
+      if (fdt64_to_cpu (((UINT64 *)RegProp)[1]) >= 0x18) {\r
+        FwCfgDmaAddress = FwCfgDataAddress + 0x10;\r
+        FwCfgDmaSize    = 0x08;\r
+\r
+        //\r
+        // See explanation above.\r
+        //\r
+        ASSERT (FwCfgDmaAddress <= MAX_UINTN - FwCfgDmaSize + 1);\r
+\r
+        PcdSet64 (PcdFwCfgDmaAddress, FwCfgDmaAddress);\r
+        DEBUG ((EFI_D_INFO, "Found FwCfg DMA @ 0x%Lx\n", FwCfgDmaAddress));\r
+      }\r
       break;\r
 \r
     case PropertyTypeVirtio:\r
@@ -441,6 +456,7 @@ InitializeVirtFdtDxe (
 \r
       PcdSet32 (PcdGicDistributorBase, (UINT32)DistBase);\r
       PcdSet32 (PcdGicInterruptInterfaceBase, (UINT32)CpuBase);\r
+      PcdSet32 (PcdArmGicRevision, 2);\r
 \r
       DEBUG ((EFI_D_INFO, "Found GIC @ 0x%Lx/0x%Lx\n", DistBase, CpuBase));\r
       break;\r
@@ -470,6 +486,7 @@ InitializeVirtFdtDxe (
 \r
       PcdSet32 (PcdGicDistributorBase, (UINT32)DistBase);\r
       PcdSet32 (PcdGicRedistributorsBase, (UINT32)RedistBase);\r
+      PcdSet32 (PcdArmGicRevision, 3);\r
 \r
       DEBUG ((EFI_D_INFO, "Found GIC v3 (re)distributor @ 0x%Lx (0x%Lx)\n",\r
         DistBase, RedistBase));\r