From c19161538cfdec472c9883c41649c8159e4dfeb1 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Sun, 28 Jul 2019 18:29:42 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/34601 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese --- src/mainboard/emulation/qemu-riscv/mainboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); } -- cgit v1.2.3