projects
/
riscv-tests.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Separate page faults from physical memory access exceptions
[riscv-tests.git]
/
benchmarks
/
pmp
/
pmp.c
diff --git
a/benchmarks/pmp/pmp.c
b/benchmarks/pmp/pmp.c
index 07eed8b6334429e2071181503fccb39b41290b90..055ec79a12c8161d9d5f37e621e71f20602b9552 100644
(file)
--- a/
benchmarks/pmp/pmp.c
+++ b/
benchmarks/pmp/pmp.c
@@
-16,7
+16,7
@@
uintptr_t handle_trap(uintptr_t cause, uintptr_t epc, uintptr_t regs[32])
if (cause == CAUSE_ILLEGAL_INSTRUCTION)
exit(0); // no PMP support
- if (!trap_expected)
+ if (!trap_expected
|| cause != CAUSE_LOAD_ACCESS
)
exit(1);
trap_expected = 0;
return epc + insn_len(epc);