From a567d1c5e57966d79f8f6b4ca9f1d91881c484d9 Mon Sep 17 00:00:00 2001 From: Prashanth Mundkur Date: Wed, 21 Mar 2018 13:17:57 -0700 Subject: Make it explicit that the page-fault exceptions from address translation correspond to the original access type, as is done for access exceptions. --- src/supervisor.tex | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/supervisor.tex b/src/supervisor.tex index e2f0c6a..d12ead8 100644 --- a/src/supervisor.tex +++ b/src/supervisor.tex @@ -1225,24 +1225,27 @@ follows: If accessing $pte$ violates a PMA or PMP check, raise an access exception corresponding to the original access type. -\item If $pte.v=0$, or if $pte.r=0$ and $pte.w=1$, stop and raise a page-fault exception. +\item If $pte.v=0$, or if $pte.r=0$ and $pte.w=1$, stop and raise a + page-fault exception corresponding to the original access type. \item Otherwise, the PTE is valid. If $pte.r=1$ or $pte.x=1$, go to step 5. Otherwise, this PTE is a pointer to the next level of the page table. Let - $i=i-1$. If $i<0$, stop and raise a page-fault exception. Otherwise, let + $i=i-1$. If $i<0$, stop and raise a page-fault exception + corresponding to the original access type. Otherwise, let $a=pte.ppn \times \textrm{PAGESIZE}$ and go to step 2. \item A leaf PTE has been found. Determine if the requested memory access is allowed by the $pte.r$, $pte.w$, $pte.x$, and $pte.u$ bits, given the current privilege mode and the value of the SUM and MXR fields of - the {\tt mstatus} register. If not, stop and raise a page-fault exception. + the {\tt mstatus} register. If not, stop and raise a page-fault + exception corresponding to the original access type. \item If $i>0$ and $pa.ppn[i-1:0]\neq 0$, this is a misaligned superpage; - stop and raise a page-fault exception. + stop and raise a page-fault exception corresponding to the original access type. \item If $pte.a=0$, or if the memory access is a store and $pte.d=0$, either - raise a page-fault exception or: + raise a page-fault exception corresponding to the original access type, or: \begin{itemize} \item Set $pte.a$ to 1 and, if the memory access is a store, also set $pte.d$ to 1. -- cgit v1.1