All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tommy S. Christensen" <tommy.christensen@eicon.com>
To: linux-mips@oss.sgi.com
Subject: Exception handlers get overwritten
Date: Wed, 16 May 2001 00:11:12 +0200	[thread overview]
Message-ID: <3B01A980.7C27BB9F@eicon.com> (raw)

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

             reply	other threads:[~2001-05-15 22:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-15 22:11 Tommy S. Christensen [this message]
2001-05-15 23:48 ` Exception handlers get overwritten 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B01A980.7C27BB9F@eicon.com \
    --to=tommy.christensen@eicon.com \
    --cc=linux-mips@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.