Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/mips At the start of the kernel, keep the MIPS...



details:   https://anonhg.NetBSD.org/src/rev/e3e7337e69c8
branches:  trunk
changeset: 495023:e3e7337e69c8
user:      jeffs <jeffs%NetBSD.org@localhost>
date:      Wed Jul 19 18:38:41 2000 +0000

description:
At the start of the kernel, keep the MIPS3_SR_DIAG_BEV setting
on mips3 systems, until the kernel actually hooks the vectors.
This makes it easier to debug early problems if the firmware
has provides an exception handler.

diffstat:

 sys/arch/mips/mips/locore.S |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r c96b10e37cb5 -r e3e7337e69c8 sys/arch/mips/mips/locore.S
--- a/sys/arch/mips/mips/locore.S       Wed Jul 19 18:29:21 2000 +0000
+++ b/sys/arch/mips/mips/locore.S       Wed Jul 19 18:38:41 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.106 2000/07/18 06:25:33 jeffs Exp $       */
+/*     $NetBSD: locore.S,v 1.107 2000/07/19 18:38:41 jeffs Exp $       */
 
 /*
  * Copyright (c) 1992, 1993
@@ -82,7 +82,14 @@
        .globl  _C_LABEL(kernel_text)           # libkvm refers this
 start:
 _C_LABEL(kernel_text):
+#if defined(MIPS3) & !defined(MIPS1)
+       /* keep firmware exception handler until we hook. */
+       mfc0    v0, MIPS_COP_0_STATUS
+       and     v0, MIPS3_SR_DIAG_BEV
+       mtc0    v0, MIPS_COP_0_STATUS           # Disable interrupts
+#else
        mtc0    zero, MIPS_COP_0_STATUS         # Disable interrupts
+#endif
 /*
  * Initialize stack and call machine startup.
  */
@@ -128,7 +135,8 @@
        mtc0    t0, MIPS_COP_0_CONFIG
 #endif /* HPCMIPS_L1CACHE_DISABLE */
 #else
-       li      t0, MIPS_SR_COP_1_BIT           # Disable interrupts, and
+       mfc0    t0, MIPS_COP_0_STATUS
+       or      t0, MIPS_SR_COP_1_BIT           # Disable interrupts, and
        mtc0    t0, MIPS_COP_0_STATUS           # enable the fp coprocessor
 #endif
        nop



Home | Main Index | Thread Index | Old Index