diff options
author | Andrew Waterman <aswaterman@gmail.com> | 2018-10-09 16:39:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-09 16:39:10 -0700 |
commit | f0baef16897be3d07e6d91e46ebdc8b28494dfb0 (patch) | |
tree | 09d2a0055bc83ffb5d4e46075b91df864627737a /src/machine.tex | |
parent | a69590d9b4f55adec829960b04ccc4e14dbad6da (diff) | |
download | riscv-isa-manual-f0baef16897be3d07e6d91e46ebdc8b28494dfb0.zip riscv-isa-manual-f0baef16897be3d07e6d91e46ebdc8b28494dfb0.tar.gz riscv-isa-manual-f0baef16897be3d07e6d91e46ebdc8b28494dfb0.tar.bz2 |
Clarify interrupt delegation semantics (#158)
* Clarify interrupt delegation semantics
* Update contributors
Diffstat (limited to 'src/machine.tex')
-rw-r--r-- | src/machine.tex | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/machine.tex b/src/machine.tex index 8d717af..297c8bf 100644 --- a/src/machine.tex +++ b/src/machine.tex @@ -1109,13 +1109,20 @@ then reading back the value in {\tt medeleg} or {\tt mideleg} to see which bit positions hold a one. Traps never transition from a more-privileged mode to a less-privileged mode. -For example, if M-mode has delegated illegal instruction traps to S-mode, and +For example, if M-mode has delegated illegal instruction exceptions to S-mode, and M-mode software later executes an illegal instruction, the trap is taken in M-mode, rather than being delegated to S-mode. By contrast, traps may be taken horizontally. Using the same example, if M-mode has delegated illegal -instruction traps to S-mode, and S-mode software later executes an illegal +instruction exceptions to S-mode, and S-mode software later executes an illegal instruction, the trap is taken in S-mode. +Delegated interrupts result in the interrupt being masked at the delegator +privilege level. For example, if the supervisor timer interrupt (STI) is +delegated to S-mode by setting {\tt mideleg}[5], STIs will not be taken when +executing in M-mode. By contrast, if {\tt mideleg}[5] is clear, STIs can +be taken in any mode and regardless of current mode will transfer control to +M-mode. + \begin{figure}[h!] {\footnotesize \begin{center} |