Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Apr 2015 04:35:27 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r281261 - head/sys/powerpc/powerpc
Message-ID:  <201504080435.t384ZRUA069005@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504080435.t384ZRUA069005>