<p>Jonathan Neuschäfer has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21342">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">arch/riscv: Document mprv_{read,write}_* functions<br><br>Change-Id: Iaf0cb241f0eb4de241f0983c0b32dbcc28f96480<br>Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net><br>---<br>M src/arch/riscv/include/vm.h<br>1 file changed, 11 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/42/21342/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..dadfecd 100644<br>--- a/src/arch/riscv/include/vm.h<br>+++ b/src/arch/riscv/include/vm.h<br>@@ -91,6 +91,17 @@<br>                );                                                      \<br>     }<br> <br>+/*<br>+ * mprv_{read,write}_* - Modified privilege memory access functions.<br>+ *<br>+ * These inline functions perform a read or write memory operation with the<br>+ * mstatus.MPRV bit set. This causes the memory protections and translation of<br>+ * the previous mode (e.g. U-mode, if we're handling a trap from U-mode) to be<br>+ * applied.<br>+ *<br>+ * The user of these functions must make sure to avoid trap loops through<br>+ * unaligned memory accesses.<br>+ */<br> DEFINE_MPRV_READ(mprv_read_u8, uint8_t, lbu)<br> DEFINE_MPRV_READ(mprv_read_u16, uint16_t, lhu)<br> DEFINE_MPRV_READ(mprv_read_u32, uint32_t, lwu)<br></pre><p>To view, visit <a href="https://review.coreboot.org/21342">change 21342</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/21342"/><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: Iaf0cb241f0eb4de241f0983c0b32dbcc28f96480 </div>
<div style="display:none"> Gerrit-Change-Number: 21342 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Jonathan Neuschäfer <j.neuschaefer@gmx.net> </div>