<p>Jonathan Neuschäfer has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21690">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">arch/riscv: Avoid config string-based query_mem<br><br>RISC-V is moving towards OpenFirmware-derived device trees, and the old<br>functions to read the config string don't work anymore. Use dummy values<br>for the memory base and size until we can query the device tree.<br><br>This lets coreboot run until somewhere in ramstage.<br><br>Change-Id: Ice13feae4da2085ee56bac4ac2864268da18d8fe<br>Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net><br>---<br>M src/mainboard/emulation/spike-riscv/romstage.c<br>M src/soc/ucb/riscv/cbmem.c<br>2 files changed, 8 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/90/21690/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/mainboard/emulation/spike-riscv/romstage.c b/src/mainboard/emulation/spike-riscv/romstage.c<br>index dccdf22..372c7b2 100644<br>--- a/src/mainboard/emulation/spike-riscv/romstage.c<br>+++ b/src/mainboard/emulation/spike-riscv/romstage.c<br>@@ -19,11 +19,10 @@<br> <br> void main(void)<br> {<br>-  uintptr_t base;<br>-      size_t size;<br>-<br>       console_init();<br>-      query_mem(configstring(), &base, &size);<br>-     printk(BIOS_SPEW, "0x%zx bytes of memory at 0x%llx\n", size, base);<br>+<br>+     //query_mem(configstring(), &base, &size);<br>+   //printk(BIOS_SPEW, "0x%zx bytes of memory at 0x%llx\n", size, base);<br>+<br>    run_ramstage();<br> }<br>diff --git a/src/soc/ucb/riscv/cbmem.c b/src/soc/ucb/riscv/cbmem.c<br>index 44ffa26..f8f4098 100644<br>--- a/src/soc/ucb/riscv/cbmem.c<br>+++ b/src/soc/ucb/riscv/cbmem.c<br>@@ -19,7 +19,10 @@<br>  uintptr_t base;<br>       size_t size;<br> <br>-      query_mem(configstring(), &base, &size);<br>+     /* Use dummy values until we can query the memory size again */<br>+      //query_mem(configstring(), &base, &size);<br>+   base = 0x80000000;<br>+   size = 128 * MiB;<br> <br>  return (void *)(base + size);<br> }<br></pre><p>To view, visit <a href="https://review.coreboot.org/21690">change 21690</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/21690"/><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: Ice13feae4da2085ee56bac4ac2864268da18d8fe </div>
<div style="display:none"> Gerrit-Change-Number: 21690 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Jonathan Neuschäfer <j.neuschaefer@gmx.net> </div>