From e3e38bc79f1c2ccffba4974ce8f3452e35429d61 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Wed, 8 Apr 2015 04:35:26 +0000 Subject: [PATCH] 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 --- sys/powerpc/powerpc/trap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c index bee61c0ba45..7551398ce62 100644 --- a/sys/powerpc/powerpc/trap.c +++ b/sys/powerpc/powerpc/trap.c @@ -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));