<p>Jonathan Neuschäfer has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/23173">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">arch/riscv: Align trap_entry to 4 bytes, as required<br><br>The RISC-V Privileged Architecture spec 1.10 requires that the address part of<br>mtvec is four-byte aligned. The lower two bits encode a "mode" flag and should<br>be zero for now.<br><br>Add the necessary alignment directive before trap_entry.<br><br>Change-Id: I83ea23e2c8f984775985ae7d61f80ad75286baaa<br>Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net><br>---<br>M src/arch/riscv/trap_util.S<br>1 file changed, 1 insertion(+), 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/73/23173/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/arch/riscv/trap_util.S b/src/arch/riscv/trap_util.S</span><br><span>index 72a9ae1..8aba48b 100644</span><br><span>--- a/src/arch/riscv/trap_util.S</span><br><span>+++ b/src/arch/riscv/trap_util.S</span><br><span>@@ -109,6 +109,7 @@</span><br><span>   .text</span><br><span> </span><br><span>     .global  trap_entry</span><br><span style="color: hsl(120, 100%, 40%);">+    .align 2    # four byte alignment, as required by mtvec</span><br><span> trap_entry:</span><br><span>   csrw mscratch, sp</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/23173">change 23173</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/23173"/><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: I83ea23e2c8f984775985ae7d61f80ad75286baaa </div>
<div style="display:none"> Gerrit-Change-Number: 23173 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Jonathan Neuschäfer <j.neuschaefer@gmx.net> </div>