Skip to content

Commit

Permalink
Allow invalid virtual addresses not to match at all
Browse files Browse the repository at this point in the history
  • Loading branch information
timsifive committed Nov 30, 2023
1 parent d497ba9 commit 81e021b
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions Sdtrig.tex
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,19 @@ \subsection{Cache Operations}

\subsection{Invalid Virtual Addresses}

For virtual address matches without a mask, \RcsrTdataTwo must be able to hold
all valid virtual addresses but it need not be capable of holding other values.
Implementations may convert an invalid virtual address to a different invalid
virtual address before comparing the address to \RcsrTdataTwo.
\begin{steps}{For address matches without a mask, \RcsrTdataTwo must be able to:}
\item Hold all valid physical addresses (which are zero extended).
\item Hold all valid virtual addresses (which are sign extended).
\end{steps}
That means that after writing any of these valid addresses, the exact same value
is read back, including any high bits.

If \RcsrTdataTwo can contain any invalid virtual addresses, then writes of an
invalid virtual address that can not be represented as-is should be converted to
a different invalid virtual address that can be represented.

The compare value for an invalid virtual address may be a different invalid
virtual address than the effective address.

\begin{commentary}
A straightforward trigger implementation would compare the effective address
Expand All @@ -338,6 +347,15 @@ \subsection{Invalid Virtual Addresses}
invalid virtual address.
\end{commentary}

In addition, implementations may decide not to perform trigger matching against
invalid virtual addresses at all.

\begin{commentary}
The behavior of a given hart when matching against invalid virtual addresses
is hard to predict. Furthermore, accessing memory at an invalid virtual
address is already easy to catch because an exception will be generated.
\end{commentary}

\section{Multiple State Change Instructions} \label{sec:multistate}

An instruction that performs multiple architectural state changes (e.g.,
Expand Down

0 comments on commit 81e021b

Please sign in to comment.