]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c
ArmVirtPkg/VirtFdtDxe: remove handling of fw_cfg DT node
[mirror_edk2.git] / ArmVirtPkg / VirtFdtDxe / VirtFdtDxe.c
index 368618956be17148043db5b46901afcdb966b532..0a47092e35ce5d5ba983d9dfe7ba241706ed0a70 100644 (file)
@@ -45,7 +45,6 @@ typedef enum {
   PropertyTypeRtc,\r
   PropertyTypeVirtio,\r
   PropertyTypeUart,\r
-  PropertyTypeFwCfg,\r
   PropertyTypePciHost,\r
   PropertyTypeXen,\r
 } PROPERTY_TYPE;\r
@@ -59,7 +58,6 @@ STATIC CONST PROPERTY CompatibleProperties[] = {
   { PropertyTypeRtc,     "arm,pl031"             },\r
   { PropertyTypeVirtio,  "virtio,mmio"           },\r
   { PropertyTypeUart,    "arm,pl011"             },\r
-  { PropertyTypeFwCfg,   "qemu,fw-cfg-mmio"      },\r
   { PropertyTypePciHost, "pci-host-ecam-generic" },\r
   { PropertyTypeXen,     "xen,xen"               },\r
   { PropertyTypeUnknown, ""                      }\r
@@ -279,12 +277,6 @@ InitializeVirtFdtDxe (
   VIRTIO_TRANSPORT_DEVICE_PATH   *DevicePath;\r
   EFI_HANDLE                     Handle;\r
   UINT64                         RegBase;\r
-  UINT64                         FwCfgSelectorAddress;\r
-  UINT64                         FwCfgSelectorSize;\r
-  UINT64                         FwCfgDataAddress;\r
-  UINT64                         FwCfgDataSize;\r
-  UINT64                         FwCfgDmaAddress;\r
-  UINT64                         FwCfgDmaSize;\r
   BOOLEAN                        HavePci;\r
 \r
   Hob = GetFirstGuidHob(&gFdtHobGuid);\r
@@ -338,47 +330,6 @@ InitializeVirtFdtDxe (
       HavePci = TRUE;\r
       break;\r
 \r
-    case PropertyTypeFwCfg:\r
-      ASSERT (Len == 2 * sizeof (UINT64));\r
-\r
-      FwCfgDataAddress     = fdt64_to_cpu (((UINT64 *)RegProp)[0]);\r
-      FwCfgDataSize        = 8;\r
-      FwCfgSelectorAddress = FwCfgDataAddress + FwCfgDataSize;\r
-      FwCfgSelectorSize    = 2;\r
-\r
-      //\r
-      // The following ASSERT()s express\r
-      //\r
-      //   Address + Size - 1 <= MAX_UINTN\r
-      //\r
-      // for both registers, that is, that the last byte in each MMIO range is\r
-      // expressible as a MAX_UINTN. The form below is mathematically\r
-      // equivalent, and it also prevents any unsigned overflow before the\r
-      // comparison.\r
-      //\r
-      ASSERT (FwCfgSelectorAddress <= MAX_UINTN - FwCfgSelectorSize + 1);\r
-      ASSERT (FwCfgDataAddress     <= MAX_UINTN - FwCfgDataSize     + 1);\r
-\r
-      PcdSet64 (PcdFwCfgSelectorAddress, FwCfgSelectorAddress);\r
-      PcdSet64 (PcdFwCfgDataAddress,     FwCfgDataAddress);\r
-\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
       ASSERT (Len == 16);\r
       //\r