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