Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Exception handlers get overwritten
@ 2001-05-15 22:11 Tommy S. Christensen
  2001-05-15 23:48 ` Kevin D. Kissell
  2001-05-16 12:08 ` Exception handlers get overwritten, and more than you ever wanted to know about EJTAG Kevin D. Kissell
  0 siblings, 2 replies; 6+ messages in thread
From: Tommy S. Christensen @ 2001-05-15 22:11 UTC (permalink / raw)
  To: linux-mips

With LOADADDR set to 0x80000000, except_vec0_r4600 and
except_vec0_nevada are overwritten in trap_init() before they
get installed at KSEG0.

The fix is easy:

diff -u -r1.53 traps.c
--- arch/mips/kernel/traps.c    2001/04/08 13:24:27     1.53
+++ arch/mips/kernel/traps.c    2001/05/15 21:39:56
@@ -837,7 +837,9 @@
         * Copy the EJTAG debug exception vector handler code to it's
final
         * destination.
         */
+#ifdef WHONEEDSTLB
        memcpy((void *)(KSEG0 + 0x300), &except_vec_ejtag_debug, 0x80);
+#endif

        /*
         * Only some CPUs have the watch exceptions or a dedicated


OK, a kinder fix would be something like:

diff -u -r1.25 head.S
--- arch/mips/kernel/head.S     2001/05/04 20:43:25     1.25
+++ arch/mips/kernel/head.S     2001/05/15 21:39:40
@@ -44,7 +44,7 @@
         * FIXME: Use the initcode feature to get rid of unused handler
         * variants.
         */
-       .fill   0x280
+       .fill   0x380
 /*
  * This is space for the interrupt handlers.
  * After trap_init() they are located at virtual address KSEG0.


I wonder why this never hit anybody else ...

Regards,
Tommy Christensen

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-05-16 12:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-15 22:11 Exception handlers get overwritten Tommy S. Christensen
2001-05-15 23:48 ` Kevin D. Kissell
2001-05-15 23:48   ` Kevin D. Kissell
2001-05-16  6:56   ` Carsten Langgaard
2001-05-16 12:08 ` Exception handlers get overwritten, and more than you ever wanted to know about EJTAG Kevin D. Kissell
2001-05-16 12:08   ` Kevin D. Kissell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox