summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-06-11 20:44:21 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-06-11 20:44:21 +0000
commitdcaea01709bb3167aacceeabbd34212bcd555f22 (patch)
treedd24ec5380e4f56c730426ef25391d56823f968c
parent9b7a17eb88a1187fb7e3cba613279acd66649130 (diff)
Move pmap_aliasmask declaration and initialization to MD code. No functional
change.
-rw-r--r--sys/arch/hp300/hp300/locore.s11
-rw-r--r--sys/arch/m68k/m68k/pmap_bootstrap.c17
-rw-r--r--sys/arch/m68k/m68k/pmap_motorola.c4
3 files changed, 13 insertions, 19 deletions
diff --git a/sys/arch/hp300/hp300/locore.s b/sys/arch/hp300/hp300/locore.s
index 0c62ad7b255..95c0709538f 100644
--- a/sys/arch/hp300/hp300/locore.s
+++ b/sys/arch/hp300/hp300/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.54 2006/05/20 14:54:52 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.55 2006/06/11 20:44:18 miod Exp $ */
/* $NetBSD: locore.s,v 1.91 1998/11/11 06:41:25 thorpej Exp $ */
/*
@@ -322,11 +322,15 @@ Lishpmmu:
RELOC(machineid, a0)
movl #HP_350,a0@ | yes, a 350
movl #0,a1@(MMUCMD) | clear out MMU again
+ RELOC(pmap_aliasmask, a0)
+ movl #0x7fff, a0@ | 32KB
jra Lstart1
Lis320:
RELOC(machineid, a0)
movl #HP_320,a0@
movl #0,a1@(MMUCMD) | clear out MMU again
+ RELOC(pmap_aliasmask, a0)
+ movl #0x3fff, a0@ | 16KB
jra Lstart1
/*
@@ -2109,6 +2113,11 @@ GLOBAL(ectype)
GLOBAL(fputype)
.long FPU_68882 | default to 68882 FPU
+#if defined(M68K_MMU_HP)
+GLOBAL(pmap_aliasmask)
+ .long 0
+#endif
+
GLOBAL(protorp)
.long 0,0 | prototype root pointer
diff --git a/sys/arch/m68k/m68k/pmap_bootstrap.c b/sys/arch/m68k/m68k/pmap_bootstrap.c
index 72c88e4aa41..554b43964a1 100644
--- a/sys/arch/m68k/m68k/pmap_bootstrap.c
+++ b/sys/arch/m68k/m68k/pmap_bootstrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_bootstrap.c,v 1.14 2005/11/12 23:11:37 miod Exp $ */
+/* $OpenBSD: pmap_bootstrap.c,v 1.15 2006/06/11 20:44:20 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -87,9 +87,6 @@ extern int physmem;
extern paddr_t avail_start, avail_end;
extern vaddr_t virtual_avail, virtual_end;
extern vsize_t mem_size;
-#ifdef M68K_MMU_HP
-extern int pmap_aliasmask;
-#endif
void pmap_bootstrap(paddr_t, paddr_t);
@@ -507,18 +504,6 @@ pmap_bootstrap(nextpa, firstpa)
VM_MIN_KERNEL_ADDRESS + (nextpa - firstpa);
RELOC(virtual_end, vaddr_t) = VM_MAX_KERNEL_ADDRESS;
-#ifdef M68K_MMU_HP
- /*
- * Determine VA aliasing distance if any
- */
- if (RELOC(ectype, int) == EC_VIRT) {
- if (RELOC(machineid, int) == HP_320)
- RELOC(pmap_aliasmask, int) = 0x3fff; /* 16k */
- else if (RELOC(machineid, int) == HP_350)
- RELOC(pmap_aliasmask, int) = 0x7fff; /* 32k */
- }
-#endif
-
/*
* Kernel page/segment table allocated in locore,
* just initialize pointers.
diff --git a/sys/arch/m68k/m68k/pmap_motorola.c b/sys/arch/m68k/m68k/pmap_motorola.c
index 421054b3ca6..14b6b1775ad 100644
--- a/sys/arch/m68k/m68k/pmap_motorola.c
+++ b/sys/arch/m68k/m68k/pmap_motorola.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_motorola.c,v 1.41 2005/11/04 21:51:35 miod Exp $ */
+/* $OpenBSD: pmap_motorola.c,v 1.42 2006/06/11 20:44:20 miod Exp $ */
/*
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -285,7 +285,7 @@ TAILQ_HEAD(pv_page_list, pv_page) pv_page_freelist;
int pv_nfree;
#if defined(M68K_MMU_HP)
-int pmap_aliasmask; /* separation at which VA aliasing is ok */
+extern int pmap_aliasmask; /* separation at which VA aliasing is ok */
#endif
#if defined(M68040) || defined(M68060)
int protostfree; /* prototype (default) free ST map */