mainboard/emulation/qemu-i440fx/fw_cfg: fix checksum for ACPI tables
Current patch fixes problem with validation of ACPI in Linux kernel: ACPI BIOS Error (bug): A valid RSDP was not found (20180313/tbxfroot-210) 1. function acpi_checksum() returns u8, so seems that is not good idea to use write_le32(). 2. at least RSDP (https://wiki.osdev.org/RSDP#Validating_the_RSDP) has u8 checksum. Change-Id: I1fb29ef4e58982aab0c54b1f715c5658d2a663d8 Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> Reviewed-on: https://review.coreboot.org/25753 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
parent
4e8adbc227
commit
4886a6591b
|
@ -294,7 +294,7 @@ unsigned long fw_cfg_acpi_tables(unsigned long start)
|
||||||
ptr = (uint8_t *)(addrs[dst] + s[i].cksum.offset);
|
ptr = (uint8_t *)(addrs[dst] + s[i].cksum.offset);
|
||||||
cksum_data = (void *)(addrs[dst] + s[i].cksum.start);
|
cksum_data = (void *)(addrs[dst] + s[i].cksum.start);
|
||||||
cksum = acpi_checksum(cksum_data, s[i].cksum.length);
|
cksum = acpi_checksum(cksum_data, s[i].cksum.length);
|
||||||
write_le32(ptr, cksum);
|
write_le8(ptr, cksum);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue