mirror of https://github.com/acidanthera/audk.git
ArmVirtPkg/VirtFdtDxe: remove timer DT node handling
The timer code no longer relies on VirtFdtDxe to set the PCDs, so remove the handling of the timer node and the references to those PCDs. 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:
parent
ffced38546
commit
479d5c4175
|
@ -45,7 +45,6 @@ typedef enum {
|
||||||
PropertyTypeRtc,
|
PropertyTypeRtc,
|
||||||
PropertyTypeVirtio,
|
PropertyTypeVirtio,
|
||||||
PropertyTypeUart,
|
PropertyTypeUart,
|
||||||
PropertyTypeTimer,
|
|
||||||
PropertyTypeFwCfg,
|
PropertyTypeFwCfg,
|
||||||
PropertyTypePciHost,
|
PropertyTypePciHost,
|
||||||
PropertyTypeXen,
|
PropertyTypeXen,
|
||||||
|
@ -60,20 +59,12 @@ STATIC CONST PROPERTY CompatibleProperties[] = {
|
||||||
{ PropertyTypeRtc, "arm,pl031" },
|
{ PropertyTypeRtc, "arm,pl031" },
|
||||||
{ PropertyTypeVirtio, "virtio,mmio" },
|
{ PropertyTypeVirtio, "virtio,mmio" },
|
||||||
{ PropertyTypeUart, "arm,pl011" },
|
{ PropertyTypeUart, "arm,pl011" },
|
||||||
{ PropertyTypeTimer, "arm,armv7-timer" },
|
|
||||||
{ PropertyTypeTimer, "arm,armv8-timer" },
|
|
||||||
{ PropertyTypeFwCfg, "qemu,fw-cfg-mmio" },
|
{ PropertyTypeFwCfg, "qemu,fw-cfg-mmio" },
|
||||||
{ PropertyTypePciHost, "pci-host-ecam-generic" },
|
{ PropertyTypePciHost, "pci-host-ecam-generic" },
|
||||||
{ PropertyTypeXen, "xen,xen" },
|
{ PropertyTypeXen, "xen,xen" },
|
||||||
{ PropertyTypeUnknown, "" }
|
{ PropertyTypeUnknown, "" }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
UINT32 Type;
|
|
||||||
UINT32 Number;
|
|
||||||
UINT32 Flags;
|
|
||||||
} INTERRUPT_PROPERTY;
|
|
||||||
|
|
||||||
STATIC
|
STATIC
|
||||||
PROPERTY_TYPE
|
PROPERTY_TYPE
|
||||||
GetTypeFromNode (
|
GetTypeFromNode (
|
||||||
|
@ -288,8 +279,6 @@ InitializeVirtFdtDxe (
|
||||||
VIRTIO_TRANSPORT_DEVICE_PATH *DevicePath;
|
VIRTIO_TRANSPORT_DEVICE_PATH *DevicePath;
|
||||||
EFI_HANDLE Handle;
|
EFI_HANDLE Handle;
|
||||||
UINT64 RegBase;
|
UINT64 RegBase;
|
||||||
CONST INTERRUPT_PROPERTY *InterruptProp;
|
|
||||||
INT32 SecIntrNum, IntrNum, VirtIntrNum, HypIntrNum;
|
|
||||||
UINT64 FwCfgSelectorAddress;
|
UINT64 FwCfgSelectorAddress;
|
||||||
UINT64 FwCfgSelectorSize;
|
UINT64 FwCfgSelectorSize;
|
||||||
UINT64 FwCfgDataAddress;
|
UINT64 FwCfgDataAddress;
|
||||||
|
@ -339,7 +328,7 @@ InitializeVirtFdtDxe (
|
||||||
// TODO use #cells root properties instead
|
// TODO use #cells root properties instead
|
||||||
//
|
//
|
||||||
RegProp = fdt_getprop (DeviceTreeBase, Node, "reg", &Len);
|
RegProp = fdt_getprop (DeviceTreeBase, Node, "reg", &Len);
|
||||||
ASSERT ((RegProp != NULL) || (PropType == PropertyTypeTimer));
|
ASSERT (RegProp != NULL);
|
||||||
|
|
||||||
switch (PropType) {
|
switch (PropType) {
|
||||||
case PropertyTypePciHost:
|
case PropertyTypePciHost:
|
||||||
|
@ -449,32 +438,6 @@ InitializeVirtFdtDxe (
|
||||||
RtcNode = Node;
|
RtcNode = Node;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PropertyTypeTimer:
|
|
||||||
//
|
|
||||||
// - interrupts : Interrupt list for secure, non-secure, virtual and
|
|
||||||
// hypervisor timers, in that order.
|
|
||||||
//
|
|
||||||
InterruptProp = fdt_getprop (DeviceTreeBase, Node, "interrupts", &Len);
|
|
||||||
ASSERT (Len == 36 || Len == 48);
|
|
||||||
|
|
||||||
SecIntrNum = fdt32_to_cpu (InterruptProp[0].Number)
|
|
||||||
+ (InterruptProp[0].Type ? 16 : 0);
|
|
||||||
IntrNum = fdt32_to_cpu (InterruptProp[1].Number)
|
|
||||||
+ (InterruptProp[1].Type ? 16 : 0);
|
|
||||||
VirtIntrNum = fdt32_to_cpu (InterruptProp[2].Number)
|
|
||||||
+ (InterruptProp[2].Type ? 16 : 0);
|
|
||||||
HypIntrNum = Len < 48 ? 0 : fdt32_to_cpu (InterruptProp[3].Number)
|
|
||||||
+ (InterruptProp[3].Type ? 16 : 0);
|
|
||||||
|
|
||||||
DEBUG ((EFI_D_INFO, "Found Timer interrupts %d, %d, %d, %d\n",
|
|
||||||
SecIntrNum, IntrNum, VirtIntrNum, HypIntrNum));
|
|
||||||
|
|
||||||
PcdSet32 (PcdArmArchTimerSecIntrNum, SecIntrNum);
|
|
||||||
PcdSet32 (PcdArmArchTimerIntrNum, IntrNum);
|
|
||||||
PcdSet32 (PcdArmArchTimerVirtIntrNum, VirtIntrNum);
|
|
||||||
PcdSet32 (PcdArmArchTimerHypIntrNum, HypIntrNum);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PropertyTypeXen:
|
case PropertyTypeXen:
|
||||||
ASSERT (Len == 16);
|
ASSERT (Len == 16);
|
||||||
|
|
||||||
|
|
|
@ -53,10 +53,6 @@
|
||||||
gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress
|
gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress
|
||||||
gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress
|
gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress
|
||||||
gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress
|
gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress
|
||||||
gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
|
|
||||||
gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
|
|
||||||
gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum
|
|
||||||
gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum
|
|
||||||
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase
|
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase
|
||||||
gArmPlatformTokenSpaceGuid.PcdPciBusMin
|
gArmPlatformTokenSpaceGuid.PcdPciBusMin
|
||||||
gArmPlatformTokenSpaceGuid.PcdPciBusMax
|
gArmPlatformTokenSpaceGuid.PcdPciBusMax
|
||||||
|
|
Loading…
Reference in New Issue