From 105708ca1cae471ef103591522926b622d716a55 Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Tue, 6 Oct 2020 13:02:20 +0000 Subject: [PATCH] riscv: Handle supervisor instruction page faults We should never take instruction page faults when in the kernel, but by using the standard page fault code we should get a more-informative message about faulting on a NOFAULT page rather than branching to the default case here and printing an "Unknown kernel exception ..." message. Reviewed by: jhb (mentor), markj Approved by: jhb (mentor), markj Differential Revision: https://reviews.freebsd.org/D26685 --- sys/riscv/riscv/trap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/riscv/riscv/trap.c b/sys/riscv/riscv/trap.c index 774d20875754..58f11c33774f 100644 --- a/sys/riscv/riscv/trap.c +++ b/sys/riscv/riscv/trap.c @@ -290,6 +290,7 @@ do_trap_supervisor(struct trapframe *frame) break; case EXCP_STORE_PAGE_FAULT: case EXCP_LOAD_PAGE_FAULT: + case EXCP_INST_PAGE_FAULT: page_fault_handler(frame, 0); break; case EXCP_BREAKPOINT: