From owner-p4-projects@FreeBSD.ORG Fri May 30 13:28:13 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8CAE837B40F; Fri, 30 May 2003 13:28:12 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 555E737B40A for ; Fri, 30 May 2003 13:28:11 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB17143FA3 for ; Fri, 30 May 2003 13:28:10 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4UKSA0U068630 for ; Fri, 30 May 2003 13:28:10 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4UKSAtD068627 for perforce@freebsd.org; Fri, 30 May 2003 13:28:10 -0700 (PDT) Date: Fri, 30 May 2003 13:28:10 -0700 (PDT) Message-Id: <200305302028.h4UKSAtD068627@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 32118 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2003 20:28:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=32118 Change 32118 by jmallett@jmallett_dalek on 2003/05/30 13:28:09 Add back TLBRead, oops. Affected files ... .. //depot/projects/mips/sys/mips/mips/mips_subr.S#7 edit Differences ... ==== //depot/projects/mips/sys/mips/mips/mips_subr.S#7 (text+ko) ==== @@ -338,6 +338,63 @@ COP0_SYNC # XXXX - not executed!! END(MIPSX(TLBUpdate)) +/*-------------------------------------------------------------------------- + * + * mipsN_TLBRead -- + * + * Read the TLB entry. + * + * mips3_TLBRead(entry, tlb) + * unsigned entry; + * struct tlb *tlb; + * + * Results: + * None. + * + * Side effects: + * tlb will contain the TLB entry found. + * + *-------------------------------------------------------------------------- + */ +LEAF(MIPSX(TLBRead)) + mfc0 v1, MIPS_COP_0_STATUS # Save the status register. + mtc0 zero, MIPS_COP_0_STATUS # Disable interrupts + COP0_SYNC + nop + mfc0 ta2, MIPS_COP_0_TLB_PG_MASK # save current pgMask + nop + _MFC0 t0, MIPS_COP_0_TLB_HI # Get current PID + + mtc0 a0, MIPS_COP_0_TLB_INDEX # Set the index register + COP0_SYNC + nop + nop # required for QED5230 + tlbr # Read from the TLB + COP0_SYNC + nop + nop + nop + mfc0 t2, MIPS_COP_0_TLB_PG_MASK # fetch the pgMask + _MFC0 t3, MIPS_COP_0_TLB_HI # fetch the hi entry + _MFC0 ta0, MIPS_COP_0_TLB_LO0 # See what we got + _MFC0 ta1, MIPS_COP_0_TLB_LO1 # See what we got + _MTC0 t0, MIPS_COP_0_TLB_HI # restore PID + COP0_SYNC + mtc0 ta2, MIPS_COP_0_TLB_PG_MASK # restore pgMask + COP0_SYNC + nop + nop + nop # wait for PID active + mtc0 v1, MIPS_COP_0_STATUS # Restore the status register + COP0_SYNC + nop + sw t2, 0(a1) + sw t3, 4(a1) + sw ta0, 8(a1) + j ra + sw ta1, 12(a1) +END(MIPSX(TLBRead)) + /* * mipsN_proc_trampoline() *