From 4886a6591bf5bc2d3a64f7486101556a29b1320d Mon Sep 17 00:00:00 2001 From: Oleksii Kurochko Date: Fri, 20 Apr 2018 15:38:57 +0300 Subject: 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 Reviewed-on: https://review.coreboot.org/25753 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Rudolph Reviewed-by: Paul Menzel --- src/mainboard/emulation/qemu-i440fx/fw_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c index 4db148cdba..7e3337460d 100644 --- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c +++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c @@ -294,7 +294,7 @@ unsigned long fw_cfg_acpi_tables(unsigned long start) ptr = (uint8_t *)(addrs[dst] + s[i].cksum.offset); cksum_data = (void *)(addrs[dst] + s[i].cksum.start); cksum = acpi_checksum(cksum_data, s[i].cksum.length); - write_le32(ptr, cksum); + write_le8(ptr, cksum); break; default: -- cgit v1.2.3