acpi/acpi.c: Fix regression with DSDT

Fix regression introduced with commit 01af0f8ac8 ("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 <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76321
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
This commit is contained in:
Kyösti Mälkki 2023-07-06 14:47:07 +03:00 committed by Lean Sheng Tan
parent e8696e1b07
commit 0bcdd40d78
1 changed files with 4 additions and 0 deletions

View File

@ -1909,6 +1909,10 @@ unsigned long write_acpi_tables(const unsigned long start)
header->checksum = acpi_checksum((void *)header, header->length); header->checksum = acpi_checksum((void *)header, header->length);
current += header->length; current += header->length;
current = acpi_align_current(current); current = acpi_align_current(current);
if (tables[i].create_table == acpi_create_dsdt)
continue;
printk(BIOS_DEBUG, "ACPI: * %.4s\n", header->signature); printk(BIOS_DEBUG, "ACPI: * %.4s\n", header->signature);
acpi_add_table(rsdp, header); acpi_add_table(rsdp, header);
} }