summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-19 02:54:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-19 02:54:49 +0000
commit6f7803c818704347720dede645cb2b57161d8f12 (patch)
treef8c201d2b62fcae918d9acd7be19d6085f7237a6 /sys
parent753b8fab14ddb3c6bb308d25dcad3b9b2051afe3 (diff)
4/300 cache is writethrough; but... it fails to update pte's in the cache
problem reported by chuck cranor
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/sparc/cpu.c1
-rw-r--r--sys/arch/sparc/sparc/pmap.c8
2 files changed, 8 insertions, 1 deletions
diff --git a/sys/arch/sparc/sparc/cpu.c b/sys/arch/sparc/sparc/cpu.c
index a445aff07c3..43437db234b 100644
--- a/sys/arch/sparc/sparc/cpu.c
+++ b/sys/arch/sparc/sparc/cpu.c
@@ -188,6 +188,7 @@ cpu_attach(parent, dev, aux)
case SUN4_300:
sprintf(cpu_model, "SUN-4/300 series (%s FPU)", fpuname);
bug = 1;
+ vactype = VAC_WRITETHROUGH;
cacheinfo.c_totalsize = 128*1024;
cacheinfo.c_hwflush = 0;
cacheinfo.c_linesize = 16;
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c
index d59b38be582..38c717eb532 100644
--- a/sys/arch/sparc/sparc/pmap.c
+++ b/sys/arch/sparc/sparc/pmap.c
@@ -2857,7 +2857,13 @@ pmap_changeprot(pm, va, prot, wired)
setcontext(ctx);
goto useless;
}
- if (vactype == VAC_WRITEBACK &&
+
+ /*
+ * the latter check deals with a writethrough cache
+ * problem on the 4/300
+ */
+ if ((vactype==VAC_WRITEBACK ||
+ (vactype==VAC_WRITETHROUGH && cputyp==CPU_SUN4)) &&
(tpte & (PG_U|PG_NC|PG_TYPE)) == (PG_U|PG_OBMEM))
cache_flush_page((int)va);
} else {