summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2019-07-28 18:29:42 +0200
committerPhilipp Deppenwiese <zaolin.daisuki@gmail.com>2019-07-29 18:29:45 +0000
commitc19161538cfdec472c9883c41649c8159e4dfeb1 (patch)
tree04a94e63a4d1a74edbcb6762a5ee5ae1262ed2c1 /src
parent04f995150f1cf49ce4b9a999095f1ebf8fe28911 (diff)
mb/emulation/qemu-riscv: Fix regression
Fix regression introduced in bd4bcab "lib: Rewrite qemu-armv7 ramdetect". The detected DRAM size is in MiB, thus needs to adjusted accordingly before passed to ram_resource. Wasn't seen earlier as everything works, except payload loading. Change-Id: I4931372f530e7b4e453a01e5595d15d95a544803 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34601 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/emulation/qemu-riscv/mainboard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mainboard/emulation/qemu-riscv/mainboard.c b/src/mainboard/emulation/qemu-riscv/mainboard.c
index 02356aa70e..88898087f4 100644
--- a/src/mainboard/emulation/qemu-riscv/mainboard.c
+++ b/src/mainboard/emulation/qemu-riscv/mainboard.c
@@ -28,7 +28,7 @@ static void mainboard_enable(struct device *dev)
}
dram_mb_detected = probe_ramsize((uintptr_t)_dram, CONFIG_DRAM_SIZE_MB);
- ram_resource(dev, 0, (uintptr_t)_dram / KiB, dram_mb_detected / KiB);
+ ram_resource(dev, 0, (uintptr_t)_dram / KiB, dram_mb_detected * MiB / KiB);
cbmem_recovery(0);
}