<p>Jonathan Neuschäfer has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/c/coreboot/+/30164">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">arch/riscv: Don't hardcode CSR numbers anymore<br><br>They are hopefully stable enough by now.<br><br>TEST=Building with for emulation/spike-riscv with BUILD_TIMELESS,<br>     with and without this patch, results in the same coreboot.rom.<br><br>Change-Id: Ie6747c7eeea6cd8fd2138c5ba535a08c5add9038<br>Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net><br>---<br>M src/arch/riscv/virtual_memory.c<br>1 file changed, 2 insertions(+), 7 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/30164/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/arch/riscv/virtual_memory.c b/src/arch/riscv/virtual_memory.c</span><br><span>index d9bae2a..0061847 100644</span><br><span>--- a/src/arch/riscv/virtual_memory.c</span><br><span>+++ b/src/arch/riscv/virtual_memory.c</span><br><span>@@ -59,11 +59,6 @@</span><br><span>                 set_csr(medeleg, delegate);</span><br><span>  }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   // Enable all user/supervisor-mode counters using</span><br><span style="color: hsl(0, 100%, 40%);">-       // v1.10 register addresses.</span><br><span style="color: hsl(0, 100%, 40%);">-    // They moved from the earlier spec.</span><br><span style="color: hsl(0, 100%, 40%);">-    // Until we trust our toolchain use the hardcoded constants.</span><br><span style="color: hsl(0, 100%, 40%);">-    // These were in flux and people who get the older toolchain</span><br><span style="color: hsl(0, 100%, 40%);">-    // will have difficult-to-debug failures.</span><br><span style="color: hsl(0, 100%, 40%);">-       write_csr(/*mcounteren*/0x306, 7);</span><br><span style="color: hsl(120, 100%, 40%);">+    // Enable all user/supervisor-mode counters</span><br><span style="color: hsl(120, 100%, 40%);">+   write_csr(mcounteren, 7);</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/c/coreboot/+/30164">change 30164</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/+/30164"/><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: Ie6747c7eeea6cd8fd2138c5ba535a08c5add9038 </div>
<div style="display:none"> Gerrit-Change-Number: 30164 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Jonathan Neuschäfer <j.neuschaefer@gmx.net> </div>
<div style="display:none"> Gerrit-Reviewer: Jonathan Neuschäfer <j.neuschaefer@gmx.net> </div>
<div style="display:none"> Gerrit-Reviewer: Philipp Hug <philipp@hug.cx> </div>
<div style="display:none"> Gerrit-Reviewer: ron minnich <rminnich@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>