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 Fix mips3 outofworld to panic cleanly eve...



details:   https://anonhg.NetBSD.org/src/rev/5bf888bab018
branches:  trunk
changeset: 495280:5bf888bab018
user:      jeffs <jeffs%NetBSD.org@localhost>
date:      Tue Jul 25 18:06:49 2000 +0000

description:
Fix mips3 outofworld to panic cleanly even if shutdown path misses K2.
Previously we jal to panic which never cleared the tlb fault, so if
on the course of shutdown (like a doshutdownhooks() callback) missed
K2, it would panic again.  Fix by setting EPC to panic() and eret.

diffstat:

 sys/arch/mips/mips/locore_mips3.S |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 039c78304401 -r 5bf888bab018 sys/arch/mips/mips/locore_mips3.S
--- a/sys/arch/mips/mips/locore_mips3.S Tue Jul 25 17:56:05 2000 +0000
+++ b/sys/arch/mips/mips/locore_mips3.S Tue Jul 25 18:06:49 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore_mips3.S,v 1.42 2000/07/25 17:56:06 jeffs Exp $  */
+/*     $NetBSD: locore_mips3.S,v 1.43 2000/07/25 18:06:49 jeffs Exp $  */
 
 /*
  * Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author)
@@ -1223,13 +1223,18 @@
 
 outofworld:
        /* Ensure we have a valid sp so panic has a chance */
+       la      a0, 9f                          # string
+       la      t0,_C_LABEL(panic)
        dmfc0   a2, MIPS_COP_0_EXC_PC
        move    a1, sp
        sll     k0, k0, PGSHIFT
+       dmtc0   t0, MIPS_COP_0_EXC_PC           # return to panic
        li      k1, VM_MIN_KERNEL_ADDRESS
        addu    a3, k0, k1
        la      sp, start                       # set sp to a valid place
-       PANIC("TLB out of universe: ksp was %p, exc PC %p, vaddr %p")
+       eret
+
+       MSG("TLB out of universe: ksp %p epc %p vaddr %p")
 
        .set    at
 END(mips3_TLBMissException)



Home | Main Index | Thread Index | Old Index