]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Revert "ArmVirtPkg/FdtClientDxe: make DT table installation !ACPI dependent"
authorLaszlo Ersek <lersek@redhat.com>
Fri, 17 Mar 2017 12:37:47 +0000 (13:37 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 28 Mar 2017 11:48:39 +0000 (13:48 +0200)
This reverts commit 78c41ff519b187d8979cda7074f007a6323f9acd.

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/ArmVirtPkg.dec
ArmVirtPkg/ArmVirtQemu.dsc
ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf

index efe83a383d552e7d3752e615c494723c6a0f8867..a5ec421664450eda2495ede370d2b3501081c50d 100644 (file)
   # EFI_VT_100_GUID.\r
   #\r
   gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x65, 0x60, 0xA6, 0xDF, 0x19, 0xB4, 0xD3, 0x11, 0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D}|VOID*|0x00000007\r
+\r
+[PcdsFeatureFlag]\r
+  #\r
+  # Pure ACPI boot\r
+  #\r
+  # Inhibit installation of the FDT as a configuration table if this feature\r
+  # PCD is TRUE. Otherwise, the OS is presented with both a DT and an ACPI\r
+  # description of the platform, and it is up to the OS to choose.\r
+  #\r
+  gArmVirtTokenSpaceGuid.PcdPureAcpiBoot|FALSE|BOOLEAN|0x0000000a\r
index 4f686faa559c2f57d627cb959a930cc63f83fdee..4b556f309a6c8d790eaad629634506c6bdbcbe27 100644 (file)
@@ -34,6 +34,7 @@
   # -D FLAG=VALUE\r
   #\r
   DEFINE SECURE_BOOT_ENABLE      = FALSE\r
+  DEFINE PURE_ACPI_BOOT_ENABLE   = FALSE\r
 \r
 !include ArmVirtPkg/ArmVirt.dsc.inc\r
 \r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE\r
 \r
+!if $(PURE_ACPI_BOOT_ENABLE) == TRUE\r
+  gArmVirtTokenSpaceGuid.PcdPureAcpiBoot|TRUE\r
+!endif\r
+\r
 [PcdsFixedAtBuild.common]\r
   gArmPlatformTokenSpaceGuid.PcdCoreCount|1\r
 !if $(ARCH) == AARCH64\r
index 21c1074e331cf4e575742e3ffcc7d806c76e5871..4cf79f70cb2ae857797fb0452c8bd7427078b231 100644 (file)
 #include <Library/DebugLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/UefiLib.h>\r
 #include <Library/HobLib.h>\r
 #include <libfdt.h>\r
 \r
-#include <Guid/Acpi.h>\r
 #include <Guid/EventGroup.h>\r
 #include <Guid/Fdt.h>\r
 #include <Guid/FdtHob.h>\r
@@ -318,16 +316,12 @@ OnReadyToBoot (
   )\r
 {\r
   EFI_STATUS      Status;\r
-  VOID            *Table;\r
 \r
-  //\r
-  // Only install the FDT as a configuration table if we are not exposing\r
-  // ACPI 2.0 (or later) tables. Note that the legacy ACPI table GUID has\r
-  // no meaning on ARM since we need at least ACPI 5.0 support, and the\r
-  // 64-bit ACPI 2.0 table GUID is mandatory in that case.\r
-  //\r
-  Status = EfiGetSystemConfigurationTable (&gEfiAcpi20TableGuid, &Table);\r
-  if (EFI_ERROR (Status) || Table == NULL) {\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
index 9861f41e968b5b86d1f5ba49d2559a1886db6c60..00017727c32caef95667bcda7829249cf1e00cbd 100644 (file)
   HobLib\r
   UefiBootServicesTableLib\r
   UefiDriverEntryPoint\r
-  UefiLib\r
 \r
 [Protocols]\r
   gFdtClientProtocolGuid                  ## PRODUCES\r
 \r
 [Guids]\r
-  gEfiAcpi20TableGuid\r
   gEfiEventReadyToBootGuid\r
   gFdtHobGuid\r
   gFdtTableGuid\r
 \r
+[FeaturePcd]\r
+  gArmVirtTokenSpaceGuid.PcdPureAcpiBoot\r
+\r
 [Depex]\r
   TRUE\r