<p>Jonathan Neuschäfer has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21688">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">arch/riscv: mprv_read_*: Mark result as earlyclobber<br><br>This fixes a case of mstatus corruption, where GCC generated code that<br>used the same register for the mprv bit and the result.<br><br>GCC inline assembly register modifiers are documented here:<br>https://gcc.gnu.org/onlinedocs/gcc/Modifiers.html<br><br>Change-Id: I2c563d171892c2e22ac96b34663aa3965553ceb3<br>Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net><br>---<br>M src/arch/riscv/include/vm.h<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/88/21688/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/arch/riscv/include/vm.h b/src/arch/riscv/include/vm.h<br>index a65aba9..af90e14 100644<br>--- a/src/arch/riscv/include/vm.h<br>+++ b/src/arch/riscv/include/vm.h<br>@@ -73,7 +73,7 @@<br>                     "csrs              mstatus, %1\n"                     \<br>                     STRINGIFY(insn) " %0, 0(%2)\n"                        \<br>                     "csrc              mstatus, %1\n"                     \<br>-                    : "=r"(value) : "r"(mprv), "r"(p) : "memory"    \<br>+                    : "=&r"(value) : "r"(mprv), "r"(p) : "memory"       \<br>             );                                                      \<br>             return value;                                           \<br>     }<br></pre><p>To view, visit <a href="https://review.coreboot.org/21688">change 21688</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/21688"/><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: I2c563d171892c2e22ac96b34663aa3965553ceb3 </div>
<div style="display:none"> Gerrit-Change-Number: 21688 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Jonathan Neuschäfer <j.neuschaefer@gmx.net> </div>