Date: Sat, 6 Mar 2004 23:29:42 -0800 (PST) From: Juli Mallett <jmallett@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 48332 for review Message-ID: <200403070729.i277Tgpv091843@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403070729.i277Tgpv091843>