svn commit: r366486 - head/sys/riscv/riscv

Jessica Clarke jrtc27 at FreeBSD.org
Tue Oct 6 13:02:20 UTC 2020


Author: jrtc27
Date: Tue Oct  6 13:02:20 2020
New Revision: 366486
URL: https://svnweb.freebsd.org/changeset/base/366486

Log:
  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

Modified:
  head/sys/riscv/riscv/trap.c

Modified: head/sys/riscv/riscv/trap.c
==============================================================================
--- head/sys/riscv/riscv/trap.c	Tue Oct  6 12:57:54 2020	(r366485)
+++ head/sys/riscv/riscv/trap.c	Tue Oct  6 13:02:20 2020	(r366486)
@@ -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:


More information about the svn-src-head mailing list