diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2017-09-24 00:43:37 +0200 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-09-27 16:41:03 +0000 |
commit | 3b2712d757190d868f625d5bca51230ceb351270 (patch) | |
tree | 3443f9fbb4e06f332feda8887f440ecd3d4abfd1 /src/arch/riscv | |
parent | 69a143d682919bb27beb317616ef8d0eecf67dd4 (diff) | |
download | coreboot-3b2712d757190d868f625d5bca51230ceb351270.tar.xz |
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>
Reviewed-on: https://review.coreboot.org/21657
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/arch/riscv')
-rw-r--r-- | src/arch/riscv/mcall.c | 9 |
1 files changed, 3 insertions, 6 deletions
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); |