From 0bcdd40d789236aff2c205511dfc962a76a7c3be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Thu, 6 Jul 2023 14:47:07 +0300 Subject: [PATCH] acpi/acpi.c: Fix regression with DSDT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix regression introduced with commit 01af0f8ac803 ("acpi/acpi.c: Reduce boilerplate"). DSDT table is not to be listed within RSDT/XSDT, ACPICA and/or OSPM may try load it twice raising conflicts in the namespace and effectively ignoring all or most of the AML. Change-Id: I0e6d07b35522f2bf9a51cef0a7e3181b15087d88 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/76321 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held Reviewed-by: Arthur Heymans Reviewed-by: Lean Sheng Tan Reviewed-by: Sean Rhodes --- src/acpi/acpi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/acpi/acpi.c b/src/acpi/acpi.c index 61e6c50fe2..53f8e0dfd3 100644 --- a/src/acpi/acpi.c +++ b/src/acpi/acpi.c @@ -1909,6 +1909,10 @@ unsigned long write_acpi_tables(const unsigned long start) header->checksum = acpi_checksum((void *)header, header->length); current += header->length; current = acpi_align_current(current); + + if (tables[i].create_table == acpi_create_dsdt) + continue; + printk(BIOS_DEBUG, "ACPI: * %.4s\n", header->signature); acpi_add_table(rsdp, header); }