summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-10-29 21:23:09 +0100
committerArthur Heymans <arthur@aheymans.xyz>2019-11-01 19:41:51 +0000
commite1c0cb737c201b736b15e098d50f196e88a57ff8 (patch)
treec6fa800b2250c439d5bec148119f3545aefd3787 /src
parent3e9061e27c62f6e1ca2ae79e5be3a9792ee5127e (diff)
downloadcoreboot-e1c0cb737c201b736b15e098d50f196e88a57ff8.tar.xz
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 <arthur@aheymans.xyz> Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36446 Reviewed-by: Philipp Hug <philipp@hug.cx> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/emulation/qemu-riscv/romstage.c2
-rw-r--r--src/mainboard/emulation/spike-riscv/romstage.c3
2 files changed, 5 insertions, 0 deletions
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 <cbmem.h>
#include <console/console.h>
#include <program_loading.h>
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 <cbmem.h>
#include <console/console.h>
#include <program_loading.h>
@@ -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);