summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2017-03-17 13:44:41 +0100
committerLaszlo Ersek <lersek@redhat.com>2017-03-28 13:48:39 +0200
commita00601c6de65d0d1b43bd91ba6c43238d9db2ed4 (patch)
tree3a27e7659aa14c24b6231cf648c69eaba424fb5f /ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
parent30cb1485b1df44cf4fbec3b80051ef326da12eb6 (diff)
downloadedk2-a00601c6de65d0d1b43bd91ba6c43238d9db2ed4.tar.gz
edk2-a00601c6de65d0d1b43bd91ba6c43238d9db2ed4.tar.bz2
edk2-a00601c6de65d0d1b43bd91ba6c43238d9db2ed4.zip
Revert "ArmVirtPkg/FdtClientDxe: install DT configuration table at ReadyToBoot"
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>
Diffstat (limited to 'ArmVirtPkg/FdtClientDxe/FdtClientDxe.c')
-rw-r--r--ArmVirtPkg/FdtClientDxe/FdtClientDxe.c49
1 files changed, 9 insertions, 40 deletions
diff --git a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
index 4cf79f70cb..547a29fce6 100644
--- a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
+++ b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
@@ -20,7 +20,6 @@
#include <Library/HobLib.h>
#include <libfdt.h>
-#include <Guid/EventGroup.h>
#include <Guid/Fdt.h>
#include <Guid/FdtHob.h>
@@ -307,30 +306,6 @@ STATIC FDT_CLIENT_PROTOCOL mFdtClientProtocol = {
GetOrInsertChosenNode,
};
-STATIC
-VOID
-EFIAPI
-OnReadyToBoot (
- EFI_EVENT Event,
- VOID *Context
- )
-{
- EFI_STATUS Status;
-
- 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, mDeviceTreeBase);
- ASSERT_EFI_ERROR (Status);
- }
-
- gBS->CloseEvent (Event);
-}
-
-STATIC EFI_EVENT mReadyToBootEvent;
-
EFI_STATUS
EFIAPI
InitializeFdtClientDxe (
@@ -358,21 +333,15 @@ InitializeFdtClientDxe (
DEBUG ((EFI_D_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, mDeviceTreeBase));
- Status = gBS->InstallProtocolInterface (&ImageHandle, &gFdtClientProtocolGuid,
- EFI_NATIVE_INTERFACE, &mFdtClientProtocol);
- if (EFI_ERROR (Status)) {
- return Status;
+ 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);
}
- Status = gBS->CreateEventEx (
- EVT_NOTIFY_SIGNAL,
- TPL_CALLBACK,
- OnReadyToBoot,
- NULL,
- &gEfiEventReadyToBootGuid,
- &mReadyToBootEvent
- );
- ASSERT_EFI_ERROR (Status);
-
- return EFI_SUCCESS;
+ return gBS->InstallProtocolInterface (&ImageHandle, &gFdtClientProtocolGuid,
+ EFI_NATIVE_INTERFACE, &mFdtClientProtocol);
}