<p>Jonathan Neuschäfer has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21657">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">arch/riscv: hls_init: Initialize time{,cmp} with dummy pointers<br><br>In current versions of spike, the config string is not available<br>anymore, because RISC-V is moving toward OpenFirmware-derived device<br>trees (either in FDT or text format). Using query_config_string leads to<br>a crash in these versions of spike.<br><br>With this commit and If0bea4bf52d ("riscv: Update register address"),<br>coreboot reaches the romstage again, on spike.<br><br>Change-Id: Ib1e6565145f0b2252deb1f4658221a4f816e2af4<br>Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net><br>---<br>M src/arch/riscv/mcall.c<br>1 file changed, 3 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/21657/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/arch/riscv/mcall.c b/src/arch/riscv/mcall.c<br>index 7728fba..111cb64 100644<br>--- a/src/arch/riscv/mcall.c<br>+++ b/src/arch/riscv/mcall.c<br>@@ -92,16 +92,13 @@<br> <br> void hls_init(uint32_t hart_id)<br> {<br>-      query_result res;<br>-<br>  printk(BIOS_SPEW, "hart %d: HLS is %p\n", hart_id, HLS());<br>  memset(HLS(), 0, sizeof(*HLS()));<br>     HLS()->hart_id = hart_id;<br> <br>-      res = query_config_string(configstring(), "rtc{addr");<br>-     HLS()->time = (void *)get_uint(res);<br>-      res = query_config_string(configstring(), "core{0{0{timecmp");<br>-     HLS()->timecmp = (void *)get_uint(res);<br>+   /* Initialize these pointers with dummy values, for now */<br>+   HLS()->time = NULL;<br>+       HLS()->timecmp = NULL;<br> <br>  printk(BIOS_SPEW, "Time is %p and timecmp is %p\n",<br>                HLS()->time, HLS()->timecmp);<br></pre><p>To view, visit <a href="https://review.coreboot.org/21657">change 21657</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/21657"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ib1e6565145f0b2252deb1f4658221a4f816e2af4 </div>
<div style="display:none"> Gerrit-Change-Number: 21657 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Jonathan Neuschäfer <j.neuschaefer@gmx.net> </div>