X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ArmVirtPkg%2FVirtFdtDxe%2FVirtFdtDxe.c;h=cebd4aa91fd9e6f0af50b2af546159bfa2142e6f;hb=1e7143d81a08c18d0b684853a756362ad7f693f3;hp=31e0ca7db8b480c90bfb048f5cb23b04e756cb7c;hpb=ffea0a2ce21e8e9878587de2419959a7bfea4021;p=mirror_edk2.git diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c index 31e0ca7db8..cebd4aa91f 100644 --- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c +++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c @@ -28,7 +28,6 @@ #include #include -#include #include #include @@ -42,9 +41,7 @@ typedef struct { typedef enum { PropertyTypeUnknown, - PropertyTypeRtc, PropertyTypeVirtio, - PropertyTypeUart, PropertyTypeXen, } PROPERTY_TYPE; @@ -54,9 +51,7 @@ typedef struct { } PROPERTY; STATIC CONST PROPERTY CompatibleProperties[] = { - { PropertyTypeRtc, "arm,pl031" }, { PropertyTypeVirtio, "virtio,mmio" }, - { PropertyTypeUart, "arm,pl011" }, { PropertyTypeXen, "xen,xen" }, { PropertyTypeUnknown, "" } }; @@ -96,7 +91,6 @@ InitializeVirtFdtDxe ( VOID *Hob; VOID *DeviceTreeBase; INT32 Node, Prev; - INT32 RtcNode; EFI_STATUS Status; CONST CHAR8 *Type; INT32 Len; @@ -119,7 +113,6 @@ InitializeVirtFdtDxe ( DEBUG ((EFI_D_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, DeviceTreeBase)); - RtcNode = -1; // // Now enumerate the nodes and install peripherals that we are interested in, // i.e., GIC, RTC and virtio MMIO nodes @@ -196,18 +189,6 @@ InitializeVirtFdtDxe ( } break; - case PropertyTypeRtc: - ASSERT (Len == 16); - - RegBase = fdt64_to_cpu (((UINT64 *)RegProp)[0]); - ASSERT (RegBase < MAX_UINT32); - - PcdSet32 (PcdPL031RtcBase, (UINT32)RegBase); - - DEBUG ((EFI_D_INFO, "Found PL031 RTC @ 0x%Lx\n", RegBase)); - RtcNode = Node; - break; - case PropertyTypeXen: ASSERT (Len == 16); @@ -233,25 +214,5 @@ InitializeVirtFdtDxe ( } } - if (!FeaturePcdGet (PcdPureAcpiBoot)) { - // - // Only install the FDT as a configuration table if we want to leave it up - // to the OS to decide whether it prefers ACPI over DT. - // - Status = gBS->InstallConfigurationTable (&gFdtTableGuid, DeviceTreeBase); - ASSERT_EFI_ERROR (Status); - - // - // UEFI takes ownership of the RTC hardware, and exposes its functionality - // through the UEFI Runtime Services GetTime, SetTime, etc. This means we - // need to disable it in the device tree to prevent the OS from attaching its - // device driver as well. - // - if ((RtcNode != -1) && - fdt_setprop_string (DeviceTreeBase, RtcNode, "status", - "disabled") != 0) { - DEBUG ((EFI_D_WARN, "Failed to set PL031 status to 'disabled'\n")); - } - } return EFI_SUCCESS; }