<p>Philipp Hug has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/c/coreboot/+/29993">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">riscv: fix non-SMP support<br><br>Change an incorrect zero default of RISCV_HART_NUM to 1.<br>This causes causes a call to address 0.<br>Add a die() call to fail gracefully.<br><br>Change-Id: I4e3aa09b787ae0f26a4aae375f4e5fcd745a0a1e<br>Signed-off-by: Philipp Hug <philipp@hug.cx><br>---<br>M src/arch/riscv/Kconfig<br>M src/arch/riscv/smp.c<br>2 files changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/29993/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/arch/riscv/Kconfig b/src/arch/riscv/Kconfig</span><br><span>index ae83be8..2d2ef5d 100644</span><br><span>--- a/src/arch/riscv/Kconfig</span><br><span>+++ b/src/arch/riscv/Kconfig</span><br><span>@@ -35,6 +35,7 @@</span><br><span> </span><br><span> config RISCV_HART_NUM</span><br><span>     int</span><br><span style="color: hsl(120, 100%, 40%);">+   default 1</span><br><span> </span><br><span> config RISCV_WORKING_HARTID</span><br><span>         int</span><br><span>diff --git a/src/arch/riscv/smp.c b/src/arch/riscv/smp.c</span><br><span>index 8d07d39..b3feb9e 100644</span><br><span>--- a/src/arch/riscv/smp.c</span><br><span>+++ b/src/arch/riscv/smp.c</span><br><span>@@ -81,5 +81,8 @@</span><br><span>                 if (i != hartid)</span><br><span>                     set_msip(i, 1);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+   if (HLS()->entry.fn == NULL)</span><br><span style="color: hsl(120, 100%, 40%);">+               die("entry fn not set\n");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>       HLS()->entry.fn(HLS()->entry.arg);</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/c/coreboot/+/29993">change 29993</a>. To unsubscribe, or for help writing mail filters, 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/c/coreboot/+/29993"/><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-Change-Id: I4e3aa09b787ae0f26a4aae375f4e5fcd745a0a1e </div>
<div style="display:none"> Gerrit-Change-Number: 29993 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Philipp Hug <philipp@hug.cx> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>