[PATCH v3 10/11] qfw: fix RSDP ext_checksum recomputation

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Sun Jun 28 10:28:08 CEST 2026


table_compute_checksum() returns the value that makes the byte sum of
the buffer zero. If the ext_checksum field already contains a non-zero
value (as QEMU's firmware-provided RSDP does), adding that existing
value into the sum produces an incorrect complement. Zero the field
before calling table_compute_checksum() so the calculation starts from
a clean state, matching the pattern used in acpi_write_rsdp().

Reviewed-by: Simon Glass <sjg at chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
v3:
	no change
v2
	new patch
---
 drivers/misc/qfw_acpi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/misc/qfw_acpi.c b/drivers/misc/qfw_acpi.c
index 721f42ecbc3..afa3b820395 100644
--- a/drivers/misc/qfw_acpi.c
+++ b/drivers/misc/qfw_acpi.c
@@ -265,6 +265,7 @@ out:
 	struct acpi_rsdp *rsdp = ctx->rsdp;
 
 	rsdp->length = sizeof(*rsdp);
+	rsdp->ext_checksum = 0;
 	rsdp->ext_checksum = table_compute_checksum((u8 *)rsdp, sizeof(*rsdp));
 
 	gd_set_acpi_start(acpi_get_rsdp_addr());
-- 
2.53.0



More information about the U-Boot mailing list