summaryrefslogtreecommitdiff
path: root/sys/arch/m88k
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/m88k')
-rw-r--r--sys/arch/m88k/include/m8820x.h16
-rw-r--r--sys/arch/m88k/m88k/pmap.c18
2 files changed, 30 insertions, 4 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);