svn commit: r281261 - head/sys/powerpc/powerpc

Justin Hibbits jhibbits at FreeBSD.org
Wed Apr 8 04:35:28 UTC 2015


Author: jhibbits
Date: Wed Apr  8 04:35:26 2015
New Revision: 281261
URL: https://svnweb.freebsd.org/changeset/base/281261

Log:
  Add DTrace support for Book-E PowerPC.
  
  Book-E got DTrace support for free with r281096&related.  This adds the bits to
  the db_trap_glue() to support FBT.
  
  Relnotes:	Yes

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

Modified: head/sys/powerpc/powerpc/trap.c
==============================================================================
--- head/sys/powerpc/powerpc/trap.c	Wed Apr  8 04:01:02 2015	(r281260)
+++ head/sys/powerpc/powerpc/trap.c	Wed Apr  8 04:35:26 2015	(r281261)
@@ -796,8 +796,12 @@ db_trap_glue(struct trapframe *frame)
 {
 	if (!(frame->srr1 & PSL_PR)
 	    && (frame->exc == EXC_TRC || frame->exc == EXC_RUNMODETRC
+#ifdef AIM
 		|| (frame->exc == EXC_PGM
 		    && (frame->srr1 & 0x20000))
+#else
+		|| (frame->exc == EXC_DEBUG)
+#endif
 		|| frame->exc == EXC_BPT
 		|| frame->exc == EXC_DSI)) {
 		int type = frame->exc;
@@ -805,7 +809,11 @@ db_trap_glue(struct trapframe *frame)
 		/* Ignore DTrace traps. */
 		if (*(uint32_t *)frame->srr0 == EXC_DTRACE)
 			return (0);
+#ifdef AIM
 		if (type == EXC_PGM && (frame->srr1 & 0x20000)) {
+#else
+		if (frame->cpu.booke.esr & ESR_PTR) {
+#endif
 			type = T_BREAKPOINT;
 		}
 		return (kdb_trap(type, 0, frame));


More information about the svn-src-all mailing list