summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2025-03-22 00:21:19 +0100
committerTom Rini <trini@konsulko.com>2025-04-08 15:22:56 -0600
commit5eca1696d25f61ad58582820f8477360c81b8b7b (patch)
treed3e784182bfcba8153c2799f4a1fd069c371ebbf
parente0055ac9bbd3059c961b1d7f98dcff276502c847 (diff)
qemu-sbsa: simplify updating ACPI table header checksum
Use acpi_update_checksum() to update table header. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
-rw-r--r--board/emulation/qemu-sbsa/acpi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/board/emulation/qemu-sbsa/acpi.c b/board/emulation/qemu-sbsa/acpi.c
index ba85e08fc7d..7e4c55cc818 100644
--- a/board/emulation/qemu-sbsa/acpi.c
+++ b/board/emulation/qemu-sbsa/acpi.c
@@ -133,7 +133,7 @@ static int sbsa_write_gtdt(struct acpi_ctx *ctx, const struct acpi_writer *entry
gtdt->cnt_read_base = 0xffffffffffffffff;
// FIXME: VirtualPL2Timer
- header->checksum = table_compute_checksum(header, header->length);
+ acpi_update_checksum(header);
acpi_add_table(ctx, gtdt);
@@ -181,7 +181,7 @@ static int acpi_write_pptt(struct acpi_ctx *ctx, const struct acpi_writer *entry
}
header->length = ctx->current - ctx->tab_start;
- header->checksum = table_compute_checksum(header, header->length);
+ acpi_update_checksum(header);
acpi_inc(ctx, header->length);
acpi_add_table(ctx, header);