From: James S. <jsi...@us...> - 2001-11-26 18:54:00
|
Update of /cvsroot/linux-mips/linux/arch/mips/kernel In directory usw-pr-cvs1:/tmp/cvs-serv17112 Modified Files: traps.c Log Message: Lots of fixes. Dump full TLB when dieing. Don't print message about having sent a FP signal.Only install EJTAG handler if MIPS_CPU_EJTAG in cpu options set. This fixes a memory corruption bug. EJTAG exception handler is located at KSEG0+0x200. Index: traps.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/traps.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- traps.c 2001/11/20 17:35:48 1.25 +++ traps.c 2001/11/26 18:53:57 1.26 @@ -309,7 +309,7 @@ /* * Saved cp0 registers */ - printk("epc : %08lx %s\nStatus: %08x\nCause : %08x\n", + printk("epc : %08lx %s\nStatus: %08lx\nCause : %08lx\n", regs->cp0_epc, print_tainted(), regs->cp0_status, regs->cp0_cause); } @@ -501,7 +501,6 @@ return; force_sig(SIGFPE, current); - printk(KERN_DEBUG "Sent send SIGFPE to %s\n", current->comm); } static inline int get_insn_opcode(struct pt_regs *regs, unsigned int *opcode) @@ -698,11 +697,13 @@ asmlinkage void do_watch(struct pt_regs *regs) { + extern void dump_tlb_all(void); + /* * We use the watch exception where available to detect stack * overflows. */ - dump_tlb(); + dump_tlb_all(); show_regs(regs); panic("Caught WATCH exception - probably caused by stack overflow."); } @@ -843,7 +844,8 @@ * Copy the EJTAG debug exception vector handler code to it's final * destination. */ - memcpy((void *)(KSEG0 + 0x300), &except_vec_ejtag_debug, 0x80); + if (mips_cpu.options & MIPS_CPU_EJTAG) + memcpy((void *)(KSEG0 + 0x200), &except_vec_ejtag_debug, 0x80); /* * Only some CPUs have the watch exceptions or a dedicated |