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 Leave TS and RE alone for the benefit of ...



details:   https://anonhg.NetBSD.org/src/rev/d56e525a8fc0
branches:  trunk
changeset: 321623:d56e525a8fc0
user:      maya <maya%NetBSD.org@localhost>
date:      Wed Mar 28 17:56:52 2018 +0000

description:
Leave TS and RE alone for the benefit of emips, which failed
to boot even earlier after locore.S:1.211.

Do this unconditionally to avoid introducing more ifdefs.
Also tested on ci20 and erlite.

diffstat:

 sys/arch/mips/mips/locore.S |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r f779a400c689 -r d56e525a8fc0 sys/arch/mips/mips/locore.S
--- a/sys/arch/mips/mips/locore.S       Wed Mar 28 16:02:49 2018 +0000
+++ b/sys/arch/mips/mips/locore.S       Wed Mar 28 17:56:52 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.217 2018/03/07 20:48:00 maya Exp $        */
+/*     $NetBSD: locore.S,v 1.218 2018/03/28 17:56:52 maya Exp $        */
 
 /*
  * Copyright (c) 1992, 1993
@@ -63,7 +63,7 @@
 #include <mips/trap.h>
 #include <mips/locore.h>
 
-RCSID("$NetBSD: locore.S,v 1.217 2018/03/07 20:48:00 maya Exp $")
+RCSID("$NetBSD: locore.S,v 1.218 2018/03/28 17:56:52 maya Exp $")
 
 #include "assym.h"
 
@@ -73,16 +73,18 @@
        .globl  _C_LABEL(kernel_text)           # libkvm refers this
 start:
 _C_LABEL(kernel_text):
-       /* First disable the interrupts only, for safety */
        mfc0    k0, MIPS_COP_0_STATUS
        MFC0_HAZARD
+
+       /* First disable the interrupts only, for safety */
        and     k0, ~MIPS_SR_INT_IE
        mtc0    k0, MIPS_COP_0_STATUS
        COP0_SYNC
 
-       /* Known state: BEV, coprocessors disabled */
-       mtc0    zero, MIPS_COP_0_STATUS
-       mtc0    zero, MIPS_COP_0_CAUSE
+       /* Known state: BEV, coprocessors disabled. */
+       /* Leaving TS | RE alone (for emips) */
+       and     k0, MIPS_SR_TS | MIPS3_SR_RE
+       mtc0    k0, MIPS_COP_0_STATUS
        COP0_SYNC
 
 #ifdef _LP64



Home | Main Index | Thread Index | Old Index