summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-05-06 16:59:29 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-05-06 16:59:29 +0000
commit516bd0ac30018bbfb1f1e7f5b33f524331357907 (patch)
tree2178d7d8c98a543b2de7a17e0891c913f347058e
parent0941726c718d0c63478583c6d822d4a893c9b7a9 (diff)
On 88100-based systems, take the two hardwired BATC into account in
pmap_extract(), and do not bother creating regular page table mappings for obio regions which are covered by these BATC entries.
-rw-r--r--sys/arch/m88k/include/m8820x.h16
-rw-r--r--sys/arch/m88k/m88k/pmap.c18
-rw-r--r--sys/arch/mvme88k/dev/mainbus.c31
-rw-r--r--sys/arch/mvme88k/mvme88k/pmap_table.c6
4 files changed, 44 insertions, 27 deletions
diff --git a/sys/arch/m88k/include/m8820x.h b/sys/arch/m88k/include/m8820x.h
index 2b2421c76e0..d83ea886484 100644
--- a/sys/arch/m88k/include/m8820x.h
+++ b/sys/arch/m88k/include/m8820x.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: m8820x.h,v 1.6 2005/12/04 12:20:19 miod Exp $ */
+/* $OpenBSD: m8820x.h,v 1.7 2006/05/06 16:59:26 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
*
@@ -169,6 +169,16 @@
#define MC88200_CACHE_SHIFT 4
#define MC88200_CACHE_LINE (1 << MC88200_CACHE_SHIFT)
+/*
+ * Hardwired BATC information
+ */
+
+#define BATC8 0xfff7ffb5
+#define BATC9 0xfffffff5
+
+#define BATC8_VA 0xfff00000
+#define BATC9_VA 0xfff80000
+
#define NBSG (1 << (PDT_BITS + PG_BITS)) /* segment size */
#ifndef _LOCORE
@@ -193,8 +203,8 @@ extern struct m8820x_cmmu m8820x_cmmu[MAX_CMMUS];
extern u_int cmmu_shift;
extern u_int max_cmmus;
-void m8820x_setup_board_config(void);
-cpuid_t m8820x_cpu_number(void);
+void m8820x_setup_board_config(void);
+cpuid_t m8820x_cpu_number(void);
#endif /* _LOCORE */
#endif /* __M88K_M8820X_H__ */
diff --git a/sys/arch/m88k/m88k/pmap.c b/sys/arch/m88k/m88k/pmap.c
index 99f16d2a14f..9f48e4feb34 100644
--- a/sys/arch/m88k/m88k/pmap.c
+++ b/sys/arch/m88k/m88k/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.22 2006/04/26 20:38:37 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.23 2006/05/06 16:59:28 miod Exp $ */
/*
* Copyright (c) 2001-2004, Miodrag Vallat
* Copyright (c) 1998-2001 Steve Murphree, Jr.
@@ -58,6 +58,9 @@
#include <machine/cpu.h>
#include <machine/lock.h>
#include <machine/pmap_table.h>
+#ifdef M88100
+#include <machine/m8820x.h>
+#endif
#include <uvm/uvm.h>
@@ -1860,6 +1863,19 @@ pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *pap)
panic("pmap_extract: pmap is NULL");
#endif
+#ifdef M88100
+ /*
+ * 88100-based designs have two hardwired BATC entries which map
+ * the upper 1MB 1:1 in supervisor space.
+ */
+ if (CPU_IS88100) {
+ if (va >= BATC8_VA && pmap == pmap_kernel()) {
+ *pap = va;
+ return (TRUE);
+ }
+ }
+#endif
+
spl = splvm();
PMAP_LOCK(pmap);
diff --git a/sys/arch/mvme88k/dev/mainbus.c b/sys/arch/mvme88k/dev/mainbus.c
index e8f603c1a2e..504e13cdcdf 100644
--- a/sys/arch/mvme88k/dev/mainbus.c
+++ b/sys/arch/mvme88k/dev/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.19 2006/04/27 20:19:28 miod Exp $ */
+/* $OpenBSD: mainbus.c,v 1.20 2006/05/06 16:59:28 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 2004, Miodrag Vallat.
@@ -40,6 +40,9 @@
#include <machine/cmmu.h>
#include <machine/cpu.h>
+#ifdef M88100
+#include <machine/m8820x.h>
+#endif
#ifdef MVME187
#include <machine/mvme187.h>
#endif
@@ -91,24 +94,14 @@ mainbus_map(bus_addr_t addr, bus_size_t size, int flags,
static bus_addr_t threshold = 0;
if (threshold == 0) {
- switch (brdtyp) {
-#ifdef MVME188
- case BRD_188:
- threshold = MVME188_UTILITY;
- break;
-#endif
-#ifdef MVME187
- case BRD_187:
- case BRD_8120:
- threshold = OBIO187_START;
- break;
+#ifdef M88100
+ if (CPU_IS88100)
+ threshold = BATC8_VA; /* hardwired BATC */
#endif
#ifdef MVME197
- case BRD_197:
-#endif
+ if (CPU_IS88110)
threshold = OBIO197_START;
- break;
- }
+#endif
}
if (addr >= threshold)
@@ -285,11 +278,5 @@ mainbus_attach(parent, self, args)
*/
cpu_configuration_print(1);
- /* XXX
- * should have a please-attach-first list for mainbus,
- * to ensure that the pcc/vme2/mcc chips are attached
- * first.
- */
-
(void)config_search(mainbus_scan, self, args);
}
diff --git a/sys/arch/mvme88k/mvme88k/pmap_table.c b/sys/arch/mvme88k/mvme88k/pmap_table.c
index 03caffdcfeb..e91ee84d206 100644
--- a/sys/arch/mvme88k/mvme88k/pmap_table.c
+++ b/sys/arch/mvme88k/mvme88k/pmap_table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_table.c,v 1.22 2006/04/27 20:19:31 miod Exp $ */
+/* $OpenBSD: pmap_table.c,v 1.23 2006/05/06 16:59:28 miod Exp $ */
/*
* Mach Operating System
@@ -46,7 +46,9 @@
const pmap_table_entry
m187_board_table[] = {
{ BUG187_START, BUG187_START, BUG187_SIZE, RW, CI },
+#if 0 /* mapped by the hardcoded BATC entries */
{ OBIO187_START, OBIO187_START, OBIO187_SIZE, RW, CI },
+#endif
{ 0, 0, 0xffffffff, 0, 0 },
};
#endif
@@ -56,7 +58,9 @@ m187_board_table[] = {
const pmap_table_entry
m188_board_table[] = {
{ MVME188_EPROM, MVME188_EPROM, MVME188_EPROM_SIZE, RW, CI },
+#if 0 /* mapped by the hardcoded BATC entries */
{ MVME188_UTILITY, MVME188_UTILITY, MVME188_UTILITY_SIZE, RW, CI },
+#endif
{ 0, 0, 0xffffffff, 0, 0 },
};
#endif