Re: [patch 3/8] KGDB support for ppc32

From: Tom Rini
Date: Sat Oct 30 2004 - 14:07:33 EST


On Fri, Oct 29, 2004 at 11:33:29AM -0700, Tom Rini wrote:
>
> Cc: Matt Porter <mporter@xxxxxxxxxxxxxxxxxxx>
> This adds KGDB support for ppc32 and was done by myself. Note that this
> currently doesn't work on 40x || BOOKE, but that problem is more generic (the
> current ppc stub doesn't work either) and Matt Porter is close to having a
> tested solution now.

As Matt has posted his work which makes KGDB functional again, the
following small patch is needed on top of this to make 40x || BOOKE work
with this stub.

Signed-off-by: Tom Rini <trini@xxxxxxxxxxxxxxxxxxx>

linux-2.6.10-rc1/arch/ppc/kernel/kgdb.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.10-rc1/arch/ppc/kernel/kgdb.c
+++ linux-2.6.10-rc1/arch/ppc/kernel/kgdb.c
@@ -54,7 +54,7 @@
{ 0x0d00, 0x04 /* SIGILL */ }, /* reserved */
{ 0x0e00, 0x04 /* SIGILL */ }, /* reserved */
{ 0x0f00, 0x04 /* SIGILL */ }, /* reserved */
- { 0x2000, 0x05 /* SIGTRAP */}, /* debug */
+ { 0x2002, 0x05 /* SIGTRAP */}, /* debug */
#else
{ 0x0200, 0x0b /* SIGSEGV */ }, /* machine check */
{ 0x0300, 0x0b /* SIGSEGV */ }, /* address error (store) */
@@ -240,8 +240,8 @@
if (remcom_in_buffer[0] == 's')
{
#if defined (CONFIG_40x) || defined(CONFIG_BOOKE)
+ mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_IC);
linux_regs->msr |= MSR_DE;
- current->thread.dbcr0 |= (DBCR0_IDM | DBCR0_IC);
#else
linux_regs->msr |= MSR_SE;
#endif

--
Tom Rini
http://gate.crashing.org/~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/