Subject: Re: "pmap_unwire: wiring ... didn't change!"
To: None <>
From: Izumi Tsutsui <>
List: port-cobalt
Date: 02/26/2005 16:41:19
In article <> wrote:

>     Chuck> so you get different corruption when you read the same file
>     Chuck> at different times? that's useful to know.
> Yes: A (large) file that was intact a first time seems to be corrupt
> when reading it later a second time (and vice versa).

Hmm, I've confirmed it certainly happens on my RaQ2.
Multiple "cmp -l file1 file2" after "cp file1 file2"
shows different results. This happens both on wd0 at viaide
and on sd0 at siop.

With the attached (a bit ugly) patch against cache.c
(which make always wbinv use index ops) the problem
seems disappear, but I'm not sure what is the real problem.

Setting use_index=1 forcibly in cobalt/bus.c:bus_dmamap_sync()
doesn't fix the corruption, so I think there are some bugs
in pmap.c around 2-way cache or virtual alias handling...
Izumi Tsutsui

Index: cache.c
RCS file: /cvsroot/src/sys/arch/mips/mips/cache.c,v
retrieving revision 1.25
diff -u -r1.25 cache.c
--- cache.c	13 Dec 2004 08:39:21 -0000	1.25
+++ cache.c	26 Feb 2005 03:46:05 -0000
@@ -525,7 +525,11 @@
 			mips_cache_ops.mco_pdcache_wbinv_all =
 			mips_cache_ops.mco_pdcache_wbinv_range =
+#if 0
+			    r5k_pdcache_wbinv_range_index_32; /* XXX XXX XXX */
 			mips_cache_ops.mco_pdcache_wbinv_range_index =
 			mips_cache_ops.mco_pdcache_inv_range =