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>
diff --git a/board/emulation/qemu-sbsa/acpi.c b/board/emulation/qemu-sbsa/acpi.c
index ba85e08..7e4c55c 100644
--- a/board/emulation/qemu-sbsa/acpi.c
+++ b/board/emulation/qemu-sbsa/acpi.c
@@ -133,7 +133,7 @@
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 @@
}
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);