summaryrefslogtreecommitdiff
path: root/src/mainboard/emulation
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2019-02-23 11:45:01 +0100
committerNico Huber <nico.h@gmx.de>2019-02-24 11:57:25 +0000
commit87abccdd898ea98ede687c17e9177107cb5c7521 (patch)
tree6c0bf019a7cc49c859b80dd784cb3a3127d4aa0f /src/mainboard/emulation
parentf606a2f5e654d1240f17bd6852c2ade0c2d22b32 (diff)
mb/emulation/qemu: Fix fw_cfg file loading
The change bcd84fe "mb/emulation/qemu-i440fx: change file handling" introduced a regression where it loads only 4 bytes of the ACPI and SMBIOS table, instead of the whole table. Load the whole ACPI and SMBIOS table. Tested on Qemu using GNU/Linux. Change-Id: Ibacbf7caab9be5f181c12e9dd39a2893b13cf6c9 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/c/31593 Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/emulation')
-rw-r--r--src/mainboard/emulation/qemu-i440fx/fw_cfg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
index 6a9ef03867..f43c280725 100644
--- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
+++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
@@ -251,7 +251,7 @@ unsigned long fw_cfg_acpi_tables(unsigned long start)
printk(BIOS_DEBUG, "QEMU: loading \"%s\" to 0x%lx (len %d)\n",
s[i].alloc.file, current, f.size);
- fw_cfg_get(f.select, (void *)current, sizeof(current));
+ fw_cfg_get(f.select, (void *)current, f.size);
addrs[i] = current;
current += f.size;
break;
@@ -454,7 +454,7 @@ unsigned long fw_cfg_smbios_tables(int *handle, unsigned long *current)
* We'll exclude the end marker as coreboot will add one.
*/
printk(BIOS_DEBUG, "QEMU: loading smbios tables to 0x%lx\n", start);
- fw_cfg_get(f.select, (void *)start, sizeof(start));
+ fw_cfg_get(f.select, (void *)start, f.size);
end = start;
do {
t0 = (struct smbios_type0*)end;