Commit 3bd855f
fix: report an instruction access fault for a denied fetch
riscv_hart_m_p::read set RV_CAUSE_LOAD_ACCESS unconditionally when the memory
chain returned an error, so a PMP-denied instruction fetch surfaced as a load
access fault. RV_CAUSE_FETCH_ACCESS was consumed by the trap dispatch switch
but never assigned in this wrapper.
riscv_hart_mu_p and riscv_hart_msu_vp already selected the cause on is_fetch,
so this was an oversight in the M-mode wrapper alone; it now matches them.
The two fetch tests only asserted that some trap fired, which is why this
went unnoticed; both now assert the cause.1 parent 1c68c43 commit 3bd855f
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
| 191 | + | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| |||
0 commit comments