From 3b2712d757190d868f625d5bca51230ceb351270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= Date: Sun, 24 Sep 2017 00:43:37 +0200 Subject: arch/riscv: hls_init: Initialize time{,cmp} with dummy pointers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In current versions of spike, the config string is not available anymore, because RISC-V is moving toward OpenFirmware-derived device trees (either in FDT or text format). Using query_config_string leads to a crash in these versions of spike. With this commit and If0bea4bf52d ("riscv: Update register address"), coreboot reaches the romstage again, on spike. Change-Id: Ib1e6565145f0b2252deb1f4658221a4f816e2af4 Signed-off-by: Jonathan Neuschäfer Reviewed-on: https://review.coreboot.org/21657 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/arch/riscv/mcall.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/arch/riscv') diff --git a/src/arch/riscv/mcall.c b/src/arch/riscv/mcall.c index 7728fbac5d..111cb64b44 100644 --- a/src/arch/riscv/mcall.c +++ b/src/arch/riscv/mcall.c @@ -92,16 +92,13 @@ uintptr_t mcall_set_timer(uint64_t when) void hls_init(uint32_t hart_id) { - query_result res; - printk(BIOS_SPEW, "hart %d: HLS is %p\n", hart_id, HLS()); memset(HLS(), 0, sizeof(*HLS())); HLS()->hart_id = hart_id; - res = query_config_string(configstring(), "rtc{addr"); - HLS()->time = (void *)get_uint(res); - res = query_config_string(configstring(), "core{0{0{timecmp"); - HLS()->timecmp = (void *)get_uint(res); + /* Initialize these pointers with dummy values, for now */ + HLS()->time = NULL; + HLS()->timecmp = NULL; printk(BIOS_SPEW, "Time is %p and timecmp is %p\n", HLS()->time, HLS()->timecmp); -- cgit v1.2.3