Author: andrew
Date: Tue Dec  1 09:52:41 2015
New Revision: 291577
URL: https://svnweb.freebsd.org/changeset/base/291577

Log:
  Print useful information when we hit a data abort we can't handle. This
  prints the trap frame, along with the exception syndrome and fault address
  registers. Even though esr is 64-bits here it is only 32-bits in hardware
  so only print the valid 32-bits.
  
  While here also print esr and far when appropriate after printing the trap
  frame.
  
  Sponsored by: ABT Systems Ltd

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

Modified: head/sys/arm64/arm64/trap.c
==============================================================================
--- head/sys/arm64/arm64/trap.c Tue Dec  1 09:06:09 2015        (r291576)
+++ head/sys/arm64/arm64/trap.c Tue Dec  1 09:52:41 2015        (r291577)
@@ -186,6 +186,8 @@ data_abort(struct trapframe *frame, uint
        if (td->td_critnest != 0 || WITNESS_CHECK(WARN_SLEEPOK |
            WARN_GIANTOK, NULL, "Kernel page fault") != 0) {
                print_registers(frame);
+               printf(" far: %16lx\n", far);
+               printf(" esr:         %.8lx\n", esr);
                panic("data abort in critical section or under mutex");
        }
 
@@ -220,6 +222,12 @@ data_abort(struct trapframe *frame, uint
                                frame->tf_elr = pcb->pcb_onfault;
                                return;
                        }
+
+                       printf("Fatal data abort:\n");
+                       print_registers(frame);
+                       printf(" far: %16lx\n", far);
+                       printf(" esr:         %.8lx\n", esr);
+
 #ifdef KDB
                        if (debugger_on_panic || kdb_active)
                                if (kdb_trap(ESR_ELx_EXCEPTION(esr), 0, frame))
@@ -271,6 +279,7 @@ do_el1h_sync(struct trapframe *frame)
        case EXCP_FP_SIMD:
        case EXCP_TRAP_FP:
                print_registers(frame);
+               printf(" esr:         %.8lx\n", esr);
                panic("VFP exception in the kernel");
        case EXCP_DATA_ABORT:
                far = READ_SPECIALREG(far_el1);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to