]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg/VirtFdtDxe: move FDT config table installation to FdtClientDxe
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 8 Apr 2016 09:45:08 +0000 (11:45 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 13 Apr 2016 15:26:06 +0000 (17:26 +0200)
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>
ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c
ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf

index 9c589e620cb40c7d542a85d4b8e26c05d9db2d7a..c336e2410033e2832db06fa98d2517a4948edc10 100644 (file)
@@ -20,6 +20,7 @@
 #include <Library/HobLib.h>\r
 #include <libfdt.h>\r
 \r
+#include <Guid/Fdt.h>\r
 #include <Guid/FdtHob.h>\r
 \r
 #include <Protocol/FdtClient.h>\r
@@ -234,6 +235,7 @@ InitializeFdtClientDxe (
 {\r
   VOID              *Hob;\r
   VOID              *DeviceTreeBase;\r
+  EFI_STATUS        Status;\r
 \r
   Hob = GetFirstGuidHob (&gFdtHobGuid);\r
   if (Hob == NULL || GET_GUID_HOB_DATA_SIZE (Hob) != sizeof (UINT64)) {\r
@@ -251,6 +253,15 @@ InitializeFdtClientDxe (
 \r
   DEBUG ((EFI_D_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, mDeviceTreeBase));\r
 \r
+  if (!FeaturePcdGet (PcdPureAcpiBoot)) {\r
+    //\r
+    // Only install the FDT as a configuration table if we want to leave it up\r
+    // to the OS to decide whether it prefers ACPI over DT.\r
+    //\r
+    Status = gBS->InstallConfigurationTable (&gFdtTableGuid, DeviceTreeBase);\r
+    ASSERT_EFI_ERROR (Status);\r
+  }\r
+\r
   return gBS->InstallProtocolInterface (&ImageHandle, &gFdtClientProtocolGuid,\r
                 EFI_NATIVE_INTERFACE, &mFdtClientProtocol);\r
 }\r
index 3647d37b02d2929a05f514ec5a190b50662d5fe2..3a0cd37040ebd4a6c33b651cb3960117f194f3ae 100644 (file)
 \r
 [Guids]\r
   gFdtHobGuid\r
+  gFdtTableGuid\r
+\r
+[FeaturePcd]\r
+  gArmVirtTokenSpaceGuid.PcdPureAcpiBoot\r
 \r
 [Depex]\r
   TRUE\r
index 8fe1277b6b498884552184aba9f140bd512bc16c..cebd4aa91fd9e6f0af50b2af546159bfa2142e6f 100644 (file)
@@ -28,7 +28,6 @@
 #include <libfdt.h>\r
 #include <Library/XenIoMmioLib.h>\r
 \r
-#include <Guid/Fdt.h>\r
 #include <Guid/VirtioMmioTransport.h>\r
 #include <Guid/FdtHob.h>\r
 \r
@@ -215,14 +214,5 @@ InitializeVirtFdtDxe (
     }\r
   }\r
 \r
-  if (!FeaturePcdGet (PcdPureAcpiBoot)) {\r
-    //\r
-    // Only install the FDT as a configuration table if we want to leave it up\r
-    // to the OS to decide whether it prefers ACPI over DT.\r
-    //\r
-    Status = gBS->InstallConfigurationTable (&gFdtTableGuid, DeviceTreeBase);\r
-    ASSERT_EFI_ERROR (Status);\r
-  }\r
-\r
   return EFI_SUCCESS;\r
 }\r
index 8c098e5885aef8ba72a70c0a69c853290da5565e..4dd46cf870117f49fd85834013c6ca29697cf6f8 100644 (file)
   XenIoMmioLib\r
 \r
 [Guids]\r
-  gFdtTableGuid\r
   gVirtioMmioTransportGuid\r
   gFdtHobGuid\r
 \r
-[FeaturePcd]\r
-  gArmVirtTokenSpaceGuid.PcdPureAcpiBoot\r
-\r
 [Protocols]\r
   gEfiDevicePathProtocolGuid\r
 \r