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>
This commit is contained in:
Patrick Rudolph 2019-07-28 18:29:42 +02:00 committed by Philipp Deppenwiese
parent 04f995150f
commit c19161538c
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}