PERFORCE change 152493 for review

Oleksandr Tymoshenko gonzo at FreeBSD.org
Tue Nov 4 14:15:37 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=152493

Change 152493 by gonzo at gonzo_jeeves on 2008/11/04 22:15:30

	o When zeroing memory area use uncached region in KSEG1 and 
	    then invalidate all chache entries for this area.

Affected files ...

.. //depot/projects/mips2/src/sys/mips/mips/pmap.c#37 edit

Differences ...

==== //depot/projects/mips2/src/sys/mips/mips/pmap.c#37 (text+ko) ====

@@ -2178,9 +2178,10 @@
 #endif
 	if (phys < MIPS_KSEG0_LARGEST_PHYS) {
 
-		va = MIPS_PHYS_TO_CACHED(phys);
+		va = MIPS_PHYS_TO_UNCACHED(phys);
 
 		bzero((caddr_t)va, PAGE_SIZE);
+		mips_dcache_wbinv_range(va, PAGE_SIZE);
 	} else {
 		int cpu;
 		struct local_sysmaps *sysm;
@@ -2233,8 +2234,9 @@
 	} else
 #endif
 	if (phys < MIPS_KSEG0_LARGEST_PHYS) {
-		va = MIPS_PHYS_TO_CACHED(phys);
+		va = MIPS_PHYS_TO_UNCACHED(phys);
 		bzero((char *)(caddr_t)va + off, size);
+		mips_dcache_wbinv_range(va + off, size);
 	} else {
 		int cpu;
 		struct local_sysmaps *sysm;
@@ -2271,8 +2273,9 @@
 	} else
 #endif
 	if (phys < MIPS_KSEG0_LARGEST_PHYS) {
-		va = MIPS_PHYS_TO_CACHED(phys);
+		va = MIPS_PHYS_TO_UNCACHED(phys);
 		bzero((caddr_t)va, PAGE_SIZE);
+		mips_dcache_wbinv_range(va, PAGE_SIZE);
 	} else {
 		int cpu;
 		struct local_sysmaps *sysm;


More information about the p4-projects mailing list