From e1c0cb737c201b736b15e098d50f196e88a57ff8 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Tue, 29 Oct 2019 21:23:09 +0100 Subject: mb/emulation/*-riscv: Initialize cbmem in romstage It is expected that cbmem is initialized in romstage. The qemu-riscv target did not perform that correctly. Fix this omission. Change-Id: I00f8e3b315e57a5c042889f48450f79d263f24b1 Signed-off-by: Arthur Heymans Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/c/coreboot/+/36446 Reviewed-by: Philipp Hug Tested-by: build bot (Jenkins) --- src/mainboard/emulation/qemu-riscv/romstage.c | 2 ++ src/mainboard/emulation/spike-riscv/romstage.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/mainboard/emulation/qemu-riscv/romstage.c b/src/mainboard/emulation/qemu-riscv/romstage.c index 684b2490a0..52c69f93d6 100644 --- a/src/mainboard/emulation/qemu-riscv/romstage.c +++ b/src/mainboard/emulation/qemu-riscv/romstage.c @@ -13,11 +13,13 @@ * GNU General Public License for more details. */ +#include #include #include void main(void) { console_init(); + cbmem_initialize_empty(); run_ramstage(); } diff --git a/src/mainboard/emulation/spike-riscv/romstage.c b/src/mainboard/emulation/spike-riscv/romstage.c index 205c89e155..b3d1b4d559 100644 --- a/src/mainboard/emulation/spike-riscv/romstage.c +++ b/src/mainboard/emulation/spike-riscv/romstage.c @@ -13,6 +13,7 @@ * GNU General Public License for more details. */ +#include #include #include @@ -20,6 +21,8 @@ void main(void) { console_init(); + cbmem_initialize_empty(); + //query_mem(configstring(), &base, &size); //printk(BIOS_SPEW, "0x%zx bytes of memory at 0x%llx\n", size, base); -- cgit v1.2.3