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>
# 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
# -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
#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
)\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
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