riscv: Panic on PMP errors
Load/store/fetch access exceptions always indicate a violation of a PMP rule. We can't treat those as page faults, because updating the page table and trying again will only result in exactly the same access exception recurring. This leaves us in an endless exception loop. We cannot recover from these exceptions, so panic instead. Reviewed by: jhb Sponsored by: Axiado Differential Revision: https://reviews.freebsd.org/D26544
This commit is contained in:
parent
d4cac59429
commit
0d3aa0fb64
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=366284
@ -282,6 +282,9 @@ do_trap_supervisor(struct trapframe *frame)
|
||||
case EXCP_FAULT_LOAD:
|
||||
case EXCP_FAULT_STORE:
|
||||
case EXCP_FAULT_FETCH:
|
||||
dump_regs(frame);
|
||||
panic("Memory access exception at 0x%016lx\n", frame->tf_sepc);
|
||||
break;
|
||||
case EXCP_STORE_PAGE_FAULT:
|
||||
case EXCP_LOAD_PAGE_FAULT:
|
||||
data_abort(frame, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user