summaryrefslogtreecommitdiff
path: root/src/acpi/acpi.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2023-06-15 17:04:16 +0200
committerLean Sheng Tan <sheng.tan@9elements.com>2023-06-17 13:15:01 +0000
commit3e523b495c2b7ed80a8b74714ff03952be411fee (patch)
tree0bc1708ca02d3d83aea659874c29e6ea7220fb37 /src/acpi/acpi.c
parentb5f6320c694766d10023fe8f5183c9c143441b2b (diff)
acpi/acpi.c: Fix printing all ACPI tables
Loop over tables in xsdt instead of maintaining a list of local variables to loop over. Some tables were not generated directly in the write_acpi_tables function, like IVRS or SRAT. Now those tables are printed too and the code is simpler. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: Ie0a6e2b6e2b72b5c8f59e730bea9b51007b507b6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75860 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Marvin Drees <marvin.drees@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/acpi/acpi.c')
-rw-r--r--src/acpi/acpi.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/acpi/acpi.c b/src/acpi/acpi.c
index aa1cd1cdd2..78135d79dd 100644
--- a/src/acpi/acpi.c
+++ b/src/acpi/acpi.c
@@ -2136,12 +2136,8 @@ unsigned long write_acpi_tables(unsigned long start)
if (CONFIG(DEBUG_ACPICA_COMPATIBLE)) {
printk(BIOS_DEBUG, "Printing ACPI tables in ACPICA compatible format\n");
- void *acpi_tables[] = { rsdt, xsdt, fadt, facs, slic, ssdt, dsdt,
- mcfg, tcpa, tpm2, madt, lpit, bert };
- for (size_t i = 0; i < ARRAY_SIZE(acpi_tables); i++) {
- if (acpi_tables[i] == NULL)
- continue;
- acpidump_print(acpi_tables[i]);
+ for (size_t i = 0; xsdt->entry[i] != 0; i++) {
+ acpidump_print((void *)(uintptr_t)xsdt->entry[i]);
}
printk(BIOS_DEBUG, "Done printing ACPI tables in ACPICA compatible format\n");
}