From 1e304f94013b7d97e08db5beca63851bae415ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= Date: Thu, 7 Jul 2016 20:53:29 +0200 Subject: [PATCH] UPSTREAM: spike-riscv: Register RAM resource at 0x80000000 Without this patch, the CBFS loader won't load segments into the RAM. BUG=None BRANCH=None TEST=None Change-Id: If05c8edb51f9fe2f7af84178826f93b193cfd8a9 Original-Signed-off-by: Jonathan Neuschfer Original-Reviewed-on: https://review.coreboot.org/15511 Original-Tested-by: build bot (Jenkins) Original-Reviewed-by: Ronald G. Minnich Signed-off-by: Aaron Durbin Reviewed-on: https://chromium-review.googlesource.com/360812 Reviewed-by: Duncan Laurie --- src/mainboard/emulation/spike-riscv/mainboard.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mainboard/emulation/spike-riscv/mainboard.c b/src/mainboard/emulation/spike-riscv/mainboard.c index 111e9b185b..df2bdd68d6 100644 --- a/src/mainboard/emulation/spike-riscv/mainboard.c +++ b/src/mainboard/emulation/spike-riscv/mainboard.c @@ -19,13 +19,21 @@ static void mainboard_enable(device_t dev) { + /* + * Size of the emulated system RAM. On hardware, this would be external + * DDR memory. + * + * TODO: Get this size from the hardware-supplied configuration string. + */ + const size_t ram_size = 1*GiB; if (!dev) { printk(BIOS_EMERG, "No dev0; die\n"); while (1); } - ram_resource(dev, 0, 2048, 32768); + ram_resource(dev, 0, 0x80000000/KiB, ram_size/KiB); + cbmem_recovery(0); }