ArmVirtPkg/VirtFdtDxe: remove GIC discovery

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>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Ard Biesheuvel 2016-04-08 11:44:52 +02:00
parent 2248631883
commit 6c6ac050d9
6 changed files with 0 additions and 63 deletions

View File

@ -72,11 +72,6 @@
gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress|0x0|UINT64|0x00000005 gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress|0x0|UINT64|0x00000005
gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress|0x0|UINT64|0x00000009 gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress|0x0|UINT64|0x00000009
#
# Supported GIC revision (2, 3, ...)
#
gArmVirtTokenSpaceGuid.PcdArmGicRevision|0x0|UINT32|0x00000008
[PcdsFeatureFlag] [PcdsFeatureFlag]
# #
# "Map PCI MMIO as Cached" # "Map PCI MMIO as Cached"

View File

@ -208,7 +208,6 @@
gArmTokenSpaceGuid.PcdGicDistributorBase|0x0 gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
gArmVirtTokenSpaceGuid.PcdArmGicRevision|0x0
## PL031 RealTimeClock ## PL031 RealTimeClock
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0 gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0

View File

@ -193,7 +193,6 @@
gArmTokenSpaceGuid.PcdGicDistributorBase|0x0 gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
gArmVirtTokenSpaceGuid.PcdArmGicRevision|0x0
## PL031 RealTimeClock ## PL031 RealTimeClock
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0 gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0

View File

@ -129,7 +129,6 @@
gArmTokenSpaceGuid.PcdGicDistributorBase|0x0 gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
gArmVirtTokenSpaceGuid.PcdArmGicRevision|0x0
## PL031 RealTimeClock ## PL031 RealTimeClock
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0 gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0

View File

@ -42,7 +42,6 @@ typedef struct {
typedef enum { typedef enum {
PropertyTypeUnknown, PropertyTypeUnknown,
PropertyTypeGic,
PropertyTypeRtc, PropertyTypeRtc,
PropertyTypeVirtio, PropertyTypeVirtio,
PropertyTypeUart, PropertyTypeUart,
@ -50,7 +49,6 @@ typedef enum {
PropertyTypePsci, PropertyTypePsci,
PropertyTypeFwCfg, PropertyTypeFwCfg,
PropertyTypePciHost, PropertyTypePciHost,
PropertyTypeGicV3,
PropertyTypeXen, PropertyTypeXen,
} PROPERTY_TYPE; } PROPERTY_TYPE;
@ -60,7 +58,6 @@ typedef struct {
} PROPERTY; } PROPERTY;
STATIC CONST PROPERTY CompatibleProperties[] = { STATIC CONST PROPERTY CompatibleProperties[] = {
{ PropertyTypeGic, "arm,cortex-a15-gic" },
{ PropertyTypeRtc, "arm,pl031" }, { PropertyTypeRtc, "arm,pl031" },
{ PropertyTypeVirtio, "virtio,mmio" }, { PropertyTypeVirtio, "virtio,mmio" },
{ PropertyTypeUart, "arm,pl011" }, { PropertyTypeUart, "arm,pl011" },
@ -69,7 +66,6 @@ STATIC CONST PROPERTY CompatibleProperties[] = {
{ PropertyTypePsci, "arm,psci-0.2" }, { PropertyTypePsci, "arm,psci-0.2" },
{ PropertyTypeFwCfg, "qemu,fw-cfg-mmio" }, { PropertyTypeFwCfg, "qemu,fw-cfg-mmio" },
{ PropertyTypePciHost, "pci-host-ecam-generic" }, { PropertyTypePciHost, "pci-host-ecam-generic" },
{ PropertyTypeGicV3, "arm,gic-v3" },
{ PropertyTypeXen, "xen,xen" }, { PropertyTypeXen, "xen,xen" },
{ PropertyTypeUnknown, "" } { PropertyTypeUnknown, "" }
}; };
@ -294,7 +290,6 @@ InitializeVirtFdtDxe (
VIRTIO_TRANSPORT_DEVICE_PATH *DevicePath; VIRTIO_TRANSPORT_DEVICE_PATH *DevicePath;
EFI_HANDLE Handle; EFI_HANDLE Handle;
UINT64 RegBase; UINT64 RegBase;
UINT64 DistBase, CpuBase, RedistBase;
CONST INTERRUPT_PROPERTY *InterruptProp; CONST INTERRUPT_PROPERTY *InterruptProp;
INT32 SecIntrNum, IntrNum, VirtIntrNum, HypIntrNum; INT32 SecIntrNum, IntrNum, VirtIntrNum, HypIntrNum;
CONST CHAR8 *PsciMethod; CONST CHAR8 *PsciMethod;
@ -446,52 +441,6 @@ InitializeVirtFdtDxe (
} }
break; 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: case PropertyTypeRtc:
ASSERT (Len == 16); ASSERT (Len == 16);

View File

@ -54,10 +54,6 @@
gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress
gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress
gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress
gArmVirtTokenSpaceGuid.PcdArmGicRevision
gArmTokenSpaceGuid.PcdGicDistributorBase
gArmTokenSpaceGuid.PcdGicRedistributorsBase
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
gArmTokenSpaceGuid.PcdArmArchTimerIntrNum gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum