]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi: x86: Correct the condition for installing ACPI tables
authorSimon Glass <sjg@chromium.org>
Wed, 20 Sep 2023 03:00:12 +0000 (21:00 -0600)
committerBin Meng <bmeng@tinylab.org>
Thu, 21 Sep 2023 22:05:40 +0000 (06:05 +0800)
It is not always the case that U-Boot builds the ACPI tables itself. For
example, when booting from coreboot, the ACPI tables are built by
coreboot.

Correct the Makefile condition so that U-Boot can pass on tables built
by a previous firmware stage.

Tidy up the installation-condition code while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
lib/efi_loader/Makefile
lib/efi_loader/efi_setup.c

index 1a8c8d7cab5c12b767a16a1dbdf78163a0bd647c..0eb748ff1a59edb30d6a7f2bebd0f7e96705774d 100644 (file)
@@ -78,7 +78,7 @@ obj-$(CONFIG_EFI_ESRT) += efi_esrt.o
 obj-$(CONFIG_VIDEO) += efi_gop.o
 obj-$(CONFIG_BLK) += efi_disk.o
 obj-$(CONFIG_NETDEVICES) += efi_net.o
-obj-$(CONFIG_GENERATE_ACPI_TABLE) += efi_acpi.o
+obj-$(CONFIG_ACPI) += efi_acpi.o
 obj-$(CONFIG_GENERATE_SMBIOS_TABLE) += efi_smbios.o
 obj-$(CONFIG_EFI_RNG_PROTOCOL) += efi_rng.o
 obj-$(CONFIG_EFI_TCG2_PROTOCOL) += efi_tcg2.o
index 58d4e1340233b7d3c9929c69a8f9118bcbb310e3..ad719afd63282008ce72ab193a9a7374b360e4d5 100644 (file)
@@ -321,11 +321,11 @@ efi_status_t efi_init_obj_list(void)
        if (ret != EFI_SUCCESS)
                goto out;
 #endif
-#ifdef CONFIG_GENERATE_ACPI_TABLE
-       ret = efi_acpi_register();
-       if (ret != EFI_SUCCESS)
-               goto out;
-#endif
+       if (IS_ENABLED(CONFIG_ACPI)) {
+               ret = efi_acpi_register();
+               if (ret != EFI_SUCCESS)
+                       goto out;
+       }
 #ifdef CONFIG_GENERATE_SMBIOS_TABLE
        ret = efi_smbios_register();
        if (ret != EFI_SUCCESS)