diff options
| author | Heinrich Schuchardt <[email protected]> | 2026-06-28 10:28:08 +0200 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2026-07-16 00:40:42 +0200 |
| commit | da91be14c1302d17b20d9a5d53bc99e9ad34c270 (patch) | |
| tree | 6296d3beb90217582374e279461fece89edb4922 | |
| parent | 8dbe57ba648648c4897717cebbc4505a8e0a8c23 (diff) | |
qfw: fix RSDP ext_checksum recomputation
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 <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
| -rw-r--r-- | drivers/misc/qfw_acpi.c | 1 |
1 files changed, 1 insertions, 0 deletions
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()); |
