[PATCH 1/2] acpi: acpi_table: Fix compilation on QFW enabled platforms
Patrick Rudolph
patrick.rudolph at 9elements.com
Thu Nov 14 12:50:43 CET 2024
On ACPI enabled platforms where QFW passes in the pre-generated
ACPI tables do not attempt to fill MADT and FADT. On all other
platforms MADT and FADT must be filled by SoC or mainboard code.
Fixes a compilation error on QEMU platforms that enable:
- CONFIG_QFW_ACPI
Signed-off-by: Patrick Rudolph <patrick.rudolph at 9elements.com>
---
lib/acpi/acpi_table.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/acpi/acpi_table.c b/lib/acpi/acpi_table.c
index 150f75027a..e44b6f3800 100644
--- a/lib/acpi/acpi_table.c
+++ b/lib/acpi/acpi_table.c
@@ -241,6 +241,10 @@ int acpi_write_fadt(struct acpi_ctx *ctx, const struct acpi_writer *entry)
struct acpi_table_header *header;
struct acpi_fadt *fadt;
+ /* On QFW ACPI enabled platforms this is never called */
+ if (IS_ENABLED(CONFIG_QFW_ACPI))
+ return 0;
+
fadt = ctx->current;
header = &fadt->header;
@@ -281,6 +285,10 @@ int acpi_write_madt(struct acpi_ctx *ctx, const struct acpi_writer *entry)
struct acpi_madt *madt;
void *current;
+ /* On QFW ACPI enabled platforms this is never called */
+ if (IS_ENABLED(CONFIG_QFW_ACPI))
+ return 0;
+
madt = ctx->current;
memset(madt, '\0', sizeof(struct acpi_madt));
--
2.46.2
More information about the U-Boot
mailing list