]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Revert "ArmVirtPkg/FdtClientDxe: install DT configuration table at ReadyToBoot"
authorLaszlo Ersek <lersek@redhat.com>
Fri, 17 Mar 2017 12:44:41 +0000 (13:44 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 28 Mar 2017 11:48:39 +0000 (13:48 +0200)
This reverts commit 18f6d4df9ece8b91b86511bcdd1cf7da478c3627.

We realized that DXE drivers that are independent of AcpiPlatformDxe (that
is, independent of QEMU's ACPI generation), such as RamDiskDxe and
BootGraphicsResourceTableDxe, may produce and/or manipulate ACPI tables,
at driver dispatch or even at Ready To Boot.

This makes it unsafe for us to check for ACPI presence in the UEFI system
config table in a Ready To Boot callback, in order to decide about
exposing the DT.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf

index 4cf79f70cb2ae857797fb0452c8bd7427078b231..547a29fce62c9fc06cc525776daf5ba983af708f 100644 (file)
@@ -20,7 +20,6 @@
 #include <Library/HobLib.h>\r
 #include <libfdt.h>\r
 \r
-#include <Guid/EventGroup.h>\r
 #include <Guid/Fdt.h>\r
 #include <Guid/FdtHob.h>\r
 \r
@@ -307,30 +306,6 @@ STATIC FDT_CLIENT_PROTOCOL mFdtClientProtocol = {
   GetOrInsertChosenNode,\r
 };\r
 \r
-STATIC\r
-VOID\r
-EFIAPI\r
-OnReadyToBoot (\r
-  EFI_EVENT       Event,\r
-  VOID            *Context\r
-  )\r
-{\r
-  EFI_STATUS      Status;\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, mDeviceTreeBase);\r
-    ASSERT_EFI_ERROR (Status);\r
-  }\r
-\r
-  gBS->CloseEvent (Event);\r
-}\r
-\r
-STATIC EFI_EVENT         mReadyToBootEvent;\r
-\r
 EFI_STATUS\r
 EFIAPI\r
 InitializeFdtClientDxe (\r
@@ -358,21 +333,15 @@ InitializeFdtClientDxe (
 \r
   DEBUG ((EFI_D_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, mDeviceTreeBase));\r
 \r
-  Status = gBS->InstallProtocolInterface (&ImageHandle, &gFdtClientProtocolGuid,\r
-                  EFI_NATIVE_INTERFACE, &mFdtClientProtocol);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\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
-  Status = gBS->CreateEventEx (\r
-                  EVT_NOTIFY_SIGNAL,\r
-                  TPL_CALLBACK,\r
-                  OnReadyToBoot,\r
-                  NULL,\r
-                  &gEfiEventReadyToBootGuid,\r
-                  &mReadyToBootEvent\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  return EFI_SUCCESS;\r
+  return gBS->InstallProtocolInterface (&ImageHandle, &gFdtClientProtocolGuid,\r
+                EFI_NATIVE_INTERFACE, &mFdtClientProtocol);\r
 }\r
index 00017727c32caef95667bcda7829249cf1e00cbd..3a0cd37040ebd4a6c33b651cb3960117f194f3ae 100644 (file)
@@ -42,7 +42,6 @@
   gFdtClientProtocolGuid                  ## PRODUCES\r
 \r
 [Guids]\r
-  gEfiEventReadyToBootGuid\r
   gFdtHobGuid\r
   gFdtTableGuid\r
 \r