From 574df1ba670aaac265ba44b2c94e831dfff9f96d Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Sun, 6 Nov 2016 20:54:20 -0800 Subject: riscv: start to use the configstring functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These functions will allow us to remove hardcodes, as long as we can verify the qemu and lowrisc targets implement the configstring correctly. Hence, for the most part, we'll start with mainboard changes first. Define a new config variable, CONFIG_RISCV_CONFIGSTRING, which has a default value that works on all existing systems but which can be changed as needed for a new SOC or mainboard. Change-Id: I7dd3f553d3e61f1c49752fb04402b134fdfdf979 Signed-off-by: Ronald G. Minnich Reviewed-on: https://review.coreboot.org/17256 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan Neuschäfer --- src/mainboard/emulation/spike-riscv/romstage.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mainboard/emulation') diff --git a/src/mainboard/emulation/spike-riscv/romstage.c b/src/mainboard/emulation/spike-riscv/romstage.c index b6314ccd1c..dccdf226fb 100644 --- a/src/mainboard/emulation/spike-riscv/romstage.c +++ b/src/mainboard/emulation/spike-riscv/romstage.c @@ -15,9 +15,15 @@ #include #include +#include void main(void) { + uintptr_t base; + size_t size; + console_init(); + query_mem(configstring(), &base, &size); + printk(BIOS_SPEW, "0x%zx bytes of memory at 0x%llx\n", size, base); run_ramstage(); } -- cgit v1.2.3