Author: jhibbits
Date: Sun Apr  8 16:55:28 2018
New Revision: 332289

  powerpc64: Print current MSR on printtrap()
  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:


Modified: head/sys/powerpc/powerpc/trap.c
--- head/sys/powerpc/powerpc/trap.c     Sun Apr  8 16:54:07 2018        
+++ head/sys/powerpc/powerpc/trap.c     Sun Apr  8 16:55:28 2018        
@@ -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);
_______________________________________________ mailing list
To unsubscribe, send any mail to ""

Reply via email to