Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Apr 2010 20:01:21 +0000 (UTC)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r206209 - user/jmallett/octeon/sys/mips/mips
Message-ID:  <201004052001.o35K1L4K029882@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004052001.o35K1L4K029882>