Skip to content

Commit

Permalink
Merge pull request #131 from dansmathers/patch-16
Browse files Browse the repository at this point in the history
Update clic.adoc-For hardware vectoring access exceptions, both {tval} and {epc} holds the faulting address. Spec update for issues #111 and #105
  • Loading branch information
Kevin-Andes authored Apr 12, 2021
2 parents 78b03c9 + 1b4210c commit 084c81f
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions clic.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -819,14 +819,9 @@ extensions are supported).
For permissions-checking purposes, the memory access to retrieve the
function pointer for vectoring is treated as a load with the privilege
mode and interrupt level of the interrupt handler. If there is an
access exception on the table load, {epc} holds the faulting address.
If this was a page fault, the table load can be resumed by returning
with {epc} pointing to the table entry and the trap handler mode bit
set.

Instruction fetch at the handler address might cause misaligned or
access exceptions, which are reported with {epc} containing the
faulting instruction fetch address.
access exception on the table load, both {tval} and {epc} holds the faulting address.

NOTE: Horizontal traps (same privilege level) are unrecoverable. The interesting case is vertical traps, where a more privileged layer is handling page faults or other synchronous faults on vector table access. The regular code path in more privileged layer will want to use xtval to determine what bad virtual address to page in, but will not normally restore xtval when returning to faulting context (potentially after some time and other contexts have run) However, it will restore xepc (using x for more privileged mode here) before using xret on normal code path. This is a rationale for why both {tval} and {epc} are written with the faulting address.

In CLIC mode, synchronous exception traps always jump to NBASE.

Expand Down

0 comments on commit 084c81f

Please sign in to comment.