[PATCH 1/1] acpi: don't fill FADT, MADT if CONFIG_QFW_ACPI=y

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Fri Dec 20 01:37:59 CET 2024


When using the ACPI tables supplied by QEMU, we don't need to build the
FADT and MADT tables in U-Boot.

This patch avoids a build failure

    make qemu-riscv64_smode_defconfig acpi.config

    riscv64-linux-gnu-ld.bfd: lib/acpi/acpi_table.o:
    in function `acpi_write_fadt':
    lib/acpi/acpi_table.c:265:(.text.acpi_write_fadt+0x15c):
    undefined reference to `acpi_fill_fadt'

    riscv64-linux-gnu-ld.bfd: lib/acpi/acpi_table.o:
    in function `acpi_write_madt':
    lib/acpi/acpi_table.c:294:(.text.acpi_write_madt+0x52):
    undefined reference to `acpi_fill_madt'

Fixes: f5f7962091e4 ("acpi: x86: Write FADT in common code")
Fixes: 4a3fc0f525da ("acpi: x86: Move MADT to common code")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
 lib/acpi/acpi_table.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/acpi/acpi_table.c b/lib/acpi/acpi_table.c
index 150f75027a5..c0ed24984af 100644
--- a/lib/acpi/acpi_table.c
+++ b/lib/acpi/acpi_table.c
@@ -273,7 +273,9 @@ int acpi_write_fadt(struct acpi_ctx *ctx, const struct acpi_writer *entry)
 	return acpi_add_fadt(ctx, fadt);
 }
 
+#ifndef CONFIG_QFW_ACPI
 ACPI_WRITER(5fadt, "FADT", acpi_write_fadt, 0);
+#endif
 
 int acpi_write_madt(struct acpi_ctx *ctx, const struct acpi_writer *entry)
 {
@@ -308,7 +310,9 @@ int acpi_write_madt(struct acpi_ctx *ctx, const struct acpi_writer *entry)
 	return 0;
 }
 
+#ifndef CONFIG_QFW_ACPI
 ACPI_WRITER(5madt, "MADT", acpi_write_madt, 0);
+#endif
 
 void acpi_create_dbg2(struct acpi_dbg2_header *dbg2,
 		      int port_type, int port_subtype,
-- 
2.47.1



More information about the U-Boot mailing list