]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
ArmVirtPkg/FdtClientDxe: make DT table installation !ACPI dependent
[mirror_edk2.git] / ArmVirtPkg / FdtClientDxe / FdtClientDxe.c
index 4cf79f70cb2ae857797fb0452c8bd7427078b231..21c1074e331cf4e575742e3ffcc7d806c76e5871 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
@@ -316,12 +318,16 @@ OnReadyToBoot (
   )\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