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:
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to