Skip to content

Commit 59c9a26

Browse files
authored
Add table with exception priority with triggers (#171)
Fixes #156 This change adds a new section under Zcheri_purecap with a table indicating where the trigger exceptions fit alongside CHERI and other exceptions. The table added here is mostly a merge between the regular exception priority table in 3.7.9 (mcause description) and the trigger exception priority table 5.2 from the RISC-V debug spec.
1 parent af8da71 commit 59c9a26

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

Diff for: src/riscv-cheri.adoc

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ include::riscv-integration.adoc[]
4444

4545
include::debug-integration.adoc[]
4646

47+
include::trigger-integration.adoc[]
48+
4749
include::cheri-pte-ext.adoc[]
4850

4951
include::riscv-legacy-integration.adoc[]

Diff for: src/trigger-integration.adoc

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
[#section_trigger_integration]
2+
=== Integrating Zcheri_purecap with Sdtrig
3+
4+
The Sdtrig extension is generally orthogonal to Zcheri_purecap. However,
5+
the priority of synchronous exceptions and where triggers fit is adjusted as
6+
shown in xref:trigger-exception-priority[xrefstyle=short].
7+
8+
[[trigger-exception-priority]]
9+
.Synchronous exception priority (including triggers) in decreasing priority order. Entries added in {cheri_base_ext_name} are in *bold*
10+
[%autowidth,float="center",align="center",cols="<,>,<,<",options="header"]
11+
|===
12+
|Priority |Exc.Code |Description |Trigger
13+
|_Highest_ |3 +
14+
3 +
15+
3 +
16+
3 | | etrigger +
17+
icount +
18+
itrigger +
19+
mcontrol/mcontrol6 after (on previous instruction)
20+
21+
| .>|3 .<|Instruction address breakpoint |mcontrol/mcontrol6 execute address before
22+
| .>|*{cheri_excep_mcause}* .<|*Prior to instruction address translation:* +
23+
*CHERI fault due to PCC checks (tag, execute permission and bounds)* |
24+
| .>|12, 1 .<|During instruction address translation: +
25+
First encountered page fault or access fault |
26+
| .>|1 .<|With physical address for instruction: +
27+
Instruction access fault |
28+
29+
| .>|3 .<| |mcontrol/mcontrol6 execute data before
30+
31+
| .>|2 +
32+
0 +
33+
8,9,11 +
34+
3 .<|Illegal instruction +
35+
Instruction address misaligned +
36+
Environment call +
37+
Environment break |
38+
39+
| .>|3 .<|Load/store/AMO address breakpoint |mcontrol/mcontrol6 load/store address before
40+
| .>|3 .<| |mcontrol/mcontrol6 store data before
41+
42+
| .>| *{cheri_excep_mcause}* .<| *CHERI faults due to:* +
43+
*PCC <<asr_perm>> clear* +
44+
*Branch/jump target address checks (tag, execute permissions and bounds)* |
45+
| .>|*{cheri_excep_mcause}* .<|*Prior to address translation for an explicit memory access:* +
46+
*Load/store/AMO capability address misaligned* +
47+
*CHERI fault due to capability checks (tag, permissions and bounds)* |
48+
49+
| .>|4,6 .<|Optionally: +
50+
Load/store/AMO address misaligned |
51+
| .>|13, 15, 5, 7 .<|During address translation for an explicit memory access: +
52+
First encountered page fault or access fault |
53+
| .>|5,7 .<|With physical address for an explicit memory access: +
54+
Load/store/AMO access fault |
55+
| .>|4,6 .<|If not higher priority: +
56+
Load/store/AMO address misaligned |
57+
|_Lowest_ .>|3 .<| |mcontrol/mcontrol6 load data before
58+
|===

0 commit comments

Comments
 (0)