From owner-p4-projects@FreeBSD.ORG Sat Mar 6 23:29:43 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6903316A4D0; Sat, 6 Mar 2004 23:29:43 -0800 (PST) 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 430FA16A4CE for ; Sat, 6 Mar 2004 23:29:43 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B8C943D1F for ; Sat, 6 Mar 2004 23:29:43 -0800 (PST) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i277ThGe091846 for ; Sat, 6 Mar 2004 23:29:43 -0800 (PST) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i277Tgpv091843 for perforce@freebsd.org; Sat, 6 Mar 2004 23:29:42 -0800 (PST) (envelope-from jmallett@freebsd.org) Date: Sat, 6 Mar 2004 23:29:42 -0800 (PST) Message-Id: <200403070729.i277Tgpv091843@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 48332 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: Sun, 07 Mar 2004 07:29:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=48332 Change 48332 by jmallett@jmallett_oingo on 2004/03/06 23:28:50 Scribblings of code to start to look at cache attributes and do something with global bit preservation rather than checking pmap==kernel_pmap. Also fix a typo which would surely be borken. Affected files ... .. //depot/projects/mips/sys/mips/mips/tlb.c#21 edit Differences ... ==== //depot/projects/mips/sys/mips/mips/tlb.c#21 (text+ko) ==== @@ -115,14 +115,12 @@ if ((bits & PG_V) == 0) printf("pmap %p entering invalid mapping for va %lx to pa %lx [%lx]\n", pmap, (u_long)va, (u_long)pa, (u_long)bits); - *pte = MIPS_PA_TO_PFN(pa) | bits; - if (pmap == kernel_pmap) - *pte |= PG_G; - if ((va >> PAGE_SHIFT) & 1) { - tlb_update(va, pte[-1], pte[0]); - } else { - tlb_update(va, pte[0], pte[1]); - } + *pte &= PG_G; + *pte |= MIPS_PA_TO_PFN(pa) | bits; + if (0) + *pte |= PG_C(3); + else + *pte |= PG_C_UNCACHED; } void @@ -193,6 +191,8 @@ /* Bogus VPN2. */ ehi = MIPS_KSEG1_END + 2 * i * PAGE_SIZE; mips_wr_index(i); + mips_wr_entrylo0(0); + mips_wr_entrylo1(0); mips_wr_entryhi(ehi); mips_tlbwi(); } @@ -209,7 +209,7 @@ mips_tlbp(); i = mips_rd_index(); if (i >= 0) - tlb_invalidate_one(va); + tlb_invalidate_one(i); } /*