summaryrefslogtreecommitdiff
path: root/ArmVirtPkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-04-08 11:45:08 +0200
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-04-13 17:26:06 +0200
commit1e7143d81a08c18d0b684853a756362ad7f693f3 (patch)
treeee9157ecd13b6f31a898626697255beab367c2ff /ArmVirtPkg
parent70bff56093e02a507bc968ac7dc79ae5ee5d53a0 (diff)
downloadedk2-platforms-1e7143d81a08c18d0b684853a756362ad7f693f3.tar.xz
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')
-rw-r--r--ArmVirtPkg/FdtClientDxe/FdtClientDxe.c11
-rw-r--r--ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf4
-rw-r--r--ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c10
-rw-r--r--ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf4
4 files changed, 15 insertions, 14 deletions
diff --git a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
index 9c589e620c..c336e24100 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);
}
diff --git a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
index 3647d37b02..3a0cd37040 100644
--- a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
+++ b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
@@ -43,6 +43,10 @@
[Guids]
gFdtHobGuid
+ gFdtTableGuid
+
+[FeaturePcd]
+ gArmVirtTokenSpaceGuid.PcdPureAcpiBoot
[Depex]
TRUE
diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c
index 8fe1277b6b..cebd4aa91f 100644
--- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c
+++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c
@@ -28,7 +28,6 @@
#include <libfdt.h>
#include <Library/XenIoMmioLib.h>
-#include <Guid/Fdt.h>
#include <Guid/VirtioMmioTransport.h>
#include <Guid/FdtHob.h>
@@ -215,14 +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);
- }
-
return EFI_SUCCESS;
}
diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
index 8c098e5885..4dd46cf870 100644
--- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
+++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
@@ -45,13 +45,9 @@
XenIoMmioLib
[Guids]
- gFdtTableGuid
gVirtioMmioTransportGuid
gFdtHobGuid
-[FeaturePcd]
- gArmVirtTokenSpaceGuid.PcdPureAcpiBoot
-
[Protocols]
gEfiDevicePathProtocolGuid