In outofworld, keep $sp for DDB case if it looks like a kernel address
so the stacktrace is ok.
This commit is contained in:
parent
6bc11dce71
commit
bbcf1beea0
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: locore_mips3.S,v 1.47 2000/09/07 20:31:02 jeffs Exp $ */
|
/* $NetBSD: locore_mips3.S,v 1.48 2000/09/08 07:24:42 jeffs Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author)
|
* Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author)
|
||||||
|
@ -1220,16 +1220,20 @@ LEAF_NOPROFILE(mips3_TLBMissException)
|
||||||
eret
|
eret
|
||||||
|
|
||||||
outofworld:
|
outofworld:
|
||||||
/* Ensure we have a valid sp so panic has a chance */
|
/* eret to panic so shutdown can use K2. Try to ensure valid $sp. */
|
||||||
la a0, 9f # string
|
la a0,_C_LABEL(panic)
|
||||||
la t0,_C_LABEL(panic)
|
|
||||||
dmfc0 a2, MIPS_COP_0_EXC_PC
|
dmfc0 a2, MIPS_COP_0_EXC_PC
|
||||||
move a1, sp
|
move a1, sp
|
||||||
sll k0, k0, PGSHIFT
|
sll k0, k0, PGSHIFT
|
||||||
dmtc0 t0, MIPS_COP_0_EXC_PC # return to panic
|
dmtc0 a0, MIPS_COP_0_EXC_PC # return to panic
|
||||||
li k1, VM_MIN_KERNEL_ADDRESS
|
li k1, VM_MIN_KERNEL_ADDRESS
|
||||||
addu a3, k0, k1
|
addu a3, k0, k1
|
||||||
|
#if defined(DDB)
|
||||||
|
bltz sp, 1f # for ddb try to keep frame
|
||||||
|
nop
|
||||||
|
#endif
|
||||||
la sp, start # set sp to a valid place
|
la sp, start # set sp to a valid place
|
||||||
|
1: la a0, 9f # string
|
||||||
eret
|
eret
|
||||||
|
|
||||||
MSG("TLB out of universe: ksp %p epc %p vaddr %p")
|
MSG("TLB out of universe: ksp %p epc %p vaddr %p")
|
||||||
|
|
Loading…
Reference in New Issue