X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc%2Fkernel%2Fppc-stub.c;h=a869750323bd90ab6e25aed4f160beb48b899c81;hb=9e1bf581d67d87a1d7fc0ea500729e3a03643a26;hp=d61889c24046c9ce181f70808e8aa1833d2f8030;hpb=8d40237c730b8be87c1b80a5d96b9c603fefa829;p=linux-2.6.git diff --git a/arch/ppc/kernel/ppc-stub.c b/arch/ppc/kernel/ppc-stub.c index d61889c24..a86975032 100644 --- a/arch/ppc/kernel/ppc-stub.c +++ b/arch/ppc/kernel/ppc-stub.c @@ -498,7 +498,7 @@ static struct hard_trap_info unsigned int tt; /* Trap type code for powerpc */ unsigned char signo; /* Signal that we map this trap into */ } hard_trap_info[] = { -#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) +#if defined(CONFIG_40x) { 0x100, SIGINT }, /* critical input interrupt */ { 0x200, SIGSEGV }, /* machine check */ { 0x300, SIGSEGV }, /* data storage */ @@ -521,7 +521,7 @@ static struct hard_trap_info ** 0x1100 data TLB miss ** 0x1200 instruction TLB miss */ - { 0x2002, SIGTRAP}, /* debug */ + { 0x2000, SIGTRAP}, /* debug */ #else { 0x200, SIGSEGV }, /* machine check */ { 0x300, SIGSEGV }, /* address error (store) */ @@ -602,6 +602,11 @@ handle_exception (struct pt_regs *regs) sigval = computeSignal(regs->trap); ptr = remcomOutBuffer; +#if defined(CONFIG_40x) + *ptr++ = 'S'; + *ptr++ = hexchars[sigval >> 4]; + *ptr++ = hexchars[sigval & 0xf]; +#else *ptr++ = 'T'; *ptr++ = hexchars[sigval >> 4]; *ptr++ = hexchars[sigval & 0xf]; @@ -615,6 +620,8 @@ handle_exception (struct pt_regs *regs) *ptr++ = ':'; ptr = mem2hex(((char *)regs) + SP_REGNUM*4, ptr, 4); *ptr++ = ';'; +#endif + *ptr++ = 0; putpacket(remcomOutBuffer); @@ -767,6 +774,10 @@ handle_exception (struct pt_regs *regs) * some location may have changed something that is in the instruction cache. */ kgdb_flush_cache_all(); +#if defined(CONFIG_40x) + strcpy(remcomOutBuffer, "OK"); + putpacket(remcomOutBuffer); +#endif mtmsr(msr); kgdb_interruptible(1); @@ -780,9 +791,10 @@ handle_exception (struct pt_regs *regs) case 's': kgdb_flush_cache_all(); -#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) - mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_IC); +#if defined(CONFIG_40x) regs->msr |= MSR_DE; + regs->dbcr0 |= (DBCR0_IDM | DBCR0_IC); + mtmsr(msr); #else regs->msr |= MSR_SE; #endif