]> git.ipfire.org Git - thirdparty/u-boot.git/commit
acpi: fix initial RSDT and XSDT size
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 20 Apr 2026 16:47:25 +0000 (18:47 +0200)
committerSimon Glass <sjg@chromium.org>
Mon, 11 May 2026 18:04:43 +0000 (12:04 -0600)
commit3d09ec64ebabffdd962b1a683a6b239773065850
tree8d6fc241034c12d2bb7a8f36435efbd736ee5a0c
parent22a285380e35a31d0a882af66278bc1edc1b917e
acpi: fix initial RSDT and XSDT size

When creating the RSDT and the XSDT table they contain no entries.
The table size therefore must equal the header size.

Without this change a NULL deference has been observed in
acpi_find_table() when running `ut dm` on sandbox64_defconfig
executed via `sudo ./u-boot -D`.

Fixes: 94ba15a3f13f ("x86: Move base tables to a writer function")
Fixes: 7e586f69070d ("acpi: Put table-setup code in its own function")
Fixes: ab5efd576c4e ("x86: acpi: Adjust order in acpi_table.c")
Fixes: 867bcb63e79f ("x86: Generate a valid ACPI table")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Update dm_test_acpi_ctx_and_base_tables() in test/dm/acpi.c to expect
sizeof(struct acpi_table_header) for the initial table length (instead
of sizeof(*rsdt) / sizeof(*xsdt)), and to compute the checksum over
header->length bytes rather than the full struct size:
Signed-off-by: Simon Glass <sjg@chromium.org>
lib/acpi/base.c
test/dm/acpi.c