Someday I'll learn how the MIPS cpu works; add some delay after the tlbp

when switching to a new process.  This was causing a ktlbmiss and stack
overflow panic on R3000 machines.
This commit is contained in:
mhitch 1997-06-25 05:06:01 +00:00
parent 021ee70ed5
commit 63f2f12797
2 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore_r2000.S,v 1.36 1997/06/23 21:45:05 mhitch Exp $ */
/* $NetBSD: locore_r2000.S,v 1.37 1997/06/25 05:06:01 mhitch Exp $ */
/*
* Copyright (c) 1992, 1993
@ -1671,8 +1671,8 @@ LEAF(mips1_cpu_switch_resume)
mtc0 v0, MIPS_COP_0_TLB_HI
nop
tlbp # probe for entry
nop
mfc0 s1, MIPS_COP_0_TLB_INDEX # see if we found it
nop
bltz s1, 1f # not found
li s1, MIPS_KSEG0_START
mtc0 s1, MIPS_COP_0_TLB_HI
@ -1691,8 +1691,8 @@ LEAF(mips1_cpu_switch_resume)
mtc0 v0, MIPS_COP_0_TLB_HI
nop
tlbp # probe for entry
nop
mfc0 s1, MIPS_COP_0_TLB_INDEX # see if we found it
nop
bltz s1, 1f # not found
li s1, MIPS_KSEG0_START
mtc0 s1, MIPS_COP_0_TLB_HI

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore_r4000.S,v 1.37 1997/06/23 21:45:11 mhitch Exp $ */
/* $NetBSD: locore_r4000.S,v 1.38 1997/06/25 05:06:05 mhitch Exp $ */
/*
* Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author)
@ -2177,7 +2177,9 @@ LEAF(mips3_cpu_switch_resume)
nop
tlbp # probe for existing entry
nop
nop
mfc0 s1, MIPS_COP_0_TLB_INDEX
nop
slti s1, s1, 8 # if found in random entry
bnez s1, 2f
mtc0 zero, MIPS_COP_0_TLB_LO0 # flush it
@ -2206,7 +2208,9 @@ LEAF(mips3_cpu_switch_resume)
nop
tlbp # probe for existing entry
nop
nop
mfc0 s1, MIPS_COP_0_TLB_INDEX
nop
slti s1, s1, 8 # if found in random entry
bnez s1, 2f
mtc0 zero, MIPS_COP_0_TLB_LO0 # flush it