summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mvme68k/stand/libsa/SRT1.c115
-rw-r--r--sys/arch/mvme68k/stand/libsa/bug.c138
-rw-r--r--sys/arch/mvme68k/stand/libsa/clock.h7
-rw-r--r--sys/arch/mvme68k/stand/libsa/clockreg.h71
-rw-r--r--sys/arch/mvme68k/stand/libsa/config.h66
-rw-r--r--sys/arch/mvme68k/stand/libsa/dev_disk.c132
-rw-r--r--sys/arch/mvme68k/stand/libsa/dev_disk.h7
-rw-r--r--sys/arch/mvme68k/stand/libsa/devopen.c33
-rw-r--r--sys/arch/mvme68k/stand/libsa/dvma.c69
-rw-r--r--sys/arch/mvme68k/stand/libsa/dvma.h7
-rw-r--r--sys/arch/mvme68k/stand/libsa/exec_sun.c212
-rw-r--r--sys/arch/mvme68k/stand/libsa/gets.c141
-rw-r--r--sys/arch/mvme68k/stand/libsa/netif_sun.c284
-rw-r--r--sys/arch/mvme68k/stand/libsa/panic.c32
-rw-r--r--sys/arch/mvme68k/stand/libsa/promboot.c93
-rw-r--r--sys/arch/mvme68k/stand/libsa/promboot.h6
-rw-r--r--sys/arch/mvme68k/stand/libsa/promcons.c62
-rw-r--r--sys/arch/mvme68k/stand/libsa/promdev.c193
-rw-r--r--sys/arch/mvme68k/stand/libsa/promdev.h5
19 files changed, 0 insertions, 1673 deletions
diff --git a/sys/arch/mvme68k/stand/libsa/SRT1.c b/sys/arch/mvme68k/stand/libsa/SRT1.c
deleted file mode 100644
index d065cc6920a..00000000000
--- a/sys/arch/mvme68k/stand/libsa/SRT1.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* $OpenBSD: SRT1.c,v 1.3 1996/04/28 10:48:55 deraadt Exp $ */
-
-/*
- * Copyright (c) 1995 Theo de Raadt
- *
- * 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 under OpenBSD by
- * Theo de Raadt for Willowglen Singapore.
- * 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.
- *
- * Copyright (c) 1995 Gordon W. Ross
- * 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. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- * 4. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Gordon Ross
- *
- * 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.
- */
-
-/* SRT1.c - Stand-alone Run-time startup code, part 1 */
-
-#include <stdarg.h>
-#include <sys/types.h>
-
-#include "config.h"
-
-extern int edata[], end[];
-extern int * getvbr();
-extern volatile void abort();
-
-volatile void
-exit()
-{
-#if 0
- mon_exit_to_mon();
-#endif
- abort();
-}
-
-struct brdid brdid;
-int cputyp;
-
-/*
- * This is called by SRT0.S
- * to do final prep for main
- */
-_start()
-{
- register int *p;
-
- /* Clear BSS */
- p = edata;
- do *p++ = 0;
- while (p < end);
-
-#if 0
- /* Set the vector for trap 0 used by abort. */
- p = getvbr();
- p[32] = (int)romp->abortEntry;
-#endif
-
- asm("clrl sp@-; trap #15; .short 0x70; movl sp@+, %0" : "&=d" (p));
- bcopy(p, &brdid, sizeof brdid);
- cputyp = brdid.model;
-
- main(0);
- exit();
-}
-
-/*
- * Boot programs in C++ ? Not likely!
- */
-__main() {}
diff --git a/sys/arch/mvme68k/stand/libsa/bug.c b/sys/arch/mvme68k/stand/libsa/bug.c
deleted file mode 100644
index 2dc7f537e60..00000000000
--- a/sys/arch/mvme68k/stand/libsa/bug.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/* $OpenBSD: bug.c,v 1.3 1996/04/28 10:48:56 deraadt Exp $ */
-
-/*
- * Copyright (c) 1995 Theo de Raadt
- * 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 Theo de Raadt
- * 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.
- *
- * bug routines -- assumes that the necessary sections of memory
- * are preserved.
- */
-#include <sys/types.h>
-#include <machine/prom.h>
-
-#define MVMEPROM_CALL(x) \
- asm volatile (__CONCAT("trap #15; .short ", __STRING(x)) )
-
-/* returns 0 if no characters ready to read */
-int
-mvmeprom_instat()
-{
- u_short ret;
-
- MVMEPROM_CALL(MVMEPROM_INSTAT);
- asm volatile ("movew ccr,%0": "=d" (ret));
- return (!(ret & 0x4));
-}
-
-void
-mvmeprom_outstr(start, end)
- char *start, *end;
-{
- asm volatile ("movl %0, sp@-" : "=a" (start));
- asm volatile ("movl %0, sp@-" : "=a" (end));
- MVMEPROM_CALL(MVMEPROM_OUTSTR);
-}
-
-void
-mvmeprom_outln(start, end)
- char *start, *end;
-{
- asm volatile ("movl %0, sp@-" : "=a" (start));
- asm volatile ("movl %0, sp@-" : "=a" (end));
- MVMEPROM_CALL(MVMEPROM_OUTSTRCRLF);
-}
-
-/* returns 0: success, nonzero: error */
-int
-mvmeprom_diskrd(arg)
- struct mvmeprom_dskio *arg;
-{
- int ret;
-
- asm volatile ("movel %0, sp@-"::"d" (arg));
- MVMEPROM_CALL(MVMEPROM_DSKRD);
- asm volatile ("movew ccr,%0": "=d" (ret));
- return (!(ret & 0x4));
-}
-
-/* returns 0: success, nonzero: error */
-int
-mvmeprom_diskwr(arg)
- struct mvmeprom_dskio *arg;
-{
- int ret;
-
- asm volatile ("movel %0, sp@-"::"d" (arg));
- MVMEPROM_CALL(MVMEPROM_DSKWR);
- asm volatile ("movew ccr,%0": "=d" (ret));
- return (!(ret & 0x4));
-}
-
-#ifdef NOTYET
-mvmeprom_diskcfig() {}
-mvmeprom_diskfmt(){}
-mvmeprom_diskctrl(){}
-#endif
-
-/* BUG - timing routine */
-void
-mvmeprom_delay(msec)
- int msec;
-{
- asm volatile ("movel %0,sp@-" : :"d" (msec));
- MVMEPROM_CALL(MVMEPROM_DELAY);
-}
-
-/* BUG - return to bug routine */
-void
-mvmeprom_return()
-{
- MVMEPROM_CALL(MVMEPROM_EXIT);
- /*NOTREACHED*/
-}
-
-/* BUG - query board routines */
-struct mvmeprom_brdid *
-mvmeprom_getbrdid()
-{
- struct mvmeprom_brdid *id;
-
- asm volatile ("clrl sp@-");
- MVMEPROM_CALL(MVMEPROM_GETBRDID);
- asm volatile ("movel sp@+,%0": "=d" (id):);
- return (id);
-}
-
-void
-mvmeprom_rtc_rd(ptime)
- struct mvmeprom_time *ptime;
-{
- asm volatile ("movel %0,sp@-" : :"a" (ptime));
- MVMEPROM_CALL(MVMEPROM_RTC_RD);
-}
diff --git a/sys/arch/mvme68k/stand/libsa/clock.h b/sys/arch/mvme68k/stand/libsa/clock.h
deleted file mode 100644
index f9958f65e05..00000000000
--- a/sys/arch/mvme68k/stand/libsa/clock.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* $OpenBSD: clock.h,v 1.2 1996/04/28 10:48:58 deraadt Exp $ */
-
-extern int hz;
-
-time_t getsecs();
-int getticks();
-
diff --git a/sys/arch/mvme68k/stand/libsa/clockreg.h b/sys/arch/mvme68k/stand/libsa/clockreg.h
deleted file mode 100644
index 86552700cf5..00000000000
--- a/sys/arch/mvme68k/stand/libsa/clockreg.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* $OpenBSD: clockreg.h,v 1.3 1996/04/28 10:48:58 deraadt Exp $ */
-
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Lawrence Berkeley Laboratory.
- *
- * 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 the University of
- * California, Berkeley and its contributors.
- * 4. 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.
- *
- * @(#)clockreg.h 8.1 (Berkeley) 6/11/93
- */
-
-/*
- * Mostek MK48T02 clock.
- */
-struct clockreg {
- volatile u_char cl_csr; /* control register */
- volatile u_char cl_sec; /* seconds (0..59; BCD) */
- volatile u_char cl_min; /* minutes (0..59; BCD) */
- volatile u_char cl_hour;/* hour (0..23; BCD) */
- volatile u_char cl_wday;/* weekday (1..7) */
- volatile u_char cl_mday;/* day in month (1..31; BCD) */
- volatile u_char cl_month; /* month (1..12; BCD) */
- volatile u_char cl_year;/* year (0..99; BCD) */
-};
-/* bits in cl_csr */
-#define CLK_WRITE 0x80 /* want to write */
-#define CLK_READ 0x40 /* want to read (freeze clock) */
-
-/*
- * Sun chose the year `68' as their base count, so that
- * cl_year==0 means 1968.
- */
-#define YEAR0 68
-
-#define CLOCK_ADDR_147 (0xfffe07f8) /* PA of clock */
-#define CLOCK_ADDR_16x (0xfffc1ff8) /* PA of clock */
diff --git a/sys/arch/mvme68k/stand/libsa/config.h b/sys/arch/mvme68k/stand/libsa/config.h
deleted file mode 100644
index b29745edae3..00000000000
--- a/sys/arch/mvme68k/stand/libsa/config.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* $OpenBSD: config.h,v 1.3 1996/04/28 10:48:59 deraadt Exp $ */
-
-/*
- * Copyright (c) 1995 Theo de Raadt
- * 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 Theo de Raadt
- * 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.
- */
-
-/* configuration information for base-line code */
-
-#define ETHER_ADDR_147 (0xfffe0778)
-#define ETHER_ADDR_16X (0xfffc0000+7980)
-#define ERAM_ADDR (0xfffe0774)
-#define LANCE_REG_ADDR (0xfffe1800)
-#define INTEL_REG_ADDR (0xfff46000)
-
-#define CPU_147 0x147
-#define CPU_162 0x162
-#define CPU_167 0x167
-#define CPU_172 0x172
-#define CPU_177 0x177
-
-struct brdid {
- u_long eye_catcher;
- u_char rev;
- u_char month;
- u_char day;
- u_char year;
- u_short size;
- u_short rsv1;
- u_short model;
- u_short suffix;
- u_short options;
- u_char family;
- u_char cpu;
- u_short ctrlun;
- u_short devlun;
- u_short devtype;
- u_short devnum;
- u_long bug;
-};
diff --git a/sys/arch/mvme68k/stand/libsa/dev_disk.c b/sys/arch/mvme68k/stand/libsa/dev_disk.c
deleted file mode 100644
index c204ebd094c..00000000000
--- a/sys/arch/mvme68k/stand/libsa/dev_disk.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/* $OpenBSD: dev_disk.c,v 1.3 1996/04/28 10:49:00 deraadt Exp $ */
-
-/*
- * Copyright (c) 1993 Paul Kranenburg
- * 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 Paul Kranenburg.
- * 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.
- */
-
-/*
- * This module implements a "raw device" interface suitable for
- * use by the stand-alone I/O library UFS file-system code, and
- * possibly for direct access (i.e. boot from tape).
- *
- * The implementation is deceptively simple because it uses the
- * drivers provided by the Sun PROM monitor. Note that only the
- * PROM driver used to load the boot program is available here.
- */
-
-#include <sys/types.h>
-#include <machine/mon.h>
-#include <machine/saio.h>
-
-#include "stand.h"
-
-#include "dvma.h"
-#include "promdev.h"
-
-int
-disk_open(f, devname)
- struct open_file *f;
- char *devname; /* Device part of file name (or NULL). */
-{
- struct saioreq *sip;
- int error;
-
-#ifdef DEBUG_PROM
- printf("disk_open: %s\n", devname);
-#endif
-
- if ((error = prom_iopen(&sip)) != 0)
- return (error);
-
- f->f_devdata = sip;
- return 0;
-}
-
-int
-disk_close(f)
- struct open_file *f;
-{
- struct saioreq *sip;
-
- sip = f->f_devdata;
- prom_iclose(sip);
- f->f_devdata = NULL;
- return 0;
-}
-
-int
-disk_strategy(devdata, flag, dblk, size, buf, rsize)
- void *devdata;
- int flag;
- daddr_t dblk;
- u_int size;
- char *buf;
- u_int *rsize;
-{
- struct saioreq *si;
- struct boottab *ops;
- char *dmabuf;
- int si_flag, xcnt;
-
- si = devdata;
- ops = si->si_boottab;
-
-#ifdef DEBUG_PROM
- printf("disk_strategy: size=%d dblk=%d\n", size, dblk);
-#else
- twiddle();
-#endif
-
- dmabuf = dvma_mapin(buf, size);
-
- si->si_bn = dblk;
- si->si_ma = dmabuf;
- si->si_cc = size;
-
- si_flag = (flag == F_READ) ? SAIO_F_READ : SAIO_F_WRITE;
- xcnt = (*ops->b_strategy)(si, si_flag);
- dvma_mapout(dmabuf, size);
-
-#ifdef DEBUG_PROM
- printf("disk_strategy: xcnt = %x\n", xcnt);
-#endif
-
- if (xcnt <= 0)
- return (EIO);
-
- *rsize = xcnt;
- return (0);
-}
-
-int
-disk_ioctl()
-{
- return EIO;
-}
-
diff --git a/sys/arch/mvme68k/stand/libsa/dev_disk.h b/sys/arch/mvme68k/stand/libsa/dev_disk.h
deleted file mode 100644
index 442d400a78b..00000000000
--- a/sys/arch/mvme68k/stand/libsa/dev_disk.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* $OpenBSD: dev_disk.h,v 1.2 1996/04/28 10:49:01 deraadt Exp $ */
-
-int disk_open __P((struct open_file *, ...));
-int disk_close __P((struct open_file *));
-int disk_strategy __P((void *, int, daddr_t, u_int, char *, u_int *));
-int disk_ioctl();
-
diff --git a/sys/arch/mvme68k/stand/libsa/devopen.c b/sys/arch/mvme68k/stand/libsa/devopen.c
deleted file mode 100644
index 9fe1f4e6dd6..00000000000
--- a/sys/arch/mvme68k/stand/libsa/devopen.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* $OpenBSD: devopen.c,v 1.3 1996/04/28 10:49:02 deraadt Exp $ */
-
-#include <sys/param.h>
-#include <stand.h>
-#include "promboot.h"
-
-/*
- * Open the device named by the combined device/file name
- * given as the "fname" arg, something like: "sd()bsd"
- *
- * However, Sun PROMs don't really let you choose which
- * device you will talk to. You can only open the device
- * that was used to load the boot program. Therefore, we
- * do not accept a "device" part in the "fname" string.
- * Pass the PROM device name to open in case it needs it.
- */
-int
-devopen(f, fname, file)
- struct open_file *f;
- const char *fname;
- char **file;
-{
- struct devsw *dp;
- char *cp, *path, *devname;
- int error;
-
- *file = (char*)fname;
- dp = &devsw[0];
- f->f_dev = dp;
- error = (*dp->dv_open)(f, prom_bootdev);
-
- return (error);
-}
diff --git a/sys/arch/mvme68k/stand/libsa/dvma.c b/sys/arch/mvme68k/stand/libsa/dvma.c
deleted file mode 100644
index bc7965e14d5..00000000000
--- a/sys/arch/mvme68k/stand/libsa/dvma.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* $OpenBSD: dvma.c,v 1.2 1996/04/28 10:49:03 deraadt Exp $ */
-
-/*
- * The easiest way to deal with the need for DVMA mappings is
- * to just map the first four megabytes of RAM into DVMA space.
- * That way, dvma_mapin can just compute the DVMA alias address,
- * and dvma_mapout does nothing.
- */
-
-#include <sys/param.h>
-
-#define DVMA_BASE 0x00000000
-#define DVMA_MASK 0x00ffFFff
-#define DVMA_MAPLEN 0x400000 /* 4 MB */
-
-void
-dvma_init()
-{
-#if 0
- int segva, sme;
-
- for (segva = 0; segva < DVMA_MAPLEN; segva += NBSG) {
- sme = get_segmap(segva);
- set_segmap((DVMA_BASE | segva), sme);
- }
-#endif
-}
-
-/* Convert a local address to a DVMA address. */
-char *
-dvma_mapin(char *addr, int len)
-{
- int va = (int)addr;
-
- va |= DVMA_BASE;
- return ((char *) va);
-}
-
-/* Convert a DVMA address to a local address. */
-char *
-dvma_mapout(char *dmabuf, int len)
-{
- if (dmabuf < (char*)DVMA_BASE)
- panic("dvma_mapout");
- return (dmabuf - DVMA_BASE);
-}
-
-extern char *alloc(int len);
-char *
-dvma_alloc(int len)
-{
- char *mem;
-
- mem = alloc(len);
- if (!mem)
- return(mem);
- return(dvma_mapin(mem, len));
-}
-
-extern void free(void *ptr, int len);
-void
-dvma_free(char *dvma, int len)
-{
- char *mem;
-
- mem = dvma_mapout(dvma, len);
- if (mem)
- free(mem, len);
-}
diff --git a/sys/arch/mvme68k/stand/libsa/dvma.h b/sys/arch/mvme68k/stand/libsa/dvma.h
deleted file mode 100644
index b99b9702f53..00000000000
--- a/sys/arch/mvme68k/stand/libsa/dvma.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* $OpenBSD: dvma.h,v 1.2 1996/04/28 10:49:03 deraadt Exp $ */
-
-char * dvma_mapin(char *pkt, int len);
-void dvma_mapout(char *dmabuf, int len);
-
-char * dvma_alloc(int len);
-
diff --git a/sys/arch/mvme68k/stand/libsa/exec_sun.c b/sys/arch/mvme68k/stand/libsa/exec_sun.c
deleted file mode 100644
index 424406f20df..00000000000
--- a/sys/arch/mvme68k/stand/libsa/exec_sun.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/* $OpenBSD: exec_sun.c,v 1.3 1996/04/28 10:49:04 deraadt Exp $ */
-
-/*-
- * Copyright (c) 1995 Theo de Raadt
- * 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 Theo de Raadt
- * 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.
- *
- * Copyright (c) 1982, 1986, 1990, 1993
- * The Regents of the University of California. 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 the University of
- * California, Berkeley and its contributors.
- * 4. 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.
- *
- * @(#)boot.c 8.1 (Berkeley) 6/10/93
- */
-
-#include <sys/param.h>
-#include <sys/reboot.h>
-#include <a.out.h>
-
-#include "stand.h"
-
-extern int debug;
-
-extern u_int bootdev;
-
-/*ARGSUSED*/
-exec_sun(file, loadaddr, howto)
- char *file;
- char *loadaddr;
- int howto;
-{
- register int io;
- struct exec x;
- int cc, magic;
- void (*entry)();
- register char *cp;
- register int *ip;
- int textlen;
-
-#ifdef DEBUG
- printf("exec_sun: file=%s loadaddr=0x%x\n", file, loadaddr);
-#endif
-
- io = open(file, 0);
- if (io < 0)
- return(-1);
-
- /*
- * Read in the exec header, and validate it.
- */
- if (read(io, (char *)&x, sizeof(x)) != sizeof(x))
- goto shread;
- if (N_BADMAG(x)) {
- errno = EFTYPE;
- goto closeout;
- }
-
- cp = loadaddr;
- textlen = x.a_text;
- magic = N_GETMAGIC(x);
- if (magic == ZMAGIC) {
- cp += sizeof(x);
- textlen -= sizeof(x);
- }
- entry = (void (*)())cp;
-
- /*
- * Leave a copy of the exec header before the text.
- * The sun3 kernel uses this to verify that the
- * symbols were loaded by this boot program.
- */
- bcopy(&x, cp - sizeof(x), sizeof(x));
-
- /*
- * Read in the text segment.
- */
- printf("%x", x.a_text);
- if (read(io, cp, textlen) != textlen)
- goto shread;
- cp += textlen;
-
- /*
- * NMAGIC may have a gap between text and data.
- */
- if (magic == NMAGIC) {
- register int mask = N_PAGSIZ(x) - 1;
- while ((int)cp & mask)
- *cp++ = 0;
- }
-
- /*
- * Read in the data segment.
- */
- printf("+%x", x.a_data);
- if (read(io, cp, x.a_data) != x.a_data)
- goto shread;
- cp += x.a_data;
-
- /*
- * Zero out the BSS section.
- * (Kernel does not do it itself)
- */
- printf("+%x", x.a_bss);
- cc = x.a_bss;
- while ((int)cp & 3) {
- *cp++ = 0;
- --cc;
- }
- ip = (int *)cp;
- cp += cc;
- while ((char *)ip < cp)
- *ip++ = 0;
-
- /*
- * Read in the symbol table and strings.
- * (Always set the symtab size word.)
- */
- *ip++ = x.a_syms;
- cp = (char *)ip;
-
- if (x.a_syms > 0) {
-
- /* Symbol table and string table length word. */
- cc = x.a_syms;
- printf("+[%x", cc);
- cc += sizeof(int); /* strtab length too */
- if (read(io, cp, cc) != cc)
- goto shread;
- cp += x.a_syms;
- ip = (int *)cp; /* points to strtab length */
- cp += sizeof(int);
-
- /* String table. Length word includes itself. */
- cc = *ip;
- printf("+%x]", cc);
- cc -= sizeof(int);
- if (cc <= 0)
- goto shread;
- if (read(io, cp, cc) != cc)
- goto shread;
- cp += cc;
- }
- printf("=%x\n", cp - loadaddr);
- close(io);
-
- if (debug) {
- printf("Debug mode - enter c to continue\n");
- asm(" trap #0");
- }
-
- printf("Starting program at 0x%x\n", (int)entry);
- (*entry)(howto, bootdev, cp, 0, 0);
- panic("exec returned");
-
-shread:
- printf("exec: short read\n");
- errno = EIO;
-closeout:
- close(io);
- return(-1);
-}
diff --git a/sys/arch/mvme68k/stand/libsa/gets.c b/sys/arch/mvme68k/stand/libsa/gets.c
deleted file mode 100644
index b1e32ce2602..00000000000
--- a/sys/arch/mvme68k/stand/libsa/gets.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/* $OpenBSD: gets.c,v 1.3 1996/04/28 10:49:05 deraadt Exp $ */
-
-/*-
- * Copyright (c) 1995 Theo de Raadt
- * 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 Theo de Raadt
- * 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.
- *
- * Copyright (c) 1993
- * The Regents of the University of California. 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 the University of
- * California, Berkeley and its contributors.
- * 4. 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.
- *
- * @(#)gets.c 8.1 (Berkeley) 6/11/93
- */
-
-#include "stand.h"
-
-/*
- * This implementation assumes that getchar() does echo, because
- * on some machines, it is hard to keep echo from being done.
- * Those that need it can do echo in their getchar() function.
- *
- * Yes, the code below will echo CR, DEL, and other control chars,
- * but sending CR or DEL here is harmless. All the other editing
- * characters will be followed by a newline, so it doesn't matter.
- * (Most terminals will not show them anyway.)
- */
-
-void
-gets(buf)
- char *buf;
-{
- register int c;
- register char *lp;
-
-top:
- lp = buf;
-
- for (;;) {
- c = getchar() & 0177;
-
- putchar(c);
-
- switch (c) {
-
- default:
- *lp++ = c;
- continue;
-
- case '\177':
- putchar('\b');
- /* fall through */
- case '\b':
- putchar(' ');
- putchar('\b');
- /* fall through */
- case '#':
- if (lp > buf)
- lp--;
- continue;
-
- /*
- * This is not very useful in a boot program.
- * (It costs you 52 bytes on m68k, gcc -O3).
- */
- case 'r'&037: {
- register char *p;
- putchar('\n');
- for (p = buf; p < lp; ++p)
- putchar(*p);
- continue;
- }
-
- case '@':
- case 'u'&037:
- case 'w'&037:
- putchar('\n');
- goto top;
-
- case '\r':
- putchar('\n');
- /* fall through */
- case '\n':
- *lp = '\0';
- return;
-
- } /* switch */
- }
- /*NOTREACHED*/
-}
diff --git a/sys/arch/mvme68k/stand/libsa/netif_sun.c b/sys/arch/mvme68k/stand/libsa/netif_sun.c
deleted file mode 100644
index a6887911c1a..00000000000
--- a/sys/arch/mvme68k/stand/libsa/netif_sun.c
+++ /dev/null
@@ -1,284 +0,0 @@
-/* $OpenBSD: netif_sun.c,v 1.3 1996/04/28 10:49:06 deraadt Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * 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. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- * 4. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Gordon W. Ross
- *
- * 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.
- */
-
-/*
- * The Sun PROM has a fairly general set of network drivers,
- * so it is easiest to just replace the netif module with
- * this adaptation to the PROM network interface.
- */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <string.h>
-#include <time.h>
-
-#include <net/if.h>
-
-#include <netinet/in.h>
-#include <netinet/if_ether.h>
-#include <netinet/in_systm.h>
-
-#include <machine/control.h>
-#include <machine/idprom.h>
-#include <machine/mon.h>
-#include <machine/saio.h>
-
-#include "stand.h"
-#include "net.h"
-#include "netif.h"
-
-#include "clock.h"
-#include "dvma.h"
-#include "promdev.h"
-
-static struct netif netif_prom;
-
-#ifdef NETIF_DEBUG
-int netif_debug;
-#endif
-
-struct iodesc sockets[SOPEN_MAX];
-
-struct iodesc *
-socktodesc(sock)
- int sock;
-{
- if (sock != 0) {
- return(NULL);
- }
- return (sockets);
-}
-
-int
-netif_open(machdep_hint)
- void *machdep_hint;
-{
- struct saioreq *si;
- struct iodesc *io;
- int fd, error;
-
- /* find a free socket */
- io = sockets;
- if (io->io_netif) {
-#ifdef DEBUG
- printf("netif_open: device busy\n");
-#endif
- return (-1);
- }
- bzero(io, sizeof(*io));
-
- /*
- * Note: Sun PROMs will do RARP on open, but does not tell
- * you the IP address it gets, so it is just noise to us...
- */
- if ((error = prom_iopen(&si)) != 0) {
-#ifdef DEBUG
- printf("netif_open: prom_iopen, error=%d\n", error);
-#endif
- return (-1);
- }
- if (si->si_sif == NULL) {
-#ifdef DEBUG
- printf("netif_open: not a network device\n");
-#endif
- prom_iclose(si);
- return (-1);
- }
-
- netif_prom.devdata = si;
- io->io_netif = &netif_prom;
-
- /* Put our ethernet address in io->myea */
- sun3_getether(io->myea);
-
- return(0);
-}
-
-int
-netif_close(fd)
- int fd;
-{
- struct iodesc *io;
- struct netif *ni;
-
- if (fd != 0) {
- errno = EBADF;
- return(-1);
- }
-
- io = sockets;
- ni = io->io_netif;
- if (ni != NULL) {
- prom_iclose(ni->devdata);
- ni->devdata = NULL;
- io->io_netif = NULL;
- }
- return(0);
-}
-
-/*
- * Send a packet. The ether header is already there.
- * Return the length sent (or -1 on error).
- */
-int
-netif_put(desc, pkt, len)
- struct iodesc *desc;
- void *pkt;
- int len;
-{
- struct saioreq *si;
- struct saif *sif;
- char *dmabuf;
- int rv, sendlen;
-
-#ifdef NETIF_DEBUG
- if (netif_debug) {
- struct ether_header *eh;
-
- printf("netif_put: desc=0x%x pkt=0x%x len=%d\n",
- desc, pkt, len);
- eh = pkt;
- printf("dst: %s ", ether_sprintf(eh->ether_dhost));
- printf("src: %s ", ether_sprintf(eh->ether_shost));
- printf("type: 0x%x\n", eh->ether_type & 0xFFFF);
- }
-#endif
-
- si = desc->io_netif->devdata;
- sif = si->si_sif;
- sendlen = len;
- if (sendlen < 60) {
- sendlen = 60;
-#ifdef NETIF_DEBUG
- printf("netif_put: length padded to %d\n", sendlen);
-#endif
- }
-
-#ifdef PARANOID
- if (sif == NULL)
- panic("netif_put: no saif ptr\n");
-#endif
-
- dmabuf = dvma_mapin(pkt, sendlen);
- rv = sif->sif_xmit(si->si_devdata, dmabuf, sendlen);
- dvma_mapout(dmabuf, sendlen);
-
-#ifdef NETIF_DEBUG
- if (netif_debug)
- printf("netif_put: xmit returned %d\n", rv);
-#endif
- if (rv == 0) rv = len;
- else rv = -1;
-
- return rv;
-}
-
-/*
- * Receive a packet, including the ether header.
- * Return the total length received (or -1 on error).
- */
-int
-netif_get(desc, pkt, maxlen, timo)
- struct iodesc *desc;
- void *pkt;
- int maxlen;
- time_t timo;
-{
- struct saioreq *si;
- struct saif *sif;
- char *dmabuf;
- int tick0, tmo_ticks;
- int len;
-
-#ifdef NETIF_DEBUG
- if (netif_debug)
- printf("netif_get: pkt=0x%x, maxlen=%d, tmo=%d\n",
- pkt, maxlen, timo);
-#endif
-
- si = desc->io_netif->devdata;
- sif = si->si_sif;
-
-#ifdef PARANOID
- if (sif == NULL)
- panic("netif_get: no saif ptr\n");
-#endif
-
- tmo_ticks = timo * hz;
- tick0 = getticks();
-
- dmabuf = dvma_mapin(pkt, maxlen);
- do len = sif->sif_poll(si->si_devdata, dmabuf);
- while ((len == 0) && ((getticks() - tick0) < tmo_ticks));
- dvma_mapout(dmabuf, maxlen);
-
-#ifdef NETIF_DEBUG
- if (netif_debug)
- printf("netif_get: received len=%d\n", len);
-#endif
-
- if (len < 12)
- return -1;
-
-#ifdef NETIF_DEBUG
- if (netif_debug) {
- struct ether_header *eh = pkt;
-
- printf("dst: %s ", ether_sprintf(eh->ether_dhost));
- printf("src: %s ", ether_sprintf(eh->ether_shost));
- printf("type: 0x%x\n", eh->ether_type & 0xFFFF);
- }
-#endif
-
- return len;
-}
-
-static struct idprom sun3_idprom;
-
-sun3_getether(ea)
- u_char *ea;
-{
- u_char *src, *dst;
- int len, x;
-
- if (sun3_idprom.idp_format == 0) {
- dst = (char*)&sun3_idprom;
- src = (char*)IDPROM_BASE;
- len = IDPROM_SIZE;
- do {
- x = get_control_byte(src++);
- *dst++ = x;
- } while (--len > 0);
- }
- MACPY(sun3_idprom.idp_etheraddr, ea);
-}
-
diff --git a/sys/arch/mvme68k/stand/libsa/panic.c b/sys/arch/mvme68k/stand/libsa/panic.c
deleted file mode 100644
index 6c035aabe11..00000000000
--- a/sys/arch/mvme68k/stand/libsa/panic.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* $OpenBSD: panic.c,v 1.3 1996/04/28 10:49:07 deraadt Exp $ */
-
-#include <stdarg.h>
-#include "stand.h"
-
-extern volatile void abort();
-extern int _estack[];
-
-__dead void
-panic(const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- printf(fmt, ap);
- printf("\n");
- va_end(ap);
- stackdump(0);
- abort();
-}
-
-stackdump(dummy)
- int dummy;
-{
- int *ip;
-
- printf("stackdump:\n");
- for (ip = &dummy; ip < _estack; ip += 4) {
- printf("%x: %x %x %x %x\n",
- (int)ip, ip[0], ip[1], ip[2], ip[3]);
- }
-}
diff --git a/sys/arch/mvme68k/stand/libsa/promboot.c b/sys/arch/mvme68k/stand/libsa/promboot.c
deleted file mode 100644
index daff57fb861..00000000000
--- a/sys/arch/mvme68k/stand/libsa/promboot.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/* $OpenBSD: promboot.c,v 1.3 1996/04/28 10:49:08 deraadt Exp $ */
-
-/*
- * Copyright (c) 1995 Theo de Raadt
- * 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 Theo de Raadt
- * 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.
- */
-
-#include <sys/param.h>
-#include <sys/reboot.h>
-#include "stand.h"
-#include "promboot.h"
-
-char prom_bootdev[32];
-char prom_bootfile[32];
-int prom_boothow;
-int debug;
-
-void
-prom_get_boot_info()
-{
- char c, *src, *dst;
- extern int devlun, ctrlun;
- extern char *oparg, *opargend;
-
-#ifdef DEBUG
- printf("prom_get_boot_info\n");
-#endif
-
- /* Get kernel filename */
- src = oparg;
- while (src && (*src == ' ' || *src == '\t'))
- src++;
-
- dst = prom_bootfile;
- if (src && *src != '-') {
- while (src && *src) {
- if (*src == ' ' || *src == '\t')
- break;
- *dst++ = *src++;
- }
- }
- *dst = '\0';
-
- /* Get boothowto flags */
- while (src && (*src == ' ' || *src == '\t'))
- src++;
- if (src && (*src == '-')) {
- while (*src) {
- switch (*src++) {
- case 'a':
- prom_boothow |= RB_ASKNAME;
- break;
- case 's':
- prom_boothow |= RB_SINGLE;
- break;
- case 'd':
- prom_boothow |= RB_KDB;
- debug = 1;
- break;
- }
- }
- }
-#ifdef DEBUG
- printf("promboot: device=\"%s\" file=\"%s\" how=0x%x\n",
- prom_bootdev, prom_bootfile, prom_boothow);
-#endif
-}
diff --git a/sys/arch/mvme68k/stand/libsa/promboot.h b/sys/arch/mvme68k/stand/libsa/promboot.h
deleted file mode 100644
index e96c103b773..00000000000
--- a/sys/arch/mvme68k/stand/libsa/promboot.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/* $OpenBSD: promboot.h,v 1.2 1996/04/28 10:49:09 deraadt Exp $ */
-
-extern char prom_bootdev[];
-extern char prom_bootfile[];
-extern int prom_boothow;
-
diff --git a/sys/arch/mvme68k/stand/libsa/promcons.c b/sys/arch/mvme68k/stand/libsa/promcons.c
deleted file mode 100644
index 01ae60ce576..00000000000
--- a/sys/arch/mvme68k/stand/libsa/promcons.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* $OpenBSD: promcons.c,v 1.3 1996/04/28 10:49:11 deraadt Exp $ */
-
-/*
- * Copyright (c) 1995 Theo de Raadt
- * 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 Theo de Raadt
- * 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.
- */
-
-#include <stdarg.h>
-#include <sys/types.h>
-
-int
-getchar()
-{
- char c;
-
- __asm("movb #0,sp@-; trap #15; .short 0x0; movb sp@+, %0" : : "d" (c));
- return (c);
-}
-
-peekchar()
-{
- int have = 0;
-
- __asm("trap #15; .short 0x1; beq 1f; movl #1, %0\n1:" : : "d" (have));
- return (have);
-}
-
-void
-putchar(c)
- int c;
-{
- if (c == '\n')
- putchar('\r');
- __asm("movb %0,sp@-; trap #15; .short 0x20" : : "d" (c));
-}
-
diff --git a/sys/arch/mvme68k/stand/libsa/promdev.c b/sys/arch/mvme68k/stand/libsa/promdev.c
deleted file mode 100644
index 6362fcdcf01..00000000000
--- a/sys/arch/mvme68k/stand/libsa/promdev.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/* $OpenBSD: promdev.c,v 1.3 1996/04/28 10:49:13 deraadt Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * Copyright (c) 1993 Paul Kranenburg
- * 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 Paul Kranenburg.
- * 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.
- */
-
-#include <sys/param.h>
-#include <machine/mon.h>
-#include <machine/pte.h>
-#include <machine/saio.h>
-
-#include <dvma.h>
-#include <stand.h>
-
-struct saioreq prom_si;
-static int promdev_inuse;
-
-static char *
-prom_mapin(u_long physaddr, int length, int maptype);
-
-int
-prom_iopen(void **devdatap)
-{
- struct bootparam *bp;
- struct boottab *ops;
- struct devinfo *dip;
- struct saioreq *si;
- char *p;
- int error;
-
- if (promdev_inuse)
- return(EMFILE);
-
- bp = *romp->bootParam;
- ops = bp->bootDevice;
- dip = ops->b_devinfo;
-
-#ifdef DEBUG_PROM
- printf("Boot device type: %s\n", ops->b_desc);
-#endif
-
- dvma_init();
-
- si = &prom_si;
- bzero((caddr_t)si, sizeof(*si));
- si->si_boottab = ops;
- si->si_ctlr = bp->ctlrNum;
- si->si_unit = bp->unitNum;
- si->si_boff = bp->partNum;
-
- if (si->si_ctlr > dip->d_stdcount) {
- printf("Invalid controller number\n");
- return(ENXIO);
- }
-
- if (dip->d_devbytes) {
- si->si_devaddr = prom_mapin(dip->d_stdaddrs[si->si_ctlr],
- dip->d_devbytes, dip->d_devtype);
-#ifdef DEBUG_PROM
- printf("prom_iopen: devaddr=0x%x pte=0x%x\n",
- si->si_devaddr, get_pte(si->si_devaddr));
-#endif
- }
-
- if (dip->d_dmabytes) {
- si->si_dmaaddr = dvma_alloc(dip->d_dmabytes);
-#ifdef DEBUG_PROM
- printf("prom_iopen: dmaaddr=0x%x\n", si->si_dmaaddr);
-#endif
- }
-
- /* OK, call the PROM device open routine. */
- error = (*ops->b_open)(si);
- if (error != 0) {
- printf("prom_iopen: \"%s\" error=%d\n",
- ops->b_desc, error);
- return (ENXIO);
- }
-#ifdef DEBUG_PROM
- printf("prom_iopen: succeeded, error=%d\n", error);
-#endif
-
- *devdatap = si;
- promdev_inuse++;
- return (0);
-}
-
-void
-prom_iclose(void *devdata)
-{
- struct boottab *ops;
- struct devinfo *dip;
- struct saioreq *si;
-
- if (promdev_inuse == 0)
- return;
-
- si = devdata;
- ops = si->si_boottab;
- dip = ops->b_devinfo;
-
- (*ops->b_close)(si);
-
- if (si->si_dmaaddr) {
- dvma_free(si->si_dmaaddr, dip->d_dmabytes);
- si->si_dmaaddr = NULL;
- }
-
- promdev_inuse = 0;
-}
-
-struct mapinfo {
- int maptype;
- int pgtype;
- int base;
-};
-
-static struct mapinfo
-prom_mapinfo[] = {
- { MAP_MAINMEM, PGT_OBMEM, 0 },
- { MAP_OBIO, PGT_OBIO, 0 },
- { MAP_MBMEM, PGT_OBMEM, 0 }, /* XXX - Sun2 Multibus? */
- { MAP_MBIO, PGT_OBIO, 0 }, /* XXX - Sun2 Multibus? */
- { MAP_VME16A16D, PGT_VME_D16, 0xFFFF0000 },
- { MAP_VME16A32D, PGT_VME_D32, 0xFFFF0000 },
- { MAP_VME24A16D, PGT_VME_D16, 0xFF000000 },
- { MAP_VME24A32D, PGT_VME_D32, 0xFF000000 },
- { MAP_VME32A16D, PGT_VME_D16, 0 },
- { MAP_VME32A32D, PGT_VME_D32, 0 },
-};
-static prom_mapinfo_cnt = sizeof(prom_mapinfo) / sizeof(prom_mapinfo[0]);
-
-/* The virtual address we will use for PROM device mappings. */
-static int prom_devmap = MONSHORTSEG;
-
-static char *
-prom_mapin(physaddr, length, maptype)
- u_long physaddr;
- int length, maptype;
-{
- int i, pa, pte, va;
-
- if (length > (4*NBPG))
- panic("prom_mapin: length=%d\n", length);
-
- for (i = 0; i < prom_mapinfo_cnt; i++)
- if (prom_mapinfo[i].maptype == maptype)
- goto found;
- panic("prom_mapin: invalid maptype %d\n", maptype);
-found:
-
- pte = prom_mapinfo[i].pgtype;
- pte |= PG_PERM;
- pa = prom_mapinfo[i].base;
- pa += physaddr;
- pte |= PA_PGNUM(pa);
-
- va = prom_devmap;
- do {
- set_pte(va, pte);
- va += NBPG;
- pte += 1;
- length -= NBPG;
- } while (length > 0);
- return ((char*)prom_devmap);
-}
diff --git a/sys/arch/mvme68k/stand/libsa/promdev.h b/sys/arch/mvme68k/stand/libsa/promdev.h
deleted file mode 100644
index 2a5bd89bffe..00000000000
--- a/sys/arch/mvme68k/stand/libsa/promdev.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* $OpenBSD: promdev.h,v 1.2 1996/04/28 10:49:14 deraadt Exp $ */
-
-int prom_iopen(struct saioreq **sipp);
-void prom_iclose(struct saioreq *sip);
-