PERFORCE change 107892 for review
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Sat Oct 14 07:44:15 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=107892
Change 107892 by gonzo at gonzo_hq on 2006/10/14 14:44:05
o Add missing part of TLBMiss handler: get actual PTEs from segtab
if it's present.
Affected files ...
.. //depot/projects/mips2/src/sys/mips/mips/exception.S#12 edit
Differences ...
==== //depot/projects/mips2/src/sys/mips/mips/exception.S#12 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $P4: //depot/projects/mips2/src/sys/mips/mips/exception.S#11 $
+ * $P4: //depot/projects/mips2/src/sys/mips/mips/exception.S#12 $
*/
/* $NetBSD: mipsX_subr.S,v 1.19 2005/12/11 12:18:09 christos Exp $ */
@@ -337,9 +337,22 @@
beq k1, zero, 7f # ==0 -- no page table
srl k0, 10 # k0=VPN (aka va>>10)
- break # XXX: Not ready yet
-
- eret
+ andi k0, k0, 0xff8 # k0=page tab offset
+ addu k1, k1, k0 # k1=pte address
+ lw k0, 0(k1) # k0=lo0 pte
+ lw k1, 4(k1) # k1=lo1 pte
+ sll k0, 2 # chop top 2 bits (part 1a)
+ srl k0, 2 # chop top 2 bits (part 1b)
+ mtc0 k0, MIPS_COP_0_TLB_LO0 # lo0 is loaded
+ sll k1, 2 # chop top 2 bits (part 2a)
+ srl k1, 2 # chop top 2 bits (part 2b)
+ mtc0 k1, MIPS_COP_0_TLB_LO1 # lo1 is loaded
+ nop # standard nop
+ tlbwr # write to tlb
+ nop # standard nop
+ nop # needed by R4000/4400
+ nop # needed by R4000/4400
+ eret # return from exception
5:
j KVATLBMiss
nop
More information about the p4-projects
mailing list