Jonathan Neuschäfer has uploaded this change for review. ( https://review.coreboot.org/21657
Change subject: arch/riscv: hls_init: Initialize time{,cmp} with dummy pointers ......................................................................
arch/riscv: hls_init: Initialize time{,cmp} with dummy pointers
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 j.neuschaefer@gmx.net --- M src/arch/riscv/mcall.c 1 file changed, 3 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/21657/1
diff --git a/src/arch/riscv/mcall.c b/src/arch/riscv/mcall.c index 7728fba..111cb64 100644 --- a/src/arch/riscv/mcall.c +++ b/src/arch/riscv/mcall.c @@ -92,16 +92,13 @@
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);