Instead of having a build time switch to prevent the FDT configuration
table from being installed, make this behavior dependent on whether we
are passing ACPI tables to the OS. This is done by looking for the
ACPI 2.0 configuration table, and only installing the FDT one if the
ACPI one cannot be found.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
# 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
# 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
# -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
\r
!include ArmVirtPkg/ArmVirt.dsc.inc\r
\r
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE\r
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE\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
[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/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 <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
#include <Guid/EventGroup.h>\r
#include <Guid/Fdt.h>\r
#include <Guid/FdtHob.h>\r
)\r
{\r
EFI_STATUS Status;\r
)\r
{\r
EFI_STATUS 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
+ //\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
Status = gBS->InstallConfigurationTable (&gFdtTableGuid, mDeviceTreeBase);\r
ASSERT_EFI_ERROR (Status);\r
}\r
Status = gBS->InstallConfigurationTable (&gFdtTableGuid, mDeviceTreeBase);\r
ASSERT_EFI_ERROR (Status);\r
}\r
HobLib\r
UefiBootServicesTableLib\r
UefiDriverEntryPoint\r
HobLib\r
UefiBootServicesTableLib\r
UefiDriverEntryPoint\r
\r
[Protocols]\r
gFdtClientProtocolGuid ## PRODUCES\r
\r
[Guids]\r
\r
[Protocols]\r
gFdtClientProtocolGuid ## PRODUCES\r
\r
[Guids]\r
gEfiEventReadyToBootGuid\r
gFdtHobGuid\r
gFdtTableGuid\r
\r
gEfiEventReadyToBootGuid\r
gFdtHobGuid\r
gFdtTableGuid\r
\r
-[FeaturePcd]\r
- gArmVirtTokenSpaceGuid.PcdPureAcpiBoot\r
-\r