summaryrefslogtreecommitdiff
path: root/sys/arch/m88k/include
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-02-19 21:02:07 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-02-19 21:02:07 +0000
commit1a3857b45b9da753c5ce6b163959d0d041b9ffad (patch)
tree3dfdadd859937db350129612b1827526e15f9888 /sys/arch/m88k/include
parentf078462d5e3d83027cccff51fd9606516d0c4cbe (diff)
Introduce a new cmmu method to return the preferred cache mode bits for the
kernel APR. Return write-back for every design but those involving 88410, where write through is returned. Apparently the use of writeback on single-processor kernels using 88410 (197SP, 197DP) has only been working by fat chance, and the last two years of uvm changes, as well as the switch to ELF (causing kernel rodata to move `up') exposes silent memory corruption on (88410-size) aliased addresses. (I am guilty of not using my 197DP board much after making 197LE write-back capable, as 197LE turned out to be faster and more stable, for I would have noticed this earlier). Further thought needs to happen about this. It might be possible to switch to writeback by default again as long as bus_dma maps things write-through on 88410 designs, and perhaps with a part of the kernel mapped with a write-through BATC, since BATC have precedence upon page tables. Right now I'm trying to get a stable release out of the door.
Diffstat (limited to 'sys/arch/m88k/include')
-rw-r--r--sys/arch/m88k/include/cmmu.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/m88k/include/cmmu.h b/sys/arch/m88k/include/cmmu.h
index 5a6ddb9c023..40324d10f5f 100644
--- a/sys/arch/m88k/include/cmmu.h
+++ b/sys/arch/m88k/include/cmmu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmmu.h,v 1.28 2013/02/17 18:07:36 miod Exp $ */
+/* $OpenBSD: cmmu.h,v 1.29 2013/02/19 21:02:06 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1992 Carnegie Mellon University
@@ -42,6 +42,7 @@ struct cmmu_p {
cpuid_t (*cpu_number)(void);
+ apr_t (*kapr_cmode)(void);
void (*set_sapr)(apr_t);
void (*set_uapr)(apr_t);
@@ -82,6 +83,7 @@ extern __cpu_simple_lock_t cmmu_cpu_lock;
#define cpu_configuration_print(cpu) (cmmu->cpu_configuration_print)(cpu)
#define cmmu_shutdown (cmmu->shutdown)
#define cmmu_cpu_number (cmmu->cpu_number)
+#define cmmu_kapr_cmode (cmmu->kapr_cmode)
#define cmmu_set_sapr(apr) (cmmu->set_sapr)(apr)
#define cmmu_set_uapr(apr) (cmmu->set_uapr)(apr)
#define cmmu_tlbis(cpu, va, pte) (cmmu->tlb_inv_s)(cpu, va, pte)