From owner-svn-src-user@FreeBSD.ORG Mon Apr 5 20:01:21 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE65A106566B; Mon, 5 Apr 2010 20:01:21 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDF948FC15; Mon, 5 Apr 2010 20:01:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35K1Lfs029884; Mon, 5 Apr 2010 20:01:21 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35K1L4K029882; Mon, 5 Apr 2010 20:01:21 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004052001.o35K1L4K029882@svn.freebsd.org> From: Juli Mallett Date: Mon, 5 Apr 2010 20:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206209 - user/jmallett/octeon/sys/mips/mips X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 20:01:21 -0000 Author: jmallett Date: Mon Apr 5 20:01:21 2010 New Revision: 206209 URL: http://svn.freebsd.org/changeset/base/206209 Log: o) Make it clear that CMAP1 and CMAP2 are initialized to PG_G. o) Set PG_W correctly (not that it matters) in one CMAP1 use. XXX We really should be updating the page table for these mappings, not just putting them in the TLB. With random replacement, it's quite possible that inserting the second entry would invalidate the first one, even if it is terribly unlikely, and in the case where we map two pages, that's an issue. Modified: user/jmallett/octeon/sys/mips/mips/pmap.c Modified: user/jmallett/octeon/sys/mips/mips/pmap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/pmap.c Mon Apr 5 19:59:05 2010 (r206208) +++ user/jmallett/octeon/sys/mips/mips/pmap.c Mon Apr 5 20:01:21 2010 (r206209) @@ -389,8 +389,8 @@ again: */ if (memory_larger_than_512meg) { for (i = 0; i < MAXCPU; i++) { - pte_set(&sysmap_lmem[i].CMAP1, PG_G); - pte_set(&sysmap_lmem[i].CMAP2, PG_G); + sysmap_lmem[i].CMAP1 = PG_G; + sysmap_lmem[i].CMAP2 = PG_G; sysmap_lmem[i].CADDR1 = (caddr_t)virtual_avail; virtual_avail += PAGE_SIZE; sysmap_lmem[i].CADDR2 = (caddr_t)virtual_avail; @@ -2175,7 +2175,7 @@ pmap_kenter_temporary(vm_paddr_t pa, int cpu = PCPU_GET(cpuid); sysm = &sysmap_lmem[cpu]; /* Since this is for the debugger, no locks or any other fun */ - sysm->CMAP1 = TLBLO_PA_TO_PFN(pa) | PG_D | PG_V | PG_G | PG_G | PG_C_CNC; + sysm->CMAP1 = TLBLO_PA_TO_PFN(pa) | PG_D | PG_V | PG_G | PG_W | PG_C_CNC; sysm->valid1 = 1; pmap_update_page(kernel_pmap, (vm_offset_t)sysm->CADDR1, sysm->CMAP1); va = (vm_offset_t)sysm->CADDR1;