diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-04-08 11:45:08 +0200 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-04-13 17:26:06 +0200 |
commit | 1e7143d81a08c18d0b684853a756362ad7f693f3 (patch) | |
tree | ee9157ecd13b6f31a898626697255beab367c2ff /ArmVirtPkg/FdtClientDxe/FdtClientDxe.c | |
parent | 70bff56093e02a507bc968ac7dc79ae5ee5d53a0 (diff) | |
download | edk2-1e7143d81a08c18d0b684853a756362ad7f693f3.zip edk2-1e7143d81a08c18d0b684853a756362ad7f693f3.tar.gz edk2-1e7143d81a08c18d0b684853a756362ad7f693f3.tar.bz2 |
ArmVirtPkg/VirtFdtDxe: move FDT config table installation to FdtClientDxe
Now that FdtClientDxe is the core driver that takes ownership of the host
supplied FDT, it makes sense to put it in charge of installing the FDT
configuration table as well.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'ArmVirtPkg/FdtClientDxe/FdtClientDxe.c')
-rw-r--r-- | ArmVirtPkg/FdtClientDxe/FdtClientDxe.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c index 9c589e6..c336e24 100644 --- a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c +++ b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c @@ -20,6 +20,7 @@ #include <Library/HobLib.h>
#include <libfdt.h>
+#include <Guid/Fdt.h>
#include <Guid/FdtHob.h>
#include <Protocol/FdtClient.h>
@@ -234,6 +235,7 @@ InitializeFdtClientDxe ( {
VOID *Hob;
VOID *DeviceTreeBase;
+ EFI_STATUS Status;
Hob = GetFirstGuidHob (&gFdtHobGuid);
if (Hob == NULL || GET_GUID_HOB_DATA_SIZE (Hob) != sizeof (UINT64)) {
@@ -251,6 +253,15 @@ InitializeFdtClientDxe ( DEBUG ((EFI_D_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, mDeviceTreeBase));
+ 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);
+ }
+
return gBS->InstallProtocolInterface (&ImageHandle, &gFdtClientProtocolGuid,
EFI_NATIVE_INTERFACE, &mFdtClientProtocol);
}
|