diff mbox

[edk2,07/21] ArmVirtPkg/VirtFdtDxe: remove GIC discovery

Message ID 1459959319-19293-8-git-send-email-ard.biesheuvel@linaro.org
State Superseded
Headers show

Commit Message

Ard Biesheuvel April 6, 2016, 4:15 p.m. UTC
Now that we moved the GIC discovery to our ArmGicArchLib implementation,
we can remove it from VirtFdtDxe, since it is no longer used. Remove the
PcdArmGicRevision declaration and definitions as well: VirtFdtDxe no longer
sets it, and no other drivers consume its value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 ArmVirtPkg/ArmVirtPkg.dec            |  5 --
 ArmVirtPkg/ArmVirtQemu.dsc           |  1 -
 ArmVirtPkg/ArmVirtQemuKernel.dsc     |  1 -
 ArmVirtPkg/ArmVirtXen.dsc            |  1 -
 ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c   | 51 --------------------
 ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf |  4 --
 6 files changed, 63 deletions(-)

-- 
2.5.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Laszlo Ersek April 7, 2016, 11:19 a.m. UTC | #1
On 04/06/16 18:15, Ard Biesheuvel wrote:
> Now that we moved the GIC discovery to our ArmGicArchLib implementation,

> we can remove it from VirtFdtDxe, since it is no longer used. Remove the

> PcdArmGicRevision declaration and definitions as well: VirtFdtDxe no longer

> sets it, and no other drivers consume its value.

> 

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---

>  ArmVirtPkg/ArmVirtPkg.dec            |  5 --

>  ArmVirtPkg/ArmVirtQemu.dsc           |  1 -

>  ArmVirtPkg/ArmVirtQemuKernel.dsc     |  1 -

>  ArmVirtPkg/ArmVirtXen.dsc            |  1 -

>  ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c   | 51 --------------------

>  ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf |  4 --

>  6 files changed, 63 deletions(-)


Reviewed-by: Laszlo Ersek <lersek@redhat.com>


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/ArmVirtPkg/ArmVirtPkg.dec b/ArmVirtPkg/ArmVirtPkg.dec
index fa908253b320..adbd5e319a09 100644
--- a/ArmVirtPkg/ArmVirtPkg.dec
+++ b/ArmVirtPkg/ArmVirtPkg.dec
@@ -72,11 +72,6 @@  [PcdsDynamic, PcdsFixedAtBuild]
   gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress|0x0|UINT64|0x00000005
   gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress|0x0|UINT64|0x00000009
 
-  #
-  # Supported GIC revision (2, 3, ...)
-  #
-  gArmVirtTokenSpaceGuid.PcdArmGicRevision|0x0|UINT32|0x00000008
-
 [PcdsFeatureFlag]
   #
   # "Map PCI MMIO as Cached"
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index fb42946f4f45..6dbd6571fbee 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -208,7 +208,6 @@  [PcdsDynamicDefault.common]
   gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
   gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
   gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
-  gArmVirtTokenSpaceGuid.PcdArmGicRevision|0x0
 
   ## PL031 RealTimeClock
   gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index cb14972f9bac..c36de5cc4294 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -193,7 +193,6 @@  [PcdsDynamicDefault.common]
   gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
   gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
   gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
-  gArmVirtTokenSpaceGuid.PcdArmGicRevision|0x0
 
   ## PL031 RealTimeClock
   gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0
diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc
index f46a79c45e15..72bc4745309b 100644
--- a/ArmVirtPkg/ArmVirtXen.dsc
+++ b/ArmVirtPkg/ArmVirtXen.dsc
@@ -129,7 +129,6 @@  [PcdsDynamicDefault.common]
   gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
   gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
   gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
-  gArmVirtTokenSpaceGuid.PcdArmGicRevision|0x0
 
   ## PL031 RealTimeClock
   gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0
diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c
index d3043fa9b877..0e308497e79e 100644
--- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c
+++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c
@@ -42,7 +42,6 @@  typedef struct {
 
 typedef enum {
   PropertyTypeUnknown,
-  PropertyTypeGic,
   PropertyTypeRtc,
   PropertyTypeVirtio,
   PropertyTypeUart,
@@ -50,7 +49,6 @@  typedef enum {
   PropertyTypePsci,
   PropertyTypeFwCfg,
   PropertyTypePciHost,
-  PropertyTypeGicV3,
   PropertyTypeXen,
 } PROPERTY_TYPE;
 
@@ -60,7 +58,6 @@  typedef struct {
 } PROPERTY;
 
 STATIC CONST PROPERTY CompatibleProperties[] = {
-  { PropertyTypeGic,     "arm,cortex-a15-gic"    },
   { PropertyTypeRtc,     "arm,pl031"             },
   { PropertyTypeVirtio,  "virtio,mmio"           },
   { PropertyTypeUart,    "arm,pl011"             },
@@ -69,7 +66,6 @@  STATIC CONST PROPERTY CompatibleProperties[] = {
   { PropertyTypePsci,    "arm,psci-0.2"          },
   { PropertyTypeFwCfg,   "qemu,fw-cfg-mmio"      },
   { PropertyTypePciHost, "pci-host-ecam-generic" },
-  { PropertyTypeGicV3,   "arm,gic-v3"            },
   { PropertyTypeXen,     "xen,xen"               },
   { PropertyTypeUnknown, ""                      }
 };
@@ -294,7 +290,6 @@  InitializeVirtFdtDxe (
   VIRTIO_TRANSPORT_DEVICE_PATH   *DevicePath;
   EFI_HANDLE                     Handle;
   UINT64                         RegBase;
-  UINT64                         DistBase, CpuBase, RedistBase;
   CONST INTERRUPT_PROPERTY       *InterruptProp;
   INT32                          SecIntrNum, IntrNum, VirtIntrNum, HypIntrNum;
   CONST CHAR8                    *PsciMethod;
@@ -446,52 +441,6 @@  InitializeVirtFdtDxe (
       }
       break;
 
-    case PropertyTypeGic:
-      ASSERT (Len == 32);
-
-      DistBase = fdt64_to_cpu (((UINT64 *)RegProp)[0]);
-      CpuBase  = fdt64_to_cpu (((UINT64 *)RegProp)[2]);
-      ASSERT (DistBase < MAX_UINT32);
-      ASSERT (CpuBase < MAX_UINT32);
-
-      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;
-
-    case PropertyTypeGicV3:
-      //
-      // The GIC v3 DT binding describes a series of at least 3 physical (base
-      // addresses, size) pairs: the distributor interface (GICD), at least one
-      // redistributor region (GICR) containing dedicated redistributor
-      // interfaces for all individual CPUs, and the CPU interface (GICC).
-      // Under virtualization, we assume that the first redistributor region
-      // listed covers the boot CPU. Also, our GICv3 driver only supports the
-      // system register CPU interface, so we can safely ignore the MMIO version
-      // which is listed after the sequence of redistributor interfaces.
-      // This means we are only interested in the first two memory regions
-      // supplied, and ignore everything else.
-      //
-      ASSERT (Len >= 32);
-
-      // RegProp[0..1] == { GICD base, GICD size }
-      DistBase = fdt64_to_cpu (((UINT64 *)RegProp)[0]);
-      ASSERT (DistBase < MAX_UINT32);
-
-      // RegProp[2..3] == { GICR base, GICR size }
-      RedistBase = fdt64_to_cpu (((UINT64 *)RegProp)[2]);
-      ASSERT (RedistBase < MAX_UINT32);
-
-      PcdSet32 (PcdGicDistributorBase, (UINT32)DistBase);
-      PcdSet32 (PcdGicRedistributorsBase, (UINT32)RedistBase);
-      PcdSet32 (PcdArmGicRevision, 3);
-
-      DEBUG ((EFI_D_INFO, "Found GIC v3 (re)distributor @ 0x%Lx (0x%Lx)\n",
-        DistBase, RedistBase));
-      break;
-
     case PropertyTypeRtc:
       ASSERT (Len == 16);
 
diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
index f807bf76bb4b..628b14501f45 100644
--- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
+++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
@@ -54,10 +54,6 @@  [Pcd]
   gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress
   gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress
   gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress
-  gArmVirtTokenSpaceGuid.PcdArmGicRevision
-  gArmTokenSpaceGuid.PcdGicDistributorBase
-  gArmTokenSpaceGuid.PcdGicRedistributorsBase
-  gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
   gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
   gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
   gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum