summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-12-31 21:38:09 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-12-31 21:38:09 +0000
commitac70415760e796ddc49d0a3f42cef4d80e3cd79c (patch)
tree320bd94ef834f8806974e699f17f9347fc1ed7e8 /sys/arch/mvme88k
parent0b6d62f095cb4dece152a6de03a65095436aed03 (diff)
Massive overhauling of the m88k pmap, though I can't pretend it's a new pmap
since a large part of the structures and logic remains. Since m88k has separate supervisor/user spaces, we can map physical memory 1:1 in supervisor space, and have the kernel virtual address space start from the end of physical memory. This allows us to switch to __HAVE_PMAP_DIRECT. And to get rid of the double mapped sdt, since now their virtual and physical addresses will always match. The upper bound of the kernel virtual memory space is now platform dependent, until the code which relies upon some hardware devices being mapped 1:1 in supervisor mode is updated to no longer require this (this is mainly a PITA on luna88k, where onboard devices start at 0x40000000, leaving only 1GB of KVA at the moment - still much better than the previous 512MB). Tested on mvme88k only (187, 188, 197LE, 197DP). Other platforms ought to work, aviion will be checked shortly and fixed if necessary. No known OpenBSD/luna88k system in working condition at the moment.
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/conf/files.mvme88k4
-rw-r--r--sys/arch/mvme88k/include/pmap.h12
-rw-r--r--sys/arch/mvme88k/include/vmparam.h11
-rw-r--r--sys/arch/mvme88k/mvme88k/m187_machdep.c20
-rw-r--r--sys/arch/mvme88k/mvme88k/m188_machdep.c8
-rw-r--r--sys/arch/mvme88k/mvme88k/m197_machdep.c32
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c88
-rw-r--r--sys/arch/mvme88k/mvme88k/mem.c228
-rw-r--r--sys/arch/mvme88k/mvme88k/pmap_bootstrap.c83
-rw-r--r--sys/arch/mvme88k/mvme88k/pmap_table.c21
10 files changed, 61 insertions, 446 deletions
diff --git a/sys/arch/mvme88k/conf/files.mvme88k b/sys/arch/mvme88k/conf/files.mvme88k
index f0485f3e52d..4aa487314fe 100644
--- a/sys/arch/mvme88k/conf/files.mvme88k
+++ b/sys/arch/mvme88k/conf/files.mvme88k
@@ -1,4 +1,4 @@
-# $OpenBSD: files.mvme88k,v 1.44 2010/12/06 20:10:18 jasper Exp $
+# $OpenBSD: files.mvme88k,v 1.45 2010/12/31 21:38:08 miod Exp $
#
maxpartitions 16
@@ -75,8 +75,6 @@ file arch/mvme88k/mvme88k/m1x7_machdep.c mvme187 | mvme197
file arch/mvme88k/mvme88k/m88110.c m88110
file arch/mvme88k/mvme88k/m8820x.c m88100
file arch/mvme88k/mvme88k/m88410.c m88110
-file arch/mvme88k/mvme88k/mem.c
-file arch/mvme88k/mvme88k/pmap_bootstrap.c
file arch/mvme88k/mvme88k/pmap_table.c
file arch/mvme88k/dev/bugio.c
file arch/mvme88k/dev/mainbus.c
diff --git a/sys/arch/mvme88k/include/pmap.h b/sys/arch/mvme88k/include/pmap.h
index 12165a55839..dfd79a91c1d 100644
--- a/sys/arch/mvme88k/include/pmap.h
+++ b/sys/arch/mvme88k/include/pmap.h
@@ -1,13 +1,3 @@
-/* $OpenBSD: pmap.h,v 1.36 2004/07/25 11:06:42 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.37 2010/12/31 21:38:08 miod Exp $ */
/* public domain */
-
-#ifndef _MVME88K_PMAP_H_
-#define _MVME88K_PMAP_H_
-
#include <m88k/pmap.h>
-
-#ifdef _KERNEL
-vaddr_t pmap_bootstrap_md(vaddr_t);
-#endif
-
-#endif _MVME88K_PMAP_H_
diff --git a/sys/arch/mvme88k/include/vmparam.h b/sys/arch/mvme88k/include/vmparam.h
index 095a4aed880..4641c603e43 100644
--- a/sys/arch/mvme88k/include/vmparam.h
+++ b/sys/arch/mvme88k/include/vmparam.h
@@ -1,3 +1,12 @@
-/* $OpenBSD: vmparam.h,v 1.27 2004/04/26 14:31:11 miod Exp $ */
+/* $OpenBSD: vmparam.h,v 1.28 2010/12/31 21:38:08 miod Exp $ */
/* public domain */
+
+/*
+ * Physical memory is mapped 1:1 at the bottom of the supervisor address
+ * space. Kernel virtual memory space starts from the end of physical memory,
+ * up to the on-board devices appearing all over the last 8MB of address space.
+ */
+#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0x00000000)
+#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xff800000)
+
#include <m88k/vmparam.h>
diff --git a/sys/arch/mvme88k/mvme88k/m187_machdep.c b/sys/arch/mvme88k/mvme88k/m187_machdep.c
index 607c5191814..16be5792d1b 100644
--- a/sys/arch/mvme88k/mvme88k/m187_machdep.c
+++ b/sys/arch/mvme88k/mvme88k/m187_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m187_machdep.c,v 1.21 2009/08/30 12:11:35 miod Exp $ */
+/* $OpenBSD: m187_machdep.c,v 1.22 2010/12/31 21:38:08 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -69,9 +69,6 @@ u_int m187_getipl(void);
vaddr_t m187_memsize(void);
u_int m187_raiseipl(u_int);
u_int m187_setipl(u_int);
-void m187_startup(void);
-
-vaddr_t bugromva;
/*
* Figure out how much memory is available, by querying the memory controllers.
@@ -92,21 +89,6 @@ m187_memsize()
return x;
}
-void
-m187_startup()
-{
- /*
- * Grab the BUGROM space that we hardwired in pmap_bootstrap
- */
- bugromva = BUG187_START;
- uvm_map(kernel_map, (vaddr_t *)&bugromva, BUG187_SIZE,
- NULL, UVM_UNKNOWN_OFFSET, 0,
- UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,
- UVM_ADV_NORMAL, UVM_FLAG_FIXED));
- if (bugromva != BUG187_START)
- panic("bugromva %lx: BUGROM not free", bugromva);
-}
-
/*
* Device interrupt handler for MVME187
*/
diff --git a/sys/arch/mvme88k/mvme88k/m188_machdep.c b/sys/arch/mvme88k/mvme88k/m188_machdep.c
index 64b1b697231..1fe5637cd38 100644
--- a/sys/arch/mvme88k/mvme88k/m188_machdep.c
+++ b/sys/arch/mvme88k/mvme88k/m188_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m188_machdep.c,v 1.53 2009/03/15 20:39:53 miod Exp $ */
+/* $OpenBSD: m188_machdep.c,v 1.54 2010/12/31 21:38:08 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
*
@@ -163,7 +163,6 @@ vaddr_t m188_memsize(void);
u_int m188_raiseipl(u_int);
void m188_send_ipi(int, cpuid_t);
u_int m188_setipl(u_int);
-void m188_startup(void);
/*
* The MVME188 interrupt arbiter has 25 orthogonal interrupt sources.
@@ -220,11 +219,6 @@ m188_memsize()
}
void
-m188_startup()
-{
-}
-
-void
m188_bootstrap()
{
extern struct cmmu_p cmmu8820x;
diff --git a/sys/arch/mvme88k/mvme88k/m197_machdep.c b/sys/arch/mvme88k/mvme88k/m197_machdep.c
index 863997d2ad0..b6e3ae872b8 100644
--- a/sys/arch/mvme88k/mvme88k/m197_machdep.c
+++ b/sys/arch/mvme88k/mvme88k/m197_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m197_machdep.c,v 1.43 2010/12/31 20:54:21 miod Exp $ */
+/* $OpenBSD: m197_machdep.c,v 1.44 2010/12/31 21:38:08 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@@ -97,10 +97,6 @@ u_int m197_raiseipl(u_int);
u_int m197_setipl(u_int);
void m197_smp_setup(struct cpu_info *);
void m197_soft_ipi(void);
-void m197_startup(void);
-
-vaddr_t obiova;
-vaddr_t flashva;
/*
* Figure out how much real memory is available.
@@ -158,32 +154,6 @@ m197_memsize()
return (32 * 1024 * 1024);
}
-void
-m197_startup()
-{
- /*
- * Grab the FLASH space that we hardwired in pmap_bootstrap
- */
- flashva = FLASH_START;
- uvm_map(kernel_map, (vaddr_t *)&flashva, FLASH_SIZE,
- NULL, UVM_UNKNOWN_OFFSET, 0,
- UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,
- UVM_ADV_NORMAL, UVM_FLAG_FIXED));
- if (flashva != FLASH_START)
- panic("flashva %lx: FLASH not free", flashva);
-
- /*
- * Grab the OBIO space that we hardwired in pmap_bootstrap
- */
- obiova = OBIO197_START;
- uvm_map(kernel_map, (vaddr_t *)&obiova, OBIO197_SIZE,
- NULL, UVM_UNKNOWN_OFFSET, 0,
- UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,
- UVM_ADV_NORMAL, UVM_FLAG_FIXED));
- if (obiova != OBIO197_START)
- panic("obiova %lx: OBIO not free", obiova);
-}
-
/*
* Device interrupt handler for MVME197
*/
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index a9aa744769b..b410c696537 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.239 2010/12/23 20:05:08 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.240 2010/12/31 21:38:08 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -108,13 +108,10 @@ void _doboot(void);
extern void m187_bootstrap(void);
extern vaddr_t m187_memsize(void);
-extern void m187_startup(void);
extern void m188_bootstrap(void);
extern vaddr_t m188_memsize(void);
-extern void m188_startup(void);
extern void m197_bootstrap(void);
extern vaddr_t m197_memsize(void);
-extern void m197_startup(void);
extern int kernelstart;
register_t kernel_vbr;
@@ -185,9 +182,6 @@ int cpuspeed = 25; /* safe guess */
vaddr_t first_addr;
vaddr_t last_addr;
-vaddr_t avail_start, avail_end;
-vaddr_t virtual_avail, virtual_end;
-
extern struct user *proc0paddr;
struct intrhand clock_ih;
@@ -204,6 +198,12 @@ struct intrhand statclock_ih;
int statvar = 8192;
int statmin; /* statclock interval - 1/2*variance */
+#if defined (MVME187) || defined (MVME197)
+#define ETHERPAGES 16
+void *etherbuf = NULL;
+int etherlen;
+#endif
+
/*
* This is to fake out the console routines, while booting.
*/
@@ -351,16 +351,6 @@ cpu_startup()
vaddr_t minaddr, maxaddr;
/*
- * Initialize error message buffer (at end of core).
- * avail_end was pre-decremented in mvme_bootstrap() to compensate.
- */
- for (i = 0; i < atop(MSGBUFSIZE); i++)
- pmap_kenter_pa((paddr_t)msgbufp + i * PAGE_SIZE,
- avail_end + i * PAGE_SIZE, VM_PROT_READ | VM_PROT_WRITE);
- pmap_update(pmap_kernel());
- initmsgbuf((caddr_t)msgbufp, round_page(MSGBUFSIZE));
-
- /*
* Good {morning,afternoon,evening,night}.
*/
printf(version);
@@ -369,28 +359,6 @@ cpu_startup()
ptoa(physmem)/1024/1024);
/*
- * Grab machine dependent memory spaces
- */
- switch (brdtyp) {
-#ifdef MVME187
- case BRD_187:
- case BRD_8120:
- m187_startup();
- break;
-#endif
-#ifdef MVME188
- case BRD_188:
- m188_startup();
- break;
-#endif
-#ifdef MVME197
- case BRD_197:
- m197_startup();
- break;
-#endif
- }
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
@@ -615,10 +583,7 @@ dumpsys()
if (pg != 0 && (pg % NPGMB) == 0)
printf("%d ", pg / NPGMB);
#undef NPGMB
- pmap_enter(pmap_kernel(), (vaddr_t)vmmap, maddr,
- VM_PROT_READ, VM_PROT_READ|PMAP_WIRED);
-
- error = (*dump)(dumpdev, blkno, vmmap, PAGE_SIZE);
+ error = (*dump)(dumpdev, blkno, (caddr_t)maddr, PAGE_SIZE);
if (error == 0) {
maddr += PAGE_SIZE;
blkno += btodb(PAGE_SIZE);
@@ -922,6 +887,8 @@ mvme_bootstrap()
{
extern struct consdev *cn_tab;
struct mvmeprom_brdid brdid;
+ vaddr_t avail_start;
+ extern vaddr_t avail_end;
#ifndef MULTIPROCESSOR
cpuid_t master_cpu;
#endif
@@ -1008,20 +975,13 @@ mvme_bootstrap()
curproc = &proc0;
curpcb = &proc0paddr->u_pcb;
- avail_start = first_addr;
- avail_end = last_addr;
-
- /*
- * Steal MSGBUFSIZE at the top of physical memory for msgbuf
- */
- avail_end -= round_page(MSGBUFSIZE);
+ avail_start = first_addr; /* first page of memory after kernel image */
+ avail_end = last_addr; /* last page of memory */
#ifdef DEBUG
printf("MVME%x boot: memory from 0x%x to 0x%x\n",
brdtyp, avail_start, avail_end);
#endif
- pmap_bootstrap((vaddr_t)trunc_page((vaddr_t)&kernelstart));
-
/*
* Tell the VM system about available physical memory.
*
@@ -1032,6 +992,30 @@ mvme_bootstrap()
uvm_page_physload(atop(avail_start), atop(avail_end),
atop(avail_start), atop(avail_end), VM_FREELIST_DEFAULT);
+ /*
+ * Initialize message buffer.
+ */
+ initmsgbuf((caddr_t)pmap_steal_memory(MSGBUFSIZE, NULL, NULL),
+ MSGBUFSIZE);
+
+#if defined (MVME187) || defined (MVME197)
+ /*
+ * Get ethernet buffer - need ETHERPAGES pages physically contiguous.
+ * XXX need to fix ie(4) to support non-1:1 mapped buffers
+ */
+ if (brdtyp == BRD_187 || brdtyp == BRD_8120 || brdtyp == BRD_197) {
+ etherlen = ETHERPAGES * PAGE_SIZE;
+ etherbuf = (void *)uvm_pageboot_alloc(etherlen);
+ }
+#endif /* defined (MVME187) || defined (MVME197) */
+
+ pmap_bootstrap();
+
+#if defined (MVME187) || defined (MVME197)
+ if (etherlen != 0)
+ pmap_cache_ctrl((paddr_t)etherbuf, (paddr_t)etherbuf + etherlen, CACHE_INH);
+#endif
+
/* Initialize the "u-area" pages. */
bzero((caddr_t)curpcb, USPACE);
#ifdef DEBUG
diff --git a/sys/arch/mvme88k/mvme88k/mem.c b/sys/arch/mvme88k/mvme88k/mem.c
deleted file mode 100644
index eb0c9b5fa02..00000000000
--- a/sys/arch/mvme88k/mvme88k/mem.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/* $OpenBSD: mem.c,v 1.24 2007/12/09 13:14:53 miod Exp $ */
-
-/*
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1982, 1986, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)mem.c 8.3 (Berkeley) 1/12/94
- */
-
-/*
- * Memory special file
- */
-
-#include <sys/param.h>
-#include <sys/buf.h>
-#include <sys/systm.h>
-#include <sys/uio.h>
-#include <sys/malloc.h>
-
-#include <machine/conf.h>
-
-#include <uvm/uvm_extern.h>
-
-caddr_t zpage;
-extern vaddr_t last_addr;
-
-/*ARGSUSED*/
-int
-mmopen(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
-{
-
- switch (minor(dev)) {
- case 0:
- case 1:
- case 2:
- case 12:
- return (0);
- default:
- return (ENXIO);
- }
-}
-
-/*ARGSUSED*/
-int
-mmclose(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
-{
-
- return (0);
-}
-
-/*ARGSUSED*/
-int
-mmrw(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
-{
- vaddr_t o, v;
- int c;
- struct iovec *iov;
- int error = 0;
- static int physlock = 0;
- extern caddr_t vmmap;
-
- if (minor(dev) == 0) {
- /* lock against other uses of shared vmmap */
- while (physlock > 0) {
- physlock++;
- error = tsleep((caddr_t)&physlock, PZERO | PCATCH,
- "mmrw", 0);
- if (error)
- return (error);
- }
- physlock = 1;
- }
- while (uio->uio_resid > 0 && error == 0) {
- iov = uio->uio_iov;
- if (iov->iov_len == 0) {
- uio->uio_iov++;
- uio->uio_iovcnt--;
- if (uio->uio_iovcnt < 0)
- panic("mmrw");
- continue;
- }
- switch (minor(dev)) {
-
-/* minor device 0 is physical memory */
- case 0:
- /* move one page at a time */
- v = uio->uio_offset;
- if (v > last_addr) {
- error = EFAULT;
- goto unlock;
- }
- pmap_enter(pmap_kernel(), (vaddr_t)vmmap,
- trunc_page(v),
- uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE,
- (uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE) | PMAP_WIRED);
- pmap_update(pmap_kernel());
- o = uio->uio_offset & PGOFSET;
- c = min(uio->uio_resid, (int)(NBPG - o));
- error = uiomove((caddr_t)vmmap + o, c, uio);
- pmap_remove(pmap_kernel(), (vaddr_t)vmmap,
- (vaddr_t)vmmap + NBPG);
- pmap_update(pmap_kernel());
- continue;
-
-/* minor device 1 is kernel memory */
- case 1:
- v = uio->uio_offset;
- c = min(iov->iov_len, MAXPHYS);
- if (!uvm_kernacc((caddr_t)v, c,
- uio->uio_rw == UIO_READ ? B_READ : B_WRITE))
- return (EFAULT);
- if (v < NBPG) {
-#ifdef DEBUG
- /*
- * For now, return zeros on read of page 0
- * and EFAULT for writes.
- */
- if (uio->uio_rw == UIO_READ) {
- if (zpage == NULL)
- zpage = malloc(PAGE_SIZE,
- M_TEMP, M_WAITOK | M_ZERO);
- c = min(c, NBPG - (int)v);
- v = (vaddr_t)zpage;
- } else
-#endif
- return (EFAULT);
- }
- error = uiomove((caddr_t)v, c, uio);
- continue;
-
-/* minor device 2 is EOF/RATHOLE */
- case 2:
- if (uio->uio_rw == UIO_WRITE)
- uio->uio_resid = 0;
- return (0);
-
-/* should add vme bus so that we can do user level probes */
-
-/* minor device 12 (/dev/zero) is source of nulls on read, rathole on write */
- case 12:
- if (uio->uio_rw == UIO_WRITE) {
- c = iov->iov_len;
- break;
- }
- if (zpage == NULL)
- zpage = malloc(PAGE_SIZE, M_TEMP,
- M_WAITOK | M_ZERO);
- c = min(iov->iov_len, PAGE_SIZE);
- error = uiomove(zpage, c, uio);
- continue;
-
- default:
- return (ENXIO);
- }
- if (error)
- break;
- iov->iov_base += c;
- iov->iov_len -= c;
- uio->uio_offset += c;
- uio->uio_resid -= c;
- }
- if (minor(dev) == 0) {
-unlock:
- if (physlock > 1)
- wakeup((caddr_t)&physlock);
- physlock = 0;
- }
- return (error);
-}
-
-paddr_t
-mmmmap(dev, off, prot)
- dev_t dev;
- off_t off;
- int prot;
-{
- return (-1);
-}
-
-/*ARGSUSED*/
-int
-mmioctl(dev, cmd, data, flags, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flags;
- struct proc *p;
-{
- return (EOPNOTSUPP);
-}
diff --git a/sys/arch/mvme88k/mvme88k/pmap_bootstrap.c b/sys/arch/mvme88k/mvme88k/pmap_bootstrap.c
deleted file mode 100644
index 7305e4db1e4..00000000000
--- a/sys/arch/mvme88k/mvme88k/pmap_bootstrap.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/* $OpenBSD: pmap_bootstrap.c,v 1.2 2004/08/01 17:44:17 miod Exp $ */
-/*
- * Copyright (c) 2001-2004, Miodrag Vallat
- * Copyright (c) 1998-2001 Steve Murphree, Jr.
- * Copyright (c) 1996 Nivas Madhur
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Nivas Madhur.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-/*
- * Mach Operating System
- * Copyright (c) 1991 Carnegie Mellon University
- * Copyright (c) 1991 OMRON Corporation
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-
-#include <uvm/uvm.h>
-
-extern vaddr_t pmap_map(vaddr_t, paddr_t, paddr_t, vm_prot_t, u_int);
-extern vaddr_t avail_start;
-extern vaddr_t virtual_avail;
-
-#define ETHERPAGES 16
-void *etherbuf = NULL;
-int etherlen;
-
-vaddr_t
-pmap_bootstrap_md(vaddr_t vaddr)
-{
-#if defined (MVME187) || defined (MVME197)
- /*
- * Get ethernet buffer - need ETHERPAGES pages physically contiguous.
- * XXX need to switch if_ie to bus_space...
- */
- if (brdtyp == BRD_187 || brdtyp == BRD_8120 || brdtyp == BRD_197) {
- etherlen = ETHERPAGES * PAGE_SIZE;
- etherbuf = (void *)vaddr;
-
- vaddr = pmap_map(vaddr, avail_start,
- avail_start + ETHERPAGES * PAGE_SIZE,
- VM_PROT_WRITE | VM_PROT_READ, CACHE_INH);
-
- virtual_avail += etherlen;
- avail_start += etherlen;
- }
-#endif /* defined (MVME187) || defined (MVME197) */
-
- return vaddr;
-}
diff --git a/sys/arch/mvme88k/mvme88k/pmap_table.c b/sys/arch/mvme88k/mvme88k/pmap_table.c
index e91ee84d206..229bee0e38b 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.23 2006/05/06 16:59:28 miod Exp $ */
+/* $OpenBSD: pmap_table.c,v 1.24 2010/12/31 21:38:08 miod Exp $ */
/*
* Mach Operating System
@@ -40,16 +40,15 @@
#define CI CACHE_INH
#define CG CACHE_GLOBAL
-/* phys_start, virt_start, size, prot, cacheability */
#ifdef MVME187
#include <machine/mvme187.h>
const pmap_table_entry
m187_board_table[] = {
- { BUG187_START, BUG187_START, BUG187_SIZE, RW, CI },
+ { BUG187_START, BUG187_SIZE, RW, CI },
#if 0 /* mapped by the hardcoded BATC entries */
- { OBIO187_START, OBIO187_START, OBIO187_SIZE, RW, CI },
+ { OBIO187_START, OBIO187_SIZE, RW, CI },
#endif
- { 0, 0, 0xffffffff, 0, 0 },
+ { 0, 0xffffffff, 0, 0 },
};
#endif
@@ -57,11 +56,11 @@ m187_board_table[] = {
#include <machine/mvme188.h>
const pmap_table_entry
m188_board_table[] = {
- { MVME188_EPROM, MVME188_EPROM, MVME188_EPROM_SIZE, RW, CI },
+ { MVME188_EPROM, MVME188_EPROM_SIZE, RW, CI },
#if 0 /* mapped by the hardcoded BATC entries */
- { MVME188_UTILITY, MVME188_UTILITY, MVME188_UTILITY_SIZE, RW, CI },
+ { MVME188_UTILITY, MVME188_UTILITY_SIZE, RW, CI },
#endif
- { 0, 0, 0xffffffff, 0, 0 },
+ { 0, 0xffffffff, 0, 0 },
};
#endif
@@ -70,10 +69,10 @@ m188_board_table[] = {
const pmap_table_entry
m197_board_table[] = {
/* We need flash 1:1 mapped to access the 88410 chip underneath */
- { FLASH_START, FLASH_START, FLASH_SIZE, RW, CI },
- { OBIO197_START, OBIO197_START, OBIO197_SIZE, RW, CI },
+ { FLASH_START, FLASH_SIZE, RW, CI },
+ { OBIO197_START, OBIO197_SIZE, RW, CI },
/* No need to mention BUG here - it is contained inside OBIO */
- { 0, 0, 0xffffffff, 0, 0 },
+ { 0, 0xffffffff, 0, 0 },
};
#endif