Author: jhibbits
Date: Sun Apr  8 16:55:28 2018
New Revision: 332289
URL: https://svnweb.freebsd.org/changeset/base/332289

Log:
  powerpc64: Print current MSR on printtrap()
  
  Summary:
  Print current MSR on printtrap(). Currently, printtrap just prints srr1, which
  contains part of the MSR prior to the exception. I find useful to dump the
  current value of the MSR, since it changes when there is an interruption.
  
  With this patch, this is the new printtrap model:
  
  handled user trap:
  
      exception       = 0x700 (program)
      srr0            = 0x100008a0 (0x100008a0)
      srr1            = 0x800000000002f032
      current msr     = 0x8000000000009032
      lr              = 0x1000089c (0x1000089c)
      curthread       = 0x7a50000
        pid = 714, comm = ttrap2
  
  Submitted by: Breno Leitao
  Reviewed by:  nwhitehorn
  Differential Revision: https://reviews.freebsd.org/D14600

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

Modified: head/sys/powerpc/powerpc/trap.c
==============================================================================
--- head/sys/powerpc/powerpc/trap.c     Sun Apr  8 16:54:07 2018        
(r332288)
+++ head/sys/powerpc/powerpc/trap.c     Sun Apr  8 16:55:28 2018        
(r332289)
@@ -507,6 +507,7 @@ printtrap(u_int vector, struct trapframe *frame, int i
        printf("   srr0            = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n",
            frame->srr0, frame->srr0 - (register_t)(__startkernel - KERNBASE));
        printf("   srr1            = 0x%lx\n", (u_long)frame->srr1);
+       printf("   current msr     = 0x%" PRIxPTR "\n", mfmsr());
        printf("   lr              = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n",
            frame->lr, frame->lr - (register_t)(__startkernel - KERNBASE));
        printf("   curthread       = %p\n", curthread);
_______________________________________________
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