summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-12-01 07:50:02 +0000
committerderaadt <deraadt@openbsd.org>2015-12-01 07:50:02 +0000
commit2ddcd48a2c523a3796613ac1d8096f8cefb926be (patch)
treefc2d6fd912162c47d17ebf4c3d3a132372e67e90
parentMake sure "exec" rights are dropped asap in all code paths. (diff)
downloadwireguard-openbsd-2ddcd48a2c523a3796613ac1d8096f8cefb926be.tar.xz
wireguard-openbsd-2ddcd48a2c523a3796613ac1d8096f8cefb926be.zip
Send Aviion to same place as Nova II
discussed with jsg
-rw-r--r--Makefile.cross4
-rw-r--r--distrib/Makefile4
-rw-r--r--distrib/aviion/Makefile5
-rw-r--r--distrib/aviion/Makefile.inc9
-rw-r--r--distrib/aviion/ramdisk/Makefile96
-rw-r--r--distrib/aviion/ramdisk/Makefile.inc43
-rw-r--r--distrib/aviion/ramdisk/install.md136
-rw-r--r--distrib/aviion/ramdisk/list84
-rw-r--r--distrib/notes/Makefile4
-rw-r--r--distrib/notes/aviion/contents38
-rw-r--r--distrib/notes/aviion/features40
-rw-r--r--distrib/notes/aviion/hardware42
-rw-r--r--distrib/notes/aviion/install102
-rw-r--r--distrib/notes/aviion/prep63
-rw-r--r--distrib/notes/aviion/upgrade2
-rw-r--r--distrib/notes/aviion/whatis5
-rw-r--r--distrib/notes/aviion/xfer13
-rw-r--r--distrib/sets/lists/base/md.aviion2048
-rw-r--r--distrib/sets/lists/comp/md.aviion292
-rw-r--r--distrib/sets/lists/etc/md.aviion0
-rw-r--r--distrib/sets/lists/game/md.aviion0
-rw-r--r--distrib/sets/lists/man/md.aviion0
-rw-r--r--distrib/sets/lists/man/mi16
-rw-r--r--distrib/special/installboot/Makefile6
-rw-r--r--distrib/special/kbd/Makefile6
-rw-r--r--etc/Makefile9
-rw-r--r--etc/etc.aviion/MAKEDEV372
-rw-r--r--etc/etc.aviion/MAKEDEV.md110
-rw-r--r--etc/etc.aviion/Makefile5
-rw-r--r--etc/etc.aviion/Makefile.inc9
-rw-r--r--etc/etc.aviion/disktab6
-rw-r--r--etc/etc.aviion/fbtab1
-rw-r--r--etc/etc.aviion/login.conf107
-rw-r--r--etc/etc.aviion/sysctl.conf0
-rw-r--r--etc/etc.aviion/ttys9
-rw-r--r--lib/libc/sys/ptrace.210
-rw-r--r--regress/etc/MAKEDEV/Makefile4
-rw-r--r--regress/usr.bin/mdoclint/mdoclint4
-rw-r--r--sbin/kbd/Makefile4
-rw-r--r--sbin/reboot/reboot.85
-rw-r--r--share/man/man4/Makefile4
-rw-r--r--share/man/man4/man4.aviion/Makefile7
-rw-r--r--share/man/man4/man4.aviion/autoconf.453
-rw-r--r--share/man/man4/man4.aviion/dart.454
-rw-r--r--share/man/man4/man4.aviion/intro.4119
-rw-r--r--share/man/man4/man4.aviion/le.486
-rw-r--r--share/man/man4/man4.aviion/mem.479
-rw-r--r--share/man/man4/man4.aviion/nvram.452
-rw-r--r--share/man/man4/man4.aviion/oaic.453
-rw-r--r--share/man/man4/man4.aviion/syscon.461
-rw-r--r--share/man/man4/man4.aviion/vme.457
-rw-r--r--share/man/man4/oosiop.48
-rw-r--r--share/man/man8/Makefile4
-rw-r--r--share/man/man8/man8.aviion/MAKEDEV.8176
-rw-r--r--share/man/man8/man8.aviion/Makefile6
-rw-r--r--sys/Makefile4
-rw-r--r--sys/arch/aviion/Makefile45
-rw-r--r--sys/arch/aviion/aviion/autoconf.c303
-rw-r--r--sys/arch/aviion/aviion/av400_machdep.c798
-rw-r--r--sys/arch/aviion/aviion/av530_machdep.c785
-rw-r--r--sys/arch/aviion/aviion/bus_dma.c686
-rw-r--r--sys/arch/aviion/aviion/bus_space.c124
-rw-r--r--sys/arch/aviion/aviion/cio_clock.c396
-rw-r--r--sys/arch/aviion/aviion/conf.c227
-rw-r--r--sys/arch/aviion/aviion/db_machdep.c48
-rw-r--r--sys/arch/aviion/aviion/disksubr.c470
-rw-r--r--sys/arch/aviion/aviion/eh.S126
-rw-r--r--sys/arch/aviion/aviion/genassym.cf1
-rw-r--r--sys/arch/aviion/aviion/locore.S388
-rw-r--r--sys/arch/aviion/aviion/m8820x.c334
-rw-r--r--sys/arch/aviion/aviion/machdep.c1088
-rw-r--r--sys/arch/aviion/aviion/pmap_table.c41
-rw-r--r--sys/arch/aviion/aviion/prom.c315
-rw-r--r--sys/arch/aviion/aviion/rtc_clock.c125
-rw-r--r--sys/arch/aviion/conf/GENERIC91
-rw-r--r--sys/arch/aviion/conf/GENERIC.MP15
-rw-r--r--sys/arch/aviion/conf/Makefile.aviion173
-rw-r--r--sys/arch/aviion/conf/RAMDISK58
-rw-r--r--sys/arch/aviion/conf/files.aviion74
-rw-r--r--sys/arch/aviion/conf/ld.script50
-rw-r--r--sys/arch/aviion/dev/dart.c414
-rw-r--r--sys/arch/aviion/dev/dartvar.h62
-rw-r--r--sys/arch/aviion/dev/dma.c217
-rw-r--r--sys/arch/aviion/dev/dmareg.h40
-rw-r--r--sys/arch/aviion/dev/dmavar.h23
-rw-r--r--sys/arch/aviion/dev/if_le_syscon.c382
-rw-r--r--sys/arch/aviion/dev/if_le_vme.c359
-rw-r--r--sys/arch/aviion/dev/if_le_vmereg.h85
-rw-r--r--sys/arch/aviion/dev/mainbus.c179
-rw-r--r--sys/arch/aviion/dev/nvram.c564
-rw-r--r--sys/arch/aviion/dev/nvramreg.h87
-rw-r--r--sys/arch/aviion/dev/oaic_syscon.c238
-rw-r--r--sys/arch/aviion/dev/oosiop_syscon.c117
-rw-r--r--sys/arch/aviion/dev/syscon.c222
-rw-r--r--sys/arch/aviion/dev/sysconvar.h23
-rw-r--r--sys/arch/aviion/dev/vme.c1012
-rw-r--r--sys/arch/aviion/dev/vmevar.h98
-rw-r--r--sys/arch/aviion/include/_float.h3
-rw-r--r--sys/arch/aviion/include/_types.h4
-rw-r--r--sys/arch/aviion/include/asm.h3
-rw-r--r--sys/arch/aviion/include/asm_macro.h3
-rw-r--r--sys/arch/aviion/include/atomic.h10
-rw-r--r--sys/arch/aviion/include/autoconf.h54
-rw-r--r--sys/arch/aviion/include/av400.h149
-rw-r--r--sys/arch/aviion/include/av530.h245
-rw-r--r--sys/arch/aviion/include/avcommon.h143
-rw-r--r--sys/arch/aviion/include/board.h156
-rw-r--r--sys/arch/aviion/include/bus.h365
-rw-r--r--sys/arch/aviion/include/cdefs.h4
-rw-r--r--sys/arch/aviion/include/cmmu.h3
-rw-r--r--sys/arch/aviion/include/conf.h40
-rw-r--r--sys/arch/aviion/include/cpu.h69
-rw-r--r--sys/arch/aviion/include/db_machdep.h12
-rw-r--r--sys/arch/aviion/include/disklabel.h178
-rw-r--r--sys/arch/aviion/include/endian.h3
-rw-r--r--sys/arch/aviion/include/exec.h3
-rw-r--r--sys/arch/aviion/include/fenv.h3
-rw-r--r--sys/arch/aviion/include/fpu.h3
-rw-r--r--sys/arch/aviion/include/frame.h3
-rw-r--r--sys/arch/aviion/include/ieee.h3
-rw-r--r--sys/arch/aviion/include/ieeefp.h3
-rw-r--r--sys/arch/aviion/include/intr.h58
-rw-r--r--sys/arch/aviion/include/kcore.h3
-rw-r--r--sys/arch/aviion/include/limits.h3
-rw-r--r--sys/arch/aviion/include/loadfile_machdep.h47
-rw-r--r--sys/arch/aviion/include/lock.h3
-rw-r--r--sys/arch/aviion/include/m88100.h3
-rw-r--r--sys/arch/aviion/include/m8820x.h63
-rw-r--r--sys/arch/aviion/include/mioctl.h28
-rw-r--r--sys/arch/aviion/include/mmu.h3
-rw-r--r--sys/arch/aviion/include/mplock.h3
-rw-r--r--sys/arch/aviion/include/mutex.h3
-rw-r--r--sys/arch/aviion/include/param.h49
-rw-r--r--sys/arch/aviion/include/pcb.h3
-rw-r--r--sys/arch/aviion/include/pmap.h3
-rw-r--r--sys/arch/aviion/include/pmap_table.h3
-rw-r--r--sys/arch/aviion/include/proc.h3
-rw-r--r--sys/arch/aviion/include/profile.h3
-rw-r--r--sys/arch/aviion/include/prom.h105
-rw-r--r--sys/arch/aviion/include/psl.h3
-rw-r--r--sys/arch/aviion/include/ptrace.h3
-rw-r--r--sys/arch/aviion/include/reg.h3
-rw-r--r--sys/arch/aviion/include/reloc.h3
-rw-r--r--sys/arch/aviion/include/setjmp.h3
-rw-r--r--sys/arch/aviion/include/signal.h3
-rw-r--r--sys/arch/aviion/include/spinlock.h3
-rw-r--r--sys/arch/aviion/include/stdarg.h3
-rw-r--r--sys/arch/aviion/include/tcb.h3
-rw-r--r--sys/arch/aviion/include/trap.h4
-rw-r--r--sys/arch/aviion/include/varargs.h3
-rw-r--r--sys/arch/aviion/include/vmparam.h11
-rw-r--r--sys/arch/aviion/stand/Makefile10
-rw-r--r--sys/arch/aviion/stand/Makefile.inc15
-rw-r--r--sys/arch/aviion/stand/a2coff/Makefile15
-rw-r--r--sys/arch/aviion/stand/a2coff/a2coff.843
-rw-r--r--sys/arch/aviion/stand/a2coff/a2coff.c344
-rw-r--r--sys/arch/aviion/stand/boot/Makefile42
-rw-r--r--sys/arch/aviion/stand/boot/boot.c168
-rw-r--r--sys/arch/aviion/stand/boot/conf.c40
-rw-r--r--sys/arch/aviion/stand/boot/crt.c36
-rw-r--r--sys/arch/aviion/stand/boot/dev_net.c187
-rw-r--r--sys/arch/aviion/stand/boot/devopen.c174
-rw-r--r--sys/arch/aviion/stand/boot/if_le.c448
-rw-r--r--sys/arch/aviion/stand/boot/if_lereg.h173
-rw-r--r--sys/arch/aviion/stand/boot/oaic.c1229
-rw-r--r--sys/arch/aviion/stand/boot/oaic.h21
-rw-r--r--sys/arch/aviion/stand/boot/oosiop.c917
-rw-r--r--sys/arch/aviion/stand/boot/oosiop.h21
-rw-r--r--sys/arch/aviion/stand/boot/scsi.c165
-rw-r--r--sys/arch/aviion/stand/boot/scsi.h98
-rw-r--r--sys/arch/aviion/stand/boot/sd.c100
-rw-r--r--sys/arch/aviion/stand/boot/version.c3
-rw-r--r--sys/arch/aviion/stand/installboot/Makefile16
-rw-r--r--sys/arch/aviion/stand/installboot/installboot.869
-rw-r--r--sys/arch/aviion/stand/installboot/installboot.c182
-rw-r--r--sys/arch/aviion/stand/libprom/Makefile18
-rw-r--r--sys/arch/aviion/stand/libprom/Makefile.inc14
-rw-r--r--sys/arch/aviion/stand/libprom/cpuid.c32
-rw-r--r--sys/arch/aviion/stand/libprom/getc.c40
-rw-r--r--sys/arch/aviion/stand/libprom/getenaddr.c45
-rw-r--r--sys/arch/aviion/stand/libprom/halt.c36
-rw-r--r--sys/arch/aviion/stand/libprom/prom.h85
-rw-r--r--sys/arch/aviion/stand/libprom/putc.c41
-rw-r--r--sys/arch/aviion/stand/libsa/Makefile40
-rw-r--r--sys/arch/aviion/stand/libsa/Makefile.inc15
-rw-r--r--sys/arch/aviion/stand/libsa/clock.c82
-rw-r--r--sys/arch/aviion/stand/libsa/delay.S55
-rw-r--r--sys/arch/aviion/stand/libsa/exec.c66
-rw-r--r--sys/arch/aviion/stand/libsa/fault.c152
-rw-r--r--sys/arch/aviion/stand/libsa/libsa.h23
-rw-r--r--sys/arch/aviion/stand/libsa/nvramreg.h87
-rw-r--r--sys/arch/aviion/stand/libsa/parse_args.c134
-rw-r--r--sys/arch/aviion/stand/libsa/setjmp.S79
-rw-r--r--sys/arch/aviion/stand/libz/Makefile8
-rw-r--r--sys/arch/aviion/stand/libz/Makefile.inc14
-rw-r--r--sys/arch/aviion/stand/vdmtool/Makefile16
-rw-r--r--sys/arch/aviion/stand/vdmtool/vdmtool.851
-rw-r--r--sys/arch/aviion/stand/vdmtool/vdmtool.c641
-rw-r--r--sys/kern/Makefile4
199 files changed, 34 insertions, 23572 deletions
diff --git a/Makefile.cross b/Makefile.cross
index f3fa160f103..934a8b79907 100644
--- a/Makefile.cross
+++ b/Makefile.cross
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.cross,v 1.80 2015/11/14 23:56:48 deraadt Exp $
+# $OpenBSD: Makefile.cross,v 1.81 2015/12/01 07:50:03 deraadt Exp $
cross-tools: cross-includes cross-binutils cross-gcc cross-lib
cross-distrib: cross-tools cross-bin cross-share cross-sys cross-etc-root-var
@@ -9,7 +9,7 @@ cross-distrib: cross-tools cross-bin cross-share cross-sys cross-etc-root-var
.if (${TARGET} == "armish" || ${TARGET} == "armv7" || \
${TARGET} == "zaurus")
TARGET_ARCH= arm
-.elif (${TARGET} == "aviion" || ${TARGET} == "luna88k")
+.elif ${TARGET} == "luna88k")
TARGET_ARCH= m88k
.elif (${TARGET} == "sgi" || ${TARGET} == "octeon")
TARGET_ARCH= mips64
diff --git a/distrib/Makefile b/distrib/Makefile
index dd2d013f432..ade0c986a71 100644
--- a/distrib/Makefile
+++ b/distrib/Makefile
@@ -1,9 +1,9 @@
-# $OpenBSD: Makefile,v 1.45 2014/03/18 22:36:27 miod Exp $
+# $OpenBSD: Makefile,v 1.46 2015/12/01 07:50:06 deraadt Exp $
SUBDIR= special notes
.if make(obj)
-SUBDIR+=alpha amd64 armish armv7 aviion hppa i386 \
+SUBDIR+=alpha amd64 armish armv7 hppa i386 \
landisk loongson luna88k macppc \
octeon sgi socppc sparc sparc64 vax zaurus
.elif exists(${MACHINE})
diff --git a/distrib/aviion/Makefile b/distrib/aviion/Makefile
deleted file mode 100644
index 0ae8e1d6d3b..00000000000
--- a/distrib/aviion/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $OpenBSD: Makefile,v 1.1 2013/10/15 13:28:04 miod Exp $
-
-SUBDIR=ramdisk
-
-.include <bsd.subdir.mk>
diff --git a/distrib/aviion/Makefile.inc b/distrib/aviion/Makefile.inc
deleted file mode 100644
index ad31a6db0fe..00000000000
--- a/distrib/aviion/Makefile.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.1 2013/10/15 13:28:04 miod Exp $
-
-REV=${OSrev}
-
-LDSTATIC=-static
-
-# Hack needed to find kernel images...
-BSDSRCDIR?=/usr/src
-SRCSYSDIR?=${BSDSRCDIR}/sys
diff --git a/distrib/aviion/ramdisk/Makefile b/distrib/aviion/ramdisk/Makefile
deleted file mode 100644
index aa9cd545113..00000000000
--- a/distrib/aviion/ramdisk/Makefile
+++ /dev/null
@@ -1,96 +0,0 @@
-# $OpenBSD: Makefile,v 1.2 2013/10/15 22:46:49 deraadt Exp $
-
-TOP= ${.CURDIR}/..
-
-.include "${TOP}/Makefile.inc"
-BSD_RD= bsd.rd
-IMAGE= mr.fs
-CBIN?= instbin
-LISTS= ${.CURDIR}/list
-UTILS?= ${.CURDIR}/../../miniroot
-
-MOUNT_POINT= /mnt
-MTREE= ${UTILS}/mtree.conf
-
-VND?= vnd0
-VND_DEV= /dev/${VND}a
-VND_RDEV= /dev/r${VND}a
-VND_CRDEV= /dev/r${VND}c
-PID!= echo $$$$
-
-
-DISKTYPE= rdroot
-NBLKS= 4096
-# minfree, opt, b/i trks, sects, cpg
-NEWFSARGS= -t ffs -m 0 -o space
-
-all: ${BSD_RD}
-
-${BSD_RD}: ${CBIN} ${IMAGE} bsd rdsetroot
- cp bsd ${BSD_RD}
- ${.OBJDIR}/rdsetroot ${BSD_RD} ${IMAGE}
-
-${IMAGE}: rd_setup do_files rd_teardown
-
-bsd:
-.ifndef(NOBUILD)
- cd ${.CURDIR}/../../../sys/arch/aviion/conf && config RAMDISK
- cd ${.CURDIR}/../../../sys/arch/aviion/compile/RAMDISK && \
- ${MAKE} clean && exec ${MAKE}
-.endif
- cp ${.CURDIR}/../../../sys/arch/aviion/compile/RAMDISK/bsd bsd
-
-rd_test: rd_setup rd_teardown
-
-rd_setup:
- dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS}
- vnconfig -v -c ${VND} ${IMAGE}
- disklabel -w ${VND} ${DISKTYPE}
- newfs ${NEWFSARGS} ${VND_RDEV}
- fsck ${VND_RDEV}
- mount ${VND_DEV} ${MOUNT_POINT}
-
-rd_teardown:
- @df -i ${MOUNT_POINT}
- -umount ${MOUNT_POINT}
- -vnconfig -u ${VND}
-
-rdsetroot: ${TOP}/../common/elfrdsetroot.c
- ${HOSTCC} -o rdsetroot \
- ${TOP}/../common/elfrdsetroot.c ${TOP}/../common/elf32.c \
- ${TOP}/../common/elf64.c
-
-unconfig:
- -umount -f ${MOUNT_POINT}
- -vnconfig -u ${VND}
-
-.PRECIOUS: ${IMAGE}
-
-.ifdef RELEASEDIR
-install:
- cp ${BSD_RD} ${RELEASEDIR}
- /usr/mdec/a2coff ${BSD_RD} ${RELEASEDIR}/${BSD_RD}.xcf
-.endif
-
-${CBIN}.conf: ${LISTS}
- awk -f ${UTILS}/makeconf.awk CBIN=${CBIN} ${LISTS} > ${CBIN}.conf
-
-${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CBIN}.conf
- crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${CBIN}.conf
-
-${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
- ${MAKE} -f ${CBIN}.mk all
-
-do_files:
- mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u
- TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
- REV=${REV} TARGDIR=${MOUNT_POINT} UTILS=${UTILS} \
- RELEASEDIR=${RELEASEDIR} sh ${UTILS}/runlist.sh ${LISTS}
- rm ${MOUNT_POINT}/${CBIN}
-
-clean cleandir:
- /bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.conf ${CBIN}.mk ${CBIN}.cache \
- *.o *.lo *.c bsd ${BSD_RD} rdsetroot
-
-.include <bsd.obj.mk>
-.include <bsd.subdir.mk>
diff --git a/distrib/aviion/ramdisk/Makefile.inc b/distrib/aviion/ramdisk/Makefile.inc
deleted file mode 100644
index fa8b44ef6fa..00000000000
--- a/distrib/aviion/ramdisk/Makefile.inc
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# $OpenBSD: Makefile.inc,v 1.2 2013/10/15 22:46:50 deraadt Exp $
-#
-
-# TOP is assumed to be defined by Makefile including this one.
-
-CBIN?= instbin
-LISTS= ${.CURDIR}/list
-UTILS?= ${.CURDIR}/../../miniroot
-
-COMMONDIR= ${TOP}/ramdisk
-MOUNT_POINT?= ${TOP}/${BASE}/fs
-
-CRUNCHCONF?= ${COMMONDIR}/${CBIN}.conf
-MTREE= ${UTILS}/mtree.conf
-
-${CBIN}.conf: ${LISTS}
- awk -f ${UTILS}/makeconf.awk CBIN=${CBIN} ${LISTS} > ${CBIN}.conf
-
-${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CBIN}.conf
- crunchgen -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib ${CBIN}.conf
-
-${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
- ${MAKE} -f ${CBIN}.mk all
-
-#${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
-# crunchgen -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib ${CRUNCHCONF}
-
-#${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
-# ${MAKE} -f ${CBIN}.mk all
-
-do_files:
- mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u
- TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
- TARGDIR=${MOUNT_POINT} UTILS=${UTILS} \
- RELEASEDIR=${RELEASEDIR} sh ${UTILS}/runlist.sh ${LISTS}
- rm ${MOUNT_POINT}/${CBIN}
-
-clean cleandir:
- /bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.lo *.c
-
-.include <bsd.obj.mk>
-.include <bsd.subdir.mk>
diff --git a/distrib/aviion/ramdisk/install.md b/distrib/aviion/ramdisk/install.md
deleted file mode 100644
index 63ec4475011..00000000000
--- a/distrib/aviion/ramdisk/install.md
+++ /dev/null
@@ -1,136 +0,0 @@
-# $OpenBSD: install.md,v 1.9 2015/06/02 19:54:06 rpe Exp $
-# Copyright (c) 1996 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Jason R. Thorpe.
-#
-# 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.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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.
-#
-#
-# machine dependent section of installation/upgrade script.
-#
-#
-
-MDTERM=vt100
-NCPU=$(sysctl -n hw.ncpufound)
-
-((NCPU > 1)) && { DEFAULTSETS="bsd bsd.rd bsd.mp"; SANESETS="bsd bsd.mp"; }
-
-_mdnoautoinstallboot=n
-
-md_installboot() {
- local _disk=$1
-
- if [[ $_mdnoautoinstallboot == y ]]; then
- cat << __EOT
-
-Do you want to install the OpenBSD boot blocks on ${_disk}? If you intend
-to share the disk with DG/UX, you are advised to keep the existing DG/UX
-boot blocks and put the OpenBSD boot blocks on the DG/UX root partition.
-
-If you no longer intend to boot DG/UX from this disk, answer `yes'.
-
-__EOT
- ask_yn "Install OpenBSD boot blocks?" "yes"
- [[ $resp = n ]] && return
- fi
- /mnt/usr/mdec/installboot /mnt/usr/mdec/boot $_disk
-}
-
-# true if the device has a boot area initialized
-md_has_boot_area () {
- /usr/mdec/vdmtool $1 2>&1 | grep -q "disk boot info"
-}
-
-# true if the device seems to have DG/UX VDM partitioning
-md_has_vdm () {
- /usr/mdec/vdmtool $1 2>&1 | grep -q "^vdit entry"
-}
-
-# true if the device seems to have DG/UX LDM partitioning
-md_has_ldm () {
- # until vdmtool can grok them...
- /usr/mdec/vdmtool $1 2>&1 | \
- grep -q "vdmtool: unexpected block kind on sector 00000001: ff"
-}
-
-md_prep_disklabel() {
- local _disk=$1 _f=/tmp/fstab.$1 _shared=n
-
- if md_has_boot_area $_disk; then
- if md_has_ldm $_disk; then
- cat << __EOT
-
-WARNING: there seem to be existing DG/UX LDM partitions on ${_disk}. These
-partitions will NOT be recognized by OpenBSD and will be overwritten.
-
-__EOT
- ask_yn "Are you *sure* you want to setup $_disk?"
- [[ $resp == n ]] && return 1
- _shared=y
- fi
-
- if md_has_vdm $_disk; then
- cat << __EOT
-
-WARNING: there seem to existing DG/UX VDM partitions on ${_disk}. These
-partitions will NOT be recognized by OpenBSD and will be overwritten,
-unless a dedicated OpenBSD vdmpart has been set up in DG/UX as described
-in the installation notes.
-
-__EOT
- ask_yn "Are you *sure* you want to setup $_disk?"
- [[ $resp == n ]] && return 1
- _shared=y
- fi
- else
- # Initialize boot area for the root disk, before attempting
- # to label it, to make sure the OpenBSD boundary will not
- # contain the boot area.
- if [[ $_disk == $ROOTDISK ]]; then
- /usr/mdec/vdmtool -i $_disk
- fi
- fi
-
- disklabel_autolayout $_disk $_f || return
- if [[ -s $_f ]]; then
- _mdnoautoinstallboot=$_shared
- return
- fi
-
- cat <<__EOT
-You will now create a OpenBSD disklabel on the disk. The disklabel defines
-how OpenBSD splits up the disk into OpenBSD partitions in which filesystems
-and swap space are created. You must provide each filesystem's mountpoint
-in this program.
-
-__EOT
-
- disklabel -F $_f -E $_disk
-}
-
-md_congrats() {
-}
-
-md_consoleinfo() {
-}
diff --git a/distrib/aviion/ramdisk/list b/distrib/aviion/ramdisk/list
deleted file mode 100644
index ded15c24a82..00000000000
--- a/distrib/aviion/ramdisk/list
+++ /dev/null
@@ -1,84 +0,0 @@
-# $OpenBSD: list,v 1.16 2015/04/13 21:27:07 deraadt Exp $
-
-SRCDIRS distrib/special
-
-# copy the crunched binary, link to it, and kill it
-COPY ${OBJDIR}/instbin instbin
-LINK instbin bin/arch
-LINK instbin bin/cat
-LINK instbin bin/chmod bin/chgrp sbin/chown
-LINK instbin bin/cp
-LINK instbin bin/date
-LINK instbin bin/dd
-LINK instbin bin/df
-LINK instbin bin/ed
-LINK instbin bin/hostname
-LINK instbin bin/ksh bin/sh
-ARGVLINK ksh -sh
-LINK instbin bin/ln
-LINK instbin bin/ls
-LINK instbin bin/md5 bin/sha256 bin/sha512
-SPECIAL rm bin/md5
-LINK instbin bin/mkdir
-LINK instbin bin/mt bin/eject
-LINK instbin bin/mv
-LINK instbin bin/pax bin/tar
-LINK instbin bin/rm
-LINK instbin bin/sleep
-LINK instbin bin/stty
-LINK instbin bin/sync
-LINK instbin sbin/dhclient
-LINK instbin sbin/disklabel
-LINK instbin sbin/dmesg
-LINK instbin sbin/fsck
-LINK instbin sbin/fsck_ffs
-LINK instbin sbin/ifconfig
-LINK instbin sbin/init
-LINK instbin sbin/mknod
-LINK instbin sbin/mount
-LINK instbin sbin/mount_cd9660
-LINK instbin sbin/mount_ffs
-LINK instbin sbin/mount_nfs
-LINK instbin sbin/newfs
-LINK instbin sbin/ping
-LINK instbin sbin/ping6
-LINK instbin sbin/reboot sbin/halt
-LINK instbin sbin/route
-LINK instbin sbin/sysctl
-LINK instbin sbin/umount
-LINK instbin usr/bin/encrypt
-LINK instbin usr/bin/ftp
-LINK instbin usr/bin/grep usr/bin/egrep usr/bin/fgrep
-LINK instbin usr/bin/gzip usr/bin/gunzip usr/bin/gzcat
-LINK instbin usr/bin/more usr/bin/less
-LINK instbin usr/bin/sed
-LINK instbin usr/bin/signify
-LINK instbin usr/sbin/chroot
-LINK instbin usr/sbin/pwd_mkdb
-
-# copy the MAKEDEV script and make some devices
-SCRIPT ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
-SPECIAL cd dev; sh MAKEDEV ramdisk
-
-COPY ${DESTDIR}/usr/mdec/vdmtool usr/mdec/vdmtool
-
-# various files that we need in /etc for the install
-COPY ${DESTDIR}/etc/group etc/group
-COPY ${CURDIR}/../../miniroot/master.passwd etc/master.passwd
-SPECIAL pwd_mkdb -p -d etc master.passwd; rm etc/master.passwd
-COPY ${DESTDIR}/etc/signify/openbsd-${REV}-base.pub etc/signify/openbsd-${REV}-base.pub
-COPY ${CURDIR}/../../miniroot/protocols etc/protocols
-COPY ${CURDIR}/../../miniroot/services etc/services
-SYMLINK /tmp/fstab.shadow etc/fstab
-SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf
-SYMLINK /tmp/hosts etc/hosts
-TERMCAP vt100,vt220,dumb usr/share/misc/termcap
-
-# and the installation tools
-SCRIPT ${CURDIR}/../../miniroot/dot.profile .profile
-SCRIPT ${CURDIR}/install.md install.md
-SCRIPT ${CURDIR}/../../miniroot/install.sh install
-SCRIPT ${CURDIR}/../../miniroot/upgrade.sh upgrade
-SCRIPT ${CURDIR}/../../miniroot/install.sub install.sub
-
-SPECIAL chmod 755 install upgrade
diff --git a/distrib/notes/Makefile b/distrib/notes/Makefile
index de2ce004d3d..1e908aedcf3 100644
--- a/distrib/notes/Makefile
+++ b/distrib/notes/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.41 2014/03/18 22:36:28 miod Exp $
+# $OpenBSD: Makefile,v 1.42 2015/12/01 07:50:06 deraadt Exp $
NOPROG=
NOMAN=
@@ -18,7 +18,7 @@ all: $(TARG)
allarchs:
@cd $(.CURDIR); \
- for arch in alpha amd64 armish armv7 aviion hppa i386 landisk \
+ for arch in alpha amd64 armish armv7 hppa i386 landisk \
loongson luna88k macppc octeon sgi socppc \
sparc sparc64 vax zaurus; \
do ${MAKE} M=$$arch; done
diff --git a/distrib/notes/aviion/contents b/distrib/notes/aviion/contents
deleted file mode 100644
index e532454e5a1..00000000000
--- a/distrib/notes/aviion/contents
+++ /dev/null
@@ -1,38 +0,0 @@
-dnl $OpenBSD: contents,v 1.9 2014/11/10 07:15:41 jsg Exp $
-TopPart
-
-OpenBSDdistsets
-
-OpenBSDbsd
-
-OpenBSDbsdmp
-
-OpenBSDrd
-
- bsd.rd.xcf Same as above, but in ECOFF format, suitable for
- netbooting.
-
- boot The OpenBSD/MACHINE disk boot loader, suitable for
- booting from DG/UX.
-
-These files can be used to configure an NFS server to support installation
-over the network. See the section "Getting the OpenBSD system onto Useful
-Media" for more information.
-
-DistributionDescription(ten)
-
-OpenBSDbase(57831687,169795744)
-
-OpenBSDcomp(59681697,177309158)
-
-OpenBSDgame(2707373,6047773)
-
-OpenBSDman(9137658,35475598)
-
-OpenBSDxbase(12230442,32063002)
-
-OpenBSDxfont(39932644,52169245)
-
-OpenBSDxserv(1677739,3897996)
-
-OpenBSDxshare(4562247,25723437)
diff --git a/distrib/notes/aviion/features b/distrib/notes/aviion/features
deleted file mode 100644
index 8f290f73562..00000000000
--- a/distrib/notes/aviion/features
+++ /dev/null
@@ -1,40 +0,0 @@
-dnl $OpenBSD: features,v 1.4 2013/10/15 13:28:06 miod Exp $
-dnl
-dnl This file lists almost all the conditional features of this port,
-dnl which are used to provide accurate installation notes.
-dnl
-dnl Information about the installer script features should be in sync with
-dnl src/distrib/aviion/install.md
-dnl and the list files in
-dnl src/distrib/aviion/ramdisk/list
-dnl
-dnl ====
-dnl
-dnl architecture name (for the packages directory)
-define({:-MACHINE_ARCH-:},m88k)dnl
-dnl
-dnl define if /sbin/kbd exists on the media
-define({:-MDKBD-:},)dnl
-dnl
-dnl define if serial consoles needs to be enabled in /etc/ttys
-dnl (i.e. md_consoleinfo is not empty)
-define({:-MDSERCONS-:},)dnl
-dnl
-dnl define if SMP kernels are provided
-define({:-MDSMP-:},1)dnl
-dnl
-dnl define if shared libraries are provided
-define({:-MDSO-:},1)dnl
-dnl
-dnl define if some media have timezone information (TZ in their list)
-define({:-MDTZ-:},)dnl
-dnl
-dnl define if glass console is possible
-dnl (XXX does not imply availablity of X servers though)
-define({:-MDX-:},)dnl
-dnl
-dnl define if the X server can't start until machdep.allow_aperture is set
-define({:-MDXAPERTURE-:},)dnl
-dnl
-dnl define if the X server can start without a configuration file
-define({:-MDXDM-:},)dnl
diff --git a/distrib/notes/aviion/hardware b/distrib/notes/aviion/hardware
deleted file mode 100644
index 69a76fe7e14..00000000000
--- a/distrib/notes/aviion/hardware
+++ /dev/null
@@ -1,42 +0,0 @@
-dnl $OpenBSD: hardware,v 1.4 2015/01/11 21:02:55 miod Exp $
-OpenBSD/MACHINE OSREV runs on the following Data General AViiON systems:
-
- - AV100/200/300/400, AV3000/4000 and AV4300 series
- - AV4600 and AV530 series
-
-Note that the actual model number found of the chassis might not exactly
-match the base number of its family, depending upon the number of processors
-and the available options. For example, model AV4605 is a member of the
-AV4600 family.
-
-OpenBSD might be able to run on close relatives of these families without
-much hassle. If your system is not currently supported under OpenBSD, please
-contact <m88k@openbsd.org> and provide some information about your system,
-especially the output of `dg_sysreport -p model architecture' from DG/UX.
-
-OpenBSD/MACHINE OSREV supports multiprocessor systems of the AV4600/AV530
-family. To support multiprocessor operation, a separate multiprocessor
-kernel (bsd.mp) is included with the installation file sets.
-
-While OpenBSD will boot single-user in 8MB, a minimum of 12MB of RAM is
-necessary to install and boot multi-user, and 16MB of RAM are recommended
-as a minimum for the system not to be swap-bound, with 32MB or more being
-recommended for serious usage of the system. A minimal system can probably
-be squeezed onto a 250MB disk by installing only the `base' set and using a
-small swap partition.
-
-Note that until you have at least 32MB of RAM, getting more RAM is more
-important than getting a faster system.
-
-Supported devices:
-
-On-board devices:
- - serial ports (dart)
- - 2KB NVRAM (nvram)
- - Ethernet interface (le)
- - AIC-6250 SCSI Controller (oaic)
- - NCR53c700 SCSI Controller (oosiop)
-
-Additional VMEbus devices:
-
- Interphase Hawk 3207 Ethernet interface (le)
diff --git a/distrib/notes/aviion/install b/distrib/notes/aviion/install
deleted file mode 100644
index bb8a52b46f0..00000000000
--- a/distrib/notes/aviion/install
+++ /dev/null
@@ -1,102 +0,0 @@
-dnl $OpenBSD: install,v 1.5 2014/03/19 01:59:48 tedu Exp $
-OpenBSDInstallPrelude
-
-There are several ways to install OpenBSD onto a disk. The easiest way
-in terms of preliminary setup is to use the OpenBSD ramdisk kernel that can
-be booted over the network, or from an existing DG/UX setup.
-
-
-Booting from Network:
-
-OpenBSD/MACHINE can boot off any network interface supported by the machine
-PROM (SCM), even if the device itself is not supported by OpenBSD.
-
-Your MACHINE expects to be able to download the installation kernel via TFTP,
-after having acquired its IP address through reverse ARP when instructed to
-boot from a network interface. It will look on the TFTP server for a filename
-composed of the machine's IP address in hexadecimal. For example, a machine
-which has been assigned IP address 130.115.144.11, will make a TFTP request
-for `8273900B'.
-
-Normally, this file is a symbolic link to the OpenBSD installation kernel in
-ECOFF format, bsd.rd.xcf, which should be located in a place where the TFTP
-daemon can find it (remember, many TFTP daemons run in a chroot'ed
-environment).
-
-The kernel can then be booted with:
-
- SCM> b inen()
-
-(replace `inen' with the device name for your Ethernet interface, such as
- `dgen').
-
-On some systems with older PROM, due to a PROM limitation, attempting to
-load the kernel in memory past 3MB will fail, with the PROM seemingly stuck.
-If all attempts to load the kernel image fail at the same byte count, but
-pressing ^C brings the SCM> prompt back, it will be necessary to load the
-kernel in two steps, by first loading the boot loader (which fits within
-3MB), and have it download the kernel.
-
-In that case, the symbolic link in the TFTP server should point to `boot'
-instead of `bsd.rd.xcf'. The bootloader will then attempt to load the
-kernel from an NFS server, after issueing a RARP query (to get an IP
-address) and a BOOTPARAMS query (to know which NFS server to connect to).
-
-For further details about diskless boot can be found in the diskless(8)
-manual page, which is available online at
- http://www.openbsd.org/cgi-bin/man.cgi?query=diskless
-
-
-Booting from DG/UX:
-
-The OpenBSD installation kernel can be booted from the DG/UX boot loader, if
-installed on a DG/UX partition. This is as easy as copying bsd.rd.xcf to
-a DG/UX partition, and boot it explicitely, as in:
-
- SCM> b sd()bsd.rd.xcf
-
-if it the installation kernel has been copied to the root partition, or
-
- SCM> b sd()partition_name:/bsd.rd.xcf
-
-if it has been copied to a different partition (such as `usr').
-
-
-Installing using the DG/UX or network boot procedure:
-
-OpenBSDInstallPart2
-
- Boot your machine from the installation media as described above.
-
- It will take a while to load the kernel especially from a slow
- network connection, most likely more than a minute. If some action
- doesn't eventually happen, or the spinning cursor has stopped and
- nothing further has happened, either your boot media is bad, your
- diskless setup isn't correct, or you may have a hardware or
- configuration problem.
-
-OpenBSDInstallPart3(,"sd0")
-
-OpenBSDInstallPart4
-
-OpenBSDInstallPart5
-
-OpenBSDInstallPart6({:-CD-ROM, NFS, -:})
-
-OpenBSDURLInstall
-
-OpenBSDCDROMInstall
-
-OpenBSDNFSInstall
-
-OpenBSDDISKInstall(,{:-only -:})
-
-OpenBSDCommonInstall
-
-OpenBSDInstallWrapup
-
-OpenBSDCongratulations
-
-
-
-OpenBSDUnattendedInstallation
diff --git a/distrib/notes/aviion/prep b/distrib/notes/aviion/prep
deleted file mode 100644
index e6e1870e27d..00000000000
--- a/distrib/notes/aviion/prep
+++ /dev/null
@@ -1,63 +0,0 @@
-dnl $OpenBSD: prep,v 1.2 2013/10/15 13:28:07 miod Exp $
-Data General AViiON systems do not require any specific preparation
-steps to be able to run OpenBSD, unless you intend to share a disk between
-DG/UX and OpenBSD.
-
- Sharing a disk between DG/UX and OpenBSD:
-
- Depending upon your DG/UX version, your disks will use either
- the older LDM partitioning, or the less old VDM partitioning.
-
- If you don't know what partitioning scheme is in use, check whether
- /usr/bin/admldisk or /usr/bin/admvdisk exist on your system. Only
- one of them will be found; if admldisk is found, your system is
- using LDM partitioning, while if admvdisk is found, your system
- is using VDM partitioning.
-
- OpenBSD currently doesn't recognize LDM partitioning at all,
- and will not be able to share an LDM-partitioned disk with DG/UX.
-
- VDM-partitioned disks are recognized to some extent: while the
- DG/UX partition themselves are not visible from OpenBSD, the
- kernel will recognize the partitioning information. If a VDM
- partition of `vdmpart' type (contiguous are), named `OpenBSD',
- is found on a VDM-partitioned disk, OpenBSD will limit itself
- to this area, leaving the remainder of the DG/UX data untouched.
-
- To create an `OpenBSD' vdmpart:
- - use `admpdisk -o list -p' to get a list of your current VDM
- partitions are the areas they span on disk.
- - if there is not enough free space, consider shrinking some
- DG/UX filesystems with
- admfilesystem -o shrink -b block_count /mount_point
- until you have a large enough free area.
- - create a `vdmpart' named `OpenBSD' within the free space:
- admvdisk -o create -P disk_path:*:size OpenBSD
- (the disk path, such as "sd(ncsc(0,7),0,0)" is the same as
- reported by admpdisk).
-
- Booting a disk shared between DG/UX and OpenBSD:
-
- There can only be one set of boot blocks on a bootable disk.
- When the installer detects that the root disk is shared between
- DG/UX and OpenBSD, it will ask whether you want to install the
- OpenBSD boot blocks. If you accept, you will no longer be able to
- boot DG/UX from that disk.
-
- The reverse is also true: if you keep DG/UX boot blocks on the
- disk, you will not be able to boot OpenBSD automatically.
-
- However, the OpenBSD boot blocks can themselves be put in a
- DG/UX partition, and manually booted from there by the DG/UX
- bootblocks:
- - copy the OpenBSD boot blocks (`boot') to one of your DG/UX
- partitions.
- - when you want to boot OpenBSD, halt your DG/UX system and,
- at the SCM prompt, boot the OpenBSD boot blocks with the `-a'
- option:
- SCM> b sd()boot -a
- - the bootblocks will load and prompt you for the device and
- kernel to boot. Reply with the disk you want to load your
- kernel from at the `boot:' prompt:
- boot: sd()bsd
-
diff --git a/distrib/notes/aviion/upgrade b/distrib/notes/aviion/upgrade
deleted file mode 100644
index 65dcd690f52..00000000000
--- a/distrib/notes/aviion/upgrade
+++ /dev/null
@@ -1,2 +0,0 @@
-dnl $OpenBSD: upgrade,v 1.4 2013/10/15 13:28:07 miod Exp $
-OpenBSDUpgrade({:-bsd.rd-:})
diff --git a/distrib/notes/aviion/whatis b/distrib/notes/aviion/whatis
deleted file mode 100644
index 6f55434b889..00000000000
--- a/distrib/notes/aviion/whatis
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl $OpenBSD: whatis,v 1.1 2007/03/15 20:18:23 miod Exp $
-
-OpenBSD/MACHINE runs on a few Motorola 88100 processor-based Data General
-AViiON workstations. Although hardware support is currently very limited,
-work is in progress to cover more models and devices.
diff --git a/distrib/notes/aviion/xfer b/distrib/notes/aviion/xfer
deleted file mode 100644
index 7bbc7b5a76e..00000000000
--- a/distrib/notes/aviion/xfer
+++ /dev/null
@@ -1,13 +0,0 @@
-dnl $OpenBSD: xfer,v 1.4 2015/06/10 06:38:39 jasper Exp $
-Installation is supported from several media types, including:
-
- CD-ROM
- FFS partitions
- Remote NFS partition
- HTTP
-
-OpenBSDXferPrelude
-
-OpenBSDXferNFS
-
-OpenBSDXferFFS
diff --git a/distrib/sets/lists/base/md.aviion b/distrib/sets/lists/base/md.aviion
deleted file mode 100644
index f50263ca1f4..00000000000
--- a/distrib/sets/lists/base/md.aviion
+++ /dev/null
@@ -1,2048 +0,0 @@
-./usr/lib/libc.so.84.2
-./usr/lib/libcrypto.so.36.1
-./usr/lib/libcurses.so.14.0
-./usr/lib/libedit.so.5.2
-./usr/lib/libevent.so.4.1
-./usr/lib/libexpat.so.11.0
-./usr/lib/libform.so.6.0
-./usr/lib/libformw.so.6.0
-./usr/lib/libfuse.so.1.1
-./usr/lib/libiberty.so.12.0
-./usr/lib/libkvm.so.16.1
-./usr/lib/libm.so.9.0
-./usr/lib/libmenu.so.6.0
-./usr/lib/libmenuw.so.6.0
-./usr/lib/libncurses.so.14.0
-./usr/lib/libncursesw.so.14.0
-./usr/lib/libobjc.so.5.0
-./usr/lib/libossaudio.so.4.0
-./usr/lib/libpanel.so.6.0
-./usr/lib/libpanelw.so.6.0
-./usr/lib/libpcap.so.8.0
-./usr/lib/libperl.so.17.1
-./usr/lib/libpthread.so.20.1
-./usr/lib/libradius.so.1.0
-./usr/lib/libreadline.so.4.0
-./usr/lib/librpcsvc.so.2.0
-./usr/lib/libskey.so.6.0
-./usr/lib/libsndio.so.6.0
-./usr/lib/libsqlite3.so.31.0
-./usr/lib/libssl.so.37.1
-./usr/lib/libstdc++.so.57.0
-./usr/lib/libtermcap.so.14.0
-./usr/lib/libtermlib.so.14.0
-./usr/lib/libtls.so.9.1
-./usr/lib/libusbhid.so.7.0
-./usr/lib/libutil.so.12.1
-./usr/lib/libz.so.5.0
-./usr/libdata/perl5/m88k-openbsd
-./usr/libdata/perl5/m88k-openbsd/5.20.2
-./usr/libdata/perl5/m88k-openbsd/5.20.2/.packlist
-./usr/libdata/perl5/m88k-openbsd/5.20.2/B
-./usr/libdata/perl5/m88k-openbsd/5.20.2/B.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/B/Concise.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/B/Showlex.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/B/Terse.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/B/Xref.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/EXTERN.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/INTERN.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/XSUB.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/av.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/bitcount.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/charclass_invlists.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/config.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/cop.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/cv.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/dosish.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/embed.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/embedvar.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/fakesdio.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/feature.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/form.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/git_version.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/gv.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/handy.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/hv.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/hv_func.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/inline.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/intrpvar.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/iperlsys.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/keywords.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/l1_char_class_tab.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/malloc_ctl.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/metaconfig.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/mg.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/mg_data.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/mg_raw.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/mg_vtable.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/mydtrace.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/nostdio.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/op.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/op_reg_common.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/opcode.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/opnames.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/overload.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/pad.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/parser.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/patchlevel.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/perl.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/perlapi.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/perlio.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/perliol.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/perlsdio.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/perlvars.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/perly.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/pp.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/pp_proto.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/proto.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/reentr.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/regcharclass.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/regcomp.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/regexp.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/regnodes.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/scope.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/sv.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/thread.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/time64.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/time64_config.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/uconfig.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/unicode_constants.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/unixish.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/utf8.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/utfebcdic.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/util.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/uudmap.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/vutil.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/vxs.inc
-./usr/libdata/perl5/m88k-openbsd/5.20.2/CORE/warnings.h
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Compress
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Compress/Raw
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Compress/Raw/Bzip2.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Compress/Raw/Zlib.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Compress/Zlib.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Config.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Config.pod
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Config_git.pl
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Config_heavy.pl
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Cwd.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/DB_File.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Data
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Data/Dumper.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Devel
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Devel/PPPort.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Devel/Peek.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Digest
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Digest/MD5.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Digest/SHA.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/DynaLoader.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/Alias.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/Byte.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/CJKConstants.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/CN
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/CN.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/CN/HZ.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/Config.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/EBCDIC.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/Encoder.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/Encoding.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/GSM0338.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/Guess.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/JP
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/JP.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/JP/H2Z.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/JP/JIS7.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/KR
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/KR.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/KR/2022_KR.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/MIME
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/MIME/Header
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/MIME/Header.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/MIME/Header/ISO_2022_JP.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/MIME/Name.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/Symbol.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/TW.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/Unicode
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/Unicode.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Encode/Unicode/UTF7.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Errno.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Fcntl.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/File
-./usr/libdata/perl5/m88k-openbsd/5.20.2/File/DosGlob.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/File/Glob.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/File/GlobMapper.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/File/Spec
-./usr/libdata/perl5/m88k-openbsd/5.20.2/File/Spec.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/File/Spec/Cygwin.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/File/Spec/Epoc.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/File/Spec/Functions.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/File/Spec/Mac.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/File/Spec/OS2.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/File/Spec/Unix.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/File/Spec/VMS.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/File/Spec/Win32.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Filter
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Filter/Util
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Filter/Util/Call.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Hash
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Hash/Util
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Hash/Util.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Hash/Util/FieldHash.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/I18N
-./usr/libdata/perl5/m88k-openbsd/5.20.2/I18N/Langinfo.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Adapter
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Adapter/Bzip2.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Adapter/Deflate.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Adapter/Identity.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Base
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Base.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Base/Common.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Bzip2.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Deflate.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Gzip
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Gzip.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Gzip/Constants.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/RawDeflate.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Zip
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Zip.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Zip/Constants.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Zlib
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Zlib/Constants.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Compress/Zlib/Extra.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Dir.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/File.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Handle.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Pipe.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Poll.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Seekable.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Select.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Socket
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Socket.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Socket/INET.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Socket/UNIX.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Uncompress
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Uncompress/Adapter
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Uncompress/Adapter/Bunzip2.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Uncompress/Adapter/Identity.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Uncompress/Adapter/Inflate.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Uncompress/AnyInflate.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Uncompress/AnyUncompress.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Uncompress/Base.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Uncompress/Bunzip2.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Uncompress/Gunzip.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Uncompress/Inflate.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Uncompress/RawInflate.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IO/Uncompress/Unzip.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IPC
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IPC/Msg.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IPC/Semaphore.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IPC/SharedMem.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/IPC/SysV.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/List
-./usr/libdata/perl5/m88k-openbsd/5.20.2/List/Util
-./usr/libdata/perl5/m88k-openbsd/5.20.2/List/Util.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/List/Util/XS.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/MIME
-./usr/libdata/perl5/m88k-openbsd/5.20.2/MIME/Base64.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/MIME/QuotedPrint.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Math
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Math/BigInt
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Math/BigInt/FastCalc.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/NDBM_File.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/O.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/ODBM_File.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Opcode.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/OpenBSD
-./usr/libdata/perl5/m88k-openbsd/5.20.2/OpenBSD/MkTemp.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/POSIX.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/POSIX.pod
-./usr/libdata/perl5/m88k-openbsd/5.20.2/PerlIO
-./usr/libdata/perl5/m88k-openbsd/5.20.2/PerlIO/encoding.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/PerlIO/mmap.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/PerlIO/scalar.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/PerlIO/via.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/SDBM_File.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Scalar
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Scalar/Util.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Socket.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Storable.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Sys
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Sys/Hostname.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Sys/Syslog.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Tie
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Tie/Hash
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Tie/Hash/NamedCapture.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Time
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Time/HiRes.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Time/Piece.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Time/Seconds.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Unicode
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Unicode/Collate
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Unicode/Collate.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Unicode/Collate/Locale.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/Unicode/Normalize.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/arybase.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/attributes.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/B
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/B/B.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Compress
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Compress/Raw
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Compress/Raw/Bzip2
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Compress/Raw/Bzip2/Bzip2.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Compress/Raw/Zlib
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Compress/Raw/Zlib/Zlib.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Cwd
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Cwd/Cwd.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/DB_File
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/DB_File/DB_File.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Data
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Data/Dumper
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Data/Dumper/Dumper.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Devel
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Devel/PPPort
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Devel/PPPort/PPPort.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Devel/Peek
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Devel/Peek/Peek.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Digest
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Digest/MD5
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Digest/MD5/MD5.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Digest/SHA
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Digest/SHA/SHA.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/Byte
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/Byte/Byte.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/CN
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/CN/CN.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/EBCDIC
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/EBCDIC/EBCDIC.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/Encode.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/JP
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/JP/JP.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/KR
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/KR/KR.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/Symbol
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/Symbol/Symbol.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/TW
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/TW/TW.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/Unicode
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Encode/Unicode/Unicode.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Fcntl
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Fcntl/Fcntl.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/File
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/File/DosGlob
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/File/DosGlob/DosGlob.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/File/Glob
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/File/Glob/Glob.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Filter
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Filter/Util
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Filter/Util/Call
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Filter/Util/Call/Call.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Hash
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Hash/Util
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Hash/Util/FieldHash
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Hash/Util/FieldHash/FieldHash.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Hash/Util/Util.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/I18N
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/I18N/Langinfo
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/I18N/Langinfo/Langinfo.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/IO
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/IO/IO.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/IPC
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/IPC/SysV
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/IPC/SysV/SysV.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/List
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/List/Util
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/List/Util/Util.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/MIME
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/MIME/Base64
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/MIME/Base64/Base64.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Math
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Math/BigInt
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Math/BigInt/FastCalc
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Math/BigInt/FastCalc/FastCalc.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/NDBM_File
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/NDBM_File/NDBM_File.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/ODBM_File
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/ODBM_File/ODBM_File.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Opcode
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Opcode/Opcode.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/OpenBSD
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/OpenBSD/MkTemp
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/OpenBSD/MkTemp/MkTemp.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/POSIX
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/POSIX/POSIX.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/PerlIO
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/PerlIO/encoding
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/PerlIO/encoding/encoding.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/PerlIO/mmap
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/PerlIO/mmap/mmap.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/PerlIO/scalar
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/PerlIO/scalar/scalar.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/PerlIO/via
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/PerlIO/via/via.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/SDBM_File
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/SDBM_File/SDBM_File.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Socket
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Socket/Socket.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Storable
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Storable/Storable.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Sys
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Sys/Hostname
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Sys/Hostname/Hostname.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Sys/Syslog
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Sys/Syslog/Syslog.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Tie
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Tie/Hash
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Tie/Hash/NamedCapture
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Tie/Hash/NamedCapture/NamedCapture.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Time
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Time/HiRes
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Time/HiRes/HiRes.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Time/Piece
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Time/Piece/Piece.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Unicode
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Unicode/Collate
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Unicode/Collate/Collate.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Unicode/Normalize
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/Unicode/Normalize/Normalize.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/arybase
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/arybase/arybase.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/attributes
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/attributes/attributes.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/mro
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/mro/mro.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/re
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/re/re.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/sdbm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/sdbm/extralibs.ld
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/threads
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/threads/shared
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/threads/shared/shared.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/auto/threads/threads.so
-./usr/libdata/perl5/m88k-openbsd/5.20.2/encoding.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/lib.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/mro.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/ops.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/re.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/threads
-./usr/libdata/perl5/m88k-openbsd/5.20.2/threads.pm
-./usr/libdata/perl5/m88k-openbsd/5.20.2/threads/shared.pm
-./usr/libdata/perl5/site_perl/m88k-openbsd
-./usr/libdata/perl5/site_perl/m88k-openbsd/_h2ph_pre.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/a.out.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/arpa
-./usr/libdata/perl5/site_perl/m88k-openbsd/arpa/ftp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/arpa/inet.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/arpa/nameser.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/arpa/telnet.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/arpa/tftp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/asr.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/assert.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/_float.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/_types.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/asm.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/asm_macro.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/atomic.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/autoconf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/av400.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/av530.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/avcommon.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/board.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/bus.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/cdefs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/cmmu.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/conf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/cpu.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/db_machdep.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/disklabel.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/endian.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/exec.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/fenv.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/fpu.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/frame.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/ieee.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/ieeefp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/intr.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/kcore.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/limits.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/loadfile_machdep.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/lock.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/m88100.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/m8820x.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/mioctl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/mmu.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/mplock.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/mutex.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/param.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/pcb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/pmap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/pmap_table.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/proc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/profile.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/prom.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/psl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/ptrace.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/reloc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/setjmp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/signal.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/spinlock.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/stdarg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/tcb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/trap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/varargs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/aviion/vmparam.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/bitstring.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/blf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/bsd_auth.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/complex.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/cpio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/arc4.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/blf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/cast.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/castsb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/chacha_private.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/chachapoly.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/cmac.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/cryptodev.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/cryptosoft.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/des_locl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/gmac.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/hmac.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/idgen.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/key_wrap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/md5.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/michael.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/podd.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/poly1305.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/rijndael.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/rmd160.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/sha1.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/sha2.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/siphash.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/sk.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/spr.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/crypto/xform.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ctype.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/curses.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/db.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dbm.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ddb
-./usr/libdata/perl5/site_perl/m88k-openbsd/ddb/db_access.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ddb/db_break.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ddb/db_command.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ddb/db_dwarf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ddb/db_extern.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ddb/db_interface.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ddb/db_lex.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ddb/db_output.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ddb/db_run.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ddb/db_sym.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ddb/db_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ddb/db_variables.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ddb/db_watch.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/acpi
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/acpi/acpidebug.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/acpi/acpidev.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/acpi/acpireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/acpi/acpivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/acpi/amltypes.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/acpi/dsdt.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/adb
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/adb/adb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/adb/akbdmap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/adb/akbdvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/adb/amsvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/adb/keyboard.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ata
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ata/atareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ata/atascsi.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ata/atavar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ata/pmreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ata/satareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ata/wdvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/audio_if.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/biovar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/cardbus
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/cardbus/cardbus_exrom.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/cardbus/cardbusvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/cardbus/cardslotvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/cardbus/rbus.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/clock_subr.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/cons.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/dec
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/dec/clockvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/dec/mcclockvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/eisa
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/eisa/eisadevs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/eisa/eisadevs_data.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/eisa/eisareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/eisa/eisavar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/flashvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/gpio
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/gpio/gpiovar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/hil
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/hil/hildevs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/hil/hildevs_data.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/hil/hilkbdmap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/hil/hilreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/hil/hilvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/i2c
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/i2c/i2c_bitbang.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/i2c/i2c_io.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/i2c/i2cvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/i2c/wm8750reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/aac_tables.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/aacreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/aacvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ac97.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/acxreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/acxvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ad1843reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ad1848reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/adv.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/advlib.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/adw.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/adwlib.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ahcireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ahcivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/aic6250reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/aic6250var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/aic6360reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/aic6360var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/aic6915.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/aic79xx.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/aic79xx_inline.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/aic79xx_openbsd.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/aic7xxx_cam.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/aic7xxx_inline.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/aic7xxx_openbsd.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/aic7xxxvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/am7930reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/am7930var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/am79900reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/am79900var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/am7990reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/am7990var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/amireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/amivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/anreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/anvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/apcdmareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ar5008reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ar5210reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ar5210var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ar5211reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ar5211var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ar5212reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ar5212var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ar5416reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ar5xxx.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ar9003reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ar9280reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ar9285reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ar9287reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ar9380reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/arcofivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/athnreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/athnvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/athvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/atwreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/atwvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/atxxreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ax88190reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ax88190var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/bhareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/bhavar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/bt458reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/bt463reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/bt463var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/bt485reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/bt485var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/bt8xx.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/bwireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/bwivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/cacreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/cacvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/cd1190reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/cd1400reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/cissreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/cissvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/comreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/comvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/cs4231reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/cyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/dc21040reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/dc503reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/dcreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/dl10019reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/dl10019var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/dp8390reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/dp8390var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/dp8573areg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/dptreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/dptvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ds1286reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ds1687reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/elink3reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/elink3var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/espreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/fxpreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/fxpvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/gdtreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/gdtvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/gemreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/gemvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/hayespreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/hmereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/hmevar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/i8042reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/i82365reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/i82365var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/i8237reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/i8253reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/i82586reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/i82595reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/i82596reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/i82596var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/i8259reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/i82802reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/i82810reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ibm525reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ibm561reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ibm561var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ics2101reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/if_wi_hostap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/if_wi_ieee.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/if_wireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/if_wivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/iha.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/intersil7170.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/lancereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/lancevar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/lemacreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/lemacvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/lm700x.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/lm78var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/lptreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/lptvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/lsi64854reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/lsi64854var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/m41t8xreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/malo.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/max2820reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/mc146818reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/mc6845.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/mc6845reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/mc68681reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/mc68681var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/mfireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/mfivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/mk48txxreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/monitors.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/mpireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/mpivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/mpuvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/mtd8xxreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/mtd8xxvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ncr5380reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ncr5380var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ncr53c9xreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ncr53c9xvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ne2000reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ne2000var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/nec765reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ns16450reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ns16550reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/nvmereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/nvmevar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/oosiopreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/oosiopvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/osiopreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/osiopvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/p9000.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/pcdisplay.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/pcdisplayvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/pcf8584var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/pckbcvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/pgtreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/pgtvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/pt2254a.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/qlareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/qlavar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/qlwreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/qlwvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/ramdac.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/revar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/rf3000reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/rt2560reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/rt2560var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/rt2661reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/rt2661var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/rt2860reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/rt2860var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/rtl80x9reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/rtl80x9var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/rtl81x9reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/rtl8225reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/rtsxreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/rtsxvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/rtwreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/rtwvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/s3_617.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/sa2400reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/seeq8003reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/si4136reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/silireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/silivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/siopreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/siopvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/siopvar_common.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/slireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/slivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/smc83c170reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/smc83c170var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/smc91cxxreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/smc91cxxvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/smc93cx6var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/stireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/stivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/tc921x.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/tcic2reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/tcic2var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/tea5757.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/tireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/tivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/trm.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/twereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/twevar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/uhareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/uhavar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/vgareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/vgavar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/w83l518d_sdmmc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/w83l518dreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/w83l518dvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/wd33c93reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/wd33c93var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/wdcevent.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/wdcreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/wdcvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/xlreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/z8530reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/z8530sc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ic/z8536reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ipmivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/ad1848var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/ahareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/cs4231var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/elink.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/essreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/essvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/fdlink.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/fdreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/gscsioreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/gusreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/gusvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/i82365_isavar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/ics2101var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/if_ecreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/if_egreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/if_elreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/if_exreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/if_ie507.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/if_ieatt.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/if_iee16.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/if_levar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/if_wereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/isadmareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/isadmavar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/isapnpreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/isareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/isavar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/itvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/madreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/pasreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/pcdisplayvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/pcppireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/pcppivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/pnpdevs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/rtreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/rtvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/sbdspvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/sbreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/sbvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/spkrio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/vga_isavar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/viasioreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/wbsioreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/wdsreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/wssreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/wssvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/isa/ymvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/midi_if.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/midivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/acphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/amphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/bmtphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/brgphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/ciphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/eephyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/icsphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/inphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/iophyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/ipgphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/jmphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/lxtphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/mii.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/mii_bitbang.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/miidevs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/miivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/mtdphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/nsgphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/nsphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/nsphyterreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/qsphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/rgephyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/sqphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/tlphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/tlphyvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/tqphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/txphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/urlphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mii/xmphyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/mulaw.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ofw
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ofw/ofw_pci.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/ofw/openfirm.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/onewire
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/onewire/onewiredevs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/onewire/onewiredevs_data.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/onewire/onewirereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/onewire/onewirevar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/agpreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/agpvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/amas.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/auacerreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/auixpreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/auixpvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/autrireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/autrivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/auviavar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/azalia.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/bktr
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/bktr/bktr_audio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/bktr/bktr_card.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/bktr/bktr_core.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/bktr/bktr_os.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/bktr/bktr_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/bktr/bktr_tuner.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/bt8370reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/cmpcireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/cmpcivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/cs4280reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/cs4281reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/cy82c693reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/cy82c693var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/czreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/eapreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/emuxkireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/emuxkivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/envyreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/envyvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/esareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/esavar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/esoreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/esovar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/fmsreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/fmsvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/gcu_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/gcu_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/glxreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/glxvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/hifn7751reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/hifn7751var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/i82365_pcivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/ichreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_agereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_alcreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_alereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_bcereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_bgereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_bnxreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_casreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_casvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_devar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_em.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_em_hw.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_em_osdep.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_em_soc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_etreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_ipwreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_ipwvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_iwireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_iwivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_iwmreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_iwmvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_iwnreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_iwnvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_ix.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_ixgb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_ixgb_osdep.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_jmereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_jmevar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_lgereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_liireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_mskvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_myxreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_nfereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_nfevar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_ngereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_ocereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_rtwnreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_sereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_sisreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_skreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_skvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_stereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_stgereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_tlreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_txpreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_vgereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_vgevar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_vmxreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_vrreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_vtereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_wbreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_wpireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_wpivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/if_xgereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/ixgb_ee.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/ixgb_hw.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/ixgb_ids.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/ixgbe.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/ixgbe_type.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/mpiireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/neoreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pccbbreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pccbbvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pcidevs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pcidevs_data.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_acard_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_acer_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_amd_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_apollo_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_cmd_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_cy693_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_hpt_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_i31244_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_ite_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_ixp_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_jmicron_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_natsemi_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_nforce_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_opti_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_pdc202xx_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_piix_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_rdc_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_sii3112_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_sis_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciide_svwsata_reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciidereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pciidevar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pcireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pcivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pcscpreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/piixreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/plx9060reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/plx9060var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/ppbreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/pucvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/qlereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/safereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/safevar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/siop_pci_common.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/tgareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/tgavar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/ubsecreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/ubsecvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/vga_pcivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/vioblkreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/vioscsireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/virtioreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/virtiovar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/ydsreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pci/ydsvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pckbc
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pckbc/pckbdreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pckbc/pckbdvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pckbc/pmsreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pckbc/wskbdmap_mfii.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pcmcia
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pcmcia/cfxgareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pcmcia/gprio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pcmcia/if_cnwreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pcmcia/if_maloreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pcmcia/if_malovar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pcmcia/if_xereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pcmcia/pcmciachip.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pcmcia/pcmciadevs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pcmcia/pcmciareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pcmcia/pcmciavar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pv
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pv/pvreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/pv/pvvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/radio_if.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/radiovar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/rasops
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/rasops/rasops.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/rasops/rasops_bitops.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/rasops/rasops_masks.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/rndvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/asioreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/bereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/bppreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/cgsixreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/cgtwelvereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/cs4231var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/lebuffervar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/magmareg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/qecreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/qecvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/qereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/sbusvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/spifreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/spifvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/stp4020reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/stp4020var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/uperf_sbusreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/xboxreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/xboxvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sbus/zxreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sdmmc
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sdmmc/sdhcreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sdmmc/sdhcvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sdmmc/sdmmc_ioreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sdmmc/sdmmc_scsi.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sdmmc/sdmmcchip.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sdmmc/sdmmcdevs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sdmmc/sdmmcreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sdmmc/sdmmcvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/softraidvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/spdmemvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sun
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sun/disklabel.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sun/sunkbdreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sun/sunkbdvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sun/sunmsvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/sun/uperfio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/systrace.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/tc
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/tc/ascvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/tc/if_levar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/tc/ioasicreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/tc/ioasicvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/tc/tcdevs_data.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/tc/tcdsreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/tc/tcdsvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/tc/tcreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/tc/tcvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/dwc2
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/dwc2/dwc2.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/dwc2/dwc2_core.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/dwc2/dwc2_hcd.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/dwc2/dwc2_hw.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/dwc2/dwc2var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/ehcireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/ehcivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/hid.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/hidkbdsc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/hidkbdvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/hidmsvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_athn_usb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_atureg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_auereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_axenreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_axereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_cdcereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_cuereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_kuereg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_kuevar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_mosreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_otusreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_ralreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_ralvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_rsureg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_rumreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_rumvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_runvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_smscreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_uathreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_uathvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_udavreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_upgtvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_urlreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_urndisreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_urtwnreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_urtwreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_wi_usb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/if_zydreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/ohcireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/ohcivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/uaudioreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/ucomvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/udl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/udlio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/uftdireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/uhcireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/uhcivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/uhid_rdesc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/uhidev.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/ukbdvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/umass_quirks.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/umass_scsi.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/umassvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/umcs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/umct.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/umidi_quirks.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/umidireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/umidivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/uoak.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/uowreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/usb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/usb_mem.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/usb_quirks.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/usbcdc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/usbdevs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/usbdevs_data.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/usbdi.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/usbdi_util.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/usbdivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/usbf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/usbfvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/usbhid.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/uslhcomreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/uvideo.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/xhcireg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/usb/xhcivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/video_if.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/videomode
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/videomode/ediddevs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/videomode/ediddevs_data.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/videomode/edidreg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/videomode/edidvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/videomode/vesagtf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/videomode/videomode.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/videovar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/vndioctl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/vscsivar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/ascii.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/unicode.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/wscons_callbacks.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/wscons_features.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/wsconsio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/wsdisplay_usl_io.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/wsdisplayvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/wsemul_vt100var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/wsemulvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/wseventvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/wskbdraw.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/wskbdvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/wsksymdef.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/wsksymvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/wsmoused.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/wsmousevar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wscons/wsmuxvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wsfont
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wsfont/bold8x16-iso1.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wsfont/bold8x16.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wsfont/gallant12x22.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wsfont/lucida16x29.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wsfont/omron12x20.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wsfont/qvss8x15.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wsfont/sony12x24.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wsfont/sony8x16.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wsfont/vt220l8x10.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wsfont/vt220l8x8.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/wsfont/wsfont.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/x86emu
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/x86emu/x86emu.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dev/x86emu/x86emu_regs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dirent.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/disktab.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/dlfcn.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/elf_abi.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/endian.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/err.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/errno.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/eti.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/event.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/evutil.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/expat.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/expat_external.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/fcntl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/fenv.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/float.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/fnmatch.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/form.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/frame.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/fstab.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/fts.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ftw.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/fuse.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/fuse_opt.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/FlexLexer.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/algo.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/algobase.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/alloc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/backward_warning.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/bvector.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/complex.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/defalloc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/deque.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/fstream.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/function.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/hash_map.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/hash_set.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/hashtable.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/heap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/iomanip.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/iostream.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/istream.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/iterator.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/list.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/map.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/multimap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/multiset.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/new.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/ostream.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/pair.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/queue.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/rope.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/set.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/slist.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/stack.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/stream.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/streambuf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/tempbuf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/tree.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/backward/vector.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/basic_ios.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/basic_string.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/boost_concept_check.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/char_traits.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/codecvt.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/concept_check.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/cpp_type_traits.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/fpos.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/functexcept.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/gslice.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/gslice_array.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/indirect_array.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/ios_base.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/locale_classes.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/locale_facets.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/localefwd.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/mask_array.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/pthread_allocimpl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/slice_array.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_algo.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_algobase.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_alloc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_bvector.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_construct.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_deque.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_function.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_heap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_iterator.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_iterator_base_funcs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_iterator_base_types.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_list.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_map.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_multimap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_multiset.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_numeric.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_pair.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_pthread_alloc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_queue.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_raw_storage_iter.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_relops.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_set.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_stack.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_tempbuf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_threads.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_tree.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_uninitialized.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stl_vector.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stream_iterator.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/streambuf_iterator.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/stringfwd.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/type_traits.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/valarray_array.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/bits/valarray_meta.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/cxxabi.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/exception_defines.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/ext
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/ext/enc_filebuf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/ext/ropeimpl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/ext/stdio_filebuf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/ext/stl_hash_fun.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/ext/stl_hashtable.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/ext/stl_rope.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/atomicity.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/basic_file.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/c++config.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/c++io.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/c++locale.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/codecvt_specializations.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/ctype_base.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/ctype_inline.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/ctype_noninline.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/gthr-default.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/gthr-posix.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/gthr-single.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/gthr.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/messages_members.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/os_defines.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/g++/m88k-unknown-openbsd5.8/bits/time_members.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/getopt.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/glob.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/grp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/histedit.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/icdb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ieeefp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ifaddrs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/imsg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/inttypes.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/iso646.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/isofs
-./usr/libdata/perl5/site_perl/m88k-openbsd/isofs/cd9660
-./usr/libdata/perl5/site_perl/m88k-openbsd/isofs/cd9660/cd9660_extern.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/isofs/cd9660/cd9660_node.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/isofs/cd9660/cd9660_rrip.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/isofs/cd9660/iso.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/isofs/cd9660/iso_rrip.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/isofs/udf
-./usr/libdata/perl5/site_perl/m88k-openbsd/isofs/udf/ecma167-udf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/isofs/udf/udf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/isofs/udf/udf_extern.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/keynote.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/kvm.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/langinfo.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/libgen.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/limits.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/link.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/link_elf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/locale.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/login_cap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/_float.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/_types.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/asm.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/asm_macro.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/atomic.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/cdefs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/cmmu.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/cpu.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/db_machdep.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/endian.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/exec.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/fenv.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/fpu.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/frame.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/ieee.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/ieeefp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/intr.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/kcore.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/limits.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/lock.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/m88100.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/m8820x.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/mmu.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/mplock.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/mutex.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/param.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/pcb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/pmap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/pmap_table.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/proc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/profile.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/psl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/ptrace.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/reg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/reloc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/setjmp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/signal.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/spinlock.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/stdarg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/tcb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/trap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/varargs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/m88k/vmparam.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/machine
-./usr/libdata/perl5/site_perl/m88k-openbsd/malloc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/math.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/md5.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/memory.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/menu.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/miscfs
-./usr/libdata/perl5/site_perl/m88k-openbsd/miscfs/fifofs
-./usr/libdata/perl5/site_perl/m88k-openbsd/miscfs/fifofs/fifo.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/miscfs/fuse
-./usr/libdata/perl5/site_perl/m88k-openbsd/miscfs/fuse/fusefs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/miscfs/fuse/fusefs_node.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/msdosfs
-./usr/libdata/perl5/site_perl/m88k-openbsd/msdosfs/bootsect.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/msdosfs/bpb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/msdosfs/denode.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/msdosfs/direntry.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/msdosfs/fat.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/msdosfs/msdosfsmount.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ncurses.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ndbm.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/art.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/bpf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/bpfdesc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/ethertypes.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/hfsc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_arp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_bridge.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_dl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_enc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_gif.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_gre.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_llc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_media.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_pflog.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_pflow.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_pfsync.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_ppp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_pppoe.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_pppvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_sppp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_trunk.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_tun.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_types.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_vlan_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/if_vxlan.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/netisr.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/pfkeyv2.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/pfvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/pipex.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/pipex_local.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/ppp-comp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/ppp_defs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/radix.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/radix_mpath.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/raw_cb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/route.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/rtable.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/slcompress.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/slip.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net/trunklacp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net80211
-./usr/libdata/perl5/site_perl/m88k-openbsd/net80211/ieee80211.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net80211/ieee80211_amrr.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net80211/ieee80211_crypto.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net80211/ieee80211_ioctl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net80211/ieee80211_node.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net80211/ieee80211_priv.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net80211/ieee80211_proto.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net80211/ieee80211_radiotap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net80211/ieee80211_regdomain.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net80211/ieee80211_rssadapt.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/net80211/ieee80211_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netdb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netgroup.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/icmp6.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/icmp_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/if_ether.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/igmp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/igmp_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/in.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/in_pcb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/in_systm.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/in_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/ip.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/ip6.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/ip_ah.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/ip_carp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/ip_divert.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/ip_ecn.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/ip_esp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/ip_ether.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/ip_gre.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/ip_icmp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/ip_ipcomp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/ip_ipip.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/ip_ipsp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/ip_mroute.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/ip_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/pim.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/pim_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/tcp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/tcp_debug.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/tcp_fsm.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/tcp_seq.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/tcp_timer.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/tcp_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/tcpip.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/udp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet/udp_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet6
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet6/in6.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet6/in6_ifattach.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet6/in6_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet6/ip6_divert.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet6/ip6_mroute.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet6/ip6_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet6/ip6protosw.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet6/mld6.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet6/mld6_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet6/nd6.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet6/pim6.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet6/pim6_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet6/raw_ip6.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netinet6/tcpipv6.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/netmpls
-./usr/libdata/perl5/site_perl/m88k-openbsd/netmpls/mpls.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/nfs
-./usr/libdata/perl5/site_perl/m88k-openbsd/nfs/krpc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/nfs/nfs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/nfs/nfs_var.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/nfs/nfsdiskless.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/nfs/nfsm_subs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/nfs/nfsmount.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/nfs/nfsnode.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/nfs/nfsproto.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/nfs/nfsrvcache.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/nfs/rpcv2.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/nfs/xdr_subs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/nl_types.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/nlist.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ntfs
-./usr/libdata/perl5/site_perl/m88k-openbsd/ntfs/ntfs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ntfs/ntfs_compr.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ntfs/ntfs_ihash.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ntfs/ntfs_inode.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ntfs/ntfs_subr.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ntfs/ntfs_vfsops.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ntfs/ntfsmount.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/objc
-./usr/libdata/perl5/site_perl/m88k-openbsd/objc/NXConstStr.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/objc/Object.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/objc/Protocol.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/objc/encoding.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/objc/hash.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/objc/objc-api.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/objc/objc-list.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/objc/objc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/objc/sarray.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/objc/thr.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/objc/typedstream.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ohash.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/aes.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/asn1.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/asn1_mac.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/asn1t.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/bio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/blowfish.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/bn.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/buffer.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/camellia.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/cast.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/chacha.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/cmac.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/cms.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/comp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/conf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/conf_api.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/crypto.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/des.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/dh.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/dsa.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/dso.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/dtls1.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/ec.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/ecdh.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/ecdsa.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/engine.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/err.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/evp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/gost.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/hmac.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/idea.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/krb5_asn.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/lhash.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/md4.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/md5.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/modes.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/obj_mac.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/objects.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/ocsp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/opensslconf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/opensslfeatures.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/opensslv.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/ossl_typ.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/pem.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/pem2.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/pkcs12.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/pkcs7.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/poly1305.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/rand.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/rc2.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/rc4.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/ripemd.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/rsa.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/safestack.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/sha.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/srtp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/ssl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/ssl2.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/ssl23.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/ssl3.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/stack.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/tls1.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/ts.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/txt_db.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/ui.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/ui_compat.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/whrlpool.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/x509.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/x509_vfy.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/openssl/x509v3.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/panel.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/paths.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/pcap-namedb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/pcap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/poll.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/protocols
-./usr/libdata/perl5/site_perl/m88k-openbsd/protocols/dumprestore.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/protocols/routed.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/protocols/rwhod.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/protocols/talkd.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/protocols/timed.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/pthread.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/pthread_np.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/pwd.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/radius.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ranlib.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/readline
-./usr/libdata/perl5/site_perl/m88k-openbsd/readline/chardefs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/readline/history.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/readline/keymaps.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/readline/readline.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/readline/rlconf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/readline/rlstdc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/readline/rltypedefs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/readline/tilde.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/readpassphrase.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/regex.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/resolv.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rmd160.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpc
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpc/auth.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpc/auth_unix.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpc/clnt.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpc/pmap_clnt.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpc/pmap_prot.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpc/pmap_rmt.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpc/rpc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpc/rpc_des.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpc/rpc_msg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpc/svc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpc/svc_auth.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpc/types.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpc/xdr.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/bootparam_prot.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/klm_prot.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/mount.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/nfs_prot.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/nlm_prot.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/rex.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/rnusers.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/rquota.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/rstat.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/rusers.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/rwall.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/sm_inter.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/spray.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/yp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/yp_prot.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/ypclnt.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/rpcsvc/yppasswd.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sched.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/scsi
-./usr/libdata/perl5/site_perl/m88k-openbsd/scsi/cd.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/scsi/iscsi.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/scsi/mpathvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/scsi/safte.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/scsi/scsi_all.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/scsi/scsi_changer.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/scsi/scsi_debug.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/scsi/scsi_disk.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/scsi/scsi_message.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/scsi/scsi_scanner.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/scsi/scsi_tape.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/scsi/scsiconf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/scsi/sdvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/scsi/ses.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/search.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/semaphore.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/setjmp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sha1.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sha2.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/signal.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/siphash.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/skey.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sndio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/soundcard.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/spawn.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sqlite3.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sqlite3ext.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ssl
-./usr/libdata/perl5/site_perl/m88k-openbsd/stdarg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/stdbool.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/stddef.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/stdint.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/stdio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/stdlib.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/string.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/strings.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/struct.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/_endian.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/_time.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/_types.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/acct.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/ataio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/atomic.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/audioio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/buf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/cdefs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/cdio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/chio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/conf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/core.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/device.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/dir.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/dirent.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/disk.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/disklabel.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/dkbad.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/dkio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/domain.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/endian.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/errno.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/evcount.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/event.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/eventvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/exec.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/exec_elf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/exec_script.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/extent.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/fcntl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/file.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/filedesc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/filio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/fusebuf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/gmon.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/gpio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/hibernate.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/hotplug.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/ioccom.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/ioctl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/ioctl_compat.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/ipc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/kcore.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/kernel.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/kgdb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/kthread.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/ktrace.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/limits.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/localedef.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/lock.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/lockf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/malloc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/mbuf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/memrange.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/mman.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/mount.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/mplock.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/msg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/msgbuf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/mtio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/mutex.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/namei.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/param.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/pciio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/pipe.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/pledge.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/poll.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/pool.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/proc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/protosw.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/ptrace.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/queue.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/radioio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/reboot.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/refcnt.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/resource.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/resourcevar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/rwlock.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/scanio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/sched.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/scsiio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/select.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/selinfo.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/sem.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/sensors.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/shm.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/siginfo.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/signal.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/signalvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/socket.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/socketvar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/sockio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/specdev.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/srp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/stat.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/statvfs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/stdarg.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/stdint.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/swap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/syscall.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/syscall_mi.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/syscallargs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/sysctl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/syslimits.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/syslog.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/systm.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/task.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/termios.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/time.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/timeout.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/times.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/timetc.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/tprintf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/tree.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/tty.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/ttycom.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/ttydefaults.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/types.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/ucred.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/uio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/un.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/unistd.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/unpcb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/user.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/utsname.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/uuid.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/varargs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/videoio.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/vmmeter.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/vnode.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sys/wait.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/sysexits.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/syslog.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/tar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/term.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/termcap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/termios.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/tgmath.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/time.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/tls.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ttyent.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ext2fs
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ext2fs/ext2fs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ext2fs/ext2fs_dinode.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ext2fs/ext2fs_dir.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ext2fs/ext2fs_extents.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ext2fs/ext2fs_extern.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ffs
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ffs/ffs_extern.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ffs/fs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ffs/softdep.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/mfs
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/mfs/mfs_extern.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/mfs/mfsnode.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ufs
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ufs/dinode.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ufs/dir.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ufs/dirhash.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ufs/inode.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ufs/quota.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ufs/ufs_extern.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/ufs/ufs/ufsmount.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/unctrl.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/unistd.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/unwind.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/usbhid.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/util.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/utime.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/utmp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uuid.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_addr.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_amap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_anon.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_aobj.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_ddb.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_device.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_extern.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_fault.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_glue.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_km.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_map.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_object.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_page.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_pager.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_param.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_pmap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_pmemrange.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_swap.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_swap_encrypt.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvm_vnode.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/uvm/uvmexp.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/varargs.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/vis.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/wchar.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/wctype.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/zconf.ph
-./usr/libdata/perl5/site_perl/m88k-openbsd/zlib.ph
-./usr/libexec/ld.so
-./usr/local/libdata/perl5/site_perl/m88k-openbsd
-./usr/mdec/a2coff
-./usr/mdec/boot
-./usr/mdec/installboot
-./usr/mdec/vdmtool
diff --git a/distrib/sets/lists/comp/md.aviion b/distrib/sets/lists/comp/md.aviion
deleted file mode 100644
index 4b0337a465c..00000000000
--- a/distrib/sets/lists/comp/md.aviion
+++ /dev/null
@@ -1,292 +0,0 @@
-./usr/bin/addr2line
-./usr/bin/gccbug
-./usr/bin/objcopy
-./usr/bin/protoize
-./usr/bin/readelf
-./usr/bin/unprotoize
-./usr/include/aviion
-./usr/include/aviion/_float.h
-./usr/include/aviion/_types.h
-./usr/include/aviion/asm.h
-./usr/include/aviion/asm_macro.h
-./usr/include/aviion/atomic.h
-./usr/include/aviion/autoconf.h
-./usr/include/aviion/av400.h
-./usr/include/aviion/av530.h
-./usr/include/aviion/avcommon.h
-./usr/include/aviion/board.h
-./usr/include/aviion/bus.h
-./usr/include/aviion/cdefs.h
-./usr/include/aviion/cmmu.h
-./usr/include/aviion/conf.h
-./usr/include/aviion/cpu.h
-./usr/include/aviion/db_machdep.h
-./usr/include/aviion/disklabel.h
-./usr/include/aviion/endian.h
-./usr/include/aviion/exec.h
-./usr/include/aviion/fenv.h
-./usr/include/aviion/fpu.h
-./usr/include/aviion/frame.h
-./usr/include/aviion/ieee.h
-./usr/include/aviion/ieeefp.h
-./usr/include/aviion/intr.h
-./usr/include/aviion/kcore.h
-./usr/include/aviion/limits.h
-./usr/include/aviion/loadfile_machdep.h
-./usr/include/aviion/lock.h
-./usr/include/aviion/m88100.h
-./usr/include/aviion/m8820x.h
-./usr/include/aviion/mioctl.h
-./usr/include/aviion/mmu.h
-./usr/include/aviion/mplock.h
-./usr/include/aviion/mutex.h
-./usr/include/aviion/param.h
-./usr/include/aviion/pcb.h
-./usr/include/aviion/pmap.h
-./usr/include/aviion/pmap_table.h
-./usr/include/aviion/proc.h
-./usr/include/aviion/profile.h
-./usr/include/aviion/prom.h
-./usr/include/aviion/psl.h
-./usr/include/aviion/ptrace.h
-./usr/include/aviion/reg.h
-./usr/include/aviion/reloc.h
-./usr/include/aviion/setjmp.h
-./usr/include/aviion/signal.h
-./usr/include/aviion/spinlock.h
-./usr/include/aviion/stdarg.h
-./usr/include/aviion/tcb.h
-./usr/include/aviion/trap.h
-./usr/include/aviion/varargs.h
-./usr/include/aviion/vmparam.h
-./usr/include/g++/backward
-./usr/include/g++/backward/algo.h
-./usr/include/g++/backward/algobase.h
-./usr/include/g++/backward/alloc.h
-./usr/include/g++/backward/backward_warning.h
-./usr/include/g++/backward/bvector.h
-./usr/include/g++/backward/complex.h
-./usr/include/g++/backward/defalloc.h
-./usr/include/g++/backward/deque.h
-./usr/include/g++/backward/fstream.h
-./usr/include/g++/backward/function.h
-./usr/include/g++/backward/hash_map.h
-./usr/include/g++/backward/hash_set.h
-./usr/include/g++/backward/hashtable.h
-./usr/include/g++/backward/heap.h
-./usr/include/g++/backward/iomanip.h
-./usr/include/g++/backward/iostream.h
-./usr/include/g++/backward/istream.h
-./usr/include/g++/backward/iterator.h
-./usr/include/g++/backward/list.h
-./usr/include/g++/backward/map.h
-./usr/include/g++/backward/multimap.h
-./usr/include/g++/backward/multiset.h
-./usr/include/g++/backward/new.h
-./usr/include/g++/backward/ostream.h
-./usr/include/g++/backward/pair.h
-./usr/include/g++/backward/queue.h
-./usr/include/g++/backward/rope.h
-./usr/include/g++/backward/set.h
-./usr/include/g++/backward/slist.h
-./usr/include/g++/backward/stack.h
-./usr/include/g++/backward/stream.h
-./usr/include/g++/backward/streambuf.h
-./usr/include/g++/backward/strstream
-./usr/include/g++/backward/tempbuf.h
-./usr/include/g++/backward/tree.h
-./usr/include/g++/backward/vector.h
-./usr/include/g++/bits
-./usr/include/g++/bits/basic_ios.h
-./usr/include/g++/bits/basic_ios.tcc
-./usr/include/g++/bits/basic_string.h
-./usr/include/g++/bits/basic_string.tcc
-./usr/include/g++/bits/boost_concept_check.h
-./usr/include/g++/bits/char_traits.h
-./usr/include/g++/bits/cmath.tcc
-./usr/include/g++/bits/codecvt.h
-./usr/include/g++/bits/concept_check.h
-./usr/include/g++/bits/cpp_type_traits.h
-./usr/include/g++/bits/deque.tcc
-./usr/include/g++/bits/fpos.h
-./usr/include/g++/bits/fstream.tcc
-./usr/include/g++/bits/functexcept.h
-./usr/include/g++/bits/gslice.h
-./usr/include/g++/bits/gslice_array.h
-./usr/include/g++/bits/indirect_array.h
-./usr/include/g++/bits/ios_base.h
-./usr/include/g++/bits/istream.tcc
-./usr/include/g++/bits/list.tcc
-./usr/include/g++/bits/locale_classes.h
-./usr/include/g++/bits/locale_facets.h
-./usr/include/g++/bits/locale_facets.tcc
-./usr/include/g++/bits/localefwd.h
-./usr/include/g++/bits/mask_array.h
-./usr/include/g++/bits/ostream.tcc
-./usr/include/g++/bits/pthread_allocimpl.h
-./usr/include/g++/bits/slice_array.h
-./usr/include/g++/bits/sstream.tcc
-./usr/include/g++/bits/stl_algo.h
-./usr/include/g++/bits/stl_algobase.h
-./usr/include/g++/bits/stl_alloc.h
-./usr/include/g++/bits/stl_bvector.h
-./usr/include/g++/bits/stl_construct.h
-./usr/include/g++/bits/stl_deque.h
-./usr/include/g++/bits/stl_function.h
-./usr/include/g++/bits/stl_heap.h
-./usr/include/g++/bits/stl_iterator.h
-./usr/include/g++/bits/stl_iterator_base_funcs.h
-./usr/include/g++/bits/stl_iterator_base_types.h
-./usr/include/g++/bits/stl_list.h
-./usr/include/g++/bits/stl_map.h
-./usr/include/g++/bits/stl_multimap.h
-./usr/include/g++/bits/stl_multiset.h
-./usr/include/g++/bits/stl_numeric.h
-./usr/include/g++/bits/stl_pair.h
-./usr/include/g++/bits/stl_pthread_alloc.h
-./usr/include/g++/bits/stl_queue.h
-./usr/include/g++/bits/stl_raw_storage_iter.h
-./usr/include/g++/bits/stl_relops.h
-./usr/include/g++/bits/stl_set.h
-./usr/include/g++/bits/stl_stack.h
-./usr/include/g++/bits/stl_tempbuf.h
-./usr/include/g++/bits/stl_threads.h
-./usr/include/g++/bits/stl_tree.h
-./usr/include/g++/bits/stl_uninitialized.h
-./usr/include/g++/bits/stl_vector.h
-./usr/include/g++/bits/stream_iterator.h
-./usr/include/g++/bits/streambuf.tcc
-./usr/include/g++/bits/streambuf_iterator.h
-./usr/include/g++/bits/stringfwd.h
-./usr/include/g++/bits/type_traits.h
-./usr/include/g++/bits/valarray_array.h
-./usr/include/g++/bits/valarray_array.tcc
-./usr/include/g++/bits/valarray_meta.h
-./usr/include/g++/bits/vector.tcc
-./usr/include/g++/cxxabi.h
-./usr/include/g++/exception_defines.h
-./usr/include/g++/ext
-./usr/include/g++/ext/algorithm
-./usr/include/g++/ext/enc_filebuf.h
-./usr/include/g++/ext/functional
-./usr/include/g++/ext/hash_map
-./usr/include/g++/ext/hash_set
-./usr/include/g++/ext/iterator
-./usr/include/g++/ext/memory
-./usr/include/g++/ext/numeric
-./usr/include/g++/ext/rb_tree
-./usr/include/g++/ext/rope
-./usr/include/g++/ext/ropeimpl.h
-./usr/include/g++/ext/slist
-./usr/include/g++/ext/stdio_filebuf.h
-./usr/include/g++/ext/stl_hash_fun.h
-./usr/include/g++/ext/stl_hashtable.h
-./usr/include/g++/ext/stl_rope.h
-./usr/include/g++/ios
-./usr/include/g++/istream
-./usr/include/g++/limits
-./usr/include/g++/locale
-./usr/include/g++/m88k-unknown-openbsd5.8
-./usr/include/g++/m88k-unknown-openbsd5.8/bits
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/atomicity.h
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/basic_file.h
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/c++config.h
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/c++io.h
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/c++locale.h
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/codecvt_specializations.h
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/ctype_base.h
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/ctype_inline.h
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/ctype_noninline.h
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/gthr-default.h
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/gthr-posix.h
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/gthr-single.h
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/gthr.h
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/messages_members.h
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/os_defines.h
-./usr/include/g++/m88k-unknown-openbsd5.8/bits/time_members.h
-./usr/include/g++/ostream
-./usr/include/g++/streambuf
-./usr/include/ieeefp.h
-./usr/include/m88k
-./usr/include/m88k/_float.h
-./usr/include/m88k/_types.h
-./usr/include/m88k/asm.h
-./usr/include/m88k/asm_macro.h
-./usr/include/m88k/atomic.h
-./usr/include/m88k/cdefs.h
-./usr/include/m88k/cmmu.h
-./usr/include/m88k/cpu.h
-./usr/include/m88k/db_machdep.h
-./usr/include/m88k/endian.h
-./usr/include/m88k/exec.h
-./usr/include/m88k/fenv.h
-./usr/include/m88k/fpu.h
-./usr/include/m88k/frame.h
-./usr/include/m88k/ieee.h
-./usr/include/m88k/ieeefp.h
-./usr/include/m88k/intr.h
-./usr/include/m88k/kcore.h
-./usr/include/m88k/limits.h
-./usr/include/m88k/lock.h
-./usr/include/m88k/m88100.h
-./usr/include/m88k/m8820x.h
-./usr/include/m88k/mmu.h
-./usr/include/m88k/mplock.h
-./usr/include/m88k/mutex.h
-./usr/include/m88k/param.h
-./usr/include/m88k/pcb.h
-./usr/include/m88k/pmap.h
-./usr/include/m88k/pmap_table.h
-./usr/include/m88k/proc.h
-./usr/include/m88k/profile.h
-./usr/include/m88k/psl.h
-./usr/include/m88k/ptrace.h
-./usr/include/m88k/reg.h
-./usr/include/m88k/reloc.h
-./usr/include/m88k/setjmp.h
-./usr/include/m88k/signal.h
-./usr/include/m88k/spinlock.h
-./usr/include/m88k/stdarg.h
-./usr/include/m88k/tcb.h
-./usr/include/m88k/trap.h
-./usr/include/m88k/varargs.h
-./usr/include/m88k/vmparam.h
-./usr/include/unwind.h
-./usr/lib/crtbegin.o
-./usr/lib/crtbeginS.o
-./usr/lib/crtend.o
-./usr/lib/crtendS.o
-./usr/lib/gcc-lib/m88k-unknown-openbsd5.8
-./usr/lib/gcc-lib/m88k-unknown-openbsd5.8/3.3.6
-./usr/lib/gcc-lib/m88k-unknown-openbsd5.8/3.3.6/SYSCALLS.c.X
-./usr/lib/gcc-lib/m88k-unknown-openbsd5.8/3.3.6/cc1
-./usr/lib/gcc-lib/m88k-unknown-openbsd5.8/3.3.6/cc1obj
-./usr/lib/gcc-lib/m88k-unknown-openbsd5.8/3.3.6/cc1plus
-./usr/lib/gcc-lib/m88k-unknown-openbsd5.8/3.3.6/collect2
-./usr/lib/gcc-lib/m88k-unknown-openbsd5.8/3.3.6/fPIC
-./usr/lib/gcc-lib/m88k-unknown-openbsd5.8/3.3.6/fPIC/libgcc.a
-./usr/lib/gcc-lib/m88k-unknown-openbsd5.8/3.3.6/fpic
-./usr/lib/gcc-lib/m88k-unknown-openbsd5.8/3.3.6/fpic/libgcc.a
-./usr/lib/gcc-lib/m88k-unknown-openbsd5.8/3.3.6/include
-./usr/lib/gcc-lib/m88k-unknown-openbsd5.8/3.3.6/include/unwind.h
-./usr/lib/gcc-lib/m88k-unknown-openbsd5.8/3.3.6/libgcc.a
-./usr/lib/gcc-lib/m88k-unknown-openbsd5.8/3.3.6/specs
-./usr/lib/libsupc++.a
-./usr/libdata/ldscripts
-./usr/libdata/ldscripts/elf32m88k_obsd.x
-./usr/libdata/ldscripts/elf32m88k_obsd.xbn
-./usr/libdata/ldscripts/elf32m88k_obsd.xc
-./usr/libdata/ldscripts/elf32m88k_obsd.xd
-./usr/libdata/ldscripts/elf32m88k_obsd.xdc
-./usr/libdata/ldscripts/elf32m88k_obsd.xdcz
-./usr/libdata/ldscripts/elf32m88k_obsd.xdw
-./usr/libdata/ldscripts/elf32m88k_obsd.xdz
-./usr/libdata/ldscripts/elf32m88k_obsd.xn
-./usr/libdata/ldscripts/elf32m88k_obsd.xr
-./usr/libdata/ldscripts/elf32m88k_obsd.xs
-./usr/libdata/ldscripts/elf32m88k_obsd.xsc
-./usr/libdata/ldscripts/elf32m88k_obsd.xsw
-./usr/libdata/ldscripts/elf32m88k_obsd.xu
-./usr/libdata/ldscripts/elf32m88k_obsd.xw
-./usr/libdata/ldscripts/elf32m88k_obsd.xz
-./usr/share/info/bfd.info
diff --git a/distrib/sets/lists/etc/md.aviion b/distrib/sets/lists/etc/md.aviion
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/distrib/sets/lists/etc/md.aviion
+++ /dev/null
diff --git a/distrib/sets/lists/game/md.aviion b/distrib/sets/lists/game/md.aviion
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/distrib/sets/lists/game/md.aviion
+++ /dev/null
diff --git a/distrib/sets/lists/man/md.aviion b/distrib/sets/lists/man/md.aviion
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/distrib/sets/lists/man/md.aviion
+++ /dev/null
diff --git a/distrib/sets/lists/man/mi b/distrib/sets/lists/man/mi
index 4e91045a5e7..a4999b65c6a 100644
--- a/distrib/sets/lists/man/mi
+++ b/distrib/sets/lists/man/mi
@@ -1267,17 +1267,6 @@
./usr/share/man/man4/auixp.4
./usr/share/man/man4/autri.4
./usr/share/man/man4/auvia.4
-./usr/share/man/man4/aviion
-./usr/share/man/man4/aviion/autoconf.4
-./usr/share/man/man4/aviion/dart.4
-./usr/share/man/man4/aviion/intro.4
-./usr/share/man/man4/aviion/kmem.4
-./usr/share/man/man4/aviion/le.4
-./usr/share/man/man4/aviion/mem.4
-./usr/share/man/man4/aviion/nvram.4
-./usr/share/man/man4/aviion/oaic.4
-./usr/share/man/man4/aviion/syscon.4
-./usr/share/man/man4/aviion/vme.4
./usr/share/man/man4/axe.4
./usr/share/man/man4/axen.4
./usr/share/man/man4/az.4
@@ -2336,11 +2325,6 @@
./usr/share/man/man8/authpf-noip.8
./usr/share/man/man8/authpf.8
./usr/share/man/man8/autoinstall.8
-./usr/share/man/man8/aviion
-./usr/share/man/man8/aviion/MAKEDEV.8
-./usr/share/man/man8/aviion/a2coff.8
-./usr/share/man/man8/aviion/installboot.8
-./usr/share/man/man8/aviion/vdmtool.8
./usr/share/man/man8/badsect.8
./usr/share/man/man8/bgpctl.8
./usr/share/man/man8/bgpd.8
diff --git a/distrib/special/installboot/Makefile b/distrib/special/installboot/Makefile
index d80c75e9439..e7300b3ec3e 100644
--- a/distrib/special/installboot/Makefile
+++ b/distrib/special/installboot/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.3 2014/03/18 22:36:28 miod Exp $
+# $OpenBSD: Makefile,v 1.4 2015/12/01 07:50:07 deraadt Exp $
.PATH: ${.CURDIR}/../../../usr.sbin/installboot
@@ -28,10 +28,6 @@ SRCS += stubs.c
SRCS += stubs.c
.endif
-.if ${MACHINE} == "aviion"
-SRCS += stubs.c
-.endif
-
.if ${MACHINE} == "hppa"
CFLAGS += -DBOOTSTRAP
SRCS += hppa_installboot.c
diff --git a/distrib/special/kbd/Makefile b/distrib/special/kbd/Makefile
index 7bb83db78cc..59eb2d8068c 100644
--- a/distrib/special/kbd/Makefile
+++ b/distrib/special/kbd/Makefile
@@ -1,13 +1,9 @@
-# $OpenBSD: Makefile,v 1.18 2014/03/18 22:36:29 miod Exp $
+# $OpenBSD: Makefile,v 1.19 2015/12/01 07:50:07 deraadt Exp $
-.if ${MACHINE} != "aviion"
PROG= kbd
SRCS= main.c kbd_wscons.c
CFLAGS+=-DNOKVM
.PATH: ${.CURDIR}/../../../sbin/kbd
-.else
-NOPROG= Yes
-.endif
.include <bsd.prog.mk>
diff --git a/etc/Makefile b/etc/Makefile
index 6f160a9f4d0..20e90b239da 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.415 2015/11/30 23:35:29 jturner Exp $
+# $OpenBSD: Makefile,v 1.416 2015/12/01 07:50:03 deraadt Exp $
TZDIR= /usr/share/zoneinfo
LOCALTIME= Canada/Mountain
@@ -40,10 +40,7 @@ MUTABLE=changelist csh.cshrc csh.login csh.logout daily \
EXAMPLES=chio.conf dhclient.conf dhcpd.conf exports \
httpd.conf ifstated.conf inetd.conf \
man.conf mixerctl.conf mrouted.conf \
- ntpd.conf printcap rbootd.conf remote sensorsd.conf
-.if ${MACHINE} != "aviion"
-EXAMPLES+= wsconsctl.conf
-.endif
+ ntpd.conf printcap rbootd.conf remote sensorsd.conf wsconsctl.conf
# -rw-------
EXAMPLES_600=bgpd.conf dvmrpd.conf eigrpd.conf hostapd.conf iked.conf \
@@ -273,7 +270,7 @@ distrib:
release allarchs kernels release-sets m4 install-mtree \
bootblocks ${ALL_KERNELS}
-SUBDIR+= etc.alpha etc.amd64 etc.armish etc.armv7 etc.aviion
+SUBDIR+= etc.alpha etc.amd64 etc.armish etc.armv7
SUBDIR+= etc.hppa etc.hppa64 etc.i386 etc.landisk etc.loongson etc.luna88k
SUBDIR+= etc.macppc etc.octeon
SUBDIR+= etc.sgi etc.socppc etc.sparc etc.sparc64 etc.vax etc.zaurus
diff --git a/etc/etc.aviion/MAKEDEV b/etc/etc.aviion/MAKEDEV
deleted file mode 100644
index a8d626f20a9..00000000000
--- a/etc/etc.aviion/MAKEDEV
+++ /dev/null
@@ -1,372 +0,0 @@
-#!/bin/sh -
-#
-# THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
-# generated from:
-#
-# OpenBSD: etc.aviion/MAKEDEV.md,v 1.21 2015/10/23 15:14:11 claudio Exp
-# OpenBSD: MAKEDEV.common,v 1.81 2015/11/10 21:49:18 sthen Exp
-# OpenBSD: MAKEDEV.mi,v 1.81 2012/11/05 08:07:09 jasper Exp
-# OpenBSD: MAKEDEV.sub,v 1.14 2005/02/07 06:14:18 david Exp
-#
-#
-# Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org>
-#
-# Permission to use, copy, modify, and distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-# Device "make" file. Valid arguments:
-# all makes all known devices, including local devices.
-# Tries to make the ``standard'' number of each type.
-# ramdisk Ramdisk kernel devices
-# std Standard devices
-# local Configuration specific devices
-# Disks:
-# cd* ATAPI and SCSI CD-ROM drives
-# rd* "rd" pseudo-disks
-# sd* SCSI disks, including flopticals
-# vnd* "file" pseudo-disk devices
-# Tapes:
-# ch* SCSI media changers
-# st* SCSI tape drives
-# Terminal ports:
-# ttya-c on-board serial and mouse ports
-# Pseudo terminals:
-# ptm pty master device
-# pty* Set of 62 master pseudo terminals
-# tty* Set of 62 slave pseudo terminals
-# Special purpose devices:
-# bio ioctl tunnel pseudo-device
-# bpf* Berkeley Packet Filter
-# diskmap Disk mapper
-# fd fd/* nodes
-# fuse Userland Filesystem
-# nvram0 On-board non-volatile memory
-# pf* Packet Filter
-# pppx* PPP Multiplexer
-# *random In-kernel random data source
-# systrace* System call tracing device
-# tun* Network tunnel driver
-# tap* Ethernet tunnel driver
-# uk* Unknown SCSI devices
-# vscsi* Virtual SCSI controller
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-T=$0
-
-# set this to echo for Echo-Only debugging
-[ "$eo" ] || eo=
-
-hex()
-{
- case $1 in
- [0-9]) echo -n $1;;
- 10) echo -n a;;
- 11) echo -n b;;
- 12) echo -n c;;
- 13) echo -n d;;
- 14) echo -n e;;
- 15) echo -n f;;
- esac
-}
-
-alph2d()
-{
- local t="$1"
- local p="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
- local sub=${p%${t}*}
- echo ${#sub}
-}
-
-h2d()
-{
- local s="$1"
- local f=${s%*[0-9a-f]} n=${s#[0-9a-f]*}
-
- echo $(($(_h2d $f)*16+ $(_h2d $n) ))
-}
-
-_h2d()
-{
- case $1 in
- [0-9]) echo -n $1;;
- a) echo -n 10;;
- b) echo -n 11;;
- c) echo -n 12;;
- d) echo -n 13;;
- e) echo -n 14;;
- f) echo -n 15;;
- esac
-}
-
-unt()
-{
- # XXX pdksh can't seem to deal with locally scoped variables
- # in ${foo#$bar} expansions
- arg="$1"
- tmp="${arg#[a-zA-Z]*}"
- tmp="${tmp%*[a-zA-Z]}"
- while [ "$tmp" != "$arg" ]
- do
- arg=$tmp
- tmp="${arg#[a-zA-Z]*}"
- tmp="${tmp%*[a-zA-Z]}"
- done
- echo $arg
-}
-
-dodisk()
-{
- [ "$DEBUG" ] && set -x
- n=$(($((${5}*${7:-16}))+${6})) count=0
- [ 0$7 -ne 8 ] && l="i j k l m n o p"
- for d in a b c d e f g h $l
- do
- M $1$2$d b $3 $(($n+$count)) 640 operator
- M r$1$2$d c $4 $(($n+$count)) 640 operator
- let count=count+1
- done
-}
-
-dodisk2()
-{
- n=$(($(($5*${7:-16}))+$6))
- M $1$2a b $3 $n 640 operator
- M r$1$2a c $4 $n 640 operator
- n=$(($n+2))
- M $1$2c b $3 $n 640 operator
- M r$1$2c c $4 $n 640 operator
-}
-
-# M name b/c major minor [mode] [group]
-RMlist[0]="rm -f"
-
-mkl() {
- mklist[${#mklist[*]}]=";mknod -m $1 $2 $3 $4 $5"
-}
-
-M() {
- RMlist[${#RMlist[*]}]=$1
- mkl ${5-666} $1 $2 $3 $4
- G=${6:-wheel}
- [ "$7" ] && {
- MKlist[${#MKlist[*]}]="&& chown $7:$G $1"
- } || {
- case $G in
- wheel)
- [ ${#whlist[*]} = 0 ] && whlist[0]="&& chgrp wheel"
- whlist[${#whlist[*]}]="$1"
- ;;
- operator)
- [ ${#oplist[*]} = 0 ] && oplist[0]="&& chgrp operator"
- oplist[${#oplist[*]}]="$1"
- ;;
- *)
- MKlist[${#MKlist[*]}]="&& chgrp $G $1";
- esac
- }
- return 0
-}
-
-R() {
-[ "$DEBUG" ] && set -x
-for i in "$@"
-do
-U=`unt $i`
-[ "$U" ] || U=0
-
-case $i in
-std)
- M console c 0 0 600
- M tty c 1 0
- M mem c 2 0 640 kmem
- M kmem c 2 1 640 kmem
- M null c 2 2
- M zero c 2 12
- M stdin c 21 0
- M stdout c 21 1
- M stderr c 21 2
- M ksyms c 43 0 640 kmem
- M klog c 6 0 600
- ;;
-
-
-vscsi*)
- M vscsi$U c 53 $U 600
- ;;
-
-uk*)
- M uk$U c 41 $U 640 operator
- ;;
-
-tap*)
- M tap$U c 56 $U 600
- ;;
-
-tun*)
- M tun$U c 23 $U 600
- ;;
-
-systrace)
- M systrace c 50 0 644
- ;;
-
-*random)
- n=0
- for pre in " " s u a
- do
- M ${pre}random c 40 $n 644
- n=$(($n+1))
- done
- ;;
-
-pppx*)
- M pppx$U c 55 $U 600
- ;;
-
-pf*)
- M pf c 39 0 600
- ;;
-
-nvram0)
- M nvram0 c 10 0 640 kmem
- ;;
-
-fuse)
- M fuse$U c 45 $U 600
- ;;
-
-fd)
- RMlist[${#RMlist[*]}]=";mkdir -p fd;rm -f" n=0
- while [ $n -lt 64 ];do M fd/$n c 21 $n;n=$(($n+1));done
- MKlist[${#MKlist[*]}]=";chmod 555 fd"
- ;;
-
-diskmap)
- M diskmap c 54 0 640 operator
- ;;
-
-bpf*)
- M bpf$U c 22 $U 600
- ;;
-
-bio)
- M bio c 49 0 600
- ;;
-
-pty*)
- if [ $U -gt 15 ]; then
- echo bad unit for pty in: $i
- continue
- fi
- set -A letters p q r s t u v w x y z P Q R S T
- set -A suffixes 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q \
- r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X \
- Y Z
-
- name=${letters[$U]}
- n=0
- while [ $n -lt 62 ]
- do
- nam=$name${suffixes[$n]}
- off=$(($U*62))
- M tty$nam c 4 $(($off+$n))
- M pty$nam c 5 $(($off+$n))
- n=$(($n+1))
- done
- ;;
-
-ptm)
- M ptm c 52 0 666
- ;;
-
-tty[a-c])
- u=${i#tty*}
- case $u in
- a) n=0 ;;
- b) n=1 ;;
- c) n=2 ;;
- *) echo unknown tty device $i ;;
- esac
- case $u in
- a|b|c)
- M tty$u c 12 $n 660 dialer uucp
- M cua$u c 12 $(($n+128)) 660 dialer uucp
- ;;
- esac
- ;;
-
-st*)
- n=$(($U*16))
- for pre in " " n e en
- do
- M ${pre}st$U b 5 $n 660 operator
- M ${pre}rst$U c 20 $n 660 operator
- n=$(($n+1))
- done
- ;;
-
-ch*)
- M ch$U c 44 $U 660 operator
- ;;
-
-vnd*)
- dodisk vnd $U 8 19 $U 0
- ;;
-
-rd*)
- dodisk2 rd $U 7 18 $U 0
- ;;
-
-cd*)
- dodisk2 cd $U 6 9 $U 0
- ;;
-
-local)
- test -s $T.local && sh $T.local
- ;;
-
-ramdisk)
- R diskmap bio pty0 ttya rd0 cd0 cd1 st0 st1 sd0 sd1 sd2 sd3
- R sd4 bpf0 std
- ;;
-
-all)
- R ttya ttyb ttyc vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 cd0
- R cd1 rd0 tap0 tap1 tap2 tap3 tun0 tun1 tun2 tun3 bio bpf0
- R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 diskmap
- R vscsi0 ch0 nvram0 fuse pppx ptm local uk0 random pf systrace
- R std st0 st1 fd
- ;;
-
-sd*)
- case $i in
- sd*) dodisk sd $U 4 8 $U 0;;
- esac
- ;;
-
-*)
- echo $i: unknown device
- ;;
-esac
-done
-}
-R "$@"
-{
-echo -n ${RMlist[*]}
-echo -n ${mklist[*]}
-echo -n ${MKlist[*]}
-echo -n ${whlist[*]}
-echo ${oplist[*]}
-} | if [ "$eo" = "echo" ]; then
- cat
-else
- sh
-fi
diff --git a/etc/etc.aviion/MAKEDEV.md b/etc/etc.aviion/MAKEDEV.md
deleted file mode 100644
index d5fbdb40ed8..00000000000
--- a/etc/etc.aviion/MAKEDEV.md
+++ /dev/null
@@ -1,110 +0,0 @@
-define(MACHINE,aviion)dnl
-vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.21 2015/10/23 15:14:11 claudio Exp $-},
-etc.MACHINE)dnl
-dnl
-dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
-dnl
-dnl Permission to use, copy, modify, and distribute this software for any
-dnl purpose with or without fee is hereby granted, provided that the above
-dnl copyright notice and this permission notice appear in all copies.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-dnl WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-dnl MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-dnl ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-dnl ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-dnl OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-dnl
-dnl
-dnl *** aviion-specific devices
-dnl
-__devitem(dart, ttya-c, on-board serial and mouse ports)dnl
-_mkdev(dart, {-tty[a-c]-}, {-u=${i#tty*}
- case $u in
- a) n=0 ;;
- b) n=1 ;;
- c) n=2 ;;
- *) echo unknown tty device $i ;;
- esac
- case $u in
- a|b|c)
- M tty$u c major_dart_c $n 660 dialer uucp
- M cua$u c major_dart_c Add($n, 128) 660 dialer uucp
- ;;
- esac-})dnl
-__devitem(nvram, nvram0, On-board non-volatile memory)dnl
-_mkdev(nvram, nvram0, {-M nvram0 c major_nvram_c 0 640 kmem-})dnl
-dnl
-dnl *** MAKEDEV itself
-dnl
-_TITLE(make)
-dnl
-dnl all)
-dnl
-target(all, nvram, 0)dnl
-dnl
-target(all, ch, 0)dnl
-target(all, vscsi, 0)dnl
-target(all, diskmap)dnl
-target(all, pty, 0)dnl
-target(all, bpf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl
-target(all, bio)dnl
-target(all, tun, 0, 1, 2, 3)dnl
-target(all, tap, 0, 1, 2, 3)dnl
-target(all, rd, 0)dnl
-target(all, cd, 0, 1)dnl
-target(all, sd, 0, 1, 2, 3, 4)dnl
-target(all, uk, 0)dnl
-target(all, vnd, 0, 1, 2, 3)dnl
-twrget(all, dart, tty, a, b, c)dnl
-_DEV(all)
-dnl
-dnl ramdisk)
-dnl
-twrget(ramd, dart, tty, a)dnl
-target(ramd, pty, 0)dnl
-target(ramd, bio)dnl
-target(ramd, diskmap)dnl
-target(ramd, random)dnl
-_DEV(ramd)
-dnl
-_DEV(std)
-_DEV(local)
-dnl
-_TITLE(dis)
-_DEV(cd, 9, 6)
-_DEV(rd, 18, 7)
-_DEV(sd, 8, 4)
-_DEV(vnd, 19, 8)
-_TITLE(tap)
-_DEV(ch, 44)
-_DEV(st, 20, 5)
-_TITLE(term)
-_DEV(dart, 12)
-_TITLE(pty)
-_DEV(ptm, 52)
-_DEV(pty, 5)
-_DEV(tty, 4)
-_TITLE(spec)
-_DEV(bio, 49)
-_DEV(bpf, 22)
-_DEV(diskmap, 54)
-_DEV(fdesc, 21)
-_DEV(fuse, 45)
-_DEV(nvram, 10)
-_DEV(pf, 39)
-_DEV(pppx, 55)
-_DEV(rnd, 40)
-_DEV(systrace, 50)
-_DEV(tun, 23)
-_DEV(tap, 56)
-_DEV(uk, 41)
-_DEV(vscsi, 53)
-dnl
-divert(__mddivert)dnl
-dnl
-_std(1, 2, 43, 6)
- ;;
-
diff --git a/etc/etc.aviion/Makefile b/etc/etc.aviion/Makefile
deleted file mode 100644
index 324bc9769a7..00000000000
--- a/etc/etc.aviion/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $OpenBSD: Makefile,v 1.2 2008/06/15 01:51:56 todd Exp $
-
-all: MAKEDEV
-
-.include <bsd.prog.mk>
diff --git a/etc/etc.aviion/Makefile.inc b/etc/etc.aviion/Makefile.inc
deleted file mode 100644
index 2724bdeeb1a..00000000000
--- a/etc/etc.aviion/Makefile.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.8 2013/10/15 13:28:08 miod Exp $
-
-KERNELS += GENERIC.MP bsd.mp
-
-bootblocks:
- cp ${DESTDIR}/usr/mdec/boot ${RELEASEDIR}/
-
-MDEXT= bsd.rd bsd.rd.xcf \
- boot
diff --git a/etc/etc.aviion/disktab b/etc/etc.aviion/disktab
deleted file mode 100644
index 7092ea3edd3..00000000000
--- a/etc/etc.aviion/disktab
+++ /dev/null
@@ -1,6 +0,0 @@
-# $OpenBSD: disktab,v 1.5 2015/08/18 15:37:48 krw Exp $
-
-rdroot|ramdiskroot|RAM-disk root FS image:\
- :dt=rdroot:se#512:nc#16:nt#2:ns#128:\
- :ta=4.2BSD:oa#0:pa#4096:fa#512:ba#4096:\
- :ob#0:pb#0:oc#0:pc#4096:
diff --git a/etc/etc.aviion/fbtab b/etc/etc.aviion/fbtab
deleted file mode 100644
index ef2d6ba46b2..00000000000
--- a/etc/etc.aviion/fbtab
+++ /dev/null
@@ -1 +0,0 @@
-/dev/ttya 0600 /dev/console
diff --git a/etc/etc.aviion/login.conf b/etc/etc.aviion/login.conf
deleted file mode 100644
index 07d1515b9c9..00000000000
--- a/etc/etc.aviion/login.conf
+++ /dev/null
@@ -1,107 +0,0 @@
-# $OpenBSD: login.conf,v 1.5 2015/10/23 22:55:49 sthen Exp $
-
-#
-# Sample login.conf file. See login.conf(5) for details.
-#
-
-#
-# Standard authentication styles:
-#
-# passwd Use only the local password file
-# chpass Do not authenticate, but change users password (change
-# the YP password if the user has one, else change the
-# local password)
-# lchpass Do not login; change user's local password instead
-# radius Use radius authentication
-# reject Use rejected authentication
-# skey Use S/Key authentication
-# activ ActivCard X9.9 token authentication
-# crypto CRYPTOCard X9.9 token authentication
-# snk Digital Pathways SecureNet Key authentication
-# tis TIS Firewall Toolkit authentication
-# token Generic X9.9 token authentication
-# yubikey YubiKey authentication
-#
-
-# Default allowed authentication styles
-auth-defaults:auth=passwd,skey:
-
-# Default allowed authentication styles for authentication type ftp
-auth-ftp-defaults:auth-ftp=passwd:
-
-#
-# The default values
-# To alter the default authentication types change the line:
-# :tc=auth-defaults:\
-# to be read something like: (enables passwd, "myauth", and activ)
-# :auth=passwd,myauth,activ:\
-# Any value changed in the daemon class should be reset in default
-# class.
-#
-default:\
- :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin:\
- :umask=022:\
- :datasize-max=512M:\
- :datasize-cur=512M:\
- :maxproc-max=256:\
- :maxproc-cur=128:\
- :openfiles-cur=512:\
- :stacksize-cur=4M:\
- :localcipher=blowfish,8:\
- :tc=auth-defaults:\
- :tc=auth-ftp-defaults:
-
-#
-# Settings used by /etc/rc and root
-# This must be set properly for daemons started as root by inetd as well.
-# Be sure reset these values back to system defaults in the default class!
-#
-daemon:\
- :ignorenologin:\
- :datasize=infinity:\
- :maxproc=infinity:\
- :openfiles-cur=128:\
- :stacksize-cur=8M:\
- :localcipher=blowfish,9:\
- :tc=default:
-
-#
-# Staff have fewer restrictions and can login even when nologins are set.
-#
-staff:\
- :datasize-cur=512M:\
- :datasize-max=infinity:\
- :maxproc-max=512:\
- :maxproc-cur=128:\
- :ignorenologin:\
- :requirehome@:\
- :tc=default:
-
-#
-# Authpf accounts get a special motd and shell
-#
-authpf:\
- :welcome=/etc/motd.authpf:\
- :shell=/usr/sbin/authpf:\
- :tc=default:
-
-#
-# Building ports with DPB uses raised limits
-#
-pbuild:\
- :datasize-max=infinity:\
- :datasize-cur=1024M:\
- :maxproc-max=1024:\
- :maxproc-cur=256:\
- :tc=default:
-
-#
-# Override resource limits for certain daemons started by rc.d(8)
-#
-bgpd:\
- :openfiles-cur=512:\
- :tc=daemon:
-
-unbound:\
- :openfiles-cur=512:\
- :tc=daemon:
diff --git a/etc/etc.aviion/sysctl.conf b/etc/etc.aviion/sysctl.conf
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/etc/etc.aviion/sysctl.conf
+++ /dev/null
diff --git a/etc/etc.aviion/ttys b/etc/etc.aviion/ttys
deleted file mode 100644
index d98de75e9ff..00000000000
--- a/etc/etc.aviion/ttys
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# $OpenBSD: ttys,v 1.2 2008/01/09 17:39:42 miod Exp $
-#
-# name getty type status comments
-#
-console "/usr/libexec/getty std.9600" vt220 on secure
-# on-board serial ports (ttyb is the mouse port)
-ttya "/usr/libexec/getty std.9600" unknown off secure # console
-ttyc "/usr/libexec/getty std.9600" unknown off
diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2
index 5720fedb864..0da7cc11703 100644
--- a/lib/libc/sys/ptrace.2
+++ b/lib/libc/sys/ptrace.2
@@ -1,8 +1,8 @@
-.\" $OpenBSD: ptrace.2,v 1.34 2015/09/24 23:09:16 tedu Exp $
+.\" $OpenBSD: ptrace.2,v 1.35 2015/12/01 07:50:03 deraadt Exp $
.\" $NetBSD: ptrace.2,v 1.3 1996/02/23 01:39:41 jtc Exp $
.\"
.\" This file is in the public domain.
-.Dd $Mdocdate: September 24 2015 $
+.Dd $Mdocdate: December 1 2015 $
.Dt PTRACE 2
.Os
.Sh NAME
@@ -432,7 +432,7 @@ one instruction
.\" m88k - vax (no general fp registers)
.\" mips64 (fp registers in the main reg structure)
.It Xo Dv PT_GETFPREGS
-.No (not available on aviion, luna88k, sgi and vax)
+.No (not available on luna88k, sgi and vax)
.Xc
This request reads the traced process' floating-point registers into
the
@@ -442,7 +442,7 @@ the
pointed to by
.Fa addr .
.It Xo Dv PT_SETFPREGS
-.No (not available on aviion, luna88k, sgi and vax)
+.No (not available on luna88k, sgi and vax)
.Xc
This request is the converse of
.Dv PT_GETFPREGS ;
@@ -564,7 +564,7 @@ The
system call first appeared in
.At v6 .
.Sh BUGS
-On several RISC architectures (such as aviion, luna88k, sparc and sparc64),
+On several RISC architectures (such as luna88k, sparc and sparc64),
the PC is set to the provided PC value for
.Dv PT_CONTINUE
and similar calls, and the remainder of the execution pipeline registers
diff --git a/regress/etc/MAKEDEV/Makefile b/regress/etc/MAKEDEV/Makefile
index 695c8f18525..44536d65509 100644
--- a/regress/etc/MAKEDEV/Makefile
+++ b/regress/etc/MAKEDEV/Makefile
@@ -1,7 +1,7 @@
-# $OpenBSD: Makefile,v 1.29 2014/04/18 14:34:24 henning Exp $
+# $OpenBSD: Makefile,v 1.30 2015/12/01 07:50:05 deraadt Exp $
-MAKEDEVARCHS+=alpha amd64 armish aviion hppa hppa64 i386 landisk
+MAKEDEVARCHS+=alpha amd64 armish hppa hppa64 i386 landisk
MAKEDEVARCHS+=loongson luna88k macppc
MAKEDEVARCHS+=sgi socppc sparc sparc64 vax zaurus
diff --git a/regress/usr.bin/mdoclint/mdoclint b/regress/usr.bin/mdoclint/mdoclint
index 27515948415..3af8996cdb2 100644
--- a/regress/usr.bin/mdoclint/mdoclint
+++ b/regress/usr.bin/mdoclint/mdoclint
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# $OpenBSD: mdoclint,v 1.44 2014/06/24 12:41:19 jmc Exp $
+# $OpenBSD: mdoclint,v 1.45 2015/12/01 07:50:06 deraadt Exp $
# $NetBSD: mdoclint,v 1.49 2014/06/23 18:10:21 wiz Exp $
#
# Copyright (c) 2001-2013 Thomas Klausner
@@ -197,7 +197,7 @@ my $valid_date_re;
my @arches;
if (OPENBSD) {
@arches =
- (qw(alpha amd64 arm armish armv7 aviion cats hppa
+ (qw(alpha amd64 arm armish armv7 cats hppa
hppa64 i386 landisk loongson luna88k macppc mips64
octeon sgi socppc sparc sparc64 vax
zaurus));
diff --git a/sbin/kbd/Makefile b/sbin/kbd/Makefile
index 12a1d0c4f02..3069e27a940 100644
--- a/sbin/kbd/Makefile
+++ b/sbin/kbd/Makefile
@@ -1,10 +1,10 @@
-# $OpenBSD: Makefile,v 1.37 2014/04/03 20:55:44 miod Exp $
+# $OpenBSD: Makefile,v 1.38 2015/12/01 07:50:05 deraadt Exp $
#
# Be sure to change src/distrib/special/kbd/Makefile as well if you add or
# remove architectures on this list!
#
-.if ${MACHINE} != "aviion" && ${MACHINE} != "hppa64" && \
+.if ${MACHINE} != "hppa64" && \
${MACHINE} != "ia64" && ${MACHINE} != "octeon"
PROG= kbd
diff --git a/sbin/reboot/reboot.8 b/sbin/reboot/reboot.8
index eb1ea623737..106458d615a 100644
--- a/sbin/reboot/reboot.8
+++ b/sbin/reboot/reboot.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: reboot.8,v 1.45 2014/07/14 09:19:21 pelikan Exp $
+.\" $OpenBSD: reboot.8,v 1.46 2015/12/01 07:50:05 deraadt Exp $
.\" $NetBSD: reboot.8,v 1.3 1995/10/05 05:36:21 mycroft Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)reboot.8 8.1 (Berkeley) 6/9/93
.\"
-.Dd $Mdocdate: July 14 2014 $
+.Dd $Mdocdate: December 1 2015 $
.Dt REBOOT 8
.Os
.Sh NAME
@@ -93,7 +93,6 @@ users advance warning of their impending doom.
.\" .Xr boot 8 ,
.Xr boot_alpha 8 ,
.Xr boot_amd64 8 ,
-.\" .Xr boot_aviion 8 ,
.Xr boot_hppa 8 ,
.Xr boot_hppa64 8 ,
.Xr boot_i386 8 ,
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 154cb13c9e0..5dbc899a2ad 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.604 2015/11/21 07:46:03 jmc Exp $
+# $OpenBSD: Makefile,v 1.605 2015/12/01 07:50:05 deraadt Exp $
MAN= aac.4 ac97.4 acphy.4 \
acpi.4 acpiac.4 acpiasus.4 acpibat.4 acpibtn.4 acpicpu.4 acpidock.4 \
@@ -94,7 +94,7 @@ MLINKS+=usb.4 uhub.4
MLINKS+=vlan.4 svlan.4
# man4.hppa64
-SUBDIR= man4.alpha man4.amd64 man4.armish man4.armv7 man4.aviion \
+SUBDIR= man4.alpha man4.amd64 man4.armish man4.armv7 \
man4.hppa man4.i386 man4.landisk man4.loongson man4.luna88k \
man4.macppc man4.octeon \
man4.sgi man4.socppc man4.sparc man4.sparc64 man4.vax man4.zaurus
diff --git a/share/man/man4/man4.aviion/Makefile b/share/man/man4/man4.aviion/Makefile
deleted file mode 100644
index e0387f10b69..00000000000
--- a/share/man/man4/man4.aviion/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $OpenBSD: Makefile,v 1.3 2013/10/15 18:13:53 miod Exp $
-
-MAN= autoconf.4 dart.4 intro.4 le.4 mem.4 nvram.4 oaic.4 syscon.4 vme.4
-MANSUBDIR=aviion
-
-MLINKS+= mem.4 kmem.4
-.include <bsd.prog.mk>
diff --git a/share/man/man4/man4.aviion/autoconf.4 b/share/man/man4/man4.aviion/autoconf.4
deleted file mode 100644
index 66f3cf23830..00000000000
--- a/share/man/man4/man4.aviion/autoconf.4
+++ /dev/null
@@ -1,53 +0,0 @@
-.\" $OpenBSD: autoconf.4,v 1.3 2010/01/02 19:55:34 schwarze Exp $
-.\"
-.\" Copyright (c) 1990, 1991, 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. 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.
-.\"
-.\" from: @(#)autoconf.4 8.1 (Berkeley) 6/9/93
-.\"
-.Dd $Mdocdate: January 2 2010 $
-.Dt AUTOCONF 4 aviion
-.Os
-.Sh NAME
-.Nm autoconf
-.Nd diagnostics from the autoconfiguration code
-.Sh DESCRIPTION
-When
-.Ox
-bootstraps it probes the innards of the machine
-on which it is running
-and locates controllers, drives, and other devices, printing out
-what it finds on the console.
-This procedure is driven by a system configuration table which is processed by
-.Xr config 8
-and compiled into each kernel.
-Devices which exist in the machine but are not configured into the
-kernel are not detected.
-.Sh SEE ALSO
-.Xr intro 4 ,
-.\" .Xr boot_aviion 8 ,
-.Xr config 8
diff --git a/share/man/man4/man4.aviion/dart.4 b/share/man/man4/man4.aviion/dart.4
deleted file mode 100644
index 8c330d13370..00000000000
--- a/share/man/man4/man4.aviion/dart.4
+++ /dev/null
@@ -1,54 +0,0 @@
-.\" $OpenBSD: dart.4,v 1.2 2013/10/15 20:34:46 jmc Exp $
-.\"
-.\" Copyright (c) 2013 Miodrag Vallat.
-.\"
-.\" Permission to use, copy, modify, and distribute this software for any
-.\" purpose with or without fee is hereby granted, provided that the above
-.\" copyright notice and this permission notice appear in all copies.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.\"
-.Dd $Mdocdate: October 15 2013 $
-.Dt DART 4 aviion
-.Os
-.Sh NAME
-.Nm dart
-.Nd MC68681 or MC68692 dual UART
-.Sh SYNOPSIS
-.Cd "dart0 at syscon0 offset 0x82000"
-.Cd "dart1 at syscon0 offset 0x82c00"
-.Sh DESCRIPTION
-The MC68681 and MC68692 dual asynchronous receiver/transmitter
-.Pq Tn DUART
-component provides two serial ports, as well as a 16-bit programmable
-counter/timer.
-.Pp
-The
-.Nm
-driver provides support for the two serial ports found on board all
-AViiON systems.
-.Pp
-The
-.Nm
-serial ports have a two character buffer on the transmit path, and a four
-character buffer on the receive path.
-.Pp
-The following link speeds are supported by the
-.Nm
-driver:
-50, 75, 110, 134.5, 150, 200, 300, 600, 1050, 1200, 1800, 200, 2400, 4800,
-7200, 9600, 19200 and 38400 bps.
-.Sh FILES
-.Bl -tag -width Pa -compact
-.It Pa /dev/tty[ab] dart0 serial ports
-.It Pa /dev/tty[cd] dart1 serial ports
-.El
-.Sh SEE ALSO
-.Xr intro 4 ,
-.Xr tty 4
diff --git a/share/man/man4/man4.aviion/intro.4 b/share/man/man4/man4.aviion/intro.4
deleted file mode 100644
index 682cbf6877b..00000000000
--- a/share/man/man4/man4.aviion/intro.4
+++ /dev/null
@@ -1,119 +0,0 @@
-.\" $OpenBSD: intro.4,v 1.10 2014/09/19 12:24:37 schwarze Exp $
-.\"
-.\" Copyright (c) 1983, 1986, 1991 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. 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.
-.\"
-.\" from: @(#)intro.4 5.2 (Berkeley) 3/27/91
-.\"
-.Dd $Mdocdate: September 19 2014 $
-.Dt INTRO 4 aviion
-.Os
-.Sh NAME
-.Nm intro
-.Nd introduction to special files and hardware support
-.Sh DESCRIPTION
-The manual pages in section 4 describe the special files,
-related driver functions, and networking support
-available in the system.
-In this part of the manual, the SYNOPSIS section of
-each configurable device gives a sample specification
-for use in constructing a system description for the
-.Xr config 8
-program.
-The DIAGNOSTICS section lists messages which may appear on the console
-and/or in the system error log
-.Pa /var/log/messages
-due to errors in device operation;
-see
-.Xr syslogd 8
-for more information.
-.Pp
-This section contains both devices
-which may be configured into the system
-and network related information.
-The networking support is introduced in
-.Xr netintro 4 .
-.Sh DEVICE SUPPORT
-This section describes the hardware supported on the
-AViiON platform.
-Software support for these devices comes in two forms.
-A hardware device may be supported with a character or block
-.Em device driver ,
-or it may be used within the networking subsystem and have a
-.Em network interface driver .
-Block and character devices are accessed through files in the file
-system of a special type; see
-.Xr mknod 8 .
-Network interfaces are indirectly accessed through the interprocess
-communication facilities provided by the system; see
-.Xr socket 2 .
-.Pp
-A hardware device is identified to the system at configuration time
-and the appropriate device or network interface driver is then compiled
-into the system.
-When the resultant system is booted, the autoconfiguration facilities
-in the system probe for the device and, if found, enable the software
-support for it.
-If a device does not respond at autoconfiguration
-time it is not accessible at any time afterwards.
-To enable a device which did not autoconfigure,
-the system will have to be rebooted.
-.Pp
-The autoconfiguration system is described in
-.Xr autoconf 4 .
-A list of the supported devices is given below.
-.Sh LIST OF DEVICES
-The devices listed below are supported in this incarnation of
-the system.
-Pseudo-devices are not listed.
-Devices are indicated by their functional interface.
-Not all supported devices are listed.
-.Pp
-.Bl -tag -compact -width 9n
-.It Xr dart 4
-MC68681 or MC68692 dual UART
-.It Xr le 4
-AMD LANCE or ILACC Ethernet device
-.It Xr nvram 4
-Mostek MK48T0x battery-backed realtime clock
-.It Xr oaic 4
-Adaptec AIC-6250 SCSI interface
-.It Xr oosiop 4
-Symbios/NCR 53C700 SCSI driver
-.It Xr syscon 4
-VME system controller
-.It Xr vme 4
-VMEbus interface
-.El
-.Sh SEE ALSO
-.Xr autoconf 4 ,
-.Xr config 8
-.Sh HISTORY
-The AViiON
-.Nm intro
-appeared in
-.Ox 4.0 .
diff --git a/share/man/man4/man4.aviion/le.4 b/share/man/man4/man4.aviion/le.4
deleted file mode 100644
index 2e4e92dec5f..00000000000
--- a/share/man/man4/man4.aviion/le.4
+++ /dev/null
@@ -1,86 +0,0 @@
-.\" $OpenBSD: le.4,v 1.6 2013/10/15 18:13:53 miod Exp $
-.\"
-.\" Copyright (c) 2003 Paul Weissmann
-.\" 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.
-.\"
-.\" 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.
-.\"
-.Dd $Mdocdate: October 15 2013 $
-.Dt LE 4 aviion
-.Os
-.Sh NAME
-.Nm le
-.Nd AMD LANCE or ILACC Ethernet device
-.Sh SYNOPSIS
-.Cd "le0 at syscon? offset 0x8c000 " Pq "on-board, AV4000 family"
-.Cd "le0 at syscon? offset 0xb0100 " Pq "on-board, AV530 family"
-.Cd "le1 at syscon? offset 0xb0140 " Pq "on-board, AV530 family"
-.Pp
-.Cd "le* at vme? a32 0x00900000 a16 0x4000 ipl 3"
-.Cd "le* at vme? a32 0x55540000 a16 0x8600 ipl 3"
-.Cd "le* at vme? a32 0x55900000 a16 0x4000 ipl 3"
-.Cd "le* at vme? a32 0x55980000 a16 0x5000 ipl 3"
-.Sh DESCRIPTION
-The
-.Nm
-driver provides access to the on-board AMD 7990/LANCE or AMD 79900/ILACC
-interface, as well as the VME Interphase 3207 Hawk Ethernet boards.
-This in turn provides an interface to the
-.Tn Ethernet
-network.
-.\" XXX this section needs a rework -- miod
-.\" .Sh HARDWARE CONFIGURATION
-.\" The card's base address
-.\" .Po
-.\" matching the
-.\" .Em addr
-.\" locator on the configuration line
-.\" .Pc
-.\" is defined through three sets of DIP switches,
-.\" .Dq SW1
-.\" and
-.\" .Dq SW2 ,
-.\" located in the middle of the board, near the space between the two
-.\" VME connectors, and
-.\" .Dq SW3 ,
-.\" closer to the AM7990DC chip at the bottom edge.
-.\" .Pp
-.\" The only supported configurations are:
-.\" .Bl -column "xxxxxxxx" "xxxxxxxx" "xxxxxxxx" "0xffffffff"
-.\" .It Li SW1 Ta SW2 Ta SW3 Ta Address
-.\" .It " "
-.\" .It Li "UUU_UU_U" Ta "U__U____" Ta "______U_" Ta "0xffff1200"
-.\" .It Li "UUU_U_UU" Ta "U__U_U__" Ta "______U_" Ta "0xffff1400"
-.\" .It Li "UUU_U__U" Ta "U__UU___" Ta "______U_" Ta "0xffff1600"
-.\" .It Li "U_U_U_UU" Ta "U__UUU__" Ta "______U_" Ta "0xffff5400"
-.\" .It Li "U_U_U__U" Ta "U_U_____" Ta "______U_" Ta "0xffff5600"
-.\" .It Li "_U_UU_UU" Ta "U_U__U__" Ta "______U_" Ta "0xffffa400"
-.\" .El
-.Sh SEE ALSO
-.Xr arp 4 ,
-.Xr inet 4 ,
-.Xr intro 4 ,
-.Xr netintro 4 ,
-.Xr vme 4 ,
-.Xr hostname.if 5 ,
-.Xr ifconfig 8
diff --git a/share/man/man4/man4.aviion/mem.4 b/share/man/man4/man4.aviion/mem.4
deleted file mode 100644
index 9d4df8c67d4..00000000000
--- a/share/man/man4/man4.aviion/mem.4
+++ /dev/null
@@ -1,79 +0,0 @@
-.\" $OpenBSD: mem.4,v 1.3 2013/10/15 18:13:53 miod 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.
-.\"
-.\" 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.
-.\"
-.\" from: @(#)mem.4 8.1 (Berkeley) 6/5/93
-.\"
-.Dd $Mdocdate: October 15 2013 $
-.Dt MEM 4 aviion
-.Os
-.Sh NAME
-.Nm mem ,
-.Nm kmem
-.Nd memory files
-.Sh DESCRIPTION
-The file
-.Pa /dev/mem
-is an interface to the physical memory of the
-computer.
-Byte offsets in this file are interpreted as physical memory addresses.
-Reading and writing this file is equivalent to reading and writing
-memory itself.
-An error will be returned if an attempt is made to reference
-an offset outside of
-.Pa /dev/mem .
-.Pp
-Kernel virtual memory is accessed via the file
-.Pa /dev/kmem
-in the same manner as
-.Pa /dev/mem .
-Only kernel virtual addresses that are currently mapped to memory are allowed.
-.Pp
-On the AViiON, physical memory is always contiguous;
-kernel virtual memory begins at
-.Ad 0x00000000 .
-.Pp
-Writeability of these devices is controlled by the system
-.Xr securelevel 7 .
-.Sh FILES
-.Bl -tag -width /dev/kmem -compact
-.It Pa /dev/mem
-.It Pa /dev/kmem
-.El
-.Sh SEE ALSO
-.Xr securelevel 7
-.Sh HISTORY
-The
-.Pa /dev/mem
-and
-.Pa /dev/kmem
-files appeared in
-.At v6 .
diff --git a/share/man/man4/man4.aviion/nvram.4 b/share/man/man4/man4.aviion/nvram.4
deleted file mode 100644
index d5d1ee5886f..00000000000
--- a/share/man/man4/man4.aviion/nvram.4
+++ /dev/null
@@ -1,52 +0,0 @@
-.\" $OpenBSD: nvram.4,v 1.2 2013/10/15 20:34:47 jmc Exp $
-.\"
-.\" Copyright (c) 2013 Miodrag Vallat.
-.\"
-.\" Permission to use, copy, modify, and distribute this software for any
-.\" purpose with or without fee is hereby granted, provided that the above
-.\" copyright notice and this permission notice appear in all copies.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.\"
-.Dd $Mdocdate: October 15 2013 $
-.Dt NVRAM 4 aviion
-.Os
-.Sh NAME
-.Nm nvram
-.Nd Mostek MK48T0x battery-backed realtime clock
-.Sh SYNOPSIS
-.Cd "nvram0 at syscon0 offset 0x80000"
-.Sh DESCRIPTION
-The
-.Nm
-driver provides support for the
-Mostek MK48T02 realtime clock chip.
-.Pp
-In addition to the clock itself, this chip embeds 2KB
-of battery-backed memory, which is accessible through the special
-.Pa /dev/nvram0
-file.
-.Sh FILES
-.Bl -tag -width Pa -compact
-.It Pa /dev/nvram0
-.El
-.Sh SEE ALSO
-.Xr intro 4 ,
-.Xr syscon 4
-.Sh CAVEATS
-The last 8 bytes of the battery-backed memory contains the realtime clock
-registers.
-Writing to these locations will interfere with proper clock operation.
-.Pp
-Most, if not all, of the battery-backed memory is used by DG/UX to store
-some of its configuration data, and may be reinitialized by the PROM
-if it considers the memory contents as invalid.
-The
-.Nm
-driver does not prevent access to this reserved part.
diff --git a/share/man/man4/man4.aviion/oaic.4 b/share/man/man4/man4.aviion/oaic.4
deleted file mode 100644
index c8fe2dbebbe..00000000000
--- a/share/man/man4/man4.aviion/oaic.4
+++ /dev/null
@@ -1,53 +0,0 @@
-.\" $OpenBSD: oaic.4,v 1.2 2013/10/15 18:13:53 miod Exp $
-.\" OpenBSD: aic.4,v 1.8 2012/08/14 01:08:19 dlg Exp
-.\" $NetBSD: aic.4,v 1.5 1998/06/07 09:08:45 enami Exp $
-.\"
-.\" Copyright (c) 1997 Jason R. Thorpe. All rights reserved.
-.\" Copyright (c) 1994 James A. Jegers
-.\" 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. 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.
-.\"
-.\"
-.Dd $Mdocdate: October 15 2013 $
-.Dt OAIC 4 aviion
-.Os
-.Sh NAME
-.Nm oaic
-.Nd Adaptec AIC-6250 SCSI interface
-.Sh SYNOPSIS
-.Cd "oaic0 at syscon? offset 0x8a000"
-.Sh DESCRIPTION
-The
-.Nm
-driver provides support for the
-.Tn Adaptec
-AIC-6250
-.Tn SCSI
-controller chips.
-.Sh SEE ALSO
-.Xr cd 4 ,
-.Xr ch 4 ,
-.Xr intro 4 ,
-.Xr scsi 4 ,
-.Xr sd 4 ,
-.Xr st 4 ,
-.Xr syscon 4 ,
-.Xr uk 4
diff --git a/share/man/man4/man4.aviion/syscon.4 b/share/man/man4/man4.aviion/syscon.4
deleted file mode 100644
index 27d51606792..00000000000
--- a/share/man/man4/man4.aviion/syscon.4
+++ /dev/null
@@ -1,61 +0,0 @@
-.\" $OpenBSD: syscon.4,v 1.2 2013/10/15 20:34:47 jmc Exp $
-.\"
-.\" Copyright (c) 2008 Miodrag Vallat.
-.\"
-.\" Permission to use, copy, modify, and distribute this software for any
-.\" purpose with or without fee is hereby granted, provided that the above
-.\" copyright notice and this permission notice appear in all copies. And
-.\" I won't mind if you keep the disclaimer below.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.\"
-.Dd $Mdocdate: October 15 2013 $
-.Dt SYSCON 4 aviion
-.Os
-.Sh NAME
-.Nm syscon
-.Nd VME system controller
-.Sh SYNOPSIS
-.Cd "syscon0 at mainbus0 addr 0xfff00000"
-.Cd "nvram0 at syscon0 offset 0x80000"
-.Cd "dart0 at syscon0 offset 0x82000"
-.Cd "dart1 at syscon0 offset 0x82c00"
-.Cd "vme0 at syscon0 offset 0x85000"
-.Cd "oaic0 at syscon0 offset 0x8a000"
-.Cd "le0 at syscon0 offset 0x8c000"
-.Cd "oosiop0 at syscon0 offset 0xb0000"
-.Cd "oosiop1 at syscon0 offset 0xb0080"
-.Cd "le0 at syscon0 offset 0xb0100"
-.Cd "le1 at syscon0 offset 0xb0140"
-.Sh DESCRIPTION
-The
-.Nm
-driver provides an interface to the different local bus-attached I/O
-devices found on AViiON systems.
-.Pp
-The devices which may be connected to
-.Nm
-are:
-.Pp
-.Bl -tag -compact -width 9n -offset indent
-.It Xr dart 4
-MC68681 or MC68692 dual UART
-.It Xr le 4
-AMD LANCE or ILACC Ethernet device
-.It Xr nvram 4
-Mostek MK48T0x battery-backed realtime clock
-.It Xr oaic 4
-Adaptec AIC-6250 SCSI interface
-.It Xr oosiop 4
-Symbios/NCR 53C700 SCSI driver
-.It Xr vme 4
-VMEbus interface
-.El
-.Sh SEE ALSO
-.Xr intro 4
diff --git a/share/man/man4/man4.aviion/vme.4 b/share/man/man4/man4.aviion/vme.4
deleted file mode 100644
index 6c4e39a454a..00000000000
--- a/share/man/man4/man4.aviion/vme.4
+++ /dev/null
@@ -1,57 +0,0 @@
-.\" $OpenBSD: vme.4,v 1.2 2013/10/15 20:34:47 jmc Exp $
-.\"
-.\" Copyright (c) 2003 Paul Weissmann
-.\" 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.
-.\"
-.\" 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.
-.\"
-.Dd $Mdocdate: October 15 2013 $
-.Dt VME 4 aviion
-.Os
-.Sh NAME
-.Nm vme
-.Nd VMEbus interface
-.Sh SYNOPSIS
-.Cd "vme0 at syscon0 offset 0x85000"
-.Sh DESCRIPTION
-The
-.Nm
-driver provides access to the VMEbus, operating the VMEbus part of the
-.Xr syscon 4
-device.
-.Pp
-The currently supported VMEbus drivers are:
-.Pp
-.Bl -tag -compact -width 10n -offset indent
-.It Xr le 4
-AMD LANCE or ILACC Ethernet device
-.\" .It Xr vs 4
-.\" MVME328, MVME328S and MVME328XT high performance SCSI controller
-.\" .It Xr vsbic 4
-.\" MVME327A SCSI and floppy controller
-.\" .It Xr vx 4
-.\" MVME332XT high performance serial I/O controller
-.El
-.Sh SEE ALSO
-.Xr intro 4 ,
-.Xr syscon 4
diff --git a/share/man/man4/oosiop.4 b/share/man/man4/oosiop.4
index 5fd545e64dc..ef2d143cff1 100644
--- a/share/man/man4/oosiop.4
+++ b/share/man/man4/oosiop.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: oosiop.4,v 1.9 2013/10/22 21:56:03 miod Exp $
+.\" $OpenBSD: oosiop.4,v 1.10 2015/12/01 07:50:05 deraadt Exp $
.\" $NetBSD: osiop.4,v 1.2 2001/09/22 01:44:55 wiz Exp $
.\"
.\" Copyright (c) 2001 Izumi Tsutsui. All rights reserved.
@@ -25,17 +25,13 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: October 22 2013 $
+.Dd $Mdocdate: December 1 2015 $
.Dt OOSIOP 4
.Os
.Sh NAME
.Nm oosiop
.Nd Symbios/NCR 53C700 SCSI driver
.Sh SYNOPSIS
-.Cd "# aviion"
-.Cd "oosiop0 at syscon? offset 0xb0000"
-.Cd "oosiop1 at syscon? offset 0xb0080"
-.Pp
.Cd "# hppa"
.Cd "oosiop* at gsc? irq 9"
.Sh DESCRIPTION
diff --git a/share/man/man8/Makefile b/share/man/man8/Makefile
index 4133c12a00c..c833b65503a 100644
--- a/share/man/man8/Makefile
+++ b/share/man/man8/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.88 2014/03/18 22:36:31 miod Exp $
+# $OpenBSD: Makefile,v 1.89 2015/12/01 07:50:05 deraadt Exp $
# $NetBSD: Makefile,v 1.13 1996/03/28 21:36:40 mark Exp $
# @(#)Makefile 8.1 (Berkeley) 6/5/93
@@ -13,7 +13,7 @@ MLINKS+=daily.8 weekly.8 daily.8 monthly.8
MLINKS+=rc.8 rc.firsttime.8 rc.8 rc.local.8 rc.8 rc.securelevel.8
MLINKS+=rc.conf.8 rc.conf.local.8
-SUBDIR= man8.alpha man8.amd64 man8.armish man8.armv7 man8.aviion \
+SUBDIR= man8.alpha man8.amd64 man8.armish man8.armv7 \
man8.hppa man8.hppa64 man8.i386 man8.landisk \
man8.loongson man8.luna88k man8.macppc \
man8.octeon man8.sgi man8.socppc man8.sparc man8.sparc64 man8.vax \
diff --git a/share/man/man8/man8.aviion/MAKEDEV.8 b/share/man/man8/man8.aviion/MAKEDEV.8
deleted file mode 100644
index b93122f8bcf..00000000000
--- a/share/man/man8/man8.aviion/MAKEDEV.8
+++ /dev/null
@@ -1,176 +0,0 @@
-.\" $OpenBSD: MAKEDEV.8,v 1.23 2015/10/23 15:18:01 claudio Exp $
-.\"
-.\" THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
-.\" generated from:
-.\"
-.\" OpenBSD: etc.aviion/MAKEDEV.md,v 1.21 2015/10/23 15:14:11 claudio Exp
-.\" OpenBSD: MAKEDEV.common,v 1.79 2015/10/23 15:14:11 claudio Exp
-.\" OpenBSD: MAKEDEV.man,v 1.7 2009/03/18 17:34:25 sobrado Exp
-.\" OpenBSD: MAKEDEV.mansub,v 1.2 2004/02/20 19:13:01 miod Exp
-.\"
-.\" Copyright (c) 2004, Miodrag Vallat
-.\" Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org>
-.\"
-.\" Permission to use, copy, modify, and distribute this software for any
-.\" purpose with or without fee is hereby granted, provided that the above
-.\" copyright notice and this permission notice appear in all copies.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.\"
-.Dd $Mdocdate: October 23 2015 $
-.Dt MAKEDEV 8 aviion
-.Os
-.Sh NAME
-.Nm MAKEDEV
-.Nd create system and device special files
-.Sh SYNOPSIS
-.Nm MAKEDEV
-.Ar name ...
-.Sh DESCRIPTION
-The shell script
-.Nm ,
-found in the
-.Pa /dev
-directory, is used to create various special files.
-See
-.Xr intro 4
-for a more complete discussion of special files.
-.Pp
-.Nm
-takes any number of device names as arguments, where the names are
-the common abbreviation for the device or group of devices.
-.Pp
-Where a device name is followed by a star
-.Sq * ,
-the star must be replaced by a unit number.
-If units are expected for a device but not provided,
-.Nm
-will supply the standard numbers in most cases.
-.Pp
-The aviion supports the following devices:
-.Pp
-.Sy Special device names
-.Bl -tag -width tenletters -compact
-.It Ar all
-Creates special files for all devices on aviion.
-.It Ar ramdisk
-Ramdisk kernel devices.
-.It Ar std
-Creates the
-.Sq standard
-devices (console, klog, kmem, ksyms, mem, null,
-stderr, stdin, stdout, tty, zero)
-which are absolutely necessary for the system to function properly.
-.It Ar local
-Creates configuration-specific devices, by invoking the shell file
-.Pa MAKEDEV.local .
-.El
-.Pp
-.Sy Disks
-.Bl -tag -width tenletters -compact
-.It Ar cd*
-ATAPI and SCSI CD-ROM drives, see
-.Xr cd 4 .
-.It Ar rd*
-.Dq rd
-pseudo-disks, see
-.Xr rd 4 .
-.It Ar sd*
-SCSI disks, including flopticals, see
-.Xr sd 4 .
-.It Ar vnd*
-.Dq file
-pseudo-disk devices, see
-.Xr vnd 4 .
-.El
-.Pp
-.Sy Tapes
-.Bl -tag -width tenletters -compact
-.It Ar ch*
-SCSI media changers, see
-.Xr ch 4 .
-.It Ar st*
-SCSI tape drives, see
-.Xr st 4 .
-.El
-.Pp
-.Sy Terminal ports
-.Bl -tag -width tenletters -compact
-.It Ar ttya-c
-on-board serial and mouse ports, see
-.Xr dart 4 .
-.El
-.Pp
-.Sy Pseudo terminals
-.Bl -tag -width tenletters -compact
-.It Ar ptm
-pty master device, see
-.Xr ptm 4 .
-.It Ar pty*
-Set of 62 master pseudo terminals, see
-.Xr pty 4 .
-.It Ar tty*
-Set of 62 slave pseudo terminals, see
-.Xr tty 4 .
-.El
-.Pp
-.Sy Special purpose devices
-.Bl -tag -width tenletters -compact
-.It Ar bio
-ioctl tunnel pseudo-device, see
-.Xr bio 4 .
-.It Ar bpf*
-Berkeley Packet Filter, see
-.Xr bpf 4 .
-.It Ar diskmap
-Disk mapper, see
-.Xr diskmap 4 .
-.It Ar fd
-fd/* nodes, see
-.Xr fd 4 .
-.It Ar fuse
-Userland Filesystem, see
-.Xr fuse 4 .
-.It Ar nvram0
-On-board non-volatile memory, see
-.Xr nvram 4 .
-.It Ar pf*
-Packet Filter, see
-.Xr pf 4 .
-.It Ar pppx*
-PPP Multiplexer, see
-.Xr pppx 4 .
-.It Ar *random
-In-kernel random data source, see
-.Xr random 4 .
-.It Ar systrace*
-System call tracing device, see
-.Xr systrace 4 .
-.It Ar tun*
-Network tunnel driver, see
-.Xr tun 4 .
-.It Ar tap*
-Ethernet tunnel driver, see
-.Xr tap 4 .
-.It Ar uk*
-Unknown SCSI devices, see
-.Xr uk 4 .
-.It Ar vscsi*
-Virtual SCSI controller, see
-.Xr vscsi 4 .
-.El
-.Sh FILES
-.Bl -tag -width /dev -compact
-.It Pa /dev
-The special file directory.
-.El
-.Sh SEE ALSO
-.Xr intro 4 ,
-.Xr config 8 ,
-.Xr mknod 8
diff --git a/share/man/man8/man8.aviion/Makefile b/share/man/man8/man8.aviion/Makefile
deleted file mode 100644
index a71b294d92b..00000000000
--- a/share/man/man8/man8.aviion/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# $OpenBSD: Makefile,v 1.1 2006/05/09 21:24:47 miod Exp $
-
-MAN= MAKEDEV.8
-MANSUBDIR=aviion
-
-.include <bsd.prog.mk>
diff --git a/sys/Makefile b/sys/Makefile
index 3f86c9674fa..c87a1375706 100644
--- a/sys/Makefile
+++ b/sys/Makefile
@@ -1,8 +1,8 @@
-# $OpenBSD: Makefile,v 1.41 2014/03/18 22:36:31 miod Exp $
+# $OpenBSD: Makefile,v 1.42 2015/12/01 07:50:02 deraadt Exp $
# $NetBSD: Makefile,v 1.5 1995/09/15 21:05:21 pk Exp $
SUBDIR= dev/microcode \
- arch/alpha arch/amd64 arch/armish arch/armv7 arch/aviion \
+ arch/alpha arch/amd64 arch/armish arch/armv7 \
arch/hppa arch/hppa64 arch/i386 \
arch/landisk arch/loongson arch/luna88k \
arch/macppc arch/octeon \
diff --git a/sys/arch/aviion/Makefile b/sys/arch/aviion/Makefile
deleted file mode 100644
index 1244bf91995..00000000000
--- a/sys/arch/aviion/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-# $OpenBSD: Makefile,v 1.7 2013/12/08 14:46:39 espie Exp $
-
-S= ${.CURDIR}/../..
-KFILE= GENERIC
-.if exists(conf/GENERIC.MP)
-KFILE= GENERIC.MP
-.endif
-TDIRS= ${_arch} include
-TAGS= ${.CURDIR}/tags
-
-NOPROG=
-NOMAN=
-NOOBJ=
-SUBDIR= stand
-
-# config the fattest kernel we can find into a temporary dir
-# to create a Makefile. Then use make to pull some variables
-# out and push them into the sub-shell to expand the paths,
-# and finally run ctags.
-tags::
- TDIR=`mktemp -d /tmp/_tagXXXXXXXXXX` || exit 1; \
- eval "S=${S}" && \
- config -s ${S} -b $${TDIR} ${.CURDIR}/conf/${KFILE} && \
- eval "_arch=\"`make -V _arch -f $${TDIR}/Makefile`\"" && \
- eval "_mach=\"`make -V _mach -f $${TDIR}/Makefile`\"" && \
- eval "_machdir=\$S/arch/$${_mach}" && \
- eval "_archdir=\$S/arch/$${_arch}" && \
- eval "HFILES=\"`find $S \( -path $S/'arch' -o -path $S/stand -o -path $S/lib/libsa -o -path $S'/lib/libkern/arch' \) -prune -o -name '*.h'; find $${_machdir} $${_archdir} $S/lib/libkern/arch/$${_mach} \( -name boot -o -name stand \) -prune -o -name '*.h'`\"" && \
- eval "SFILES=\"`make -V SFILES -f $${TDIR}/Makefile`\"" && \
- eval "CFILES=\"`make -V CFILES -f $${TDIR}/Makefile`\"" && \
- eval "AFILES=\"`make -V AFILES -f $${TDIR}/Makefile`\"" && \
- ctags -wd -f ${TAGS} $${CFILES} $${HFILES} && \
- egrep "^[_A-Z]*ENTRY[_A-Z]*\(.*\)" $${SFILES} $${AFILES} | \
- sed "s;\\([^:]*\\):\\([^(]*\\)(\\([^, )]*\\)\\(.*\\);\\3 \\1 /^\\2(\\3\\4$$/;" \
- >> ${TAGS} && \
- sort -o ${TAGS} ${TAGS} && \
- rm -rf $${TDIR}
-
-links:
- -for i in conf ${TDIRS}; do \
- (cd $$i && rm -f tags; ln -s tags tags); done
-
-obj: _SUBDIRUSE
-
-.include <bsd.prog.mk>
diff --git a/sys/arch/aviion/aviion/autoconf.c b/sys/arch/aviion/aviion/autoconf.c
deleted file mode 100644
index ca33d594c12..00000000000
--- a/sys/arch/aviion/aviion/autoconf.c
+++ /dev/null
@@ -1,303 +0,0 @@
-/* $OpenBSD: autoconf.c,v 1.17 2015/04/25 21:15:08 miod Exp $ */
-/*
- * Copyright (c) 1998 Steve Murphree, Jr.
- * Copyright (c) 1996 Nivas Madhur
- * Copyright (c) 1994 Christian E. Hopps
- * 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 Christian E. Hopps.
- * 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/systm.h>
-#include <sys/buf.h>
-#include <sys/reboot.h>
-#include <sys/conf.h>
-#include <sys/device.h>
-#include <sys/disklabel.h>
-#include <sys/kernel.h>
-
-#include <machine/asm_macro.h>
-#include <machine/autoconf.h>
-#include <machine/board.h>
-#include <machine/cpu.h>
-#include <machine/prom.h>
-
-#ifdef AV530
-#include <machine/av530.h>
-#endif
-
-#include <scsi/scsi_all.h>
-#include <scsi/scsiconf.h>
-
-#include <dev/cons.h>
-
-#include "sd.h"
-#include "st.h"
-
-/*
- * The following several variables are related to
- * the configuration process, and are used in initializing
- * the machine.
- */
-
-void dumpconf(void);
-
-int cold = 1; /* 1 if still booting */
-
-static struct device *bootctrl; /* boot controller */
-static struct device *bootdv; /* boot device (if found) */
-u_int bootdev = 0; /* set in locore.S, can't be in .bss */
-u_int bootunit = 0; /* set in locore.S, can't be in .bss */
-u_int bootlun = 0; /* set in locore.S, can't be in .bss */
-u_int bootpart = 0; /* set in locore.S, can't be in .bss */
-static uint32_t bootdevtype; /* boot controller SCM name */
-static paddr_t bootctrlpaddr; /* boot controller address */
-
-/*
- * called at boot time, configure all devices on the system.
- */
-void
-cpu_configure()
-{
- printf("bootpath: '%s' dev %u unit %u lun %u\n",
- bootargs, bootdev, bootunit, bootlun);
-
- softintr_init();
-
- if (config_rootfound("mainbus", "mainbus") == 0)
- panic("no mainbus found");
-
- /* NO PROM CALLS FROM NOW ON */
-
- cold = 0;
-
- /*
- * Turn external interrupts on.
- */
- set_psr(get_psr() & ~PSR_IND);
- spl0();
-}
-
-void
-diskconf(void)
-{
- printf("boot device: %s\n",
- (bootdv) ? bootdv->dv_xname : "<unknown>");
-
- setroot(bootdv, bootpart, RB_USERREQ);
- dumpconf();
-
-}
-
-/*
- * Parse the commandline.
- *
- * This has two goals: first, turn the necessary options into boothowto
- * flags; second, convert the PROM boot device into the matching OpenBSD
- * driver name.
- */
-
-/* skip end of token and whitespace */
-static char *stws(char *);
-static char *
-stws(char *p)
-{
- while (*p != ' ' && *p != '\0')
- p++;
-
- while (*p == ' ')
- p++;
-
- return (p);
-}
-
-/* parse a positive base 10 number */
-static u_int strtoi(const char *);
-static u_int
-strtoi(const char *s)
-{
- int c;
- u_int val = 0;
-
- if (s == NULL || *s == '\0')
- return 0;
-
- /* skip whitespace */
- do {
- c = *s++;
- } while (c == ' ' || c == '\t');
-
- for (;;) {
- if (c < '0' || c > '9')
- break;
- val *= 10;
- val += c - '0';
- c = *s++;
- }
-
- return val;
-}
-
-void
-cmdline_parse(void)
-{
- char *p;
-
- /*
- * If the boot commandline has been manually entered, it
- * may end with a '\r' character.
- */
- for (p = bootargs; *p != '\0'; p++)
- ;
- if (p != bootargs)
- if (*--p == '\r')
- *p = '\0';
-
- /*
- * Skip boot device ``foo(ctrl,dev,lun)'' and filename,
- * i.e. eat everything until whitespace.
- */
- p = stws(bootargs);
- while (*p != '\0') {
- if (*p++ == '-')
- while (*p != ' ' && *p != '\0')
- switch (*p++) {
- case 'a':
- boothowto |= RB_ASKNAME;
- break;
- case 'b':
- boothowto |= RB_KDB;
- break;
- case 'c':
- boothowto |= RB_CONFIG;
- break;
- case 's':
- boothowto |= RB_SINGLE;
- break;
- }
- p = stws(p);
- }
-
- /*
- * Now parse the boot device. We are only interested in the
- * device type, since the PROM has cracked the controller, unit
- * and partition numbers for us already, and we do not care about
- * our own filename...
- *
- * However, in the sd() or st() cases, we need to figure out the
- * SCSI controller name (if not the default one) and address, if
- * provided.
- *
- * Note that we will override bootdev at this point. If no boot
- * controller number or address was provided, bootdev will be set
- * to zero anyway.
- */
- if (memcmp(bootargs, "sd", 2) == 0 ||
- memcmp(bootargs, "st", 2) == 0) {
- /*
- * Either
- * sd(bootdev,bootunit,bootlun)
- * or
- * sd(ctrl(bootdev,id),bootunit,bootlun)
- * We already know bootdev, bootunit and bootlun.
- * All we need here is to figure out the controller type
- * and address.
- */
- if (bootargs[7] == '(') {
- bcopy(bootargs + 3, &bootdevtype, sizeof(uint32_t));
- bootdev = strtoi(bootargs + 8);
- }
- } else {
- bcopy(bootargs, &bootdevtype, sizeof(int));
- bootdev = strtoi(bootargs + 5);
- }
-
- /* fill the holes */
- bootctrlpaddr = platform->get_boot_device(&bootdevtype, bootdev);
-}
-
-void
-device_register(struct device *dev, void *aux)
-{
- struct confargs *ca = (struct confargs *)aux;
- struct cfdriver *cf = dev->dv_cfdata->cf_driver;
- struct device *parent = dev->dv_parent;
-
- if (bootdv != NULL)
- return;
-
- if (bootctrl == NULL) {
- if (ca->ca_paddr != bootctrlpaddr)
- return;
-
- switch (bootdevtype) {
- case SCM_INEN:
- case SCM_DGEN:
- if (strcmp("le", cf->cd_name) == 0 &&
- strcmp("syscon",
- parent->dv_cfdata->cf_driver->cd_name) == 0)
- bootctrl = dev;
- break;
-
- case SCM_INSC:
- if (strcmp("oaic", cf->cd_name) == 0 &&
- strcmp("syscon",
- parent->dv_cfdata->cf_driver->cd_name) == 0)
- bootctrl = dev;
- break;
-
- case SCM_NCSC:
- if (strcmp("oosiop", cf->cd_name) == 0 &&
- strcmp("syscon",
- parent->dv_cfdata->cf_driver->cd_name) == 0)
- bootctrl = dev;
- break;
- }
-
- if (bootctrl != NULL && bootctrl->dv_class == DV_IFNET)
- bootdv = bootctrl;
- return;
- }
-
- if (memcmp(cf->cd_name, bootargs, 2) == 0 &&
- (strcmp("sd", cf->cd_name) == 0 ||
- strcmp("st", cf->cd_name) == 0)) {
- struct scsi_attach_args *saa = aux;
- if (saa->sa_sc_link->target == bootunit &&
- saa->sa_sc_link->lun == bootlun &&
- parent->dv_parent == bootctrl)
- bootdv = dev;
- }
-}
-
-struct nam2blk nam2blk[] = {
- { "sd", 4 },
- { "cd", 6 },
- { "rd", 7 },
- { "vnd", 8 },
- { NULL, -1 }
-};
diff --git a/sys/arch/aviion/aviion/av400_machdep.c b/sys/arch/aviion/aviion/av400_machdep.c
deleted file mode 100644
index 661a9fd82d9..00000000000
--- a/sys/arch/aviion/aviion/av400_machdep.c
+++ /dev/null
@@ -1,798 +0,0 @@
-/* $OpenBSD: av400_machdep.c,v 1.28 2015/05/18 04:06:37 miod Exp $ */
-/*
- * Copyright (c) 2006, 2007, Miodrag Vallat.
- *
- * 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.
- *
- * 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) 1998, 1999, 2000, 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.
- *
- */
-/*
- * Copyright (c) 1999 Steve Murphree, Jr.
- * 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.
- *
- * 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) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- * Copyright (c) 1995 Nivas Madhur
- * Copyright (c) 1994 Gordon W. Ross
- * Copyright (c) 1993 Adam Glass
- *
- * 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. 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.
- *
- * @(#)clock.c 8.1 (Berkeley) 6/11/93
- */
-/*
- * Mach Operating System
- * Copyright (c) 1993-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 <sys/kernel.h>
-#include <sys/device.h>
-#include <sys/errno.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <machine/asm_macro.h>
-#include <machine/board.h>
-#include <machine/bus.h>
-#include <machine/cmmu.h>
-#include <machine/cpu.h>
-#include <machine/pmap_table.h>
-#include <machine/reg.h>
-#include <machine/trap.h>
-
-#include <machine/m88100.h>
-#include <machine/m8820x.h>
-#include <machine/avcommon.h>
-#include <machine/av400.h>
-#include <machine/prom.h>
-
-#include <aviion/dev/sysconvar.h>
-#include <aviion/dev/vmevar.h>
-
-#ifdef MULTIPROCESSOR0
-#include <machine/db_machdep.h>
-#endif
-
-u_int av400_safe_level(u_int, u_int);
-void av400_clock_ipi_handler(struct trapframe *);
-void av400_ipi_handler(struct trapframe *);
-
-const struct pmap_table
-av400_ptable[] = {
- { AV400_PROM, AV400_PROM_SIZE, PROT_READ | PROT_WRITE, CACHE_INH },
-#if 0 /* mapped by the hardcoded BATC entries */
- { AV400_UTILITY,AV400_UTILITY_SIZE, PROT_READ | PROT_WRITE, CACHE_INH },
-#endif
- { 0, (vsize_t)-1, 0, 0 }
-};
-
-const struct vme_range vme_av400[] = {
- { VME_A16,
- AV400_VME16_START, AV400_VME16_END, AV400_VME16_BASE },
- { VME_A24,
- AV400_VME24_START, AV400_VME24_END, AV400_VME24_BASE },
- { VME_A32,
- AV400_VME32_START1, AV400_VME32_END1, AV400_VME32_BASE },
- { VME_A32,
- AV400_VME32_START2, AV400_VME32_END2, AV400_VME32_BASE },
- { 0 }
-};
-
-const struct board board_av400 = {
- av400_bootstrap,
- av400_memsize,
- av400_startup,
- av400_get_boot_device,
- av400_intr,
- cio_init_clocks,
- av400_getipl,
- av400_setipl,
- av400_raiseipl,
-#ifdef MULTIPROCESSOR
- NULL, /* av400_send_ipi, */
- m88100_smp_setup,
-#endif
- av400_intsrc,
- av400_exintsrc,
- av400_get_vme_ranges,
-
- av400_ptable
-};
-
-/*
- * The MVME188 interrupt arbiter has 25 orthogonal interrupt sources.
- * On the AViiON machines, there are even more interrupt sources in use,
- * but differences are minimal.
- * We fold this model in the 8-level spl model this port uses, enforcing
- * priorities manually with the interrupt masks.
- */
-
-/*
- * Copy of the interrupt enable register for each CPU.
- * Note that, on the AV400 design, the interrupt enable registers are
- * write-only and read back as 0xffffffff.
- */
-u_int32_t av400_int_mask_reg[] = { 0, 0, 0, 0 };
-
-u_int av400_curspl[] = { IPL_HIGH, IPL_HIGH, IPL_HIGH, IPL_HIGH };
-
-#ifdef MULTIPROCESSOR0
-/*
- * Interrupts allowed on secondary processors.
- */
-#define SLAVE_MASK 0
-#endif
-
-/*
- * Figure out how much memory is available, by asking the PROM.
- */
-vaddr_t
-av400_memsize()
-{
- vaddr_t memsize0, memsize1;
-
- memsize0 = scm_memsize(0);
- memsize1 = scm_memsize(1);
-
- /*
- * What we got is the ``top of memory'', i.e. the largest addressable
- * word address, ending in 0xffc. Round up to a multiple of a page.
- */
- memsize0 = round_page(memsize0);
- memsize1 = round_page(memsize1);
-
- physmem = atop(memsize0);
- return (memsize1);
-}
-
-void
-av400_startup()
-{
-}
-
-u_int
-av400_bootstrap()
-{
- extern const struct cmmu_p cmmu8820x;
- extern u_char hostaddr[6];
-
- /*
- * These are the fixed assignments on AV400 designs.
- */
- cmmu = &cmmu8820x;
- m8820x_cmmu[0].cmmu_regs = (void *)AV400_CMMU_I0;
- m8820x_cmmu[1].cmmu_regs = (void *)AV400_CMMU_D0;
- m8820x_cmmu[2].cmmu_regs = (void *)AV400_CMMU_I1;
- m8820x_cmmu[3].cmmu_regs = (void *)AV400_CMMU_D1;
- m8820x_cmmu[4].cmmu_regs = (void *)AV400_CMMU_I2;
- m8820x_cmmu[5].cmmu_regs = (void *)AV400_CMMU_D2;
- m8820x_cmmu[6].cmmu_regs = (void *)AV400_CMMU_I3;
- m8820x_cmmu[7].cmmu_regs = (void *)AV400_CMMU_D3;
-
- /* clear and disable all interrupts */
- *(volatile u_int32_t *)AV_IENALL = 0;
-
- /*
- * Get all the information we'll need later from the PROM, while
- * we can still use it.
- */
- scm_getenaddr(hostaddr);
-
- /*
- * Return the delay const value to use (which matches the CPU speed).
- */
- switch (cputyp) {
- case AVIION_300_310:
- case AVIION_400_4000:
- case AVIION_300C_310C:
- case AVIION_300CD_310CD:
- case AVIION_300D_310D:
- case AVIION_4300_16:
- return 16;
- case AVIION_410_4100:
- case AVIION_4300_20:
- return 20;
- default:
- case AVIION_4300_25:
- return 25;
- }
-}
-
-/*
- * Return the address of the boot device, providing the default boot device
- * if none is requested.
- */
-paddr_t
-av400_get_boot_device(uint32_t *name, u_int unit)
-{
- /* default boot device is on-board insc() */
- if (*name == 0)
- *name = SCM_INSC;
-
- switch (*name) {
- case SCM_INEN:
- if (unit == 0)
- return AV400_LAN;
- break;
- case SCM_INSC:
- if (unit == 0)
- return AV400_SCSI;
- break;
- }
-
- return 0;
-}
-
-/*
- * Return the next ipl >= ``curlevel'' at which we can reenable interrupts
- * while keeping ``mask'' masked.
- */
-u_int
-av400_safe_level(u_int mask, u_int curlevel)
-{
- int i;
-
-#ifdef MULTIPROCESSOR0
- if (mask & AV400_CLOCK_IPI_MASK)
- curlevel = max(IPL_CLOCK, curlevel);
- mask &= ~(AV400_IPI_MASK | AV400_CLOCK_IPI_MASK);
-#endif
- for (i = curlevel; i < NIPLS; i++)
- if ((int_mask_val[i] & mask) == 0)
- return i;
-
- return (NIPLS - 1);
-}
-
-u_int
-av400_getipl(void)
-{
- return av400_curspl[cpu_number()];
-}
-
-u_int
-av400_setipl(u_int level)
-{
- u_int32_t mask, curspl, psr;
- u_int cpu = cpu_number();
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- curspl = av400_curspl[cpu];
-
- mask = int_mask_val[level];
-#ifdef MULTIPROCESSOR0
- if (cpu != master_cpu)
- mask &= SLAVE_MASK;
- mask |= AV400_SWI_IPI_MASK(cpu);
- if (level < IPL_CLOCK)
- mask |= AV400_SWI_CLOCK_IPI_MASK(cpu);
-#endif
-
- av400_curspl[cpu] = level;
- *(u_int32_t *)AV_IEN(cpu) = av400_int_mask_reg[cpu] = mask;
- /*
- * We do not flush the pipeline here, because interrupts are disabled,
- * and set_psr() will synchronize the pipeline.
- */
- set_psr(psr);
-
- return curspl;
-}
-
-u_int
-av400_raiseipl(u_int level)
-{
- u_int32_t mask, curspl, psr;
- u_int cpu = cpu_number();
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- curspl = av400_curspl[cpu];
- if (curspl < level) {
- mask = int_mask_val[level];
-#ifdef MULTIPROCESSOR0
- if (cpu != master_cpu)
- mask &= SLAVE_MASK;
- mask |= AV400_SWI_IPI_MASK(cpu);
- if (level < IPL_CLOCK)
- mask |= AV400_SWI_CLOCK_IPI_MASK(cpu);
-#endif
-
- av400_curspl[cpu] = level;
- *(u_int32_t *)AV_IEN(cpu) = av400_int_mask_reg[cpu] = mask;
- }
- /*
- * We do not flush the pipeline here, because interrupts are disabled,
- * and set_psr() will synchronize the pipeline.
- */
- set_psr(psr);
-
- return curspl;
-}
-
-#ifdef MULTIPROCESSOR0
-
-void
-av400_send_ipi(int ipi, cpuid_t cpu)
-{
- struct cpu_info *ci = &m88k_cpus[cpu];
- uint32_t bits = 0;
-
- if (ci->ci_ipi & ipi)
- return;
-
- atomic_setbits_int(&ci->ci_ipi, ipi);
- if (ipi & ~(CI_IPI_HARDCLOCK | CI_IPI_STATCLOCK))
- bits |= AV400_SWI_IPI_BIT(cpu);
- if (ipi & (CI_IPI_HARDCLOCK | CI_IPI_STATCLOCK))
- bits |= AV400_SWI_CLOCK_IPI_BIT(cpu);
- *(volatile u_int32_t *)AV400_SETSWI = bits;
-}
-
-/*
- * Process inter-processor interrupts.
- */
-
-/*
- * Unmaskable IPIs - those are processed with interrupts disabled,
- * and no lock held.
- */
-void
-av400_ipi_handler(struct trapframe *eframe)
-{
- struct cpu_info *ci = curcpu();
- int ipi = ci->ci_ipi & (CI_IPI_DDB | CI_IPI_NOTIFY);
-
- *(volatile u_int32_t *)AV400_CLRSWI = AV400_SWI_IPI_BIT(ci->ci_cpuid);
- atomic_clearbits_int(&ci->ci_ipi, ipi);
-
- if (ipi & CI_IPI_DDB) {
-#ifdef DDB
- /*
- * Another processor has entered DDB. Spin on the ddb lock
- * until it is done.
- */
- extern struct __mp_lock ddb_mp_lock;
-
- __mp_lock(&ddb_mp_lock);
- __mp_unlock(&ddb_mp_lock);
-
- /*
- * If ddb is hoping to us, it's our turn to enter ddb now.
- */
- if (ci->ci_cpuid == ddb_mp_nextcpu)
- Debugger();
-#endif
- }
- if (ipi & CI_IPI_NOTIFY) {
- /* nothing to do */
- }
-}
-
-/*
- * Maskable IPIs
- */
-void
-av400_clock_ipi_handler(struct trapframe *eframe)
-{
- struct cpu_info *ci = curcpu();
- int ipi = ci->ci_ipi & (CI_IPI_HARDCLOCK | CI_IPI_STATCLOCK);
-
- /* clear clock ipi interrupt */
- *(volatile u_int32_t *)AV400_CLRSWI =
- AV400_SWI_CLOCK_IPI_BIT(ci->ci_cpuid);
- atomic_clearbits_int(&ci->ci_ipi, ipi);
-
- if (ipi & CI_IPI_HARDCLOCK)
- hardclock((struct clockframe *)eframe);
-#if 0 /* no separate statclock yet */
- if (ipi & CI_IPI_STATCLOCK)
- statclock((struct clockframe *)eframe);
-#endif
-}
-
-#endif
-
-/*
- * Provide the interrupt masks for a given logical interrupt source.
- */
-u_int32_t
-av400_intsrc(int i)
-{
- static const u_int32_t intsrc[] = {
- 0,
- AV400_IRQ_ABORT,
- AV400_IRQ_ACF,
- AV400_IRQ_SF,
- AV400_IRQ_CIOI,
- AV400_IRQ_DI1,
- AV400_IRQ_DI2,
- AV400_IRQ_ECI,
- 0,
- AV400_IRQ_SCI,
- AV400_IRQ_DTC,
- AV400_IRQ_VME1,
- AV400_IRQ_VME2,
- AV400_IRQ_VME3,
- AV400_IRQ_VME4,
- AV400_IRQ_VME5,
- AV400_IRQ_VME6,
- AV400_IRQ_VME7
- };
-
- return intsrc[i];
-}
-
-u_int32_t
-av400_exintsrc(int i)
-{
- return 0;
-}
-
-/*
- * Provide the interrupt source for a given interrupt status bit.
- */
-static const u_int av400_obio_vec[32] = {
- 0, /* SWI0 */
- 0, /* SWI1 */
- 0,
- 0,
- INTSRC_VME(1), /* VME1 */
- INTSRC_SCSI1, /* SCI */
- INTSRC_VME(2), /* VME2 */
- 0,
- 0,
- 0, /* DVB */
- INTSRC_VME(3), /* VME3 */
- 0, /* DWP */
- INTSRC_VME(4), /* VME4 */
- INTSRC_DMA, /* DTC */
- INTSRC_VME(5), /* VME5 */
- INTSRC_ETHERNET1, /* ECI */
- INTSRC_DUART2, /* DI2 */
- INTSRC_DUART1, /* DI1 */
- 0, /* PPI */
- INTSRC_VME(6), /* VME6 */
- INTSRC_SYSFAIL, /* SF */
- INTSRC_CLOCK, /* CIOI */
- 0, /* KBD */
- INTSRC_VME(7), /* VME7 */
- 0, /* PAR */
- 0, /* VID */
- 0, /* ZBUF */
- 0,
- 0,
- 0, /* ARBTO */
- INTSRC_ACFAIL, /* ACF */
- INTSRC_ABORT /* ABORT */
-};
-
-/*
- * Device interrupt handler for AV400
- */
-
-#define VME_VECTOR_MASK 0x1ff /* mask into VIACK register */
-#define VME_BERR_MASK 0x100 /* timeout during VME IACK cycle */
-
-#define ISR_GET_CURRENT_MASK(cpu) \
- (*(volatile u_int *)AV_IST & av400_int_mask_reg[cpu])
-
-void
-av400_intr(struct trapframe *eframe)
-{
- u_int cpu = cpu_number();
- u_int32_t cur_mask, ign_mask;
- u_int level, old_spl;
- struct intrhand *intr;
- intrhand_t *list;
- int ret, intbit;
- vaddr_t ivec;
- u_int intsrc, vec;
- int unmasked = 0;
- int warn;
-#ifdef DIAGNOSTIC
- static int problems = 0;
-#endif
-
- cur_mask = ISR_GET_CURRENT_MASK(cpu);
- ign_mask = 0;
- old_spl = eframe->tf_mask;
-
- if (cur_mask == 0) {
- /*
- * Spurious interrupts - may be caused by debug output clearing
- * DUART interrupts.
- */
-#ifdef MULTIPROCESSOR0
- if (cpu != master_cpu) {
- if (++problems >= 10) {
- printf("cpu%d: interrupt pin won't clear, "
- "disabling processor\n", cpu);
- cpu_emergency_disable();
- /* NOTREACHED */
- }
- }
-#endif
- flush_pipeline();
- goto out;
- }
-
- uvmexp.intrs++;
-
-#ifdef MULTIPROCESSOR0
- /*
- * Handle unmaskable IPIs immediately, so that we can reenable
- * interrupts before further processing. We rely on the interrupt
- * mask to make sure that if we get an IPI, it's really for us
- * and no other processor.
- */
- if (cur_mask & AV400_IPI_MASK) {
- av400_ipi_handler(eframe);
- cur_mask &= ~AV400_IPI_MASK;
- if (cur_mask == 0)
- goto out;
- }
-#endif
-
- /*
- * We want to service all interrupts marked in the IST register
- * They are all valid because the mask would have prevented them
- * from being generated otherwise. We will service them in order of
- * priority.
- */
- for (;;) {
- cur_mask = ISR_GET_CURRENT_MASK(cpu);
-#ifdef MULTIPROCESSOR0
- cur_mask &= ~AV400_IPI_MASK;
-#endif
- if ((cur_mask & ~ign_mask) == 0)
- break;
-
- level = av400_safe_level(cur_mask, old_spl);
- av400_setipl(level);
-
- if (unmasked == 0) {
- set_psr(get_psr() & ~PSR_IND);
- unmasked = 1;
- }
-
-#ifdef MULTIPROCESSOR0
- /*
- * Handle pending maskable IPIs first.
- */
- if (cur_mask & AV400_CLOCK_IPI_MASK) {
- av400_clock_ipi_handler(eframe);
- cur_mask &= ~AV400_CLOCK_IPI_MASK;
- if ((cur_mask & ~ign_mask) == 0)
- break;
- }
-#endif
-
- /* find the first bit set in the current mask */
- warn = 0;
- intbit = ff1(cur_mask);
- intsrc = av400_obio_vec[intbit];
-
- if (intsrc == 0)
- panic("%s: unexpected interrupt source (bit %d), "
- "level %d, mask 0x%b",
- __func__, intbit, level,
- cur_mask, AV400_IST_STRING);
-
- if (IS_VME_INTSRC(intsrc)) {
- level = VME_INTSRC_LEVEL(intsrc);
- ivec = AV400_VIRQLV + (level << 2);
- vec = *(volatile u_int32_t *)ivec & VME_VECTOR_MASK;
- if (vec & VME_BERR_MASK) {
- printf("%s: timeout getting VME "
- "interrupt vector, "
- "level %d, mask 0x%b\n",
- __func__, level,
- cur_mask, AV400_IST_STRING);
- ign_mask |= 1 << intbit;
- continue;
- }
- list = &vmeintr_handlers[vec];
- } else {
- list = &sysconintr_handlers[intsrc];
- }
-
- if (SLIST_EMPTY(list)) {
- warn = 1;
- } else {
- /*
- * Walk through all interrupt handlers in the chain
- * for the given vector, calling each handler in turn,
- * until some handler returns a value != 0.
- */
- ret = 0;
- SLIST_FOREACH(intr, list, ih_link) {
-#ifdef MULTIPROCESSOR
- if (intr->ih_ipl < IPL_CLOCK)
- __mp_lock(&kernel_lock);
-#endif
- if (ISSET(intr->ih_flags, INTR_WANTFRAME))
- ret = (*intr->ih_fn)((void *)eframe);
- else
- ret = (*intr->ih_fn)(intr->ih_arg);
-#ifdef MULTIPROCESSOR
- if (intr->ih_ipl < IPL_CLOCK)
- __mp_unlock(&kernel_lock);
-#endif
- if (ret != 0) {
- intr->ih_count.ec_count++;
- break;
- }
- }
- if (ret == 0)
- warn = 2;
- }
-
- if (warn != 0) {
- ign_mask |= 1 << intbit;
-
- if (IS_VME_INTSRC(intsrc))
- printf("%s: %s VME interrupt, "
- "level %d, vec 0x%x, mask 0x%b\n",
- __func__,
- warn == 1 ? "spurious" : "unclaimed",
- level, vec,
- cur_mask, AV400_IST_STRING);
- else
- printf("%s: %s interrupt, "
- "level %d, bit %d, mask 0x%b\n",
- __func__,
- warn == 1 ? "spurious" : "unclaimed",
- level, intbit, cur_mask, AV400_IST_STRING);
- }
- }
-
-#ifdef DIAGNOSTIC
- if (ign_mask != 0) {
- if (++problems >= 10)
- panic("%s: broken interrupt behaviour", __func__);
- } else
- problems = 0;
-#endif
-
-out:
- /*
- * process any remaining data access exceptions before
- * returning to assembler
- */
- if (eframe->tf_dmt0 & DMT_VALID)
- m88100_trap(T_DATAFLT, eframe);
-
- /*
- * Disable interrupts before returning to assembler, the spl will
- * be restored later.
- */
- set_psr(get_psr() | PSR_IND);
-}
-
-const struct vme_range *
-av400_get_vme_ranges(void)
-{
- /* no VME slots on models 100/200/300 */
- switch (cpuid) {
- case AVIION_300_310:
- case AVIION_300C_310C:
- case AVIION_300CD_310CD:
- case AVIION_300D_310D:
- return NULL;
- default:
- return vme_av400;
- }
-}
diff --git a/sys/arch/aviion/aviion/av530_machdep.c b/sys/arch/aviion/aviion/av530_machdep.c
deleted file mode 100644
index 10a41461e16..00000000000
--- a/sys/arch/aviion/aviion/av530_machdep.c
+++ /dev/null
@@ -1,785 +0,0 @@
-/* $OpenBSD: av530_machdep.c,v 1.16 2015/05/18 04:06:37 miod Exp $ */
-/*
- * Copyright (c) 2006, 2007, 2010 Miodrag Vallat.
- *
- * 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.
- *
- * 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/systm.h>
-#include <sys/kernel.h>
-#include <sys/device.h>
-#include <sys/errno.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <machine/asm_macro.h>
-#include <machine/board.h>
-#include <machine/bus.h>
-#include <machine/cmmu.h>
-#include <machine/cpu.h>
-#include <machine/pmap_table.h>
-#include <machine/trap.h>
-
-#include <machine/m88100.h>
-#include <machine/m8820x.h>
-#include <machine/avcommon.h>
-#include <machine/av530.h>
-#include <machine/prom.h>
-
-#include <aviion/dev/sysconvar.h>
-#include <aviion/dev/vmevar.h>
-
-#ifdef MULTIPROCESSOR
-#include <machine/db_machdep.h>
-#endif
-
-u_int av530_safe_level(u_int, u_int, u_int);
-void av530_clock_ipi_handler(struct trapframe *);
-void av530_ipi_handler(struct trapframe *);
-
-const struct pmap_table
-av530_ptable[] = {
- { AV530_PROM, AV530_PROM_SIZE, PROT_READ | PROT_WRITE, CACHE_INH },
-#if 0 /* mapped by the hardcoded BATC entries */
- { AV530_UTILITY,AV530_UTILITY_SIZE, PROT_READ | PROT_WRITE, CACHE_INH },
-#endif
- { 0, (vsize_t)-1, 0, 0 }
-};
-
-const struct vme_range vme_av530[] = {
- { VME_A16,
- AV530_VME16_START, AV530_VME16_END, AV530_VME16_BASE },
- { VME_A24,
- AV530_VME24_START, AV530_VME24_END, AV530_VME24_BASE },
- { VME_A32,
- AV530_VME32_START1, AV530_VME32_END1, AV530_VME32_BASE },
- { VME_A32,
- AV530_VME32_START2, AV530_VME32_END2, AV530_VME32_BASE },
- { 0 }
-};
-
-const struct board board_av530 = {
- av530_bootstrap,
- av530_memsize,
- av530_startup,
- av530_get_boot_device,
- av530_intr,
- rtc_init_clocks,
- av530_getipl,
- av530_setipl,
- av530_raiseipl,
-#ifdef MULTIPROCESSOR
- av530_send_ipi,
- m88100_smp_setup,
-#endif
- av530_intsrc,
- av530_exintsrc,
- av530_get_vme_ranges,
-
- av530_ptable
-};
-
-/*
- * The AViiON 530 machines have two interrupt arbiter for 32 orthognal
- * interrupt sources each.
- * We fold this model in the 8-level spl model this port uses, enforcing
- * priorities manually with the interrupt masks.
- */
-
-/*
- * Copy of the interrupt enable registers for each CPU.
- */
-u_int32_t av530_int_mask_reg[] = { 0, 0, 0, 0 };
-u_int32_t av530_ext_int_mask_reg[] = { 0, 0, 0, 0 };
-
-u_int av530_curspl[] = { IPL_HIGH, IPL_HIGH, IPL_HIGH, IPL_HIGH };
-
-#ifdef MULTIPROCESSOR
-/*
- * Interrupts allowed on secondary processors.
- */
-#define SLAVE_MASK 0
-#define SLAVE_EXMASK 0
-#endif
-
-/*
- * Figure out how much memory is available, by asking the PROM.
- */
-vaddr_t
-av530_memsize()
-{
- vaddr_t memsize0, memsize1;
-
- memsize0 = scm_memsize(0);
- memsize1 = scm_memsize(1);
-
- /*
- * What we got is the ``top of memory'', i.e. the largest addressable
- * word address, ending in 0xffc. Round up to a multiple of a page.
- */
- memsize0 = round_page(memsize0);
- memsize1 = round_page(memsize1);
-
- physmem = atop(memsize0);
- return (memsize1);
-}
-
-void
-av530_startup()
-{
-}
-
-u_int
-av530_bootstrap()
-{
- extern const struct cmmu_p cmmu8820x;
- uint32_t whoami;
-
- /*
- * Set up CMMU addresses. We need to access the WHOAMI register
- * early since addresses differ between the 6:1 and 2:1 designs.
- */
- cmmu = &cmmu8820x;
- whoami = (*(volatile u_int32_t *)AV_WHOAMI & 0xf0) >> 4;
- switch (whoami) {
- default: /* 2:1 systems */
- m8820x_cmmu[0].cmmu_regs = (void *)AV530_CMMU_I0;
- m8820x_cmmu[1].cmmu_regs = (void *)AV530_CMMU_D0;
- m8820x_cmmu[2].cmmu_regs = (void *)AV530_CMMU_I1;
- m8820x_cmmu[3].cmmu_regs = (void *)AV530_CMMU_D1;
- break;
- case 3:
- case 7: /* 6:1 systems */
- m8820x_cmmu[0].cmmu_regs = (void *)AV530_CMMU6_I0;
- m8820x_cmmu[1].cmmu_regs = (void *)AV530_CMMU6_D0;
- m8820x_cmmu[2].cmmu_regs = (void *)AV530_CMMU6_I1;
- m8820x_cmmu[3].cmmu_regs = (void *)AV530_CMMU6_D1;
- m8820x_cmmu[4].cmmu_regs = (void *)AV530_CMMU6_I2;
- m8820x_cmmu[6].cmmu_regs = (void *)AV530_CMMU6_I3;
-
- m8820x_cmmu[8].cmmu_regs = (void *)AV530_CMMU6_I4;
- m8820x_cmmu[9].cmmu_regs = (void *)AV530_CMMU6_D2;
- m8820x_cmmu[10].cmmu_regs = (void *)AV530_CMMU6_I5;
- m8820x_cmmu[11].cmmu_regs = (void *)AV530_CMMU6_D3;
- m8820x_cmmu[12].cmmu_regs = (void *)AV530_CMMU6_I6;
- m8820x_cmmu[14].cmmu_regs = (void *)AV530_CMMU6_I7;
- break;
- }
-
- /* clear and disable all interrupts */
- *(volatile u_int32_t *)AV_IENALL = 0;
- *(volatile u_int32_t *)AV_EXIENALL = 0;
-
- /*
- * Return the delay const value to use (which matches the CPU speed).
- */
- return 33;
-}
-
-/*
- * Return the address of the boot device, providing the default boot device
- * if none is requested.
- */
-paddr_t
-av530_get_boot_device(uint32_t *name, u_int unit)
-{
- /* default boot device is on-board ncsc() */
- if (*name == 0)
- *name = SCM_NCSC;
-
- switch (*name) {
- case SCM_DGEN:
- switch (unit) {
- case 0:
- return AV530_LAN1;
- case 1:
- return AV530_LAN2;
- }
- break;
- case SCM_NCSC:
- switch (unit) {
- case 0:
- return AV530_SCSI1;
- case 1:
- return AV530_SCSI2;
- }
- break;
- }
-
- return 0;
-}
-
-/*
- * Return the next ipl >= ``curlevel'' at which we can reenable interrupts
- * while keeping ``mask'' and ``exmask'' masked.
- */
-u_int
-av530_safe_level(u_int mask, u_int exmask, u_int curlevel)
-{
- int i;
-
-#ifdef MULTIPROCESSOR
- if (mask & AV530_CLOCK_IPI_MASK)
- curlevel = max(IPL_CLOCK, curlevel);
- mask &= ~(AV530_IPI_MASK | AV530_CLOCK_IPI_MASK);
-#endif
- for (i = curlevel; i < NIPLS; i++)
- if ((int_mask_val[i] & mask) == 0 &&
- (ext_int_mask_val[i] & exmask) == 0)
- return i;
-
- return (NIPLS - 1);
-}
-
-u_int
-av530_getipl(void)
-{
- return av530_curspl[cpu_number()];
-}
-
-u_int
-av530_setipl(u_int level)
-{
- u_int32_t mask, exmask, curspl, psr;
- u_int cpu = cpu_number();
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- curspl = av530_curspl[cpu];
-
- mask = int_mask_val[level];
- exmask = ext_int_mask_val[level];
-#ifdef MULTIPROCESSOR
- if (cpu != master_cpu) {
- mask &= SLAVE_MASK;
- exmask &= SLAVE_EXMASK;
- }
- mask |= AV530_SWI_IPI_MASK(cpu);
- if (level < IPL_CLOCK)
- mask |= AV530_SWI_CLOCK_IPI_MASK(cpu);
-#endif
-
- av530_curspl[cpu] = level;
- *(u_int32_t *)AV_IEN(cpu) = av530_int_mask_reg[cpu] = mask;
- *(u_int32_t *)AV_EXIEN(cpu) = av530_ext_int_mask_reg[cpu] = exmask;
- /*
- * We do not flush the pipeline here, because interrupts are disabled,
- * and set_psr() will synchronize the pipeline.
- */
- set_psr(psr);
-
- return curspl;
-}
-
-u_int
-av530_raiseipl(u_int level)
-{
- u_int32_t mask, exmask, curspl, psr;
- u_int cpu = cpu_number();
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- curspl = av530_curspl[cpu];
- if (curspl < level) {
- mask = int_mask_val[level];
- exmask = ext_int_mask_val[level];
-#ifdef MULTIPROCESSOR
- if (cpu != master_cpu) {
- mask &= SLAVE_MASK;
- exmask &= SLAVE_EXMASK;
- }
- mask |= AV530_SWI_IPI_MASK(cpu);
- if (level < IPL_CLOCK)
- mask |= AV530_SWI_CLOCK_IPI_MASK(cpu);
-#endif
-
- av530_curspl[cpu] = level;
- *(u_int32_t *)AV_IEN(cpu) = av530_int_mask_reg[cpu] = mask;
- *(u_int32_t *)AV_EXIEN(cpu) =
- av530_ext_int_mask_reg[cpu] = exmask;
- }
- /*
- * We do not flush the pipeline here, because interrupts are disabled,
- * and set_psr() will synchronize the pipeline.
- */
- set_psr(psr);
-
- return curspl;
-}
-
-#ifdef MULTIPROCESSOR
-
-void
-av530_send_ipi(int ipi, cpuid_t cpu)
-{
- struct cpu_info *ci = &m88k_cpus[cpu];
- uint32_t bits = 0;
-
- if (ci->ci_ipi & ipi)
- return;
-
- atomic_setbits_int(&ci->ci_ipi, ipi);
- if (ipi & ~(CI_IPI_HARDCLOCK | CI_IPI_STATCLOCK))
- bits |= AV530_SWI_IPI_BIT(cpu);
- if (ipi & (CI_IPI_HARDCLOCK | CI_IPI_STATCLOCK))
- bits |= AV530_SWI_CLOCK_IPI_BIT(cpu);
- *(volatile u_int32_t *)AV530_SETSWI = bits;
-}
-
-/*
- * Process inter-processor interrupts.
- */
-
-/*
- * Unmaskable IPIs - those are processed with interrupts disabled,
- * and no lock held.
- */
-void
-av530_ipi_handler(struct trapframe *eframe)
-{
- struct cpu_info *ci = curcpu();
- int ipi = ci->ci_ipi & (CI_IPI_DDB | CI_IPI_NOTIFY);
-
- *(volatile u_int32_t *)AV530_CLRSWI = AV530_SWI_IPI_BIT(ci->ci_cpuid);
- atomic_clearbits_int(&ci->ci_ipi, ipi);
-
- if (ipi & CI_IPI_DDB) {
-#ifdef DDB
- /*
- * Another processor has entered DDB. Spin on the ddb lock
- * until it is done.
- */
- extern struct __mp_lock ddb_mp_lock;
-
- __mp_lock(&ddb_mp_lock);
- __mp_unlock(&ddb_mp_lock);
-
- /*
- * If ddb is hoping to us, it's our turn to enter ddb now.
- */
- if (ci->ci_cpuid == ddb_mp_nextcpu)
- Debugger();
-#endif
- }
- if (ipi & CI_IPI_NOTIFY) {
- /* nothing to do */
- }
-}
-
-/*
- * Maskable IPIs
- */
-void
-av530_clock_ipi_handler(struct trapframe *eframe)
-{
- struct cpu_info *ci = curcpu();
- int ipi = ci->ci_ipi & (CI_IPI_HARDCLOCK | CI_IPI_STATCLOCK);
-
- /* clear clock ipi interrupt */
- *(volatile u_int32_t *)AV530_CLRSWI =
- AV530_SWI_CLOCK_IPI_BIT(ci->ci_cpuid);
- atomic_clearbits_int(&ci->ci_ipi, ipi);
-
- if (ipi & CI_IPI_HARDCLOCK)
- hardclock((struct clockframe *)eframe);
-#if 0 /* no separate statclock yet */
- if (ipi & CI_IPI_STATCLOCK)
- statclock((struct clockframe *)eframe);
-#endif
-}
-
-#endif
-
-/*
- * Provide the interrupt masks for a given logical interrupt source.
- */
-u_int32_t
-av530_intsrc(int i)
-{
- static const u_int32_t intsrc[] = {
- 0,
- AV530_IRQ_ABORT,
- AV530_IRQ_ACF,
- AV530_IRQ_SF,
- 0,
- AV530_IRQ_DI,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- AV530_IRQ_VME1,
- AV530_IRQ_VME2,
- AV530_IRQ_VME3,
- AV530_IRQ_VME4,
- AV530_IRQ_VME5,
- AV530_IRQ_VME6,
- AV530_IRQ_VME7
- };
-
- return intsrc[i];
-}
-
-u_int32_t
-av530_exintsrc(int i)
-{
- static const u_int32_t exintsrc[] = {
- 0,
- 0,
- 0,
- 0,
- AV530_EXIRQ_PIT0OF,
- 0,
- AV530_EXIRQ_DUART2,
- AV530_EXIRQ_LAN0,
- AV530_EXIRQ_LAN1,
- AV530_EXIRQ_SCSI0,
- AV530_EXIRQ_SCSI1,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0
- };
-
- return exintsrc[i];
-}
-
-/*
- * Provide the interrupt source for a given interrupt status bit.
- */
-static const u_int av530_obio_vec[32] = {
- 0, /* SWI0 */
- 0, /* SWI1 */
- 0, /* SWI2 */
- 0, /* SWI3 */
- INTSRC_VME(1), /* VME1 */
- 0,
- INTSRC_VME(2), /* VME2 */
- 0, /* SIGLPI */
- 0, /* LMI */
- 0,
- INTSRC_VME(3), /* VME3 */
- 0,
- INTSRC_VME(4), /* VME4 */
- 0,
- INTSRC_VME(5), /* VME5 */
- 0,
- 0, /* HPI */
- INTSRC_DUART1, /* DI */
- 0, /* MEM */
- INTSRC_VME(6), /* VME6 */
- INTSRC_SYSFAIL, /* SF */
- 0,
- 0, /* KBD */
- INTSRC_VME(7), /* VME7 */
- 0, /* SWI4 */
- 0, /* SWI5 */
- 0, /* SWI6 */
- 0, /* SWI7 */
- 0, /* DTI */
- 0, /* ARBTO */
- INTSRC_ACFAIL, /* ACF */
- INTSRC_ABORT /* ABORT */
-};
-static const u_int av530_obio_exvec[32] = {
- 0,
- 0,
- 0,
- 0,
- 0,
- 0, /* PDMA */
- 0, /* IOEXP2 */
- 0,
- 0, /* IOEXP1 */
- 0,
- 0,
- 0,
- 0, /* VDMA */
- INTSRC_DUART2, /* DUART2 */
- 0, /* ZBUF */
- 0, /* VIDEO */
- INTSRC_SCSI2, /* SCSI1 */
- INTSRC_SCSI1, /* SCSI0 */
- INTSRC_ETHERNET2, /* LAN1 */
- INTSRC_ETHERNET1, /* LAN0 */
- 0, /* SCC */
- 0, /* DMA0C */
- 0, /* DMA1C */
- 0, /* DMA2C */
- 0, /* DMA3C */
- 0, /* DMA4C */
- 0,
- INTSRC_CLOCK, /* PIT0OF */
- 0, /* PIT1OF */
- 0, /* PIT2OF */
- 0, /* PIT3OF */
- 0 /* RTCOF */
-};
-
-/*
- * Device interrupt handler for AV530
- */
-
-#define VME_VECTOR_MASK 0x1ff /* mask into VIACK register */
-#define VME_BERR_MASK 0x100 /* timeout during VME IACK cycle */
-
-#define ISR_GET_CURRENT_MASK(cpu) \
- (*(volatile u_int *)AV_IST & av530_int_mask_reg[cpu])
-#define EXISR_GET_CURRENT_MASK(cpu) \
- (*(volatile u_int *)AV_EXIST & av530_ext_int_mask_reg[cpu])
-
-void
-av530_intr(struct trapframe *eframe)
-{
- int cpu = cpu_number();
- u_int32_t cur_mask, ign_mask;
- u_int32_t cur_exmask, ign_exmask;
- u_int level, old_spl;
- struct intrhand *intr;
- intrhand_t *list;
- int ret, intbit;
- vaddr_t ivec;
- u_int intsrc, vec;
- int unmasked = 0;
- int warn;
-#ifdef DIAGNOSTIC
- static int problems = 0;
-#endif
-
- cur_mask = ISR_GET_CURRENT_MASK(cpu);
- cur_exmask = EXISR_GET_CURRENT_MASK(cpu);
- ign_mask = 0;
- ign_exmask = 0;
- old_spl = eframe->tf_mask;
-
- if (cur_mask == 0 && cur_exmask == 0) {
- /*
- * Spurious interrupts - may be caused by debug output clearing
- * DUART interrupts.
- */
-#ifdef MULTIPROCESSOR
- if (cpu != master_cpu) {
- if (++problems >= 10) {
- printf("cpu%d: interrupt pin won't clear, "
- "disabling processor\n", cpu);
- cpu_emergency_disable();
- /* NOTREACHED */
- }
- }
-#endif
- flush_pipeline();
- goto out;
- }
-
- uvmexp.intrs++;
-
-#ifdef MULTIPROCESSOR
- /*
- * Handle unmaskable IPIs immediately, so that we can reenable
- * interrupts before further processing. We rely on the interrupt
- * mask to make sure that if we get an IPI, it's really for us
- * and no other processor.
- */
- if (cur_mask & AV530_IPI_MASK) {
- av530_ipi_handler(eframe);
- cur_mask &= ~AV530_IPI_MASK;
- if (cur_mask == 0 && cur_exmask == 0)
- goto out;
- }
-#endif
-
- /*
- * We want to service all interrupts marked in the IST register
- * They are all valid because the mask would have prevented them
- * from being generated otherwise. We will service them in order of
- * priority.
- */
- for (;;) {
- cur_mask = ISR_GET_CURRENT_MASK(cpu);
-#ifdef MULTIPROCESSOR
- cur_mask &= ~AV530_IPI_MASK;
-#endif
- cur_exmask = EXISR_GET_CURRENT_MASK(cpu);
- if ((cur_mask & ~ign_mask) == 0 &&
- (cur_exmask & ~ign_exmask) == 0)
- break;
-
- level = av530_safe_level(cur_mask, cur_exmask, old_spl);
- av530_setipl(level);
-
- if (unmasked == 0) {
- set_psr(get_psr() & ~PSR_IND);
- unmasked = 1;
- }
-
-#ifdef MULTIPROCESSOR
- /*
- * Handle pending maskable IPIs first.
- */
- if (cur_mask & AV530_CLOCK_IPI_MASK) {
- av530_clock_ipi_handler(eframe);
- cur_mask &= ~AV530_CLOCK_IPI_MASK;
- if ((cur_mask & ~ign_mask) == 0 &&
- (cur_exmask & ~ign_exmask) == 0)
- break;
- }
-#endif
-
- /* find the first bit set in the current mask */
- warn = 0;
- if (cur_mask != 0) {
- intbit = ff1(cur_mask);
- intsrc = av530_obio_vec[intbit];
-
- if (intsrc == 0)
- panic("%s: unexpected interrupt source"
- " (bit %d), level %d, mask 0x%b",
- __func__, intbit, level,
- cur_mask, AV530_IST_STRING);
- } else {
- intbit = ff1(cur_exmask);
- intsrc = av530_obio_exvec[intbit];
-
- if (intsrc == 0)
- panic("%s: unexpected extended interrupt source"
- " (bit %d), level %d, mask 0x%b",
- __func__, intbit, level,
- cur_exmask, AV530_EXIST_STRING);
- }
-
- if (IS_VME_INTSRC(intsrc)) {
- level = VME_INTSRC_LEVEL(intsrc);
- ivec = AV530_VIRQLV + (level << 2);
- vec = *(volatile u_int32_t *)ivec & VME_VECTOR_MASK;
- if (vec & VME_BERR_MASK) {
- /* no need to dump exmask for vme intr */
- printf("%s: timeout getting VME "
- "interrupt vector, "
- "level %d, mask 0x%b\n",
- __func__, level,
- cur_mask, AV530_IST_STRING);
- ign_mask |= 1 << intbit;
- continue;
- }
- list = &vmeintr_handlers[vec];
- } else {
- list = &sysconintr_handlers[intsrc];
- }
-
- if (SLIST_EMPTY(list)) {
- warn = 1;
- } else {
- /*
- * Walk through all interrupt handlers in the chain
- * for the given vector, calling each handler in turn,
- * until some handler returns a value != 0.
- */
- ret = 0;
- SLIST_FOREACH(intr, list, ih_link) {
-#ifdef MULTIPROCESSOR
- if (intr->ih_ipl < IPL_CLOCK)
- __mp_lock(&kernel_lock);
-#endif
- if (ISSET(intr->ih_flags, INTR_WANTFRAME))
- ret = (*intr->ih_fn)((void *)eframe);
- else
- ret = (*intr->ih_fn)(intr->ih_arg);
-#ifdef MULTIPROCESSOR
- if (intr->ih_ipl < IPL_CLOCK)
- __mp_unlock(&kernel_lock);
-#endif
- if (ret != 0) {
- intr->ih_count.ec_count++;
- break;
- }
- }
- if (ret == 0)
- warn = 2;
- }
-
- if (warn != 0) {
- if (cur_mask != 0)
- ign_mask |= 1 << intbit;
- else
- ign_exmask |= 1 << intbit;
-
- if (IS_VME_INTSRC(intsrc))
- printf("%s: %s VME interrupt, "
- "level %d, vec 0x%x, mask 0x%b\n",
- __func__,
- warn == 1 ? "spurious" : "unclaimed",
- level, vec, cur_mask, AV530_IST_STRING);
- else {
- if (cur_mask != 0)
- printf("%s: %s interrupt, "
- "level %d, bit %d, mask 0x%b\n",
- __func__,
- warn == 1 ?
- "spurious" : "unclaimed",
- level, intbit,
- cur_mask, AV530_IST_STRING);
- else
- printf("%s: %s extended interrupt, "
- "level %d, bit %d, mask 0x%b\n",
- __func__,
- warn == 1 ?
- "spurious" : "unclaimed",
- level, intbit,
- cur_exmask, AV530_EXIST_STRING);
- }
- }
- }
-
-#ifdef DIAGNOSTIC
- if (ign_mask != 0 || ign_exmask != 0) {
- if (++problems >= 10)
- panic("%s: broken interrupt behaviour", __func__);
- } else
- problems = 0;
-#endif
-
-out:
- /*
- * process any remaining data access exceptions before
- * returning to assembler
- */
- if (eframe->tf_dmt0 & DMT_VALID)
- m88100_trap(T_DATAFLT, eframe);
-
- /*
- * Disable interrupts before returning to assembler, the spl will
- * be restored later.
- */
- set_psr(get_psr() | PSR_IND);
-}
-
-const struct vme_range *
-av530_get_vme_ranges()
-{
- return vme_av530;
-}
diff --git a/sys/arch/aviion/aviion/bus_dma.c b/sys/arch/aviion/aviion/bus_dma.c
deleted file mode 100644
index ab4fb8dba38..00000000000
--- a/sys/arch/aviion/aviion/bus_dma.c
+++ /dev/null
@@ -1,686 +0,0 @@
-/* $OpenBSD: bus_dma.c,v 1.10 2014/12/24 22:48:27 miod Exp $ */
-/* $NetBSD: bus_dma.c,v 1.2 2001/06/10 02:31:25 briggs Exp $ */
-
-/*-
- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
- * NASA Ames Research Center.
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
- */
-
-#include <sys/param.h>
-#include <sys/proc.h>
-#include <sys/extent.h>
-#include <sys/buf.h>
-#include <sys/device.h>
-#include <sys/systm.h>
-#include <sys/conf.h>
-#include <sys/file.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/mount.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <machine/bus.h>
-#include <machine/cmmu.h>
-#include <machine/intr.h>
-
-int _bus_dmamap_load_buffer(bus_dma_tag_t, bus_dmamap_t, void *,
- bus_size_t, struct proc *, int, paddr_t *, int *, int);
-
-int _bus_dmamem_alloc_range(bus_dma_tag_t, bus_size_t, bus_size_t,
- bus_size_t, bus_dma_segment_t *, int, int *, int, paddr_t, paddr_t);
-
-/*
- * Common function for DMA map creation. May be called by bus-specific
- * DMA map creation functions.
- */
-int
-bus_dmamap_create(t, size, nsegments, maxsegsz, boundary, flags, dmamp)
- bus_dma_tag_t t;
- bus_size_t size;
- int nsegments;
- bus_size_t maxsegsz;
- bus_size_t boundary;
- int flags;
- bus_dmamap_t *dmamp;
-{
- struct m88k_bus_dmamap *map;
- void *mapstore;
- size_t mapsize;
-
- /*
- * Allocate and initialize the DMA map. The end of the map
- * is a variable-sized array of segments, so we allocate enough
- * room for them in one shot.
- *
- * Note we don't preserve the WAITOK or NOWAIT flags. Preservation
- * of ALLOCNOW notifies others that we've reserved these resources,
- * and they are not to be freed.
- *
- * The bus_dmamap_t includes one bus_dma_segment_t, hence
- * the (nsegments - 1).
- */
- mapsize = sizeof(struct m88k_bus_dmamap) +
- (sizeof(bus_dma_segment_t) * (nsegments - 1));
- if ((mapstore = malloc(mapsize, M_DEVBUF, (flags & BUS_DMA_NOWAIT) ?
- (M_NOWAIT | M_ZERO) : (M_WAITOK | M_ZERO))) == NULL)
- return (ENOMEM);
-
- map = (struct m88k_bus_dmamap *)mapstore;
- map->_dm_size = size;
- map->_dm_segcnt = nsegments;
- map->_dm_maxsegsz = maxsegsz;
- map->_dm_boundary = boundary;
- map->dm_mapsize = 0; /* no valid mappings */
- map->dm_nsegs = 0;
-
- *dmamp = map;
- return (0);
-}
-
-/*
- * Common function for DMA map destruction. May be called by bus-specific
- * DMA map destruction functions.
- */
-void
-bus_dmamap_destroy(t, map)
- bus_dma_tag_t t;
- bus_dmamap_t map;
-{
- size_t mapsize;
-
- mapsize = sizeof(struct m88k_bus_dmamap) +
- (sizeof(bus_dma_segment_t) * (map->_dm_segcnt - 1));
- free(map, M_DEVBUF, mapsize);
-}
-
-/*
- * Utility function to load a linear buffer. lastaddrp holds state
- * between invocations (for multiple-buffer loads). segp contains
- * the starting segment on entrance, and the ending segment on exit.
- * first indicates if this is the first invocation of this function.
- */
-int
-_bus_dmamap_load_buffer(t, map, buf, buflen, p, flags, lastaddrp, segp, first)
- bus_dma_tag_t t;
- bus_dmamap_t map;
- void *buf;
- bus_size_t buflen;
- struct proc *p;
- int flags;
- paddr_t *lastaddrp;
- int *segp;
- int first;
-{
- bus_size_t sgsize;
- bus_addr_t curaddr, lastaddr, baddr, bmask;
- vaddr_t vaddr = (vaddr_t)buf;
- int seg;
- pmap_t pmap;
-
- if (p != NULL)
- pmap = vm_map_pmap(&p->p_vmspace->vm_map);
- else
- pmap = pmap_kernel();
-
- lastaddr = *lastaddrp;
- bmask = ~(map->_dm_boundary - 1);
-
- for (seg = *segp; buflen > 0 ; ) {
- /*
- * Get the physical address for this segment.
- */
- if (pmap_extract(pmap, vaddr, (paddr_t *)&curaddr) == FALSE)
- return (EINVAL);
-
- /*
- * Compute the segment size, and adjust counts.
- */
- sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET);
- if (buflen < sgsize)
- sgsize = buflen;
-
- /*
- * Make sure we don't cross any boundaries.
- */
- if (map->_dm_boundary > 0) {
- baddr = (curaddr + map->_dm_boundary) & bmask;
- if (sgsize > (baddr - curaddr))
- sgsize = (baddr - curaddr);
- }
-
- /*
- * Insert chunk into a segment, coalescing with
- * the previous segment if possible.
- */
- if (first) {
- map->dm_segs[seg].ds_addr = curaddr;
- map->dm_segs[seg].ds_len = sgsize;
- first = 0;
- } else {
- if (curaddr == lastaddr &&
- (map->dm_segs[seg].ds_len + sgsize) <=
- map->_dm_maxsegsz &&
- (map->_dm_boundary == 0 ||
- (map->dm_segs[seg].ds_addr & bmask) ==
- (curaddr & bmask)))
- map->dm_segs[seg].ds_len += sgsize;
- else {
- if (++seg >= map->_dm_segcnt)
- break;
- map->dm_segs[seg].ds_addr = curaddr;
- map->dm_segs[seg].ds_len = sgsize;
- }
- }
-
- lastaddr = curaddr + sgsize;
- vaddr += sgsize;
- buflen -= sgsize;
- }
-
- *segp = seg;
- *lastaddrp = lastaddr;
-
- /*
- * Did we fit?
- */
- if (buflen != 0)
- return (EFBIG); /* XXX better return value here? */
-
- return (0);
-}
-
-/*
- * Common function for loading a DMA map with a linear buffer. May
- * be called by bus-specific DMA map load functions.
- */
-int
-bus_dmamap_load(t, map, buf, buflen, p, flags)
- bus_dma_tag_t t;
- bus_dmamap_t map;
- void *buf;
- bus_size_t buflen;
- struct proc *p;
- int flags;
-{
- paddr_t lastaddr;
- int seg, error;
-
- /*
- * Make sure that on error condition we return "no valid mappings".
- */
- map->dm_mapsize = 0;
- map->dm_nsegs = 0;
-
- if (buflen > map->_dm_size)
- return (EINVAL);
-
- seg = 0;
- error = _bus_dmamap_load_buffer(t, map, buf, buflen, p, flags,
- &lastaddr, &seg, 1);
- if (error == 0) {
- map->dm_mapsize = buflen;
- map->dm_nsegs = seg + 1;
- }
- return (error);
-}
-
-/*
- * Like _bus_dmamap_load(), but for mbufs.
- */
-int
-bus_dmamap_load_mbuf(t, map, m0, flags)
- bus_dma_tag_t t;
- bus_dmamap_t map;
- struct mbuf *m0;
- int flags;
-{
- paddr_t lastaddr;
- int seg, error, first;
- struct mbuf *m;
-
- /*
- * Make sure that on error condition we return "no valid mappings."
- */
- map->dm_mapsize = 0;
- map->dm_nsegs = 0;
-
-#ifdef DIAGNOSTIC
- if ((m0->m_flags & M_PKTHDR) == 0)
- panic("bus_dmamap_load_mbuf: no packet header");
-#endif
-
- if (m0->m_pkthdr.len > map->_dm_size)
- return (EINVAL);
-
- first = 1;
- seg = 0;
- error = 0;
- for (m = m0; m != NULL && error == 0; m = m->m_next) {
- if (m->m_len == 0)
- continue;
- error = _bus_dmamap_load_buffer(t, map, m->m_data, m->m_len,
- NULL, flags, &lastaddr, &seg, first);
- first = 0;
- }
- if (error == 0) {
- map->dm_mapsize = m0->m_pkthdr.len;
- map->dm_nsegs = seg + 1;
- }
- return (error);
-}
-
-/*
- * Like _bus_dmamap_load(), but for uios.
- */
-int
-bus_dmamap_load_uio(t, map, uio, flags)
- bus_dma_tag_t t;
- bus_dmamap_t map;
- struct uio *uio;
- int flags;
-{
- paddr_t lastaddr;
- int seg, i, error, first;
- bus_size_t minlen, resid;
- struct proc *p = NULL;
- struct iovec *iov;
- caddr_t addr;
-
- /*
- * Make sure that on error condition we return "no valid mappings."
- */
- map->dm_mapsize = 0;
- map->dm_nsegs = 0;
-
- resid = uio->uio_resid;
- iov = uio->uio_iov;
-
- if (resid > map->_dm_size)
- return (EINVAL);
-
- if (uio->uio_segflg == UIO_USERSPACE) {
- p = uio->uio_procp;
-#ifdef DIAGNOSTIC
- if (p == NULL)
- panic("bus_dmamap_load_uio: USERSPACE but no proc");
-#endif
- }
-
- first = 1;
- seg = 0;
- error = 0;
- for (i = 0; i < uio->uio_iovcnt && resid != 0 && error == 0; i++) {
- /*
- * Now at the first iovec to load. Load each iovec
- * until we have exhausted the residual count.
- */
- minlen = resid < iov[i].iov_len ? resid : iov[i].iov_len;
- addr = (caddr_t)iov[i].iov_base;
-
- error = _bus_dmamap_load_buffer(t, map, addr, minlen,
- p, flags, &lastaddr, &seg, first);
- first = 0;
-
- resid -= minlen;
- }
- if (error == 0) {
- map->dm_mapsize = uio->uio_resid;
- map->dm_nsegs = seg + 1;
- }
- return (error);
-}
-
-/*
- * Like bus_dmamap_load(), but for raw memory allocated with
- * bus_dmamem_alloc().
- */
-int
-bus_dmamap_load_raw(t, map, segs, nsegs, size, flags)
- bus_dma_tag_t t;
- bus_dmamap_t map;
- bus_dma_segment_t *segs;
- int nsegs;
- bus_size_t size;
- int flags;
-{
- if (nsegs > map->_dm_segcnt || size > map->_dm_size)
- return (EINVAL);
-
- /*
- * Make sure we don't cross any boundaries.
- */
- if (map->_dm_boundary) {
- bus_addr_t bmask = ~(map->_dm_boundary - 1);
- int i;
-
- for (i = 0; i < nsegs; i++) {
- if (segs[i].ds_len > map->_dm_maxsegsz)
- return (EINVAL);
- if ((segs[i].ds_addr & bmask) !=
- ((segs[i].ds_addr + segs[i].ds_len - 1) & bmask))
- return (EINVAL);
- }
- }
-
- bcopy(segs, map->dm_segs, nsegs * sizeof(*segs));
- map->dm_nsegs = nsegs;
- return (0);
-}
-
-/*
- * Common function for unloading a DMA map. May be called by
- * chipset-specific DMA map unload functions.
- */
-void
-bus_dmamap_unload(t, map)
- bus_dma_tag_t t;
- bus_dmamap_t map;
-{
-
- /*
- * No resources to free; just mark the mappings as
- * invalid.
- */
- map->dm_mapsize = 0;
- map->dm_nsegs = 0;
-}
-
-/*
- * Common function for DMA map synchronization. May be called
- * by chipset-specific DMA map synchronization functions.
- */
-
-void
-bus_dmamap_sync(t, map, offset, len, op)
- bus_dma_tag_t t;
- bus_dmamap_t map;
- bus_addr_t offset;
- bus_size_t len;
- int op;
-{
- u_int nsegs;
- bus_dma_segment_t *seg;
-
- if (op & BUS_DMASYNC_PREREAD)
- op = DMA_CACHE_SYNC_INVAL;
- else if (op & BUS_DMASYNC_PREWRITE)
- op = DMA_CACHE_SYNC;
- else if (op & BUS_DMASYNC_POSTREAD)
- op = DMA_CACHE_INV;
- else
- return;
-
- nsegs = map->dm_nsegs;
- seg = map->dm_segs;
- while (nsegs != 0 && len != 0) {
- if (offset >= seg->ds_len) {
- offset -= seg->ds_len;
- } else {
- bus_addr_t addr;
- bus_size_t sublen;
-
- addr = seg->ds_addr + offset;
- sublen = seg->ds_len - offset;
- if (sublen > len)
- sublen = len;
-
- dma_cachectl(addr, sublen, op);
-
- offset = 0;
- len -= sublen;
- }
- seg++;
- nsegs--;
- }
-}
-
-/*
- * Common function for DMA-safe memory allocation. May be called
- * by bus-specific DMA memory allocation functions.
- */
-int
-bus_dmamem_alloc(t, size, alignment, boundary, segs, nsegs, rsegs, flags)
- bus_dma_tag_t t;
- bus_size_t size, alignment, boundary;
- bus_dma_segment_t *segs;
- int nsegs;
- int *rsegs;
- int flags;
-{
- return _bus_dmamem_alloc_range(t, size, alignment, boundary, segs,
- nsegs, rsegs, flags, 0, -1);
-}
-
-/*
- * Common function for freeing DMA-safe memory. May be called by
- * bus-specific DMA memory free functions.
- */
-void
-bus_dmamem_free(t, segs, nsegs)
- bus_dma_tag_t t;
- bus_dma_segment_t *segs;
- int nsegs;
-{
- struct vm_page *m;
- bus_addr_t addr;
- struct pglist mlist;
- int curseg;
-
- /*
- * Build a list of pages to free back to the VM system.
- */
- TAILQ_INIT(&mlist);
- for (curseg = 0; curseg < nsegs; curseg++) {
- for (addr = segs[curseg].ds_addr;
- addr < (segs[curseg].ds_addr + segs[curseg].ds_len);
- addr += PAGE_SIZE) {
- m = PHYS_TO_VM_PAGE(addr);
- TAILQ_INSERT_TAIL(&mlist, m, pageq);
- }
- }
-
- uvm_pglistfree(&mlist);
-}
-
-/*
- * Common function for mapping DMA-safe memory. May be called by
- * bus-specific DMA memory map functions.
- */
-int
-bus_dmamem_map(t, segs, nsegs, size, kvap, flags)
- bus_dma_tag_t t;
- bus_dma_segment_t *segs;
- int nsegs;
- size_t size;
- caddr_t *kvap;
- int flags;
-{
- vaddr_t va, sva;
- size_t ssize;
- bus_addr_t addr;
- int curseg, error;
- const struct kmem_dyn_mode *kd;
-
- size = round_page(size);
- kd = flags & BUS_DMA_NOWAIT ? &kd_trylock : &kd_waitok;
- va = (vaddr_t)km_alloc(size, &kv_any, &kp_none, kd);
- if (va == 0)
- return (ENOMEM);
-
- *kvap = (caddr_t)va;
-
- sva = va;
- ssize = size;
- for (curseg = 0; curseg < nsegs; curseg++) {
- for (addr = segs[curseg].ds_addr;
- addr < (segs[curseg].ds_addr + segs[curseg].ds_len);
- addr += PAGE_SIZE, va += PAGE_SIZE, size -= PAGE_SIZE) {
- if (size == 0)
- panic("bus_dmamem_map: size botch");
- error = pmap_enter(pmap_kernel(), va, addr,
- PROT_READ | PROT_WRITE,
- PROT_READ | PROT_WRITE | PMAP_WIRED | PMAP_CANFAIL);
- if (error) {
- pmap_update(pmap_kernel());
- km_free((void *)sva, ssize, &kv_any, &kp_none);
- return (error);
- }
- if (flags & BUS_DMA_COHERENT)
- pmap_page_uncache(addr);
- }
- }
- pmap_update(pmap_kernel());
-
- return (0);
-}
-
-/*
- * Common function for unmapping DMA-safe memory. May be called by
- * bus-specific DMA memory unmapping functions.
- */
-void
-bus_dmamem_unmap(t, kva, size)
- bus_dma_tag_t t;
- caddr_t kva;
- size_t size;
-{
-
-#ifdef DIAGNOSTIC
- if ((u_long)kva & PGOFSET)
- panic("bus_dmamem_unmap");
-#endif
-
- km_free(kva, round_page(size), &kv_any, &kp_none);
-}
-
-/*
- * Common function for mmap(2)'ing DMA-safe memory. May be called by
- * bus-specific DMA mmap(2)'ing functions.
- */
-paddr_t
-bus_dmamem_mmap(t, segs, nsegs, off, prot, flags)
- bus_dma_tag_t t;
- bus_dma_segment_t *segs;
- int nsegs;
- off_t off;
- int prot, flags;
-{
- int i;
-
- for (i = 0; i < nsegs; i++) {
-#ifdef DIAGNOSTIC
- if (off & PGOFSET)
- panic("bus_dmamem_mmap: offset unaligned");
- if (segs[i].ds_addr & PGOFSET)
- panic("bus_dmamem_mmap: segment unaligned");
- if (segs[i].ds_len & PGOFSET)
- panic("bus_dmamem_mmap: segment size not multiple"
- " of page size");
-#endif
- if (off >= segs[i].ds_len) {
- off -= segs[i].ds_len;
- continue;
- }
-
- return (segs[i].ds_addr + off);
- }
-
- /* Page not found. */
- return (-1);
-}
-
-/*
- * Allocate physical memory from the given physical address range.
- * Called by DMA-safe memory allocation methods.
- */
-int
-_bus_dmamem_alloc_range(t, size, alignment, boundary, segs, nsegs, rsegs,
- flags, low, high)
- bus_dma_tag_t t;
- bus_size_t size, alignment, boundary;
- bus_dma_segment_t *segs;
- int nsegs;
- int *rsegs;
- int flags;
- paddr_t low;
- paddr_t high;
-{
- paddr_t curaddr, lastaddr;
- struct vm_page *m;
- struct pglist mlist;
- int curseg, error, plaflag;
-
- /* Always round the size. */
- size = round_page(size);
-
- /*
- * Allocate pages from the VM system.
- */
- plaflag = flags & BUS_DMA_NOWAIT ? UVM_PLA_NOWAIT : UVM_PLA_WAITOK;
- if (flags & BUS_DMA_ZERO)
- plaflag |= UVM_PLA_ZERO;
-
- TAILQ_INIT(&mlist);
- error = uvm_pglistalloc(size, low, high, alignment, boundary,
- &mlist, nsegs, plaflag);
- if (error)
- return (error);
-
- /*
- * Compute the location, size, and number of segments actually
- * returned by the VM code.
- */
- m = TAILQ_FIRST(&mlist);
- curseg = 0;
- lastaddr = segs[curseg].ds_addr = VM_PAGE_TO_PHYS(m);
- segs[curseg].ds_len = PAGE_SIZE;
- m = TAILQ_NEXT(m, pageq);
-
- for (; m != NULL; m = TAILQ_NEXT(m, pageq)) {
- curaddr = VM_PAGE_TO_PHYS(m);
-#ifdef DIAGNOSTIC
- if (curaddr < low || curaddr >= high) {
- panic("_bus_dmamem_alloc_range: uvm_pglistalloc "
- "returned non-sensical address 0x%lx\n", curaddr);
- }
-#endif
- if (curaddr == (lastaddr + PAGE_SIZE))
- segs[curseg].ds_len += PAGE_SIZE;
- else {
- curseg++;
- segs[curseg].ds_addr = curaddr;
- segs[curseg].ds_len = PAGE_SIZE;
- }
- lastaddr = curaddr;
- }
-
- *rsegs = curseg + 1;
-
- return (0);
-}
diff --git a/sys/arch/aviion/aviion/bus_space.c b/sys/arch/aviion/aviion/bus_space.c
deleted file mode 100644
index 951379c6cd1..00000000000
--- a/sys/arch/aviion/aviion/bus_space.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/* $OpenBSD: bus_space.c,v 1.1 2010/04/20 22:53:20 miod Exp $ */
-
-/*
- * Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
- *
- * 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.
- *
- * 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.
- *
- */
-
-/*
- * Simple generic bus access primitives, for memory mapped space without
- * any access restriction or endianness conversion required.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-
-#include <machine/bus.h>
-
-uint8_t
-generic_space_read_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
-{
- return *(volatile uint8_t *)(h + o);
-}
-
-uint16_t
-generic_space_read_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
-{
- return *(volatile uint16_t *)(h + o);
-}
-
-uint32_t
-generic_space_read_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
-{
- return *(volatile uint32_t *)(h + o);
-}
-
-void
-generic_space_write_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint8_t v)
-{
- *(volatile uint8_t *)(h + o) = v;
-}
-
-void
-generic_space_write_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint16_t v)
-{
- *(volatile uint16_t *)(h + o) = v;
-}
-
-void
-generic_space_write_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint32_t v)
-{
- *(volatile uint32_t *)(h + o) = v;
-}
-
-void
-generic_space_read_raw_2(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
- uint8_t *buf, bus_size_t len)
-{
- volatile uint16_t *addr = (volatile uint16_t *)(h + o);
- len >>= 1;
- while (len-- != 0) {
- *(uint16_t *)buf = *addr;
- buf += 2;
- }
-}
-
-void
-generic_space_write_raw_2(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
- const uint8_t *buf, bus_size_t len)
-{
- volatile uint16_t *addr = (volatile uint16_t *)(h + o);
- len >>= 1;
- while (len-- != 0) {
- *addr = *(uint16_t *)buf;
- buf += 2;
- }
-}
-
-void
-generic_space_read_raw_4(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
- uint8_t *buf, bus_size_t len)
-{
- volatile uint32_t *addr = (volatile uint32_t *)(h + o);
- len >>= 2;
- while (len-- != 0) {
- *(uint32_t *)buf = *addr;
- buf += 4;
- }
-}
-
-void
-generic_space_write_raw_4(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
- const uint8_t *buf, bus_size_t len)
-{
- volatile uint32_t *addr = (volatile uint32_t *)(h + o);
- len >>= 2;
- while (len-- != 0) {
- *addr = *(uint32_t *)buf;
- buf += 4;
- }
-}
diff --git a/sys/arch/aviion/aviion/cio_clock.c b/sys/arch/aviion/aviion/cio_clock.c
deleted file mode 100644
index 25a9aa720dc..00000000000
--- a/sys/arch/aviion/aviion/cio_clock.c
+++ /dev/null
@@ -1,396 +0,0 @@
-/* $OpenBSD: cio_clock.c,v 1.3 2010/04/24 18:46:51 miod Exp $ */
-/*
- * Copyright (c) 2006, 2007, 2009 Miodrag Vallat.
- *
- * 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.
- *
- * 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) 1998, 1999, 2000, 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.
- *
- */
-/*
- * Copyright (c) 1999 Steve Murphree, Jr.
- * 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.
- *
- * 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) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- * Copyright (c) 1995 Nivas Madhur
- * Copyright (c) 1994 Gordon W. Ross
- * Copyright (c) 1993 Adam Glass
- *
- * 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. 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.
- *
- * @(#)clock.c 8.1 (Berkeley) 6/11/93
- */
-/*
- * Mach Operating System
- * Copyright (c) 1993-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 <sys/kernel.h>
-#include <sys/errno.h>
-#include <sys/mutex.h>
-#include <sys/timetc.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <machine/asm_macro.h>
-#include <machine/board.h>
-#include <machine/avcommon.h>
-
-#include <aviion/dev/sysconvar.h>
-#include <dev/ic/z8536reg.h>
-
-/*
- * Z8536 (CIO) Clock routines
- */
-
-void cio_clock_init(u_int);
-u_int read_cio(int);
-void write_cio(int, u_int);
-
-struct intrhand cio_clock_ih;
-
-int cio_clockintr(void *);
-int cio_calibrateintr(void *);
-u_int cio_get_timecount(struct timecounter *);
-
-volatile int cio_calibrate_phase = 0;
-extern u_int aviion_delay_const;
-
-uint32_t cio_step;
-uint32_t cio_refcnt;
-uint32_t cio_lastcnt;
-
-struct mutex cio_mutex = MUTEX_INITIALIZER(IPL_CLOCK);
-
-struct timecounter cio_timecounter = {
- .tc_get_timecount = cio_get_timecount,
- .tc_counter_mask = 0xffffffff,
- .tc_name = "cio",
- .tc_quality = 0
-};
-
-/*
- * Notes on the AV400 clock usage:
- *
- * Unlike the MVME188 design, we only have access to three counter/timers
- * in the Zilog Z8536 (since we can not receive the DUART timer interrupts).
- *
- * Clock is run on a Z8536 counter, kept in counter mode and retriggered
- * every interrupt (when using the Z8536 in timer mode, it _seems_ that it
- * resets at 0xffff instead of the initial count value...)
- *
- * It should be possible to run statclock on the Z8536 counter #2, but
- * this would make interrupt handling more tricky, in the case both
- * counters interrupt at the same time...
- */
-
-void
-cio_init_clocks(void)
-{
- u_int iter, divisor;
- u_int32_t psr;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
-
-#ifdef DIAGNOSTIC
- if (1000000 % hz) {
- printf("cannot get %d Hz clock; using 100 Hz\n", hz);
- hz = 100;
- }
-#endif
- tick = 1000000 / hz;
-
- cio_clock_init(tick);
-
- profhz = stathz = 0;
-
- /*
- * Calibrate delay const.
- */
- cio_clock_ih.ih_fn = cio_calibrateintr;
- cio_clock_ih.ih_arg = 0;
- cio_clock_ih.ih_flags = INTR_WANTFRAME;
- cio_clock_ih.ih_ipl = IPL_CLOCK;
- sysconintr_establish(INTSRC_CLOCK, &cio_clock_ih, "clock");
-
- aviion_delay_const = 1;
- set_psr(psr);
- while (cio_calibrate_phase == 0)
- ;
-
- iter = 0;
- while (cio_calibrate_phase == 1) {
- delay(10000);
- iter++;
- }
-
- divisor = 1000000 / 10000;
- aviion_delay_const = (iter * hz + divisor - 1) / divisor;
-
- set_psr(psr | PSR_IND);
-
- sysconintr_disestablish(INTSRC_CLOCK, &cio_clock_ih);
- cio_clock_ih.ih_fn = cio_clockintr;
- sysconintr_establish(INTSRC_CLOCK, &cio_clock_ih, "clock");
-
- set_psr(psr);
-
- tc_init(&cio_timecounter);
-}
-
-int
-cio_calibrateintr(void *eframe)
-{
- /* no need to grab the mutex, only one processor is running for now */
- /* ack the interrupt */
- write_cio(ZCIO_CT1CS, ZCIO_CTCS_GCB | ZCIO_CTCS_C_IP);
-
- cio_calibrate_phase++;
-
- return (1);
-}
-
-int
-cio_clockintr(void *eframe)
-{
- mtx_enter(&cio_mutex);
- /* ack the interrupt */
- write_cio(ZCIO_CT1CS, ZCIO_CTCS_GCB | ZCIO_CTCS_C_IP);
- cio_refcnt += cio_step;
- mtx_leave(&cio_mutex);
-
- hardclock(eframe);
-
-#ifdef MULTIPROCESSOR
- /*
- * Send an IPI to all other processors, so they can get their
- * own ticks.
- */
- m88k_broadcast_ipi(CI_IPI_HARDCLOCK);
-#endif
-
- return (1);
-}
-
-/* Write CIO register */
-void
-write_cio(int reg, u_int val)
-{
- volatile int i;
- volatile u_int32_t * cio_ctrl = (volatile u_int32_t *)CIO_CTRL;
-
- i = *cio_ctrl; /* goto state 1 */
- *cio_ctrl = 0; /* take CIO out of RESET */
- i = *cio_ctrl; /* reset CIO state machine */
-
- *cio_ctrl = (reg & 0xff); /* select register */
- *cio_ctrl = (val & 0xff); /* write the value */
-}
-
-/* Read CIO register */
-u_int
-read_cio(int reg)
-{
- int c;
- volatile int i;
- volatile u_int32_t * cio_ctrl = (volatile u_int32_t *)CIO_CTRL;
-
- /* select register */
- *cio_ctrl = (reg & 0xff);
- /* delay for a short time to allow 8536 to settle */
- for (i = 0; i < 100; i++)
- ;
- /* read the value */
- c = *cio_ctrl;
- return (c & 0xff);
-}
-
-/*
- * Initialize the CTC (8536)
- * Only the counter/timers are used - the IO ports are un-comitted.
- */
-void
-cio_clock_init(u_int period)
-{
- volatile int i;
-
- /* Start by forcing chip into known state */
- read_cio(ZCIO_MIC);
- write_cio(ZCIO_MIC, ZCIO_MIC_RESET); /* Reset the CTC */
- for (i = 0; i < 1000; i++) /* Loop to delay */
- ;
-
- /* Clear reset and start init seq. */
- write_cio(ZCIO_MIC, 0x00);
-
- /* Wait for chip to come ready */
- while ((read_cio(ZCIO_MIC) & ZCIO_MIC_RJA) == 0)
- ;
-
- /* Initialize the 8536 for real */
- write_cio(ZCIO_MIC,
- ZCIO_MIC_MIE /* | ZCIO_MIC_NV */ | ZCIO_MIC_RJA | ZCIO_MIC_DLC);
- write_cio(ZCIO_CT1MD, ZCIO_CTMD_CSC); /* Continuous count */
- write_cio(ZCIO_PBDIR, 0xff); /* set port B to input */
-
- period <<= 1; /* CT#1 runs at PCLK/2, hence 2MHz */
- write_cio(ZCIO_CT1TCM, period >> 8);
- write_cio(ZCIO_CT1TCL, period);
- /* enable counter #1 */
- write_cio(ZCIO_MCC, ZCIO_MCC_CT1E | ZCIO_MCC_PBE);
- write_cio(ZCIO_CT1CS, ZCIO_CTCS_GCB | ZCIO_CTCS_TCB | ZCIO_CTCS_S_IE);
-
- cio_step = period;
- cio_timecounter.tc_frequency = (uint64_t)cio_step * hz;
-}
-
-u_int
-cio_get_timecount(struct timecounter *tc)
-{
- u_int cmsb, clsb, counter, curcnt;
-
- /*
- * The CIO counter is free running, but by setting the
- * RCC bit in its control register, we can read a frozen
- * value of the counter.
- * The counter will automatically unfreeze after reading
- * its LSB.
- */
-
- mtx_enter(&cio_mutex);
- write_cio(ZCIO_CT1CS, ZCIO_CTCS_GCB | ZCIO_CTCS_RCC);
- cmsb = read_cio(ZCIO_CT1CCM);
- clsb = read_cio(ZCIO_CT1CCL);
- curcnt = cio_refcnt;
-
- counter = (cmsb << 8) | clsb;
-#if 0 /* this will never happen unless the period itself is 65536 */
- if (counter == 0)
- counter = 65536;
-#endif
-
- /*
- * The counter counts down from its initialization value to 1.
- */
- counter = cio_step - counter;
-
- curcnt += counter;
- if (curcnt < cio_lastcnt)
- curcnt += cio_step;
-
- cio_lastcnt = curcnt;
- mtx_leave(&cio_mutex);
- return curcnt;
-}
diff --git a/sys/arch/aviion/aviion/conf.c b/sys/arch/aviion/aviion/conf.c
deleted file mode 100644
index 40c19546e3a..00000000000
--- a/sys/arch/aviion/aviion/conf.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/* $OpenBSD: conf.c,v 1.20 2015/10/23 15:10:52 claudio Exp $ */
-
-/*-
- * Copyright (c) 1991 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. 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.
- *
- * @(#)conf.c 7.9 (Berkeley) 5/28/91
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/buf.h>
-#include <sys/ioctl.h>
-#include <sys/tty.h>
-#include <sys/vnode.h>
-
-#include <machine/conf.h>
-
-#include "bpfilter.h"
-#include "cd.h"
-#include "ch.h"
-#include "dart.h"
-#include "ksyms.h"
-#include "nvram.h"
-#include "pf.h"
-#include "bio.h"
-#include "pty.h"
-#include "rd.h"
-#include "sd.h"
-#include "st.h"
-#include "systrace.h"
-#include "tun.h"
-#include "uk.h"
-#include "vme.h"
-#include "vnd.h"
-#include "vscsi.h"
-#include "pppx.h"
-#include "fuse.h"
-
-struct bdevsw bdevsw[] =
-{
- bdev_notdef(), /* 0 */
- bdev_notdef(), /* 1 */
- bdev_notdef(), /* 2 */
- bdev_swap_init(1,sw), /* 3: swap pseudo-device */
- bdev_disk_init(NSD,sd), /* 4: SCSI disk */
- bdev_tape_init(NST,st), /* 5: SCSI tape */
- bdev_disk_init(NCD,cd), /* 6: SCSI CD-ROM */
- bdev_disk_init(NRD,rd), /* 7: ramdisk */
- bdev_disk_init(NVND,vnd), /* 8: vnode disk driver */
- bdev_notdef(), /* 9: was: concatenated disk driver */
- bdev_notdef(), /* 10 */
- bdev_notdef(), /* 11 */
- bdev_notdef(), /* 12 */
- bdev_notdef(), /* 13 */
- bdev_notdef(), /* 14 */
- bdev_notdef(), /* 15 */
- bdev_notdef(), /* 16 */
- bdev_notdef(), /* 17 */
- bdev_notdef(), /* 18 */
-};
-int nblkdev = nitems(bdevsw);
-
-struct cdevsw cdevsw[] =
-{
- cdev_cn_init(1,cn), /* 0: virtual console */
- cdev_ctty_init(1,ctty), /* 1: controlling terminal */
- cdev_mm_init(1,mm), /* 2: /dev/{null,mem,kmem,...} */
- cdev_notdef(), /* 3 was /dev/drum */
- cdev_tty_init(NPTY,pts), /* 4: pseudo-tty slave */
- cdev_ptc_init(NPTY,ptc), /* 5: pseudo-tty master */
- cdev_log_init(1,log), /* 6: /dev/klog */
- cdev_notdef(), /* 7 */
- cdev_disk_init(NSD,sd), /* 8: SCSI disk */
- cdev_disk_init(NCD,cd), /* 9: SCSI CD-ROM */
- cdev_mm_init(NNVRAM,nvram), /* 10: /dev/nvramX */
- cdev_notdef(), /* 11: */
- cdev_tty_init(NDART,dart), /* 12: on-board serial (tty[ab]) */
- cdev_notdef(), /* 13 */
- cdev_notdef(), /* 14 */
- cdev_notdef(), /* 15 */
- cdev_notdef(), /* 16 */
- cdev_notdef(), /* 17: was: concatenated disk */
- cdev_disk_init(NRD,rd), /* 18: ramdisk disk */
- cdev_disk_init(NVND,vnd), /* 19: vnode disk */
- cdev_tape_init(NST,st), /* 20: SCSI tape */
- cdev_fd_init(1,filedesc), /* 21: file descriptor pseudo-dev */
- cdev_bpf_init(NBPFILTER,bpf), /* 22: berkeley packet filter */
- cdev_tun_init(NTUN,tun), /* 23: network tunnel */
- cdev_notdef(), /* 24 was LKM */
- cdev_notdef(), /* 25 */
- cdev_notdef(), /* 26: XD disk */
- cdev_notdef(), /* 27 */
- cdev_notdef(), /* 28: lp */
- cdev_notdef(), /* 29: lptwo */
- cdev_mm_init(NVME,vme), /* 30: /dev/vme* */
- cdev_notdef(), /* 31: old /dev/vmelX */
- cdev_notdef(), /* 32: old /dev/vmesX */
- cdev_notdef(), /* 33 */
- cdev_notdef(), /* 34 */
- cdev_notdef(), /* 35 */
- cdev_notdef(), /* 36 */
- cdev_notdef(), /* 37 */
- cdev_notdef(), /* 38 */
- cdev_pf_init(NPF,pf), /* 39: packet filter */
- cdev_random_init(1,random), /* 40: random data source */
- cdev_uk_init(NUK,uk), /* 41 */
- cdev_notdef(), /* 42 */
- cdev_ksyms_init(NKSYMS,ksyms), /* 43: Kernel symbols device */
- cdev_ch_init(NCH,ch), /* 44: SCSI autochanger */
- cdev_fuse_init(NFUSE,fuse), /* 45: fuse */
- cdev_notdef(), /* 46 */
- cdev_notdef(), /* 47 */
- cdev_notdef(), /* 48 */
- cdev_bio_init(NBIO,bio), /* 49: ioctl tunnel */
- cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */
- cdev_notdef(), /* 51 */
- cdev_ptm_init(NPTY,ptm), /* 52: pseudo-tty ptm device */
- cdev_vscsi_init(NVSCSI,vscsi), /* 53: vscsi */
- cdev_disk_init(1,diskmap), /* 54: disk mapper */
- cdev_pppx_init(NPPPX,pppx), /* 55: pppx */
- cdev_tun_init(NTUN,tap), /* 56: Ethernet network tunnel */
-};
-int nchrdev = nitems(cdevsw);
-
-int mem_no = 2; /* major device number of memory special file */
-
-/*
- * Swapdev is a fake device implemented
- * in sw.c used only internally to get to swstrategy.
- * It cannot be provided to the users, because the
- * swstrategy routine munches the b_dev and b_blkno entries
- * before calling the appropriate driver. This would horribly
- * confuse, e.g. the hashing routines. Instead, /dev/drum is
- * provided as a character (raw) device.
- */
-dev_t swapdev = makedev(3, 0);
-
-/*
- * Returns true if dev is /dev/mem or /dev/kmem.
- */
-int
-iskmemdev(dev)
- dev_t dev;
-{
-
- return (major(dev) == mem_no && minor(dev) < 2);
-}
-
-/*
- * Returns true if dev is /dev/zero.
- */
-int
-iszerodev(dev)
- dev_t dev;
-{
-
- return (major(dev) == mem_no && minor(dev) == 12);
-}
-
-dev_t
-getnulldev()
-{
- return makedev(mem_no, 2);
-}
-
-int chrtoblktbl[] = {
- /*VCHR*/ /*VBLK*/
- /* 0 */ NODEV,
- /* 1 */ NODEV,
- /* 2 */ NODEV,
- /* 3 */ NODEV,
- /* 4 */ NODEV,
- /* 5 */ NODEV,
- /* 6 */ NODEV,
- /* 7 */ NODEV,
- /* 8 */ 4, /* sd */
- /* 9 */ 6, /* cd */
- /* 10 */ NODEV,
- /* 11 */ NODEV,
- /* 12 */ NODEV,
- /* 13 */ NODEV,
- /* 14 */ NODEV,
- /* 15 */ NODEV,
- /* 16 */ NODEV,
- /* 17 */ NODEV,
- /* 18 */ 7, /* rd */
- /* 19 */ 8, /* vnd */
- /* 20 */ 5, /* st */
-};
-int nchrtoblktbl = nitems(chrtoblktbl);
-
-#include <dev/cons.h>
-
-#define dartcnpollc nullcnpollc
-cons_decl(dart);
-
-struct consdev constab[] = {
-#if NDART > 0
- cons_init(dart),
-#endif
- { 0 },
-};
diff --git a/sys/arch/aviion/aviion/db_machdep.c b/sys/arch/aviion/aviion/db_machdep.c
deleted file mode 100644
index 909286489be..00000000000
--- a/sys/arch/aviion/aviion/db_machdep.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* $OpenBSD: db_machdep.c,v 1.1.1.1 2006/05/09 18:08:53 miod Exp $ */
-/*
- * Mach Operating System
- * Copyright (c) 1993-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.
- *
- * CARNEGIE MELLON AND OMRON ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON AND OMRON DISCLAIM ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-/*
- * aviion-specific interface to ddb debugger
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-
-#include <machine/cpu.h>
-#include <machine/db_machdep.h>
-
-void
-m88k_db_prom_cmd(addr, have_addr, count, modif)
- db_expr_t addr;
- int have_addr;
- db_expr_t count;
- char *modif;
-{
- doboot();
-}
diff --git a/sys/arch/aviion/aviion/disksubr.c b/sys/arch/aviion/aviion/disksubr.c
deleted file mode 100644
index 4cf802fdb7d..00000000000
--- a/sys/arch/aviion/aviion/disksubr.c
+++ /dev/null
@@ -1,470 +0,0 @@
-/* $OpenBSD: disksubr.c,v 1.63 2015/09/30 00:43:44 krw Exp $ */
-
-/*
- * Copyright (c) 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-/*
- * Copyright (c) 1996 Theo de Raadt
- * Copyright (c) 1982, 1986, 1988 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. 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.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/buf.h>
-#include <sys/disklabel.h>
-#include <sys/disk.h>
-#include <sys/malloc.h>
-
-char *extract_vdit_portion(char *, const char *, unsigned int, unsigned int,
- int);
-int readvditlabel(struct buf *, void (*)(struct buf *), struct disklabel *,
- daddr_t *, int, struct vdm_boot_info *);
-int readvdmlabel(struct buf *, void (*)(struct buf *), struct disklabel *,
- daddr_t *, int);
-
-/*
- * Attempt to read a disk label from a device
- * using the indicated strategy routine.
- * The label must be partly set up before this:
- * secpercyl, secsize and anything required for a block i/o read
- * operation in the driver's strategy/start routines
- * must be filled in before calling us.
- */
-int
-readdisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp,
- int spoofonly)
-{
- struct buf *bp = NULL;
- int error;
-
- if ((error = initdisklabel(lp)))
- goto done;
-
- bp = geteblk((int)lp->d_secsize);
- bp->b_dev = dev;
-
- /*
- * Check for a VDIT or native-in-VDM label first.
- * If a valid VDM signature is found, but neither a VDIT nor a
- * native label are found, do not attempt to check for any other
- * label scheme.
- */
- error = readvdmlabel(bp, strat, lp, NULL, spoofonly);
- if (error == 0)
- goto done;
- if (error == ENOENT) {
- error = EINVAL;
- goto done;
- }
-
- error = readdoslabel(bp, strat, lp, NULL, spoofonly);
- if (error == 0)
- goto done;
-
-#if defined(CD9660)
- error = iso_disklabelspoof(dev, strat, lp);
- if (error == 0)
- goto done;
-#endif
-#if defined(UDF)
- error = udf_disklabelspoof(dev, strat, lp);
- if (error == 0)
- goto done;
-#endif
-
-done:
- if (bp) {
- bp->b_flags |= B_INVAL;
- brelse(bp);
- }
- disk_change = 1;
- return (error);
-}
-
-/*
- * Write disk label back to device after modification.
- */
-int
-writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp)
-{
- daddr_t partoff = -1;
- int error = EIO;
- int offset;
- struct disklabel *dlp;
- struct buf *bp = NULL;
-
- /* get a buffer and initialize it */
- bp = geteblk((int)lp->d_secsize);
- bp->b_dev = dev;
-
- /* Read it in, slap the new label in, and write it back out */
- error = readvdmlabel(bp, strat, lp, &partoff, 1);
- if (error == 0 || error == ENOENT) {
- error = readdisksector(bp, strat, lp, DL_BLKTOSEC(lp,
- partoff + LABELSECTOR));
- offset = LABELOFFSET;
- } else if (readdoslabel(bp, strat, lp, &partoff, 1) == 0) {
- error = readdisksector(bp, strat, lp, DL_BLKTOSEC(lp,
- partoff + DOS_LABELSECTOR));
- offset = DL_BLKOFFSET(lp, partoff + DOS_LABELSECTOR);
- } else {
- error = EIO;
- goto done;
- }
-
- if (error)
- goto done;
-
- dlp = (struct disklabel *)(bp->b_data + offset);
- *dlp = *lp;
- CLR(bp->b_flags, B_READ | B_WRITE | B_DONE);
- SET(bp->b_flags, B_BUSY | B_WRITE | B_RAW);
- (*strat)(bp);
- error = biowait(bp);
-
-done:
- if (bp) {
- bp->b_flags |= B_INVAL;
- brelse(bp);
- }
- disk_change = 1;
- return (error);
-}
-
-/*
- * Search for a VDM "label" (which does not describe any partition).
- * If one is found, search for either a VDIT label, or a native OpenBSD
- * label in the first sector.
- */
-int
-readvdmlabel(struct buf *bp, void (*strat)(struct buf *), struct disklabel *lp,
- daddr_t *partoffp, int spoofonly)
-{
- struct vdm_label *vdl;
- struct vdm_boot_info *vbi;
- int error = 0;
-
- /*
- * Read first sector and check for a VDM label.
- * Note that a VDM label is only required for bootable disks, and
- * may not be followed by a VDIT.
- */
-
- error = readdisksector(bp, strat, lp, DL_BLKTOSEC(lp,
- VDM_LABEL_SECTOR));
- if (error)
- return (error);
-
- vdl = (struct vdm_label *)(bp->b_data + VDM_LABEL_OFFSET);
- if (vdl->signature != VDM_LABEL_SIGNATURE)
- vdl = (struct vdm_label *)(bp->b_data + VDM_LABEL_OFFSET_ALT);
- if (vdl->signature != VDM_LABEL_SIGNATURE)
- return EINVAL;
-
- /*
- * If the disk is a bootable disk, remember the boot block area, to
- * be able to check that the VDIT does not overwrite it.
- */
-
- vbi = (struct vdm_boot_info *)(bp->b_data + dbtob(1) - sizeof *vbi);
- if (vbi->signature != VDM_LABEL_SIGNATURE || vbi->boot_start == 0)
- vbi = NULL;
-
- if (vbi != NULL && vbi->boot_start == VDIT_SECTOR)
- return EINVAL;
-
- if (vbi != NULL && vbi->boot_start + vbi->boot_size > DL_GETBSTART(lp))
- DL_SETBSTART(lp, vbi->boot_start + vbi->boot_size);
-
- error = readvditlabel(bp, strat, lp, partoffp, spoofonly, vbi);
- if (error == 0)
- return 0;
-
- /*
- * Valid VDIT information, but no OpenBSD vdmpart found.
- * Do not try to read a native label.
- */
- if (error == ENOENT)
- return error;
-
- if (partoffp != NULL)
- *partoffp = 0;
-
- /* don't read the on-disk label if we are in spoofed-only mode */
- if (spoofonly != 0)
- return 0;
-
- error = readdisksector(bp, strat, lp, DL_BLKTOSEC(lp, LABELSECTOR));
- if (error)
- return (error);
-
- return checkdisklabel(bp->b_data + LABELOFFSET, lp,
- DL_GETBSTART(lp), DL_GETBEND(lp));
-}
-
-/*
- * Search for a VDIT volume information. If one is found, search for a
- * vdmpart instance of name "OpenBSD". If one is found, set the disklabel
- * bounds to the area it spans, and attempt to read a native label within
- * it.
- */
-int
-readvditlabel(struct buf *bp, void (*strat)(struct buf *), struct disklabel *lp,
- daddr_t *partoffp, int spoofonly, struct vdm_boot_info *vbi)
-{
- struct buf *sbp = NULL;
- struct vdit_block_header *vbh;
- struct vdit_entry_header *veh;
- char *vdit_storage = NULL, *vdit_end;
- size_t vdit_size;
- unsigned int largest_chunk, vdit_blkno;
- int expected_kind;
- daddr_t blkno;
- int error = 0;
- vdit_id_t *vdmpart_id;
- struct vdit_vdmpart_instance *bsd_vdmpart;
-
- /*
- * Figure out the size of the first VDIT.
- */
-
- vdit_size = largest_chunk = 0;
- expected_kind = VDIT_BLOCK_HEAD_BE;
- blkno = VDIT_SECTOR;
- for (;;) {
- error = readdisksector(bp, strat, lp, DL_BLKTOSEC(lp, blkno));
- if (error)
- return (error);
-
- vbh = (struct vdit_block_header *)bp->b_data;
- if (VDM_ID_KIND(&vbh->id) != expected_kind ||
- VDM_ID_BLKNO(&vbh->id) != vdit_size ||
- vbh->id.node_number != VDM_NO_NODE_NUMBER)
- return EINVAL;
-
- if (vbi != NULL) {
- if ((blkno >= vbi->boot_start &&
- blkno < vbi->boot_start + vbi->boot_size) ||
- (blkno + vbh->chunksz - 1 >= vbi->boot_start &&
- blkno + vbh->chunksz - 1 <
- vbi->boot_start + vbi->boot_size))
- return EINVAL;
- }
-
- if (vbh->chunksz > largest_chunk)
- largest_chunk = vbh->chunksz;
- vdit_size += vbh->chunksz;
- if (vbh->nextblk == VDM_NO_BLK_NUMBER)
- break;
- blkno = vbh->nextblk;
- if (blkno >= DL_GETDSIZE(lp))
- return EINVAL;
- expected_kind = VDIT_PORTION_HEADER_BLOCK;
- }
-
- /*
- * Now read the first VDIT.
- */
-
- vdit_size *= dbtob(1) - sizeof(struct vdit_block_header);
- vdit_storage = malloc(vdit_size, M_DEVBUF, M_WAITOK);
- largest_chunk = dbtob(largest_chunk);
- sbp = geteblk(largest_chunk);
- sbp->b_dev = bp->b_dev;
-
- vdit_end = vdit_storage;
- expected_kind = VDIT_BLOCK_HEAD_BE;
- blkno = VDIT_SECTOR;
- vdit_blkno = 0;
- for (;;) {
- sbp->b_blkno = blkno;
- sbp->b_bcount = largest_chunk;
- CLR(sbp->b_flags, B_READ | B_WRITE | B_DONE);
- SET(sbp->b_flags, B_BUSY | B_READ | B_RAW);
- (*strat)(sbp);
- if ((error = biowait(sbp)) != 0)
- goto done;
-
- vbh = (struct vdit_block_header *)sbp->b_data;
- if (VDM_ID_KIND(&vbh->id) != expected_kind) {
- error = EINVAL;
- goto done;
- }
-
- vdit_end = extract_vdit_portion(vdit_end, sbp->b_data,
- vbh->chunksz, vdit_blkno, expected_kind);
- if (vdit_end == NULL) {
- error = EINVAL;
- goto done;
- }
- if (vbh->nextblk == VDM_NO_BLK_NUMBER)
- break;
- vdit_blkno += vbh->chunksz;
- blkno = vbh->nextblk;
- expected_kind = VDIT_PORTION_HEADER_BLOCK;
- }
-
- /*
- * Walk the VDIT entries.
- *
- * If we find an OpenBSD vdmpart, we'll set our disk area bounds to
- * its area, and will read a label from there.
- */
-
- vdmpart_id = NULL;
- bsd_vdmpart = NULL;
-
- veh = (struct vdit_entry_header *)vdit_storage;
- while ((caddr_t)veh < vdit_end) {
- switch (veh->type) {
- case VDIT_ENTRY_SUBDRIVER_INFO:
- {
- struct vdit_subdriver_entry *vse;
-
- vse = (struct vdit_subdriver_entry *)(veh + 1);
- if (strcmp(vse->name, VDM_SUBDRIVER_VDMPART) == 0)
- vdmpart_id = &vse->subdriver_id;
- }
- break;
- case VDIT_ENTRY_INSTANCE:
- {
- struct vdit_instance_entry *vie;
-
- vie = (struct vdit_instance_entry *)(veh + 1);
- if (strcmp(vie->name, VDM_INSTANCE_OPENBSD) == 0) {
- if (vdmpart_id != NULL &&
- memcmp(vdmpart_id, &vie->subdriver_id,
- sizeof(vdit_id_t)) == 0) {
- /* found it! */
- if (bsd_vdmpart != NULL) {
- bsd_vdmpart = NULL;
- veh->type = VDIT_ENTRY_SENTINEL;
- } else
- bsd_vdmpart = (struct
- vdit_vdmpart_instance *)vie;
- }
- }
- }
- break;
- }
- if (veh->type == VDIT_ENTRY_SENTINEL)
- break;
- veh = (struct vdit_entry_header *)((char *)veh + veh->size);
- }
-
- if (bsd_vdmpart != NULL) {
- uint32_t start, size;
-
- memcpy(&start, &bsd_vdmpart->start_blkno, sizeof(uint32_t));
- memcpy(&size, &bsd_vdmpart->size, sizeof(uint32_t));
-
- if (start >= DL_GETDSIZE(lp) ||
- start + size > DL_GETDSIZE(lp)) {
- error = EINVAL;
- goto done;
- }
-
- if (partoffp != NULL) {
- *partoffp = start;
- goto done;
- } else {
- DL_SETBSTART(lp, start);
- DL_SETBEND(lp, start + size);
- }
-
- /*
- * Now read the native label.
- */
-
- if (spoofonly == 0) {
- error = readdisksector(bp, strat, lp,
- DL_BLKTOSEC(lp, start + LABELSECTOR));
- if (error)
- goto done;
-
- error = checkdisklabel(bp->b_data + LABELOFFSET, lp,
- start, start + size);
- }
- } else {
- /*
- * VDM label, but no OpenBSD vdmpart partition found.
- * XXX is it worth registering the whole disk as a
- * XXX `don't touch' vendor partition in that case?
- */
- error = ENOENT;
- goto done;
- }
-
-done:
- free(vdit_storage, M_DEVBUF, vdit_size);
- if (sbp != NULL) {
- sbp->b_flags |= B_INVAL;
- brelse(sbp);
- }
-
- return error;
-}
-
-/*
- * Process a contiguous chunk of VDIT, verifying and removing each block header
- * as we go.
- */
-char *
-extract_vdit_portion(char *dst, const char *src, unsigned int nsec,
- unsigned int vdit_blkno, int kind)
-{
- struct vdit_block_header *vbh;
-
- for (; nsec != 0; nsec--) {
- vbh = (struct vdit_block_header *)src;
- if (VDM_ID_KIND(&vbh->id) != kind ||
- VDM_ID_BLKNO(&vbh->id) != vdit_blkno ||
- vbh->id.node_number != VDM_NO_NODE_NUMBER)
- return NULL;
- kind = VDIT_BLOCK;
-
- memcpy(dst, src + sizeof *vbh, dbtob(1) - sizeof *vbh);
- dst += dbtob(1) - sizeof *vbh;
- src += dbtob(1);
- vdit_blkno++;
- }
-
- return dst;
-}
diff --git a/sys/arch/aviion/aviion/eh.S b/sys/arch/aviion/aviion/eh.S
deleted file mode 100644
index 8c0cabdfc45..00000000000
--- a/sys/arch/aviion/aviion/eh.S
+++ /dev/null
@@ -1,126 +0,0 @@
-/* $OpenBSD: eh.S,v 1.9 2014/09/21 16:20:16 miod Exp $ */
-/*
- * Copyright (c) 2006, 2010 Miodrag Vallat
- *
- * 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.
- *
- * 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 <machine/m8820x.h>
-
-/*
- * Save Pbus fault status register from data and inst CMMU.
- */
-
-#define PFSR_SAVE \
- NOP; /* will be changed to br.n pfsr_handler + 4 */ \
- NOP /* will be changed to first instruction of pfsr_handler */
-
-#include <m88k/m88k/eh_common.S>
-
-ENTRY(pfsr_double)
- /*
- * 4 CMMUs per CPU. Almost as simple as the 2 CMMUs per CPU
- * situation...
- *
- * However, to be sure we don't get fooled with already-processed
- * exceptions, we have to reset the fault status registers
- * after reading them.
- */
- ld TMP2, TMP, CI_PFSR_I0
- ld TMP3, TMP2, %r0
- extu TMP3, TMP3, 3<16>
- bcnd ne0, TMP3, 1f
- st %r0, TMP2, %r0
- ld TMP2, TMP, CI_PFSR_I1
-1:
- ld TMP3, TMP2, %r0
- st %r0, TMP2, %r0
- st TMP3, %r31, EF_IPFSR
-
- ld TMP2, TMP, CI_PFSR_D0
- ld TMP3, TMP2, %r0
- extu TMP3, TMP3, 3<16>
- bcnd ne0, TMP3, 2f
- st %r0, TMP2, %r0
- ld TMP2, TMP, CI_PFSR_D1
-2:
- ld TMP3, TMP2, %r0
- st %r0, TMP2, %r0
- br.n _ASM_LABEL(pfsr_done)
- st TMP3, %r31, EF_DPFSR
-
-ENTRY(pfsr_straight)
- /*
- * We have the simple 2 CMMUs per CPU mapping. Pick our couple;
- * note that, at least on AV530 family systems, unlike other
- * MVME188-derived designs, we *do* need to reset fault status
- * registers after reading them.
- */
- ld TMP2, TMP, CI_PFSR_I0
- ld TMP3, TMP2, %r0
- st %r0, TMP2, %r0
- st TMP3, %r31, EF_IPFSR
-
- ld TMP2, TMP, CI_PFSR_D0
- ld TMP3, TMP2, %r0
- st %r0, TMP2, %r0
- br.n _ASM_LABEL(pfsr_done)
- st TMP3, %r31, EF_DPFSR
-
-ENTRY(pfsr_six)
- /*
- * 6 CMMU (2D4I) per CPU - this is the worst situation.
- * We handle the instruction CMMU relying upon them being set up
- * every 0x1000 bytes in the address space. Data CMMU can use
- * the per-cpu_info pfsr pointers as usual.
- */
- ld TMP2, TMP, CI_PFSR_I0
- ld TMP3, TMP2, %r0
- extu TMP3, TMP3, 3<16>
- bcnd ne0, TMP3, 1f
-
- addu TMP2, TMP2, 0x1000 /* I1 */
- ld TMP3, TMP2, %r0
- extu TMP3, TMP3, 3<16>
- bcnd ne0, TMP3, 1f
-
- addu TMP2, TMP2, 0x1000 /* I2 */
- ld TMP3, TMP2, %r0
- extu TMP3, TMP3, 3<16>
- bcnd ne0, TMP3, 1f
-
- addu TMP2, TMP2, 0x1000 /* I3 */
-1:
- ld TMP3, TMP2, %r0
- st %r0, TMP2, %r0
- st TMP3, %r31, EF_IPFSR
-
- ld TMP2, TMP, CI_PFSR_D0
- ld TMP3, TMP2, %r0
- extu TMP3, TMP3, 3<16>
- bcnd ne0, TMP3, 2f
- addu TMP2, TMP2, 0x1000 /* D1 */
-2:
- ld TMP3, TMP2, %r0
- st %r0, TMP2, %r0
- br.n _ASM_LABEL(pfsr_done)
- st TMP3, %r31, EF_DPFSR
diff --git a/sys/arch/aviion/aviion/genassym.cf b/sys/arch/aviion/aviion/genassym.cf
deleted file mode 100644
index 679dcad021f..00000000000
--- a/sys/arch/aviion/aviion/genassym.cf
+++ /dev/null
@@ -1 +0,0 @@
-# $OpenBSD: genassym.cf,v 1.1 2010/04/26 22:11:38 deraadt Exp $
diff --git a/sys/arch/aviion/aviion/locore.S b/sys/arch/aviion/aviion/locore.S
deleted file mode 100644
index 27d7e0c9a95..00000000000
--- a/sys/arch/aviion/aviion/locore.S
+++ /dev/null
@@ -1,388 +0,0 @@
-/* $OpenBSD: locore.S,v 1.21 2015/02/25 17:41:22 miod Exp $ */
-/*
- * Copyright (c) 2005, Miodrag Vallat.
- * Copyright (c) 1998 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) 1993-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.
- *
- * CARNEGIE MELLON AND OMRON ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON AND OMRON DISCLAIM ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-#include "assym.h"
-#include "ksyms.h"
-
-#include <machine/asm.h>
-#include <machine/m88100.h>
-#include <machine/param.h>
-#include <machine/psl.h>
-#include <machine/trap.h>
-#include <machine/vmparam.h>
-
-#define BOOT_MAGIC 0x6274ef2e
-
- .text
-
-GLOBAL(kernelstart)
-GLOBAL(kernel_text)
-ASGLOBAL(__start)
- /*
- * A few identical jump instructions to make sure the pipeline is
- * in a good state. Probably overkill, but it's cheap.
- */
- br _ASM_LABEL(main_start)
- br _ASM_LABEL(main_start)
- br _ASM_LABEL(main_start)
- br _ASM_LABEL(main_start)
-
- /*
- * Room for the kernel VBR page.
- * Note this page is in kernel text, in order to be write-protected
- * by pmap_bootstrap().
- */
- .balign PAGE_SIZE
-
-#ifdef M88100
- /*
- * The 88100 may execute the first instruction of the next trap
- * handler, as documented in its Errata. Processing trap #511
- * would then fall into the next page, unless the address computation
- * wraps, or software traps are exempt from the issue - the Errata
- * does not provide more detail.
- * Although the MVME BUG does not add an extra NOP after its VBR page,
- * it is cheap to add an extra NOP for safety.
- */
- NOP
-#endif
-
- /*
- * Startup code for main processor.
- */
-ASLOCAL(main_start)
- /*
- * Save the arguments passed by the PROM
- * %r2 boot string
- * %r3 boot device
- * %r4 boot unit number
- * %r5 boot partition number
- * %r6 magic number if not loaded by the PROM
- * %r7 end of loaded binary if not loaded by the PROM
- */
- or.u %r13, %r0, %hi16(_C_LABEL(prom_bootargs))
- st %r2, %r13, %lo16(_C_LABEL(prom_bootargs))
- or.u %r13, %r0, %hi16(_C_LABEL(bootdev))
- st %r3, %r13, %lo16(_C_LABEL(bootdev))
- or.u %r13, %r0, %hi16(_C_LABEL(bootunit))
- st %r4, %r13, %lo16(_C_LABEL(bootunit))
- or.u %r13, %r0, %hi16(_C_LABEL(bootlun))
- st %r5, %r13, %lo16(_C_LABEL(bootlun))
-
- or.u %r12, %r0, %hi16(BOOT_MAGIC)
- or %r12, %r12, %lo16(BOOT_MAGIC)
- cmp %r2, %r6, %r12
- bb1 eq, %r2, 1f
- addu %r12, %r12, 1 /* BOOT_MAGIC + 1 */
- cmp %r2, %r6, %r12
- bb1 ne, %r2, 2f
-
- /* BOOT_MAGIC + 1 */
- or.u %r13, %r0, %hi16(_C_LABEL(bootpart))
- st %r7, %r13, %lo16(_C_LABEL(bootpart))
-#if defined(DDB) || NKSYMS > 0
- or.u %r13, %r0, %hi16(_C_LABEL(esym))
- st %r8, %r13, %lo16(_C_LABEL(esym))
-#endif
- br 2f
-
- /* BOOT_MAGIC */
-1:
-#if defined(DDB) || NKSYMS > 0
- or.u %r13, %r0, %hi16(_C_LABEL(esym))
- st %r7, %r13, %lo16(_C_LABEL(esym))
-#endif
-
-2:
- /* set cputyp */
- ldcr %r1, PID
- extu %r8, %r1, 8<8>
-
- or.u %r13, %r0, %hi16(_C_LABEL(cputyp))
- bsr.n _ASM_LABEL(setup_psr)
- st %r8, %r13, %lo16(_C_LABEL(cputyp))
-
- /* save PROM vbr */
- ldcr %r12, VBR
- or.u %r13, %r0, %hi16(_C_LABEL(prom_vbr))
- st %r12, %r13, %lo16(_C_LABEL(prom_vbr))
-
- /*
- * Have curcpu() point at the dummy cpuinfo structure,
- * and initialize cr17.
- * This is necessary for early spl*() usage, as well as
- * mutex diagnostic code.
- */
- or.u %r11, %r0, %hi16(_ASM_LABEL(dummy_cpu))
- or %r11, %r11, %lo16(_ASM_LABEL(dummy_cpu))
- stcr %r11, CPU
-
-#ifdef MULTIPROCESSOR
- /*
- * SCM PROM idles all secondary MPUs upon startup, so at this point
- * we do not have to compete with them.
- */
-#endif /* MULTIPROCESSOR */
-
- /* Switch to startup stack */
- or.u %r31, %r0, %hi16(_ASM_LABEL(initstack_end))
- or %r31, %r31, %lo16(_ASM_LABEL(initstack_end))
-
-#ifdef M88110
-#ifdef M88100
- cmp %r2, %r8, CPU_88110
- bb1 ne, %r2, 1f /* if it's a 'mc88110, use different vectors */
-#endif
- or.u %r3, %r0, %hi16(_C_LABEL(m88110_vector_list))
- br.n 2f
- or %r3, %r3, %lo16(_C_LABEL(m88110_vector_list))
-1:
-#endif /* M88110 */
-#ifdef M88100
- or.u %r3, %r0, %hi16(_C_LABEL(vector_list))
- or %r3, %r3, %lo16(_C_LABEL(vector_list))
-#endif /* M88100 */
-2:
- or %r4, %r0, 1
- or.u %r2, %r0, %hi16(_ASM_LABEL(__start))
- bsr.n _C_LABEL(vector_init)
- or %r2, %r2, %lo16(_ASM_LABEL(__start))
- stcr %r2, VBR
- FLUSH_PIPELINE
-
- or.u %r3, %r0, %hi16(_C_LABEL(kernel_vbr))
- st %r2, %r3, %lo16(_C_LABEL(kernel_vbr))
-
-#ifdef MULTIPROCESSOR
- bsr _C_LABEL(atomic_init)
-#endif
-
- /*
- * aviion_bootstrap(), among other things, clears proc0's u area.
- * We are still using the interrupt stack here, thus we are not
- * affected...
- */
- bsr _C_LABEL(aviion_bootstrap)
-
- /*
- * ...and we can switch to the u area stack now.
- */
- ldcr %r10, CPU
- ld %r31, %r10, CI_CURPCB
-
- /* call main() - no arguments although main() still defines one */
- bsr.n _C_LABEL(main)
- addu %r31, %r31, USPACE
-
-#ifdef MULTIPROCESSOR
-
- /*
- * Startup code for secondary processors.
- * Some of these initializations are very close to main_start; refer
- * to the comments there for details.
- */
-GLOBAL(secondary_start)
- /*
- * We have been started early, but there is nothing we can do yet.
- * We'll just spin until we can get the hatching mutex.
- */
- or.u %r11, %r0, %hi16(_C_LABEL(cpu_hatch_mutex))
- or %r11, %r11, %lo16(_C_LABEL(cpu_hatch_mutex))
-1:
- or %r22, %r0, 1
- xmem %r22, %r11, %r0 /* if %r22 becomes zero, we own the lock... */
- bcnd eq0, %r22, 4f /* ... but if not, we must wait */
-2:
- /* just watch the lock until it clears */
- ld %r22, %r11, %r0
- bcnd eq0, %r22, 1b
- /* wait a bit to avoid overloading the bus */
- or.u %r2, %r0, 100
-3:
- subu %r2, %r2, 1
- bcnd ne0, %r2, 3b
- br 2b
-4:
-
- /*
- * We are now running free with cpu_hatch_mutex held; other
- * secondary processors (if any) are waiting for the lock,
- * and the main processor is waiting for us to decrease the
- * hatch counter, which we'll do later in secondary_main().
- */
-
- or.u %r31, %r0, %hi16(_ASM_LABEL(slavestack_end))
- bsr.n _ASM_LABEL(setup_psr)
- or %r31, %r31, %lo16(_ASM_LABEL(slavestack_end))
-
- or.u %r3, %r0, %hi16(_C_LABEL(kernel_vbr))
- ld %r2, %r3, %lo16(_C_LABEL(kernel_vbr))
- stcr %r2, VBR
- FLUSH_PIPELINE
-
- /*
- * Have curcpu() point at the dummy cpuinfo structure,
- * and initialize cr17.
- * This is necessary for early spl*() usage, as well as
- * mutex diagnostic code.
- */
- or.u %r11, %r0, %hi16(_ASM_LABEL(dummy_cpu))
- or %r11, %r11, %lo16(_ASM_LABEL(dummy_cpu))
- st %r0, %r11, CI_FLAGS /* reset CIF_PRIMARY */
- stcr %r11, CPU
-
- /*
- * While holding the cpu_mutex, the secondary cpu can use the
- * slavestack to call secondary_pre_main() to determine its cpu
- * number. That function will also return the proper stack to
- * use and we'll switch to it.
- */
-
- bsr _C_LABEL(secondary_pre_main) /* set cpu number */
-
- bsr.n _C_LABEL(secondary_main)
- addu %r31, %r2, USPACE /* switch to idle stack */
-
- /*
- * Dummy mp_atomic_begin() and mp_atomic_end() routine, so that
- * we can interact with ddb if things go wrong very early during
- * bootstrap. Of course this should never happen (-:
- */
-ASLOCAL(dummy_mplock)
- jmp %r1
-
-#endif /* MULTIPROCESSOR */
-
-/*
- * void delay(int us)
- *
- * The processor loops (busy waits) for the given number of microseconds:
- * Thus, delay(1000000) will delay for one second.
- * (originally from Mach 2.5)
- */
-GLOBAL(delay)
- bcnd eq0, %r2, 2f
- or.u %r3, %r0, %hi16(_C_LABEL(aviion_delay_const))
- ld %r3, %r3, %lo16(_C_LABEL(aviion_delay_const))
- mul %r4, %r2, %r3
- subu %r4, %r4, 4 /* overhead of these instructions */
-
- /* now loop for the given number of cycles */
-1:
- bcnd.n gt0, %r4, 1b
- subu %r4, %r4, 2 /* two cycles per iteration */
-2:
- jmp %r1
-
-/*
- * Switch to a 1:1 mapped stack at shutdown/reboot time.
- */
-GLOBAL(bootstack)
- or.u %r31, %r0, %hi16(_ASM_LABEL(initstack_end))
- jmp.n %r1
- or %r31, %r31, %lo16(_ASM_LABEL(initstack_end))
-
-/*****************************************************************************/
-
- .data
- .balign PAGE_SIZE
-GLOBAL(kernel_sdt) /* SDT (segment descriptor table */
- .space 0x2000 /* 8K - 4K phys, 4K virt*/
-
- .balign PAGE_SIZE
-ASGLOBAL(initstack)
- .space USPACE
-ASGLOBAL(initstack_end)
-
-#ifdef MULTIPROCESSOR
- .space PAGE_SIZE /* 4K, small, interim stack */
-ASLOCAL(slavestack_end)
-#endif
-
-/*
- * Process 0's u.
- * Should be page aligned.
- */
- .balign PAGE_SIZE
-ASLOCAL(u0)
- .space USPACE
-GLOBAL(proc0paddr)
- .word _ASM_LABEL(u0) /* KVA of proc0 uarea */
-
-/* Dummy cpuinfo structure, for cpu_number() to work early. */
-ASLOCAL(dummy_cpu)
- .word 3 /* CIF_PRIMARY | CIF_ALIVE */ /* ci_alive */
- .word 0 /* ci_curproc */
- .word 0 /* ci_curpcb */
- .word 0 /* ci_curpmap */
- .word 0 /* ci_cpuid */
-#ifdef MULTIPROCESSOR
- .word _ASM_LABEL(dummy_mplock) /* ci_mp_atomic_begin */
- .word _ASM_LABEL(dummy_mplock) /* ci_mp_atomic_end */
-#else
- .word 0
- .word 0
-#endif
- .space CPU_INFO_SIZEOF - 7 * 4
-
-#if defined(DDB) || NKSYMS > 0
-GLOBAL(esym)
- .word 0
-#endif /* DDB || NKSYMS > 0 */
diff --git a/sys/arch/aviion/aviion/m8820x.c b/sys/arch/aviion/aviion/m8820x.c
deleted file mode 100644
index aa86bcddd74..00000000000
--- a/sys/arch/aviion/aviion/m8820x.c
+++ /dev/null
@@ -1,334 +0,0 @@
-/* $OpenBSD: m8820x.c,v 1.12 2013/09/29 14:08:53 miod Exp $ */
-/*
- * Copyright (c) 2004, 2006, 2010 Miodrag Vallat.
- *
- * 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.
- *
- * 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/systm.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <machine/asm_macro.h>
-#include <machine/avcommon.h>
-#include <machine/board.h>
-#include <machine/cmmu.h>
-#include <machine/cpu.h>
-#include <machine/m8820x.h>
-#include <machine/pmap.h>
-#include <machine/prom.h>
-
-extern u_int32_t pfsr_straight[];
-extern u_int32_t pfsr_double[];
-extern u_int32_t pfsr_six[];
-
-volatile u_int32_t *whoamiptr;
-
-/*
- * This routine sets up the CPU/CMMU configuration.
- */
-void
-m8820x_setup_board_config()
-{
- extern u_int32_t pfsr_save[];
- struct m8820x_cmmu *cmmu;
- struct scm_cpuconfig scc;
- int type, cpu_num, cpu_cmmu_num, cmmu_num, cmmu_per_cpu;
- volatile u_int *cr;
- u_int32_t whoami;
- u_int32_t *m8820x_pfsr;
-
- /*
- * Check whether the WHOAMI register exists.
- * According to documentation, that register is not available
- * on 100, 200 and 300 models.
- *
- * Since it is unknown whether models 100 and 200 share the
- * 300/310 cpuid, we'd better check whether the register can
- * be read.
- */
-
- switch (cpuid) {
- case AVIION_300_310:
- /* the following for consistency and safety */
- case AVIION_300C_310C:
- case AVIION_300CD_310CD:
- case AVIION_300D_310D:
- break;
- default:
- if (badaddr((vaddr_t)AV_WHOAMI, 4) == 0)
- whoamiptr = (volatile u_int32_t *)AV_WHOAMI;
- break;
- }
-
-
- /*
- * First, find if any CPU0 CMMU is a 88204. If so, we can
- * issue the CPUCONFIG system call to get the configuration
- * details.
- * NOTE that this relies upon [0] and [1] to always have
- * valid CMMU addresses - thankfully this is always the case
- * on model 530 regardless of the CMMU configuration.
- */
- if (badaddr((vaddr_t)m8820x_cmmu[0].cmmu_regs, 4) != 0 ||
- badaddr((vaddr_t)m8820x_cmmu[1].cmmu_regs, 4) != 0) {
- printf("CPU0: missing CMMUs ???\n");
- scm_halt();
- /* NOTREACHED */
- }
-
- cr = (void *)m8820x_cmmu[0].cmmu_regs;
- type = CMMU_TYPE(cr[CMMU_IDR]);
-
- if (type != M88204_ID && type != M88200_ID) {
- printf("CPU0: unrecognized CMMU type %d\n", type);
- scm_halt();
- /* NOTREACHED */
- }
-
- /*
- * Try and use the CPUCONFIG system call to get all the information
- * we need. This is theoretically only available on 88204-based
- * machines, but it can't hurt to give it a try.
- */
- if (scm_cpuconfig(&scc) == 0 && scc.version == SCM_CPUCONFIG_VERSION)
- goto knowledge;
-
- /*
- * XXX Instead of deciding on the CMMU type, we should decide on
- * XXX the board type instead. But then, I am not sure not all
- * XXX 88204-based designs have the WHOAMI register... -- miod
- */
- switch (type) {
- case M88204_ID:
- /*
- * Probe CMMU addresses to discover which CPU slots are
- * populated. Actually, we'll simply check how many upper
- * slots we can ignore, and keep using badaddr() to cope
- * with unpopulated slots.
- */
-hardprobe:
- /*
- * First, we'll assume we are in a 2:1 configuration, thus no
- * CMMU split scheme in use.
- */
- scc.igang = scc.dgang = 1;
- scc.isplit = scc.dsplit = 0;
-
- /*
- * Probe CMMU addresses to discover which CPU slots are
- * populated. Actually, we'll simply check how many upper
- * slots we can ignore, and keep using badaddr() to cope
- * with unpopulated slots.
- */
- cmmu = m8820x_cmmu + MAX_CMMUS - 1;
- for (max_cmmus = MAX_CMMUS - 1; max_cmmus != 0;
- max_cmmus--, cmmu--) {
- if (cmmu->cmmu_regs == NULL)
- continue;
- if (badaddr((vaddr_t)cmmu->cmmu_regs, 4) == 0)
- break;
- }
- scc.cpucount = (1 + max_cmmus) >> 1;
- break;
-
- case M88200_ID:
- /*
- * Deduce our configuration from the WHOAMI register.
- */
-
- if (whoamiptr == NULL)
- whoami = 0x0a; /* 1 CPU, 2 CMMUs */
- else
- whoami = (*whoamiptr & 0xf0) >> 4;
-
- switch (whoami) {
- case 0: /* 4 CPUs, 8 CMMUs */
- scc.cpucount = 4;
- break;
- case 5: /* 2 CPUs, 4 CMMUs */
- scc.cpucount = 2;
- break;
- case 0x0a: /* 1 CPU, 2 CMMUs */
- scc.cpucount = 1;
- break;
- case 3: /* 2 CPUs, 12 CMMUs */
- case 7: /* 1 CPU, 6 CMMUs */
- /*
- * Regular logic can't cope with asymmetrical
- * designs. Report a 4:1 ratio with two missing
- * data CMMUs.
- */
- ncpusfound = whoami == 7 ? 1 : 2;
- cmmu_per_cpu = 6;
- cmmu_shift = 3;
- max_cmmus = ncpusfound << cmmu_shift;
-#if 0
- scc.igang = 4;
- scc.isplit = (1U << 12) | (1U << 13);
- scc.dgang = 2;
- scc.dsplit = (1U << 12);
-#endif
- m8820x_pfsr = pfsr_six;
- goto done;
- break;
- default:
- printf("unrecognized CMMU configuration, whoami %x\n",
- whoami);
-#if 0
- scm_halt();
-#else
- goto hardprobe;
-#endif
- }
- /*
- * Oh, and we are in a 2:1 configuration, thus no
- * CMMU split scheme in use.
- */
- scc.igang = scc.dgang = 1;
- scc.isplit = scc.dsplit = 0;
-
- break;
- }
-
-knowledge:
- if (scc.igang != scc.dgang ||
- scc.igang == 0 || scc.igang > 2) {
- printf("Unsupported CMMU to CPU ratio (%dI/%dD)\n",
- scc.igang, scc.dgang);
- scm_halt();
- /* NOTREACHED */
- }
-
- ncpusfound = scc.cpucount;
- if (scc.igang == 1) {
- cmmu_shift = 1;
- m8820x_pfsr = pfsr_straight;
- } else {
- cmmu_shift = 2;
- m8820x_pfsr = pfsr_double;
- }
- max_cmmus = ncpusfound << cmmu_shift;
- cmmu_per_cpu = 1 << cmmu_shift;
-
-done:
- /*
- * Now that we know which CMMUs are there, report every association
- */
- for (cpu_num = 0; cpu_num < ncpusfound; cpu_num++) {
- cmmu_num = cpu_num << cmmu_shift;
- cr = m8820x_cmmu[cmmu_num].cmmu_regs;
- if (badaddr((vaddr_t)cr, 4) == 0) {
- type = CMMU_TYPE(m8820x_cmmu[cmmu_num].
- cmmu_regs[CMMU_IDR]);
-
- printf("CPU%d is associated to %d MC8820%c CMMUs\n",
- cpu_num, cmmu_per_cpu,
- type == M88204_ID ? '4' : '0');
- }
- }
-
- /*
- * Now set up addressing limits
- */
- switch (cmmu_shift) {
- case 3: /* 6:1 schemes */
- for (cmmu_num = 0, cmmu = m8820x_cmmu; cmmu_num < max_cmmus;
- cmmu_num++, cmmu++) {
- if (cmmu->cmmu_regs == NULL)
- continue;
-
- cpu_cmmu_num = cmmu_num >> 1; /* CPU view of the CMMU */
-
- if (CMMU_MODE(cmmu_num) == INST_CMMU) {
- /* I0, I1, I2, I3: A13:A12 split */
- cmmu->cmmu_addr = (cpu_cmmu_num & 0x03) << 12;
- cmmu->cmmu_addr_mask = (1U << 13) | (1U << 12);
- } else {
- /* D0, D1: A12 split */
- cmmu->cmmu_addr = (cpu_cmmu_num & 0x01) << 12;
- cmmu->cmmu_addr_mask = 1U << 12;
- }
- }
- break;
- case 2: /* 4:1 schemes */
- for (cmmu_num = 0, cmmu = m8820x_cmmu; cmmu_num < max_cmmus;
- cmmu_num++, cmmu++) {
- cpu_cmmu_num = cmmu_num >> 1; /* CPU view of the CMMU */
-
- if (CMMU_MODE(cmmu_num) == INST_CMMU) {
- /* I0, I1 */
- cmmu->cmmu_addr =
- cpu_cmmu_num < 2 ? 0 : scc.isplit;
- cmmu->cmmu_addr_mask = scc.isplit;
- } else {
- /* D0, D1 */
- cmmu->cmmu_addr =
- cpu_cmmu_num < 2 ? 0 : scc.dsplit;
- cmmu->cmmu_addr_mask = scc.dsplit;
- }
- }
- break;
- }
-
- /*
- * Patch the exception handling code to invoke the correct pfsr
- * analysis chunk.
- */
- pfsr_save[0] = 0xc4000000 |
- (((vaddr_t)m8820x_pfsr + 4 - (vaddr_t)pfsr_save) >> 2);
- pfsr_save[1] = m8820x_pfsr[0];
-}
-
-/*
- * Find out the CPU number from accessing CMMU.
- * We access the WHOAMI register, which is in data space;
- * its value will let us know which CPU has been used to perform the read.
- */
-cpuid_t
-m8820x_cpu_number()
-{
- u_int32_t whoami;
- cpuid_t cpu;
-
- if (whoamiptr == NULL)
- return 0;
-
- whoami = *whoamiptr;
- switch ((whoami & 0xf0) >> 4) {
- case 0:
- case 3:
- case 5:
- for (cpu = 0; cpu < 4; cpu++)
- if (whoami & (1 << cpu))
- return (cpu);
- break;
- case 7:
- case 0x0a:
- /* for single processors, this field of whoami is undefined */
- return (0);
- }
-
- panic("m8820x_cpu_number: could not determine my cpu number, whoami %x",
- whoami);
-}
diff --git a/sys/arch/aviion/aviion/machdep.c b/sys/arch/aviion/aviion/machdep.c
deleted file mode 100644
index 1b71aa4c7e7..00000000000
--- a/sys/arch/aviion/aviion/machdep.c
+++ /dev/null
@@ -1,1088 +0,0 @@
-/* $OpenBSD: machdep.c,v 1.75 2015/10/21 07:59:17 mpi Exp $ */
-/*
- * Copyright (c) 2007 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice, this permission notice, and the disclaimer below
- * appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-/*
- * Copyright (c) 1998, 1999, 2000, 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) 1993-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 <sys/kernel.h>
-#include <sys/proc.h>
-#include <sys/user.h>
-#include <sys/buf.h>
-#include <sys/reboot.h>
-#include <sys/conf.h>
-#include <sys/malloc.h>
-#include <sys/mount.h>
-#include <sys/msgbuf.h>
-#include <sys/syscallargs.h>
-#include <sys/exec.h>
-#include <sys/sysctl.h>
-#include <sys/errno.h>
-#include <sys/extent.h>
-#include <sys/core.h>
-#include <sys/kcore.h>
-#include <sys/device.h>
-#include <dev/rndvar.h>
-
-#include <machine/asm.h>
-#include <machine/asm_macro.h>
-#include <machine/autoconf.h>
-#include <machine/avcommon.h>
-#include <machine/board.h>
-#include <machine/bus.h>
-#include <machine/cmmu.h>
-#include <machine/cpu.h>
-#include <machine/kcore.h>
-#include <machine/prom.h>
-#include <machine/reg.h>
-#include <machine/trap.h>
-#ifdef M88100
-#include <machine/m88100.h>
-#endif
-
-#include <aviion/dev/vmevar.h>
-
-#include <dev/cons.h>
-
-#include <net/if.h>
-#include <uvm/uvm.h>
-
-#include "ksyms.h"
-#if DDB
-#include <machine/db_machdep.h>
-#include <ddb/db_extern.h>
-#include <ddb/db_interface.h>
-#include <ddb/db_var.h>
-#endif /* DDB */
-
-void aviion_bootstrap(void);
-void aviion_identify(void);
-void consinit(void);
-void cpu_hatch_secondary_processors(void);
-void cpu_setup_secondary_processors(void);
-__dead void doboot(void);
-void dumpconf(void);
-void dumpsys(void);
-void savectx(struct pcb *);
-void secondary_main(void);
-void *secondary_pre_main(void);
-
-extern void bootstack(void);
-
-int physmem; /* available physical memory, in pages */
-
-struct vm_map *exec_map = NULL;
-struct vm_map *phys_map = NULL;
-
-#ifdef MULTIPROCESSOR
-__cpu_simple_lock_t cpu_hatch_mutex = __SIMPLELOCK_LOCKED;
-__cpu_simple_lock_t cpu_boot_mutex = __SIMPLELOCK_LOCKED;
-unsigned int hatch_pending_count;
-unsigned int hatch_mask;
-#endif
-
-struct uvm_constraint_range dma_constraint = { 0x0, (paddr_t)-1 };
-struct uvm_constraint_range *uvm_md_constraints[] = { NULL };
-
-/*
- * Info for CTL_HW
- */
-char machine[] = MACHINE; /* cpu "architecture" */
-char cpu_model[120];
-
-#if defined(DDB) || NKSYMS > 0
-extern vaddr_t esym;
-#endif
-
-const char *prom_bootargs; /* set in locore.S */
-char bootargs[256]; /* local copy */
-
-int32_t cpuid;
-
-int cputyp; /* set in locore.S */
-register_t kernel_vbr; /* set in locore.S */
-const struct board *platform;
-
-/* multiplication factor for delay() */
-u_int aviion_delay_const = 33;
-
-vaddr_t first_addr;
-vaddr_t last_addr;
-
-extern struct user *proc0paddr;
-
-/*
- * Interrupt masks, one per IPL level.
- */
-u_int32_t int_mask_val[NIPLS];
-u_int32_t ext_int_mask_val[NIPLS];
-
-/*
- * This is to fake out the console routines, while booting.
- * We could use directly the bugtty console, but we want to be able to
- * configure a kernel without bugtty since we do not necessarily need a
- * full-blown console driver.
- */
-cons_decl(boot);
-
-struct consdev bootcons = {
- NULL,
- NULL,
- bootcngetc,
- bootcnputc,
- nullcnpollc,
- NULL,
- makedev(14, 0),
- CN_LOWPRI
-};
-
-/*
- * Early console initialization: called early on from main, before vm init.
- * We want to stick to the BUG routines for now, and we'll switch to the
- * real console in cpu_startup().
- */
-void
-consinit()
-{
- cn_tab = NULL;
- cninit();
-
-#if defined(DDB)
- db_machine_init();
- ddb_init();
- if (boothowto & RB_KDB)
- Debugger();
-#endif
-}
-
-/*
- * Set up real-time clocks.
- * These function pointers are set in dev/clock.c.
- */
-void
-cpu_initclocks()
-{
- platform->init_clocks();
-}
-
-void
-setstatclockrate(int newhz)
-{
- /* function stub */
-}
-
-
-void
-cpu_startup()
-{
- vaddr_t minaddr, maxaddr;
-
- /*
- * Good {morning,afternoon,evening,night}.
- */
- printf(version);
- printf("real mem = %lu (%luMB)\n", ptoa(physmem),
- ptoa(physmem)/1024/1024);
-
- /*
- * Grab machine dependent memory spaces
- */
- platform->startup();
-
- /*
- * Allocate a submap for exec arguments. This map effectively
- * limits the number of processes exec'ing at any time.
- */
- minaddr = vm_map_min(kernel_map);
- exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- 16 * NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
-
- /*
- * Allocate map for physio.
- */
- phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_PHYS_SIZE, 0, FALSE, NULL);
-
- printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free),
- ptoa(uvmexp.free)/1024/1024);
-
- /*
- * Set up buffers, so they can be used to read disk labels.
- */
- bufinit();
-
- /*
- * Configure the system.
- */
- if (boothowto & RB_CONFIG) {
-#ifdef BOOT_CONFIG
- user_config();
-#else
- printf("kernel does not support -c; continuing..\n");
-#endif
- }
-}
-
-__dead void
-doboot()
-{
-
- printf("Rebooting system...\n\n");
- bootstack();
- cmmu_shutdown();
- scm_reboot(NULL);
- /*NOTREACHED*/
- for (;;); /* appease gcc */
-}
-
-__dead void
-boot(int howto)
-{
- if (curproc && curproc->p_addr)
- savectx(curpcb);
-
- if (cold) {
- if ((howto & RB_USERREQ) == 0)
- howto |= RB_HALT;
- goto haltsys;
- }
-
- boothowto = howto;
- if ((howto & RB_NOSYNC) == 0) {
- vfs_shutdown();
-
- if ((howto & RB_TIMEBAD) == 0) {
- resettodr();
- } else {
- printf("WARNING: not updating battery clock\n");
- }
- }
- if_downall();
-
- uvm_shutdown();
- splhigh();
- cold = 1;
-
- if ((howto & RB_DUMP) != 0)
- dumpsys();
-
-haltsys:
- config_suspend_all(DVACT_POWERDOWN);
-
- if ((howto & RB_HALT) != 0) {
- printf("System halted.\n\n");
- bootstack();
- cmmu_shutdown();
- scm_halt();
- }
-
- doboot();
-
- for (;;) ;
- /* NOTREACHED */
-}
-
-unsigned dumpmag = 0x8fca0101; /* magic number for savecore */
-int dumpsize = 0; /* also for savecore */
-long dumplo = 0;
-cpu_kcore_hdr_t cpu_kcore_hdr;
-
-/*
- * This is called by configure to set dumplo and dumpsize.
- * Dumps always skip the first PAGE_SIZE of disk space
- * in case there might be a disk label stored there.
- * If there is extra space, put dump at the end to
- * reduce the chance that swapping trashes it.
- */
-void
-dumpconf(void)
-{
- int nblks; /* size of dump area */
-
- if (dumpdev == NODEV ||
- (nblks = (bdevsw[major(dumpdev)].d_psize)(dumpdev)) == 0)
- return;
- if (nblks <= ctod(1))
- return;
-
- dumpsize = physmem;
-
- /* aviion only uses a single segment. */
- cpu_kcore_hdr.ram_segs[0].start = 0;
- cpu_kcore_hdr.ram_segs[0].size = ptoa(physmem);
- cpu_kcore_hdr.cputype = cputyp;
-
- /*
- * Don't dump on the first block
- * in case the dump device includes a disk label.
- */
- if (dumplo < ctod(1))
- dumplo = ctod(1);
-
- /* Put dump at end of partition, and make it fit. */
- if (dumpsize + 1 > dtoc(nblks - dumplo))
- dumpsize = dtoc(nblks - dumplo) - 1;
- if (dumplo < nblks - ctod(dumpsize) - 1)
- dumplo = nblks - ctod(dumpsize) - 1;
-}
-
-/*
- * Doadump comes here after turning off memory management and
- * getting on the dump stack, either when called above, or by
- * the auto-restart code.
- */
-void
-dumpsys()
-{
- int maj;
- int psize;
- daddr_t blkno; /* current block to write */
- /* dump routine */
- int (*dump)(dev_t, daddr_t, caddr_t, size_t);
- int pg; /* page being dumped */
- paddr_t maddr; /* PA being dumped */
- int error; /* error code from (*dump)() */
- kcore_seg_t *kseg_p;
- cpu_kcore_hdr_t *chdr_p;
- char dump_hdr[dbtob(1)]; /* XXX assume hdr fits in 1 block */
-
- extern int msgbufmapped;
-
- msgbufmapped = 0;
-
- /* Make sure dump device is valid. */
- if (dumpdev == NODEV)
- return;
- if (dumpsize == 0) {
- dumpconf();
- if (dumpsize == 0)
- return;
- }
- maj = major(dumpdev);
- if (dumplo < 0) {
- printf("\ndump to dev %u,%u not possible\n", maj,
- minor(dumpdev));
- return;
- }
- dump = bdevsw[maj].d_dump;
- blkno = dumplo;
-
- printf("\ndumping to dev %u,%u offset %ld\n", maj,
- minor(dumpdev), dumplo);
-
- /* Setup the dump header */
- kseg_p = (kcore_seg_t *)dump_hdr;
- chdr_p = (cpu_kcore_hdr_t *)&dump_hdr[ALIGN(sizeof(*kseg_p))];
- bzero(dump_hdr, sizeof(dump_hdr));
-
- CORE_SETMAGIC(*kseg_p, KCORE_MAGIC, MID_MACHINE, CORE_CPU);
- kseg_p->c_size = dbtob(1) - ALIGN(sizeof(*kseg_p));
- *chdr_p = cpu_kcore_hdr;
-
- printf("dump ");
- psize = (*bdevsw[maj].d_psize)(dumpdev);
- if (psize == -1) {
- printf("area unavailable\n");
- return;
- }
-
- /* Dump the header. */
- error = (*dump)(dumpdev, blkno++, (caddr_t)dump_hdr, dbtob(1));
- if (error != 0)
- goto abort;
-
- maddr = (paddr_t)0;
- for (pg = 0; pg < dumpsize; pg++) {
-#define NPGMB (1024 * 1024 / PAGE_SIZE)
- /* print out how many MBs we have dumped */
- if (pg != 0 && (pg % NPGMB) == 0)
- printf("%d ", pg / NPGMB);
-#undef NPGMB
- error = (*dump)(dumpdev, blkno, (caddr_t)maddr, PAGE_SIZE);
- if (error == 0) {
- maddr += PAGE_SIZE;
- blkno += btodb(PAGE_SIZE);
- } else
- break;
- }
-abort:
- switch (error) {
- case 0:
- printf("succeeded\n");
- break;
-
- case ENXIO:
- printf("device bad\n");
- break;
-
- case EFAULT:
- printf("device not ready\n");
- break;
-
- case EINVAL:
- printf("area improper\n");
- break;
-
- case EIO:
- printf("i/o error\n");
- break;
-
- case EINTR:
- printf("aborted from console\n");
- break;
-
- default:
- printf("error %d\n", error);
- break;
- }
-}
-
-#ifdef MULTIPROCESSOR
-
-/*
- * Secondary CPU early initialization routine.
- * Determine CPU number and set it, then return the startup stack.
- *
- * Running on a minimal stack here, with interrupts disabled; do nothing fancy.
- */
-void *
-secondary_pre_main()
-{
- struct cpu_info *ci;
-
- /*
- * Invoke the CMMU initialization routine as early as possible,
- * so that we do not risk any memory writes to be lost during
- * cache setup.
- */
- cmmu_initialize_cpu(cmmu_cpu_number());
-
- /*
- * Now initialize your cpu_info structure.
- */
- set_cpu_number(cmmu_cpu_number());
- ci = curcpu();
- ci->ci_curproc = &proc0;
- platform->smp_setup(ci);
-
- splhigh();
-
- /*
- * Enable MMU on this processor.
- */
- pmap_bootstrap_cpu(ci->ci_cpuid);
-
- if (ci->ci_curpcb == NULL) {
- printf("cpu%d: unable to get startup stack\n", ci->ci_cpuid);
- /*
- * Release cpu_hatch_mutex to let other secondary processors
- * have a chance to run.
- */
- __cpu_simple_unlock(&cpu_hatch_mutex);
- for (;;) ;
- }
-
- return ci->ci_curpcb;
-}
-
-/*
- * Further secondary CPU initialization.
- *
- * We are now running on our startup stack, with proper page tables.
- * There is nothing to do but display some details about the CPU and its CMMUs.
- */
-void
-secondary_main()
-{
- struct cpu_info *ci = curcpu();
- int s;
-
- cpu_configuration_print(0);
- ncpus++;
-
- sched_init_cpu(ci);
- nanouptime(&ci->ci_schedstate.spc_runtime);
- ci->ci_curproc = NULL;
- ci->ci_randseed = (arc4random() & 0x7fffffff) + 1;
-
- /*
- * Release cpu_hatch_mutex to let other secondary processors
- * have a chance to run.
- */
- hatch_pending_count--;
- __cpu_simple_unlock(&cpu_hatch_mutex);
-
- /* wait for cpu_boot_secondary_processors() */
- __cpu_simple_lock(&cpu_boot_mutex);
- __cpu_simple_unlock(&cpu_boot_mutex);
-
- spl0();
- SCHED_LOCK(s);
- set_psr(get_psr() & ~PSR_IND);
-
- SET(ci->ci_flags, CIF_ALIVE);
-
- cpu_switchto(NULL, sched_chooseproc());
-}
-
-#endif /* MULTIPROCESSOR */
-
-void
-nmihand(void *frame)
-{
-#ifdef DDB
- printf("Abort switch pressed\n");
- if (db_console) {
- /*
- * We can't use Debugger() here, as we are coming from an
- * exception, and can't assume anything on the state we are
- * in. Invoke the post-trap ddb entry directly.
- */
- extern void m88k_db_trap(int, struct trapframe *);
- m88k_db_trap(T_KDB_ENTRY, (struct trapframe *)frame);
- }
-#endif
-}
-
-int
-sys_sysarch(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
-#if 0
- struct sys_sysarch_args /* {
- syscallarg(int) op;
- syscallarg(char *) parm;
- } */ *uap = v;
-#endif
-
- return (ENOSYS);
-}
-
-/*
- * machine dependent system variables.
- */
-
-int
-cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
- int *name;
- u_int namelen;
- void *oldp;
- size_t *oldlenp;
- void *newp;
- size_t newlen;
- struct proc *p;
-{
- dev_t consdev;
-
- /* all sysctl names are this level are terminal */
- if (namelen != 1)
- return (ENOTDIR); /* overloaded */
-
- switch (name[0]) {
- case CPU_CONSDEV:
- if (cn_tab != NULL)
- consdev = cn_tab->cn_dev;
- else
- consdev = NODEV;
- return (sysctl_rdstruct(oldp, oldlenp, newp, &consdev,
- sizeof consdev));
- case CPU_CPUTYPE:
- return (sysctl_rdint(oldp, oldlenp, newp, cputyp));
- default:
- return (EOPNOTSUPP);
- }
- /*NOTREACHED*/
-}
-
-/*
- * Called from locore.S during boot,
- * this is the first C code that's run.
- */
-void
-aviion_bootstrap()
-{
- extern vaddr_t avail_start;
- extern vaddr_t avail_end;
- extern char *end;
-#ifndef MULTIPROCESSOR
- cpuid_t master_cpu;
-#endif
-
- /* Save a copy of our commandline before it gets overwritten. */
- strlcpy(bootargs, prom_bootargs, sizeof bootargs);
-
- aviion_identify();
-
- cn_tab = &bootcons;
- aviion_delay_const = platform->bootstrap();
- /* we can use printf() from here. */
-
- /* Parse the commandline */
- cmdline_parse();
-
- uvmexp.pagesize = PAGE_SIZE;
- uvm_setpagesize();
-
-#if defined(DDB) || NKSYMS > 0
- if (esym != 0)
- first_addr = esym;
- else
-#endif
- first_addr = (vaddr_t)&end;
- first_addr = round_page(first_addr);
-
- last_addr = platform->memsize();
-
- setup_board_config();
- master_cpu = cmmu_init();
- set_cpu_number(master_cpu);
-#ifdef MULTIPROCESSOR
- platform->smp_setup(curcpu());
-#endif
- SET(curcpu()->ci_flags, CIF_ALIVE | CIF_PRIMARY);
-
-#ifdef M88100
- if (CPU_IS88100) {
- m88100_apply_patches();
- }
-#endif
-
-#ifdef MULTIPROCESSOR
- /*
- * We need to start secondary processors while it is still
- * possible to invoke SCM functions.
- */
- cpu_hatch_secondary_processors();
-#endif
-
- /*
- * Now that set_cpu_number() set us with a valid cpu_info pointer,
- * we need to initialize p_addr and curpcb before autoconf, for the
- * fault handler to behave properly [except for badaddr() faults,
- * which can be taken care of without a valid curcpu()].
- */
- proc0.p_addr = proc0paddr;
- curproc = &proc0;
- curpcb = &proc0paddr->u_pcb;
-
- avail_start = round_page(first_addr);
- avail_end = last_addr;
-
- /*
- * Tell the VM system about available physical memory.
- * The aviion systems only have one contiguous area.
- *
- * XXX However, on series 5000, SRAM overlaps a low memory range,
- * XXX so we will need to upload two ranges of pages on them.
- */
- uvm_page_physload(atop(avail_start), atop(avail_end),
- atop(avail_start), atop(avail_end), 0);
-
- /*
- * Initialize message buffer.
- */
- initmsgbuf((caddr_t)pmap_steal_memory(MSGBUFSIZE, NULL, NULL),
- MSGBUFSIZE);
-
- /* ROM work area is on top of physical memory */
- pmap_bootstrap(0, 0);
-
- /* Initialize the "u-area" pages. */
- bzero((caddr_t)curpcb, USPACE);
-}
-
-#ifdef MULTIPROCESSOR
-/*
- * Spin processors while we can use the PROM, and have them wait for
- * cpu_hatch_mutex.
- */
-void
-cpu_hatch_secondary_processors()
-{
- struct cpu_info *ci = curcpu();
- cpuid_t cpu;
- int rc;
- extern void secondary_start(void);
-
- /* we might not have a working SMP implementation on this system. */
- if (platform->send_ipi == NULL)
- return;
-
- for (cpu = 0; cpu < MAX_CPUS; cpu++) {
- if (cpu != ci->ci_cpuid) {
- hatch_pending_count++;
- rc = scm_jpstart(cpu, (vaddr_t)secondary_start);
- switch (rc) {
- case JPSTART_OK:
- hatch_mask |= 1U << cpu;
- break;
- case JPSTART_SINGLE_JP:
- /* this should never happen, but just in case */
- hatch_pending_count = 0;
- ncpusfound = 1;
- return;
- default:
- printf("CPU%ld failed to start, error %d\n",
- cpu, rc);
- /* FALLTHROUGH */
- case JPSTART_NO_JP:
- hatch_pending_count--;
- break;
- }
- }
- }
-}
-
-/*
- * Release cpu_hatch_mutex to let secondary processors initialize.
- */
-void
-cpu_setup_secondary_processors()
-{
- cpuid_t cpu;
-
- /*
- * Allocate UPAGES contiguous pages for the idle stack of every
- * running secondary processor.
- */
- for (cpu = 0; cpu < MAX_CPUS; cpu++) {
- if ((hatch_mask & (1U << cpu)) == 0)
- continue;
-
- m88k_cpus[cpu].ci_curpcb =
- (void *)uvm_km_zalloc(kernel_map, USPACE);
- }
-
- __cpu_simple_unlock(&cpu_hatch_mutex);
- while (hatch_pending_count != 0)
- delay(10000); /* 10ms */
-}
-
-/*
- * Release cpu_boot_mutex to let secondary processors start running
- * processes.
- */
-void
-cpu_boot_secondary_processors()
-{
- __cpu_simple_unlock(&cpu_boot_mutex);
-}
-#endif
-
-/*
- * Boot console routines:
- * Enables printing of boot messages before consinit().
- */
-void
-bootcnprobe(cp)
- struct consdev *cp;
-{
- cp->cn_dev = makedev(0, 0);
- cp->cn_pri = CN_LOWPRI;
-}
-
-void
-bootcninit(cp)
- struct consdev *cp;
-{
- /* Nothing to do */
-}
-
-int
-bootcngetc(dev)
- dev_t dev;
-{
- return (scm_getc());
-}
-
-void
-bootcnputc(dev, c)
- dev_t dev;
- int c;
-{
- if (c == '\n')
- scm_putcrlf();
- else
- scm_putc(c);
-}
-
-int
-getipl(void)
-{
- return (int)platform->getipl();
-}
-
-int
-setipl(int level)
-{
- return (int)platform->setipl((u_int)level);
-}
-
-int
-raiseipl(int level)
-{
- return (int)platform->raiseipl((u_int)level);
-}
-
-#ifdef MULTIPROCESSOR
-void
-m88k_send_ipi(int ipi, cpuid_t cpu)
-{
- struct cpu_info *ci;
-
- ci = &m88k_cpus[cpu];
- if (ISSET(ci->ci_flags, CIF_ALIVE))
- platform->send_ipi(ipi, cpu);
-}
-
-void
-m88k_broadcast_ipi(int ipi)
-{
- struct cpu_info *us = curcpu();
- struct cpu_info *ci;
- CPU_INFO_ITERATOR cii;
-
- CPU_INFO_FOREACH(cii, ci) {
- if (ci == us)
- continue;
-
- if (ISSET(ci->ci_flags, CIF_ALIVE))
- platform->send_ipi(ipi, ci->ci_cpuid);
- }
-}
-#endif
-
-void
-intsrc_enable(u_int intsrc, int ipl)
-{
- u_int32_t psr;
- u_int32_t intmask = platform->intsrc(intsrc);
- u_int32_t exintmask = platform->exintsrc(intsrc);
- int i;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
-
- for (i = IPL_NONE; i < ipl; i++) {
- int_mask_val[i] |= intmask;
- ext_int_mask_val[i] |= exintmask;
- }
- setipl(getipl());
-
- set_psr(psr);
-}
-
-void
-intsrc_disable(u_int intsrc)
-{
- u_int32_t psr;
- u_int32_t intmask = platform->intsrc(intsrc);
- u_int32_t exintmask = platform->exintsrc(intsrc);
- int i;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
-
- for (i = 0; i < NIPLS; i++) {
- int_mask_val[i] &= ~intmask;
- ext_int_mask_val[i] &= ~exintmask;
- }
- setipl(getipl());
-
- set_psr(psr);
-}
-
-u_char hostaddr[6];
-
-void
-myetheraddr(u_char *cp)
-{
- bcopy(hostaddr, cp, 6);
-}
-
-/*
- * Attempt to identify which AViiON flavour we are running on.
- */
-
-struct aviion_system {
- int32_t cpuid;
- const char *model;
- const struct board *platform;
- const char *kernel_option;
-};
-static const struct aviion_system aviion_systems[] = {
-#define BOARD_UNSUPPORTED NULL, NULL
-#ifdef AV400
-#define BOARD_AV400 &board_av400, NULL
-#else
-#define BOARD_AV400 NULL, "AV400"
-#endif
-#ifdef AV530
-#define BOARD_AV530 &board_av530, NULL
-#else
-#define BOARD_AV530 NULL, "AV530"
-#endif
-#ifdef AV5000
-#define BOARD_AV5000 &board_av5000, NULL
-#else
-#define BOARD_AV5000 BOARD_UNSUPPORTED /* NULL, "AV5000" */
-#endif
-#ifdef AV6280
-#define BOARD_AV6280 &board_av6280, NULL
-#else
-#define BOARD_AV6280 BOARD_UNSUPPORTED /* NULL, "AV6280" */
-#endif
- { AVIION_300_310, "300/310", BOARD_AV400 },
- { AVIION_5100_6100, "5100/6100", BOARD_UNSUPPORTED },
- { AVIION_400_4000, "400/4000", BOARD_AV400 },
- { AVIION_410_4100, "410/4100", BOARD_AV400 },
- { AVIION_300C_310C, "300C/310C", BOARD_AV400 },
- { AVIION_5200_6200, "5200/6200", BOARD_AV5000 },
- { AVIION_5240_6240, "5240/6240", BOARD_AV5000 },
- { AVIION_300CD_310CD, "300CD/310CD", BOARD_AV400 },
- { AVIION_300D_310D, "300D/310D", BOARD_AV400 },
- { AVIION_4600_530, "4600/530", BOARD_AV530 },
- { AVIION_4300_25, "4300-25", BOARD_AV400 },
- { AVIION_4300_20, "4300-20", BOARD_AV400 },
- { AVIION_4300_16, "4300-16", BOARD_AV400 },
- { AVIION_5255_6255, "5255/6255", BOARD_AV5000 },
- { AVIION_350, "350", BOARD_UNSUPPORTED },
- { AVIION_6280, "6280", BOARD_AV6280 },
- { AVIION_8500_9500, "8500/9500", BOARD_UNSUPPORTED },
- { AVIION_9500_HA, "9500HA", BOARD_UNSUPPORTED },
- { AVIION_500, "500", BOARD_UNSUPPORTED },
- { AVIION_5500, "5500", BOARD_UNSUPPORTED },
- { AVIION_450, "450", BOARD_UNSUPPORTED },
- { AVIION_8500_9500_45_1MB, "8500/9500-45", BOARD_UNSUPPORTED },
- { AVIION_10000, "10000", BOARD_UNSUPPORTED },
- { AVIION_10000_QT, "10000QT", BOARD_UNSUPPORTED },
- { AVIION_5500PLUS, "5500+", BOARD_UNSUPPORTED },
- { AVIION_450PLUS, "450+", BOARD_UNSUPPORTED },
- { AVIION_8500_9500_50_1MB, "8500/9500-50", BOARD_UNSUPPORTED },
- { AVIION_8500_9500_50_2MB, "8500/9500-50d", BOARD_UNSUPPORTED },
-
- { AVIION_UNKNOWN1, "\"Montezuma\"", BOARD_UNSUPPORTED },
- { AVIION_UNKNOWN2, "\"Montezuma\"", BOARD_UNSUPPORTED },
- { AVIION_UNKNOWN3, "\"Flintstone\"", BOARD_UNSUPPORTED },
- { AVIION_UNKNOWN1_DIS, "\"Montezuma-\"", BOARD_UNSUPPORTED },
- { AVIION_UNKNOWN2_DIS, "\"Montezuma-\"", BOARD_UNSUPPORTED },
-
- { 0 }
-#undef BOARD_AV6280
-#undef BOARD_AV5000
-#undef BOARD_AV530
-#undef BOARD_AV400
-};
-
-void
-aviion_identify()
-{
- const struct aviion_system *system;
- char excuse[512];
- extern char *hw_vendor, *hw_prod;
-
- cpuid = scm_cpuid();
- hostid = scm_sysid();
-
- for (system = aviion_systems; ; system++) {
- if (system->cpuid != 0 && system->cpuid != cpuid)
- continue;
-
- if (system->platform != NULL) {
- hw_vendor = "Data General";
- hw_prod = "AViiON";
- strlcpy(cpu_model, system->model, sizeof cpu_model);
- platform = system->platform;
- return;
- }
-
- if (system->kernel_option != NULL) {
- /* unconfigured system */
- snprintf(excuse, sizeof excuse, "\n"
- "Sorry, support for the %s system is not present\n"
- "in this OpenBSD/" MACHINE " kernel.\n"
- "Please recompile your kernel with\n"
- "\toption\t%s\n"
- "in the kernel configuration file.\n",
- system->model, system->kernel_option);
- } else if (system->cpuid != 0) {
- /* unsupported system */
- snprintf(excuse, sizeof excuse, "\n"
- "Sorry, OpenBSD/" MACHINE
- " does not support the %s system"
- " (cpuid %04x) yet.\n\n"
- "Please contact <m88k@openbsd.org>\n",
- system->model, cpuid);
- } else {
- /* unrecgonized system */
- snprintf(excuse, sizeof excuse, "\n"
- "Sorry, OpenBSD/" MACHINE
- " does not recognize this system (cpuid %04x).\n\n"
- "Please contact <m88k@openbsd.org>\n",
- cpuid);
- }
-
- scm_printf(excuse);
- scm_halt();
- }
- /* NOTREACHED */
-}
diff --git a/sys/arch/aviion/aviion/pmap_table.c b/sys/arch/aviion/aviion/pmap_table.c
deleted file mode 100644
index 62264808e2e..00000000000
--- a/sys/arch/aviion/aviion/pmap_table.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* $OpenBSD: pmap_table.c,v 1.3 2011/01/02 13:40:05 miod Exp $ */
-
-/*
- * Mach Operating System
- * Copyright (c) 1993-1992 Carnegie Mellon University
- * 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.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <machine/board.h>
-#include <machine/pmap_table.h>
-
-const struct pmap_table *
-pmap_table_build(void)
-{
- return (platform->ptable);
-}
diff --git a/sys/arch/aviion/aviion/prom.c b/sys/arch/aviion/aviion/prom.c
deleted file mode 100644
index 003e2959b3e..00000000000
--- a/sys/arch/aviion/aviion/prom.c
+++ /dev/null
@@ -1,315 +0,0 @@
-/* $OpenBSD: prom.c,v 1.8 2014/03/29 18:09:29 guenther Exp $ */
-
-/*
- * Copyright (c) 2006, Miodrag Vallat.
- *
- * 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.
- *
- * 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/systm.h>
-
-#include <machine/asm_macro.h>
-#include <machine/prom.h>
-
-register_t prom_vbr; /* set in locore.S */
-
-/*
- * No locking is necessary, since we will only use the SCM routines
- * during startup, before any secondary CPU is started.
- */
-
-#define SCM_DECL \
- register_t psr; \
- register_t ossr0, ossr1, ossr2, ossr3
-
-#define SCM_CALL(x) \
- __asm__ volatile ("or %r9, %r0, " __STRING(x)); \
- __asm__ volatile ("tb0 0, %%r0, 496" ::: \
- "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", \
- "r9", "r10", "r11", "r12", "r13")
-
-#define SCM_VBR() \
- __asm__ volatile ("stcr %0, %%cr7" : : "r" (prom_vbr))
-
-#define SCM_CONTEXT() \
- __asm__ volatile ("ldcr %0, %%cr17" : "=r" (ossr0)); \
- __asm__ volatile ("ldcr %0, %%cr18" : "=r" (ossr1)); \
- __asm__ volatile ("ldcr %0, %%cr19" : "=r" (ossr2)); \
- __asm__ volatile ("ldcr %0, %%cr20" : "=r" (ossr3))
-
-#define OS_VBR() \
- __asm__ volatile ("stcr %0, %%cr7" : : "r" (kernel_vbr))
-
-#define OS_CONTEXT() \
- __asm__ volatile ("stcr %0, %%cr17" : : "r" (ossr0)); \
- __asm__ volatile ("stcr %0, %%cr18" : : "r" (ossr1)); \
- __asm__ volatile ("stcr %0, %%cr19" : : "r" (ossr2)); \
- __asm__ volatile ("stcr %0, %%cr20" : : "r" (ossr3))
-
-/* ==== */
-
-int
-scm_cpuconfig(struct scm_cpuconfig *scc)
-{
- SCM_DECL;
- int ret;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- SCM_CONTEXT();
- SCM_VBR();
- __asm__ volatile ("or %%r2, %%r0, %0" : : "r" (scc));
- SCM_CALL(SCM_CPUCONFIG);
- __asm__ volatile ("or %0, %%r0, %%r2" : "=r" (ret));
- OS_CONTEXT();
- OS_VBR();
- set_psr(psr);
-
- return (ret);
-}
-
-u_int
-scm_cpuid()
-{
- SCM_DECL;
- u_int ret;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- SCM_CONTEXT();
- SCM_VBR();
- SCM_CALL(SCM_CPUID);
- __asm__ volatile ("or %0, %%r0, %%r2" : "=r" (ret));
- OS_CONTEXT();
- OS_VBR();
- set_psr(psr);
-
- return (ret);
-}
-
-int
-scm_getc(void)
-{
- SCM_DECL;
- u_int ret;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- SCM_CONTEXT();
- SCM_VBR();
- SCM_CALL(SCM_CHAR);
- __asm__ volatile ("or %0, %%r0, %%r2" : "=r" (ret));
- OS_CONTEXT();
- OS_VBR();
- set_psr(psr);
-
- return (ret & 0xff);
-}
-
-void
-scm_getenaddr(u_char *ea)
-{
- SCM_DECL;
- char *addr;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- SCM_CONTEXT();
- SCM_VBR();
- SCM_CALL(SCM_COMMID);
- __asm__ volatile ("or %0, %%r0, %%r2" : "=r" (addr));
- OS_CONTEXT();
- OS_VBR();
- set_psr(psr);
-
- bcopy(addr, ea, 6);
-}
-
-__dead void
-scm_halt()
-{
- SCM_DECL;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- SCM_CONTEXT();
- SCM_VBR();
- SCM_CALL(SCM_HALT);
-#if 0
- OS_CONTEXT();
- OS_VBR();
- set_psr(psr);
-#endif
- for (;;) ;
-}
-
-u_int
-scm_memsize(int which)
-{
- SCM_DECL;
- u_int msize;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- SCM_CONTEXT();
- SCM_VBR();
- __asm__ volatile ("or %%r2, %%r0, %0" : : "r" (which));
- SCM_CALL(SCM_MSIZE);
- __asm__ volatile ("or %0, %%r0, %%r2" : "=r" (msize));
- OS_CONTEXT();
- OS_VBR();
- set_psr(psr);
-
- return (msize);
-}
-
-/*
- * Does not accept parameters beyond a string because this would need extra
- * register constraints.
- */
-void
-scm_printf(const char *msg)
-{
- SCM_DECL;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- SCM_CONTEXT();
- SCM_VBR();
- __asm__ volatile ("or %%r2, %%r0, %0" : : "r" (msg));
- SCM_CALL(SCM_PTLINE);
- OS_CONTEXT();
- OS_VBR();
- set_psr(psr);
-}
-
-u_int
-scm_promver()
-{
- SCM_DECL;
- u_int ret;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- SCM_CONTEXT();
- SCM_VBR();
- SCM_CALL(SCM_REVNUM);
- __asm__ volatile ("or %0, %%r0, %%r2" : "=r" (ret));
- OS_CONTEXT();
- OS_VBR();
- set_psr(psr);
-
- return (ret);
-}
-
-void
-scm_putc(int c)
-{
- SCM_DECL;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- SCM_CONTEXT();
- SCM_VBR();
- __asm__ volatile ("or %%r2, %%r0, %0" : : "r" (c));
- SCM_CALL(SCM_OCHAR);
- OS_CONTEXT();
- OS_VBR();
- set_psr(psr);
-}
-
-void
-scm_putcrlf()
-{
- SCM_DECL;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- SCM_CONTEXT();
- SCM_VBR();
- SCM_CALL(SCM_OCRLF);
- OS_CONTEXT();
- OS_VBR();
- set_psr(psr);
-}
-
-__dead void
-scm_reboot(const char *cmdline)
-{
- SCM_DECL;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- SCM_CONTEXT();
- SCM_VBR();
- __asm__ volatile ("or %%r2, %%r0, %0" : : "r" (cmdline));
- SCM_CALL(SCM_REBOOT);
-#if 0
- OS_CONTEXT();
- OS_VBR();
- set_psr(psr);
-#endif
- for (;;) ;
-}
-
-u_int
-scm_sysid()
-{
- SCM_DECL;
- u_int ret;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- SCM_CONTEXT();
- SCM_VBR();
- SCM_CALL(SCM_SYSID);
- __asm__ volatile ("or %0, %%r0, %%r2" : "=r" (ret));
- OS_CONTEXT();
- OS_VBR();
- set_psr(psr);
-
- return (ret);
-}
-
-#ifdef MULTIPROCESSOR
-u_int
-scm_jpstart(cpuid_t cpu, vaddr_t addr)
-{
- SCM_DECL;
- u_int ret;
-
- psr = get_psr();
- set_psr(psr | PSR_IND);
- SCM_CONTEXT();
- SCM_VBR();
- __asm__ volatile ("or %%r2, %%r0, %0; or %%r3, %%r0, %1" : :
- "r" (cpu), "r" (addr));
- SCM_CALL(SCM_JPSTART);
- __asm__ volatile ("or %0, %%r0, %%r2" : "=r" (ret));
- OS_CONTEXT();
- OS_VBR();
- set_psr(psr);
-
- return (ret);
-}
-#endif
diff --git a/sys/arch/aviion/aviion/rtc_clock.c b/sys/arch/aviion/aviion/rtc_clock.c
deleted file mode 100644
index 097198319c1..00000000000
--- a/sys/arch/aviion/aviion/rtc_clock.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/* $OpenBSD: rtc_clock.c,v 1.3 2013/10/07 19:11:39 miod Exp $ */
-
-/*
- * Copyright (c) 2010 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
- * Clock routines using a freerunning RTC counter (models 530/4600)
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/timetc.h>
-
-#include <machine/board.h>
-#include <machine/avcommon.h>
-#include <machine/av530.h>
-
-#include <aviion/dev/sysconvar.h>
-
-struct intrhand rtc_clock_ih;
-
-int rtc_clockintr(void *);
-u_int rtc_get_timecount(struct timecounter *);
-
-struct timecounter rtc_timecounter = {
- .tc_get_timecount = rtc_get_timecount,
- .tc_counter_mask = 0xffffffff,
- .tc_name = "rtc",
- .tc_quality = 0
-};
-
-uint32_t pit_step;
-
-void
-rtc_init_clocks()
-{
- uint rtc_speed, pit_interval;
-
-#ifdef DIAGNOSTIC
- if (1000000 % hz) {
- printf("cannot get %d Hz clock; using 100 Hz\n", hz);
- hz = 100;
- }
-#endif
- tick = 1000000 / hz;
-
- profhz = stathz = 0;
-
- /*
- * According to the documentation, all systems of this family run
- * at 33MHz.
- */
- rtc_speed = 33333333 / 2; /* apparently RTC runs at half CPUCLK */
-
- /*
- * RTC is free running; we can get a periodic interrupt at any
- * multiple of 0x100 RTC ticks. We use PIT0 for this purpose.
- * Therefore to get a proper system clock, we need an interrupt
- * every (rtc_speed / hz) ticks, rounded down.
- * With hz being 100, this won't be an exact 100Hz clock, but the
- * timecounter code will make sure time is kept accurately.
- */
-
- /* disable and reset all counters */
- *(volatile uint32_t *)AV530_PIT_CMD_ALL = AV530_PIT_RESET;
- /* setup countdown interrupt threshold */
- pit_interval = rtc_speed / hz;
- pit_step = 0xffffff00 & (-pit_interval);
- *(volatile uint32_t *)AV530_PIT0_CNT = pit_step;
- /* start timer */
- *(volatile uint32_t *)AV530_PIT0_CS = AV530_PIT_CTEN;
-
- rtc_clock_ih.ih_fn = rtc_clockintr;
- rtc_clock_ih.ih_arg = 0;
- rtc_clock_ih.ih_flags = INTR_WANTFRAME;
- rtc_clock_ih.ih_ipl = IPL_CLOCK;
- sysconintr_establish(INTSRC_CLOCK, &rtc_clock_ih, "clock");
-
- rtc_timecounter.tc_frequency = rtc_speed;
- tc_init(&rtc_timecounter);
-}
-
-int
-rtc_clockintr(void *frame)
-{
- /*
- * Not only does the PIT stop upon overflow (requiring us to
- * rearm it after acknowledging the interrupt), but also the
- * comparison value is lost and needs to be setup again.
- */
- *(volatile uint32_t *)AV530_PIT0_CS = AV530_PIT_IACK | AV530_PIT_RESET;
- *(volatile uint32_t *)AV530_PIT0_CNT = pit_step;
- *(volatile uint32_t *)AV530_PIT0_CS = AV530_PIT_CTEN;
- hardclock(frame);
-
-#ifdef MULTIPROCESSOR
- /*
- * Send an IPI to all other processors, so they can get their
- * own ticks.
- */
- m88k_broadcast_ipi(CI_IPI_HARDCLOCK);
-#endif
-
- return 1;
-}
-
-u_int
-rtc_get_timecount(struct timecounter *tc)
-{
- return *(volatile uint32_t *)AV530_RTC_CNT;
-}
diff --git a/sys/arch/aviion/conf/GENERIC b/sys/arch/aviion/conf/GENERIC
deleted file mode 100644
index 77bc89a06a0..00000000000
--- a/sys/arch/aviion/conf/GENERIC
+++ /dev/null
@@ -1,91 +0,0 @@
-# $OpenBSD: GENERIC,v 1.10 2013/10/15 01:41:46 miod Exp $
-#
-# For further information on compiling OpenBSD kernels, see the config(8)
-# man page.
-#
-# For further information on hardware support for this architecture, see
-# the intro(4) man page. For further information about kernel options
-# for this architecture, see the options(4) man page. For an explanation
-# of each device driver in this file see the section 4 man page for the
-# device.
-
-machine aviion m88k
-include "../../../conf/GENERIC"
-maxusers 32 # estimated number of users
-
-# Processor type
-option M88100
-#option M88110
-
-# Supported models
-option AV400 # 100, 200, 300, 400, 3000, 4000, 4300
-option AV530 # 4600, 530
-#option AV5000 # 5000, 6000
-#option AV6280 # 6280, 8000-8
-
-# Define this if your 88100 processor has the xxx.usr bug (mask C82N)
-option ERRATA__XXX_USR
-
-config bsd swap generic
-
-#
-# devices
-#
-
-mainbus0 at root
-
-#
-# Onboard devices for all 88100-based machines
-#
-
-syscon0 at mainbus0 addr 0xfff00000
-nvram0 at syscon? offset 0x80000
-dart0 at syscon? offset 0x82000 # serial ports
-#avkbc0 at syscon? offset 0x82800
-#pckbd* at avkbc?
-#wskbd* at avkbd?
-vme0 at syscon? offset 0x85000 # VME bridge
-#avfb0 at syscon? offset 0x89000
-#wsdisplay* at avfb?
-
-#
-# AV400 onboard devices
-#
-
-dart1 at syscon? offset 0x82c00
-oaic0 at syscon? offset 0x8a000
-le0 at syscon? offset 0x8c000 # on-board ethernet
-
-#
-# AV530 onboard devices
-#
-
-dart1 at syscon? offset 0x82040
-#ssi0 at syscon? offset 0x8d000
-oosiop0 at syscon? offset 0xb0000
-oosiop1 at syscon? offset 0xb0080
-le0 at syscon? offset 0xb0100
-le1 at syscon? offset 0xb0140
-
-#
-# VME devices
-#
-
-# Interphase Hawk Ethernet
-le* at vme? a32 0x00900000 a16 0x4000 ipl 3 # artwork X0A factory settings
-le* at vme? a32 0x55540000 a16 0x8600 ipl 3 # artwork X0B factory settings
-le* at vme? a32 0x55900000 a16 0x4000 ipl 3
-le* at vme? a32 0x55980000 a16 0x5000 ipl 3
-
-#
-# SCSI devices
-#
-
-scsibus* at scsi?
-sd* at scsibus?
-st* at scsibus?
-cd* at scsibus?
-ch* at scsibus?
-safte* at scsibus?
-ses* at scsibus?
-uk* at scsibus?
diff --git a/sys/arch/aviion/conf/GENERIC.MP b/sys/arch/aviion/conf/GENERIC.MP
deleted file mode 100644
index fcbddc61acf..00000000000
--- a/sys/arch/aviion/conf/GENERIC.MP
+++ /dev/null
@@ -1,15 +0,0 @@
-# $OpenBSD: GENERIC.MP,v 1.1 2010/04/24 18:46:53 miod Exp $
-#
-# For further information on compiling OpenBSD kernels, see the config(8)
-# man page.
-#
-# For further information on hardware support for this architecture, see
-# the intro(4) man page. For further information about kernel options
-# for this architecture, see the options(4) man page. For an explanation
-# of each device driver in this file see the section 4 man page for the
-# device.
-
-include "arch/aviion/conf/GENERIC"
-
-option MULTIPROCESSOR
-#option MP_LOCKDEBUG
diff --git a/sys/arch/aviion/conf/Makefile.aviion b/sys/arch/aviion/conf/Makefile.aviion
deleted file mode 100644
index 28ece520564..00000000000
--- a/sys/arch/aviion/conf/Makefile.aviion
+++ /dev/null
@@ -1,173 +0,0 @@
-# $OpenBSD: Makefile.aviion,v 1.51 2015/01/13 01:12:49 deraadt Exp $
-
-# For instructions on building kernels consult the config(8) and options(4)
-# manual pages.
-#
-# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE
-# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING
-# DEBUG is set to -g by config if debugging is requested (config -g).
-# PROF is set to -pg by config if profiling is requested (config -p).
-
-.include <bsd.own.mk>
-
-SIZE?= size
-STRIP?= strip
-
-# source tree is located via $S relative to the compilation directory
-.ifndef S
-S!= cd ../../../..; pwd
-.endif
-
-_machdir?= $S/arch/${_mach}
-_archdir?= $S/arch/${_arch}
-
-INCLUDES= -nostdinc -I$S -I. -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP
-CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \
- -Wno-main -Wno-uninitialized \
- -Wframe-larger-than=2047
-
-CMACHFLAGS= -mno-check-zero-division -mmemcpy
-CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
- -fno-builtin-vsnprintf -fno-builtin-log \
- -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
-.if ${IDENT:M-DNO_PROPOLICE}
-CMACHFLAGS+= -fno-stack-protector
-.endif
-
-COPTS?= -O2
-CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
-LDSCRIPT= ${_machdir}/conf/ld.script
-LINKFLAGS= -T ${LDSCRIPT} -Ttext 0x80000 -e __start -X -N --warn-common -nopie
-
-.if ${IDENT:M-DDDB_STRUCT}
-DB_STRUCTINFO= db_structinfo.h
-.else
-DB_STRUCTINFO=
-.endif
-
-HOSTCC?= ${CC}
-HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
-HOSTED_CFLAGS= ${CFLAGS}
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
-
-NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
-NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-PROFILE_C= ${CC} -S -c ${CFLAGS} ${CPPFLAGS} $<; \
- sed -e s/_mcount/mcount/ -e s/subrmcount/subr_mcount/ <$*.s | \
- ${AS} -o $@; \
- rm -f $*.s
-
-%OBJS
-
-%CFILES
-
-%SFILES
-
-# load lines for config "xxx" will be emitted as:
-# xxx: ${SYSTEM_DEP} swapxxx.o
-# ${SYSTEM_LD_HEAD}
-# ${SYSTEM_LD} swapxxx.o
-# ${SYSTEM_LD_TAIL}
-SYSTEM_HEAD= locore.o param.o ioconf.o
-SYSTEM_OBJ= ${SYSTEM_HEAD} ${OBJS}
-SYSTEM_DEP= Makefile ${SYSTEM_OBJ} ${LDSCRIPT}
-SYSTEM_LD_HEAD= @rm -f $@
-SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \
- ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS}
-SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@
-
-DEBUG?=
-.if ${DEBUG} == "-g"
-LINKFLAGS+= -X
-STRIPFLAGS= -g -x
-SYSTEM_LD_TAIL+=; \
- echo mv $@ $@.gdb; rm -f $@.gdb; mv $@ $@.gdb; \
- echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \
- ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
-.else
-LINKFLAGS+= -S -x
-.endif
-
-%LOAD
-
-# cc's -MD puts the source and output paths in the dependency file;
-# since those are temp files here we need to fix it up. It also
-# puts the file in /tmp, so we use -MF to put it in the current
-# directory as assym.P and then generate assym.d from it with a
-# good target name
-assym.h: $S/kern/genassym.sh Makefile \
- ${_archdir}/${_arch}/genassym.cf ${_machdir}/${_mach}/genassym.cf
- cat ${_archdir}/${_arch}/genassym.cf ${_machdir}/${_mach}/genassym.cf | \
- sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} -MF assym.P > assym.h.tmp
- sed '1s/.*/assym.h: \\/' assym.P > assym.d
- sort -u assym.h.tmp > assym.h
-
-param.c: $S/conf/param.c
- rm -f param.c
- cp $S/conf/param.c .
-
-param.o: param.c Makefile
- ${NORMAL_C}
-
-mcount.o: $S/lib/libkern/mcount.c Makefile
- ${NORMAL_C_NOP}
-
-ioconf.o: ioconf.c
- ${NORMAL_C}
-
-vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
- sh $S/conf/newvers.sh
- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
-
-clean::
- rm -f eddep *bsd *bsd.gdb tags *.[dio] [a-z]*.s \
- [Ee]rrs linterrs assym.h ${DB_STRUCTINFO}
-
-lint:
- @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
- ${CFILES} ioconf.c param.c | \
- grep -v 'static function .* unused'
-
-depend:
- @touch $@
-
-tags:
- @echo "see $S/kern/Makefile for tags"
-
-db_structinfo.h: $S/ddb/db_structinfo.c $S/ddb/parse_structinfo.pl
- ${CC} ${CFLAGS} ${CPPFLAGS} -MT $@ -gstabs -c $S/ddb/db_structinfo.c
- objdump -g db_structinfo.o | perl $S/ddb/parse_structinfo.pl > $@
- rm -f db_structinfo.o
-
-locore.o: ${_machdir}/${_mach}/locore.S assym.h
-eh.o mutex.o process.o subr.o: assym.h
-
-# The install target can be redefined by putting a
-# install-kernel-${MACHINE_NAME} target into /etc/mk.conf
-MACHINE_NAME!= uname -n
-install: install-kernel-${MACHINE_NAME}
-.if !target(install-kernel-${MACHINE_NAME}})
-install-kernel-${MACHINE_NAME}:
- cmp -s bsd /bsd || ln -f /bsd /obsd
- cp bsd /nbsd
- mv /nbsd /bsd
-.endif
-
-# pull in the dependency information
-.if !empty(DB_STRUCTINFO) && !exists(${DB_STRUCTINFO})
- ${SYSTEM_OBJ}: ${DB_STRUCTINFO}
-.endif
-.ifnmake clean
-. for o in ${SYSTEM_OBJ} assym.h ${DB_STRUCTINFO}
-. if exists(${o:R}.d)
-. include "${o:R}.d"
-. elif exists($o)
- .PHONY: $o
-. endif
-. endfor
-.endif
-
-%RULES
diff --git a/sys/arch/aviion/conf/RAMDISK b/sys/arch/aviion/conf/RAMDISK
deleted file mode 100644
index 9f4857ad872..00000000000
--- a/sys/arch/aviion/conf/RAMDISK
+++ /dev/null
@@ -1,58 +0,0 @@
-# $OpenBSD: RAMDISK,v 1.3 2015/07/17 22:52:28 tedu Exp $
-
-machine aviion m88k
-maxusers 4
-
-option TIMEZONE=0
-option DST=0
-option SMALL_KERNEL
-option NO_PROPOLICE
-option BOOT_CONFIG
-
-option MINIROOTSIZE=4096
-option RAMDISK_HOOKS
-
-option FFS
-option NFSCLIENT
-option CD9660
-option INET6
-
-option M88100
-#option M88110
-option AV400 # 100, 200, 300, 400, 3000, 4000, 4300
-option AV530 # 4600, 530
-#option AV5000 # 5000, 6000
-#option AV6280 # 6280, 8000-8
-option ERRATA__XXX_USR # processor xxx.usr bug (mask C82N)
-
-config bsd root on rd0a swap on rd0b
-
-mainbus0 at root
-syscon0 at mainbus0 addr 0xfff00000
-nvram0 at syscon? offset 0x80000
-dart0 at syscon? offset 0x82000 # serial ports
-vme0 at syscon? offset 0x85000 # VME bridge
-
-dart1 at syscon? offset 0x82c00
-oaic0 at syscon? offset 0x8a000
-le0 at syscon? offset 0x8c000 # on-board ethernet
-
-dart1 at syscon? offset 0x82040
-oosiop0 at syscon? offset 0xb0000
-oosiop1 at syscon? offset 0xb0080
-le0 at syscon? offset 0xb0100
-le1 at syscon? offset 0xb0140
-
-le* at vme? a32 0x00900000 a16 0x4000 ipl 3 # artwork X0A factory settings
-le* at vme? a32 0x55540000 a16 0x8600 ipl 3 # artwork X0B factory settings
-le* at vme? a32 0x55900000 a16 0x4000 ipl 3
-le* at vme? a32 0x55980000 a16 0x5000 ipl 3
-
-scsibus* at scsi?
-sd* at scsibus?
-st* at scsibus?
-cd* at scsibus?
-
-pseudo-device bpfilter 1
-pseudo-device loop 1
-pseudo-device rd 1
diff --git a/sys/arch/aviion/conf/files.aviion b/sys/arch/aviion/conf/files.aviion
deleted file mode 100644
index 5685b4e468a..00000000000
--- a/sys/arch/aviion/conf/files.aviion
+++ /dev/null
@@ -1,74 +0,0 @@
-# $OpenBSD: files.aviion,v 1.13 2013/10/15 01:41:46 miod Exp $
-#
-maxpartitions 16
-
-device mainbus {[addr = -1]}
-attach mainbus at root
-file arch/aviion/dev/mainbus.c
-
-#
-# On-board devices
-#
-
-device syscon {[offset = -1]}
-attach syscon at mainbus
-file arch/aviion/dev/syscon.c syscon needs-flag
-
-device nvram
-attach nvram at syscon
-file arch/aviion/dev/nvram.c nvram needs-flag
-
-device dart: tty
-file dev/ic/mc68681.c
-attach dart at syscon
-file arch/aviion/dev/dart.c dart needs-count
-
-attach le at syscon with le_syscon: le24, le32
-file arch/aviion/dev/if_le_syscon.c le_syscon
-
-attach oaic at syscon with oaic_syscon
-file arch/aviion/dev/oaic_syscon.c oaic_syscon
-
-attach oosiop at syscon with oosiop_syscon
-file arch/aviion/dev/oosiop_syscon.c oosiop_syscon
-
-include "scsi/files.scsi"
-
-major {sd = 4}
-major {st = 5}
-major {cd = 6}
-major {rd = 7}
-major {vnd = 8}
-
-#
-# VME suppport code and devices
-#
-
-device vme {[a16 = -1], [a24 = -1], [a32 = -1], [ipl = -1]}
-attach vme at syscon
-file arch/aviion/dev/vme.c vme needs-flag
-
-attach le at vme with le_vme: le24 #, le32
-file arch/aviion/dev/if_le_vme.c le_vme
-
-# list of standard files
-file dev/cninit.c
-
-file arch/aviion/aviion/autoconf.c
-file arch/aviion/aviion/bus_space.c
-file arch/aviion/aviion/bus_dma.c
-file arch/aviion/aviion/conf.c
-file arch/aviion/aviion/db_machdep.c ddb
-file arch/aviion/aviion/disksubr.c
-file arch/aviion/aviion/eh.S
-file arch/aviion/aviion/machdep.c
-file arch/aviion/aviion/av400_machdep.c av400
-file arch/aviion/aviion/av530_machdep.c av530
-file arch/aviion/aviion/av5000_machdep.c av5000
-file arch/aviion/aviion/av6280_machdep.c av6280
-file arch/aviion/aviion/cio_clock.c av400 |
- av5000 | av6280
-file arch/aviion/aviion/m8820x.c m88100
-file arch/aviion/aviion/pmap_table.c
-file arch/aviion/aviion/prom.c
-file arch/aviion/aviion/rtc_clock.c av530
diff --git a/sys/arch/aviion/conf/ld.script b/sys/arch/aviion/conf/ld.script
deleted file mode 100644
index d2c7645712e..00000000000
--- a/sys/arch/aviion/conf/ld.script
+++ /dev/null
@@ -1,50 +0,0 @@
-/* $OpenBSD: ld.script,v 1.2 2013/11/03 09:42:55 miod Exp $ */
-
-/*
- * Copyright (c) 2012 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-OUTPUT_FORMAT("elf32-m88k")
-OUTPUT_ARCH(m88k)
-ENTRY(__start)
-SECTIONS
-{
- .text :
- {
- *(.text)
- PROVIDE(etext = ABSOLUTE(.));
- }
- . = ALIGN(0x80000);
- .rodata :
- {
- *(.rodata*)
- PROVIDE(erodata = ABSOLUTE(.));
- }
- . = ALIGN(0x80000);
- .data :
- {
- *(.data)
- PROVIDE(edata = ABSOLUTE(.));
- }
- .bss :
- {
- *(.bss)
- }
- PROVIDE(end = ABSOLUTE(.));
- /DISCARD/ :
- {
- *(.comment)
- }
-}
diff --git a/sys/arch/aviion/dev/dart.c b/sys/arch/aviion/dev/dart.c
deleted file mode 100644
index 50ed29e714f..00000000000
--- a/sys/arch/aviion/dev/dart.c
+++ /dev/null
@@ -1,414 +0,0 @@
-/* $OpenBSD: dart.c,v 1.13 2013/10/17 15:46:18 miod Exp $ */
-
-/*
- * Copyright (c) 2006, 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-/*
- * Mach Operating System
- * Copyright (c) 1993-1991 Carnegie Mellon University
- * 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.
- *
- * CARNEGIE MELLON AND OMRON ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON AND OMRON DISCLAIM ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/device.h>
-
-#include <machine/autoconf.h>
-#include <machine/board.h>
-#include <machine/conf.h>
-#include <machine/cpu.h>
-
-#include <dev/cons.h>
-
-#include <machine/avcommon.h>
-#include <aviion/dev/sysconvar.h>
-#include <dev/ic/mc68681reg.h>
-#include <dev/ic/mc68681var.h>
-
-struct dartsoftc {
- struct mc68681_softc sc_base;
- bus_space_tag_t sc_iot;
- bus_space_handle_t sc_ioh;
- struct intrhand sc_ih;
-};
-
-int dart_match(struct device *parent, void *self, void *aux);
-void dart_attach(struct device *parent, struct device *self, void *aux);
-
-struct cfattach dart_ca = {
- sizeof(struct dartsoftc), dart_match, dart_attach
-};
-
-/* console, if applicable, will always be on the first port */
-#define CONS_PORT A_PORT
-
-cons_decl(dart);
-int dartintr(void *);
-uint8_t dart_read(void *, uint);
-void dart_write(void *, uint, uint8_t);
-
-/* early console register image */
-struct mc68681_sw_reg dartcn_sw_reg;
-
-/*
- * DUART registers are mapped as the least-significant byte of 32-bit addresses.
- */
-
-uint8_t
-dart_read(void *v, uint reg)
-{
- struct dartsoftc *sc = v;
-
- return (uint8_t)bus_space_read_4(sc->sc_iot, sc->sc_ioh, reg << 2);
-}
-
-void
-dart_write(void *v, uint reg, uint8_t val)
-{
- struct dartsoftc *sc = v;
-
- bus_space_write_4(sc->sc_iot, sc->sc_ioh, reg << 2, val);
- /*
- * Multiple accesses to the same command register must be delayed,
- * to prevent the chip from misbehaving.
- */
- if (reg == DART_CRA || reg == DART_CRB)
- DELAY(2);
-}
-
-int
-dart_match(struct device *parent, void *cf, void *aux)
-{
- struct confargs *ca = aux;
- bus_space_handle_t ioh;
- int rc;
-
- /*
- * We do not accept empty locators here...
- */
- if (ca->ca_paddr == (paddr_t)-1)
- return (0);
-
- if (bus_space_map(ca->ca_iot, ca->ca_paddr, DART_SIZE << 2, 0, &ioh) !=
- 0)
- return (0);
- rc = badaddr((vaddr_t)bus_space_vaddr(ca->ca_iot, ioh), 4);
- bus_space_unmap(ca->ca_iot, ca->ca_paddr, DART_SIZE << 2);
-
- return (rc == 0);
-}
-
-void
-dart_attach(struct device *parent, struct device *self, void *aux)
-{
- struct dartsoftc *sc = (struct dartsoftc *)self;
- struct mc68681_softc *msc = &sc->sc_base;
- struct confargs *ca = aux;
- bus_space_handle_t ioh;
- u_int intsrc;
-
- sc->sc_iot = ca->ca_iot;
- if (bus_space_map(sc->sc_iot, ca->ca_paddr, DART_SIZE << 2, 0, &ioh) !=
- 0) {
- printf(": can't map registers!\n");
- return;
- }
- sc->sc_ioh = ioh;
-
- if (ca->ca_paddr == CONSOLE_DART_BASE) {
- intsrc = INTSRC_DUART1;
- msc->sc_consport = CONS_PORT; /* XXX always for now */
- msc->sc_sw_reg = &dartcn_sw_reg;
- } else {
- intsrc = INTSRC_DUART2;
- msc->sc_sw_reg = &msc->sc_sw_reg_store;
- msc->sc_consport = -1;
- }
-
- msc->sc_read = dart_read;
- msc->sc_write = dart_write;
-
- /*
- * Interrupt configuration.
- *
- * Timer interrupts are not routed anywhere, so we don't need
- * to enable them.
- */
- msc->sc_sw_reg->imr = 0;
-
- /*
- * Input Port configuration.
- *
- * There is no documentation about the serial port usage
- * of the input port in the 400 and 4600 manuals. However,
- * the 6280 manual describes canonical assignments, which
- * are hopefully correct on other systems:
- * IP0 = port A CTS
- * IP1 = port B CTS
- * IP2 = port A DCD (active low)
- * IP3 = port B DCD (active low)
- */
- msc->sc_hw[A_PORT].dcd_ip = 2;
- msc->sc_hw[A_PORT].dcd_active_low = 1;
- msc->sc_hw[B_PORT].dcd_ip = 3;
- msc->sc_hw[B_PORT].dcd_active_low = 1;
- msc->sc_sw_reg->acr |=
- DART_ACR_ISR_IP3_CHANGE_ENABLE | DART_ACR_ISR_IP2_CHANGE_ENABLE;
-
- /*
- * Output Port configuration.
- *
- * Again, the serial bits assigments are not documented until the
- * 6280 manual, except for the speaker connected to OP3.
- * OP0 = port A RTS (guessed)
- * OP1 = port B RTS (guessed)
- * OP2 = port A DTR
- * OP3 = speaker input or port B DTR
- * OP4 = speaker enable (active low)
- * OP5 = port B DTR if speaker on OP3
- * OP6 = parallel port data strobe
- * OP7 = parallel port selection
- */
- msc->sc_sw_reg->opcr = DART_OPCR_OP7 | DART_OPCR_OP6 |
- DART_OPCR_OP5 | DART_OPCR_OP4 | DART_OPCR_OP3 | DART_OPCR_OP2;
- msc->sc_hw[A_PORT].dtr_op = 2;
- msc->sc_hw[A_PORT].rts_op = 0;
- switch (cpuid) {
- case AVIION_300_310:
- case AVIION_400_4000:
- case AVIION_410_4100:
- case AVIION_300C_310C:
- case AVIION_300CD_310CD:
- case AVIION_300D_310D:
- case AVIION_4300_25:
- case AVIION_4300_20:
- case AVIION_4300_16:
- msc->sc_sw_reg->oprs |= DART_OP_OP4; /* disable speaker */
- /* FALLTHROUGH */
- case AVIION_4600_530:
- msc->sc_hw[B_PORT].dtr_op = 5;
- msc->sc_sw_reg->oprs |= DART_OP_OP5;
- break;
- default:
- msc->sc_hw[B_PORT].dtr_op = 3;
- msc->sc_sw_reg->oprs |= DART_OP_OP3;
- break;
- }
- msc->sc_hw[B_PORT].rts_op = 1;
- msc->sc_sw_reg->oprs |= DART_OP_OP2 | DART_OP_OP1 | DART_OP_OP0;
-
- /*
- * Clock configuration.
- *
- * We don't use any clock; the MI driver expects a counter mode
- * to be set in this case.
- */
- msc->sc_sw_reg->acr = DART_ACR_CT_COUNTER_CLK_16;
-
- mc68681_common_attach(msc);
-
- /* enable interrupts */
- sc->sc_ih.ih_fn = dartintr;
- sc->sc_ih.ih_arg = sc;
- sc->sc_ih.ih_flags = 0;
- sc->sc_ih.ih_ipl = IPL_TTY;
-
- sysconintr_establish(intsrc, &sc->sc_ih, self->dv_xname);
-}
-
-int
-dartintr(void *arg)
-{
- struct mc68681_softc *sc = arg;
- uint8_t isr, imr;
-
- isr = (*sc->sc_read)(sc, DART_ISR);
- imr = sc->sc_sw_reg->imr;
-
- isr &= imr;
- if (isr == 0)
- return 0;
-
- mc68681_intr(sc, isr);
- return 1;
-}
-
-/*
- * Console interface routines.
- */
-
-#define dart_cnread(reg) \
- *(volatile u_int32_t *)(CONSOLE_DART_BASE + ((reg) << 2))
-#define dart_cnwrite(reg, val) \
- *(volatile u_int32_t *)(CONSOLE_DART_BASE + ((reg) << 2)) = (val)
-
-void
-dartcnprobe(struct consdev *cp)
-{
- int maj;
-
- if (badaddr(CONSOLE_DART_BASE, 4) != 0)
- return;
-
- /* locate the major number */
- for (maj = 0; maj < nchrdev; maj++)
- if (cdevsw[maj].d_open == dartopen)
- break;
- if (maj == nchrdev)
- return;
-
- cp->cn_dev = makedev(maj, CONS_PORT);
- cp->cn_pri = CN_LOWPRI;
-}
-
-void
-dartcninit(cp)
- struct consdev *cp;
-{
- dartcn_sw_reg.mr1[CONS_PORT] =
- DART_MR1_RX_IRQ_RXRDY | DART_MR1_ERROR_CHAR |
- DART_MR1_PARITY_NONE | DART_MR1_RX_RTR | DART_MR1_BPC_8;
- dartcn_sw_reg.mr2[CONS_PORT] =
- DART_MR2_MODE_NORMAL | /* DART_MR2_TX_CTS | */ DART_MR2_STOP_1;
- dartcn_sw_reg.cr[CONS_PORT] =
- DART_CR_TX_ENABLE | DART_CR_RX_ENABLE;
-
- dartcn_sw_reg.acr = DART_ACR_BRG_SET_2 | DART_ACR_CT_COUNTER_CLK_16;
- dartcn_sw_reg.oprs = CONS_PORT == A_PORT ? DART_OP_OP2 | DART_OP_OP0 :
- DART_OP_OP5 | DART_OP_OP3 | DART_OP_OP1;
- dartcn_sw_reg.opcr = DART_OPCR_RX_A; /* XXX unconditional */
- dartcn_sw_reg.imr = DART_ISR_IP_CHANGE;
-
- dart_cnwrite(DART_CRA,
- DART_CR_RESET_RX | DART_CR_TX_DISABLE | DART_CR_RX_DISABLE);
- DELAY(2);
- dart_cnwrite(DART_CRA,
- DART_CR_RESET_TX /* | DART_CR_TX_DISABLE | DART_CR_RX_DISABLE */);
- DELAY(2);
- dart_cnwrite(DART_CRA,
- DART_CR_RESET_ERROR /* | DART_CR_TX_DISABLE | DART_CR_RX_DISABLE */);
- DELAY(2);
- dart_cnwrite(DART_CRA,
- DART_CR_RESET_BREAK /* | DART_CR_TX_DISABLE | DART_CR_RX_DISABLE */);
- DELAY(2);
- dart_cnwrite(DART_CRA,
- DART_CR_RESET_MR1 /* | DART_CR_TX_DISABLE | DART_CR_RX_DISABLE */);
- DELAY(2);
-
- dart_cnwrite(DART_OPRS, dartcn_sw_reg.oprs);
- dart_cnwrite(DART_OPCR, dartcn_sw_reg.opcr);
-
- dart_cnwrite(DART_ACR, dartcn_sw_reg.acr);
-
- dart_cnwrite(DART_MRA, dartcn_sw_reg.mr1[CONS_PORT]);
- dart_cnwrite(DART_MRA, dartcn_sw_reg.mr2[CONS_PORT]);
- dart_cnwrite(DART_CSRA,
- (DART_CSR_9600 << DART_CSR_RXCLOCK_SHIFT) |
- (DART_CSR_9600 << DART_CSR_TXCLOCK_SHIFT));
- dart_cnwrite(DART_CRA, dartcn_sw_reg.cr[CONS_PORT]);
- DELAY(2);
-
- dart_cnwrite(DART_IMR, dartcn_sw_reg.imr);
-}
-
-void
-dartcnputc(dev_t dev, int c)
-{
- int s;
-
- s = spltty();
-
- /* inhibit interrupts on the chip */
- dart_cnwrite(DART_IMR, dartcn_sw_reg.imr & ~DART_ISR_TXA);
- /* make sure transmitter is enabled */
- dart_cnwrite(DART_CRA, DART_CR_TX_ENABLE);
- DELAY(2);
-
- while ((dart_cnread(DART_SRA) & DART_SR_TX_READY) == 0)
- ;
- dart_cnwrite(DART_TBA, c);
-
- /* wait for transmitter to empty */
- while ((dart_cnread(DART_SRA) & DART_SR_TX_EMPTY) == 0)
- ;
-
- /* restore the previous state */
- dart_cnwrite(DART_IMR, dartcn_sw_reg.imr);
- dart_cnwrite(DART_CRA, dartcn_sw_reg.cr[0]);
- DELAY(2);
-
- splx(s);
-}
-
-int
-dartcngetc(dev_t dev)
-{
- uint8_t sr; /* status reg of port a/b */
- u_char c; /* received character */
- int s;
-
- s = spltty();
-
- /* enable receiver */
- dart_cnwrite(DART_CRA, DART_CR_RX_ENABLE);
- DELAY(2);
-
- for (;;) {
- /* read status reg */
- sr = dart_cnread(DART_SRA);
-
- /* receiver interrupt handler*/
- if (sr & DART_SR_RX_READY) {
- /* read character from port */
- c = dart_cnread(DART_RBA);
-
- /* check break and error conditions */
- if (sr & DART_SR_BREAK) {
- dart_cnwrite(DART_CRA, DART_CR_RESET_BREAK);
- DELAY(2);
- dart_cnwrite(DART_CRA, DART_CR_RESET_ERROR);
- DELAY(2);
- } else if (sr & (DART_SR_FRAME | DART_SR_PARITY |
- DART_SR_OVERRUN)) {
- dart_cnwrite(DART_CRA, DART_CR_RESET_ERROR);
- DELAY(2);
- } else
- break;
- }
- }
- splx(s);
-
- return (int)c;
-}
diff --git a/sys/arch/aviion/dev/dartvar.h b/sys/arch/aviion/dev/dartvar.h
deleted file mode 100644
index 40a6e2a70b5..00000000000
--- a/sys/arch/aviion/dev/dartvar.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* $OpenBSD: dartvar.h,v 1.1.1.1 2006/05/08 18:44:10 miod Exp $ */
-
-/*
- * Mach Operating System
- * Copyright (c) 1993-1991 Carnegie Mellon University
- * 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.
- *
- * CARNEGIE MELLON AND OMRON ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON AND OMRON DISCLAIM ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-#define NDARTPORTS 2 /* Number of ports */
-
-struct dart_info {
- struct tty *tty;
- u_char dart_swflags;
-};
-
-/* saved registers */
-struct dart_sv_reg {
- u_int8_t sv_mr1[NDARTPORTS];
- u_int8_t sv_mr2[NDARTPORTS];
- u_int8_t sv_csr[NDARTPORTS];
- u_int8_t sv_cr[NDARTPORTS];
- u_int8_t sv_opr;
- u_int8_t sv_imr;
-};
-
-struct dartsoftc {
- struct device sc_dev;
- bus_space_tag_t sc_iot;
- bus_space_handle_t sc_ioh;
- struct intrhand sc_ih;
-
- int sc_console;
-
- struct dart_sv_reg *sc_sv_reg;
- struct dart_sv_reg sc_sv_reg_storage;
- struct dart_info sc_dart[NDARTPORTS];
-};
-
-void dart_common_attach(struct dartsoftc *);
-int dartintr(void *);
-
-#define DART_SIZE 0x40
diff --git a/sys/arch/aviion/dev/dma.c b/sys/arch/aviion/dev/dma.c
deleted file mode 100644
index 66329451895..00000000000
--- a/sys/arch/aviion/dev/dma.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/* $OpenBSD: dma.c,v 1.3 2014/12/24 22:48:27 miod Exp $ */
-
-/*
- * Copyright (c) 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/device.h>
-#include <sys/malloc.h>
-#include <sys/queue.h>
-
-#include <uvm/uvm.h>
-
-#include <machine/autoconf.h>
-#include <machine/board.h>
-
-#include <aviion/dev/sysconvar.h>
-
-#include <aviion/dev/dmareg.h>
-#include <aviion/dev/dmavar.h>
-
-/*
- * DMA request information structure.
- */
-struct dmareq {
- TAILQ_ENTRY(dmareq) chain;
-
- vaddr_t mem;
- size_t len;
- uint dir;
-
- size_t lastcnt;
-
- void *cbarg;
- void (*cbstart)(void *);
- void (*cbdone)(void *);
-};
-
-struct dma_softc {
- struct device sc_dev;
-
- struct intrhand sc_ih;
-
- TAILQ_HEAD(, dmareq) sc_req;
-};
-
-int dma_match(struct device *, void *, void *);
-void dma_attach(struct device *, struct device *, void *);
-
-const struct cfattach dma_ca = {
- sizeof(struct dma_softc), dma_match, dma_attach
-};
-
-struct cfdriver dma_cd = {
- NULL, "dma", DV_DULL
-};
-
-int dma_intr(void *);
-void dma_start(struct dma_softc *);
-
-int
-dma_match(struct device *parent, void *match, void *aux)
-{
- struct confargs *ca = aux;
-
- switch (cpuid) {
-#ifdef AV400
- case AVIION_300_310:
- case AVIION_400_4000:
- case AVIION_410_4100:
- case AVIION_300C_310C:
- case AVIION_300CD_310CD:
- case AVIION_300D_310D:
- case AVIION_4300_25:
- case AVIION_4300_20:
- case AVIION_4300_16:
- if (ca->ca_paddr == DMA_MAP)
- return 1;
- /* FALLTHROUGH */
-#endif
- default:
- return 0;
- }
-}
-
-void
-dma_attach(struct device *parent, struct device *self, void *aux)
-{
- struct dma_softc *sc = (struct dma_softc *)self;
-
- printf("\n");
-
- *(volatile uint32_t *)DMA_COUNT = 0; /* clear possibly pending int */
-
- TAILQ_INIT(&sc->sc_req);
-
- sc->sc_ih.ih_fn = dma_intr;
- sc->sc_ih.ih_arg = sc;
- sc->sc_ih.ih_flags = 0;
- sc->sc_ih.ih_ipl = IPL_BIO;
- sysconintr_establish(INTSRC_DMA, &sc->sc_ih, self->dv_xname);
-}
-
-int
-dma_intr(void *v)
-{
- struct dma_softc *sc = v;
- struct dmareq *req;
- size_t tc;
-
- req = TAILQ_FIRST(&sc->sc_req);
- if (req == NULL) {
- printf("%s: interrupt but no active request?\n", __func__);
- *(volatile uint32_t *)DMA_STOP = DMASTOP_INHIBIT;
- return -1;
- }
-
- tc = *(volatile uint32_t *)DMA_COUNT;
- if (tc != 0)
- printf("%s: unexpected intr, TC = %x\n", __func__, tc);
- req->len -= req->lastcnt;
- if (req->len == 0) {
- /* this transfer is over */
- TAILQ_REMOVE(&sc->sc_req, req, chain);
-
- if (req->cbdone != NULL)
- (*req->cbdone)(req->cbarg);
-
- free(req, M_DEVBUF, sizeof *req);
- } else {
- req->mem += req->lastcnt;
- }
- dma_start(sc);
-
- return 1;
-}
-
-int
-dma_req(void *vaddr, size_t sz, int dir, void (*cbstart)(void *),
- void (*cbdone)(void *), void *cbarg)
-{
- struct dma_softc *sc;
- struct dmareq *req;
- int run;
- int s;
-
- if (dma_cd.cd_devs == NULL ||
- (sc = (struct dma_softc *)dma_cd.cd_devs[0]) == NULL)
- return ENXIO;
- req = malloc(sizeof *req, M_DEVBUF, M_NOWAIT | M_CANFAIL);
- if (req == NULL)
- return ENOMEM;
-
- req->mem = (vaddr_t)vaddr;
- req->len = sz;
- req->dir = dir;
- req->cbstart = cbstart;
- req->cbdone = cbdone;
- req->cbarg = cbarg;
- req->lastcnt = 0;
-
- s = splbio();
- run = TAILQ_EMPTY(&sc->sc_req);
- TAILQ_INSERT_TAIL(&sc->sc_req, req, chain);
- if (run)
- dma_start(sc);
- splx(s);
-
- return 0;
-}
-
-void
-dma_start(struct dma_softc *sc)
-{
- struct dmareq *req;
- paddr_t pa, paoff;
-
- req = TAILQ_FIRST(&sc->sc_req);
- if (req == NULL) {
- *(volatile uint32_t *)DMA_STOP = DMASTOP_INHIBIT;
- return;
- }
-
- if (pmap_extract(pmap_kernel(), req->mem, &pa) == FALSE)
- panic("%s: pmap_extract(%p) failed",
- __func__, (void *)req->mem);
-
- paoff = pa & ~DMAMAP_MASK;
-
- req->lastcnt = DMA_BOUNDARY - paoff;
- if (req->lastcnt > req->len)
- req->lastcnt = req->len;
-
- *(volatile uint32_t *)DMA_DIR = req->dir;
- *(volatile uint32_t *)DMA_COUNT = req->lastcnt;
- *(volatile uint32_t *)DMA_OFF = paoff;
- *(volatile uint32_t *)DMA_MAP = (pa & DMAMAP_MASK) |
- DMAMAP_G | DMAMAP_V;
- *(volatile uint32_t *)DMA_CLR_INVALID = DMACLR;
- *(volatile uint32_t *)DMA_STOP = DMASTOP_RESTART;
-
- if (req->cbstart != NULL)
- (*req->cbstart)(req->cbarg);
-}
diff --git a/sys/arch/aviion/dev/dmareg.h b/sys/arch/aviion/dev/dmareg.h
deleted file mode 100644
index d60301c15c3..00000000000
--- a/sys/arch/aviion/dev/dmareg.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* $OpenBSD: dmareg.h,v 1.1 2013/10/23 10:07:14 miod Exp $ */
-
-/*
- * Copyright (c) 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
- * AV400 family DMA controller definitions
- */
-
-#define DMA_BOUNDARY 0x1000
-
-#define DMA_MAP 0xfff8b000
-#define DMAMAP_MASK 0xfffff000
-#define DMAMAP_G 0x00000080
-#define DMAMAP_RO 0x00000004
-#define DMAMAP_V 0x00000001
-#define DMA_OFF 0xfff8b004
-#define DMAOFF_MASK 0x00000ffe
-#define DMA_COUNT 0xfff8b008
-#define DMACOUNTC_MASK 0x00001ffe
-#define DMA_DIR 0xfff8b00c
-#define DMA_CLR_INVALID 0xfff8b010
-#define DMA_CLR_WP 0xfff8b014
-#define DMACLR 0x00000000
-#define DMA_STOP 0xfff8b018
-#define DMASTOP_RESTART 0x00000000 /* restart DMA */
-#define DMASTOP_INHIBIT 0x00000001 /* do not restart DMA */
diff --git a/sys/arch/aviion/dev/dmavar.h b/sys/arch/aviion/dev/dmavar.h
deleted file mode 100644
index 23527e9821d..00000000000
--- a/sys/arch/aviion/dev/dmavar.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* $OpenBSD: dmavar.h,v 1.1 2013/10/23 10:07:14 miod Exp $ */
-
-/*
- * Copyright (c) 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#define DMADIR_TO_DEVICE 0x00000001 /* DMA from memory to device */
-#define DMADIR_FROM_DEVICE 0x00000000 /* DMA from device to memory */
-
-int dma_req(void *, size_t, int,
- void (*)(void *), void (*)(void *), void *);
diff --git a/sys/arch/aviion/dev/if_le_syscon.c b/sys/arch/aviion/dev/if_le_syscon.c
deleted file mode 100644
index 86a22b639eb..00000000000
--- a/sys/arch/aviion/dev/if_le_syscon.c
+++ /dev/null
@@ -1,382 +0,0 @@
-/* $OpenBSD: if_le_syscon.c,v 1.17 2014/12/22 02:26:53 tedu Exp $ */
-
-/*-
- * Copyright (c) 1996 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Adam Glass and Gordon W. Ross.
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/syslog.h>
-#include <sys/socket.h>
-#include <sys/device.h>
-
-#include <uvm/uvm.h>
-
-#include <net/if.h>
-
-#include <netinet/in.h>
-#include <netinet/if_ether.h>
-
-#include <net/if_media.h>
-
-#include <machine/autoconf.h>
-#include <machine/board.h>
-#include <machine/cpu.h>
-
-#ifdef AV400
-#include <machine/av400.h>
-#endif
-#ifdef AV530
-#include <machine/av530.h>
-#endif
-
-#include <aviion/dev/sysconvar.h>
-
-#include <dev/ic/lancereg.h>
-#include <dev/ic/lancevar.h>
-#include <dev/ic/am7990reg.h>
-#include <dev/ic/am7990var.h>
-/* #include <dev/ic/am79900reg.h> */
-#include <dev/ic/am79900var.h>
-
-/*
- * LANCE or ILACC registers. Although these are 16 bit registers, on the AV400
- * design, they need to be accessed as 32 bit registers. Bus magic...
- */
-struct av_lereg {
- volatile uint32_t ler1_rdp; /* data port */
- volatile uint32_t ler1_rap; /* register select port */
-
- /* The following fields are only found on ILACC designs */
- volatile uint32_t unused[2];
- volatile uint32_t enaddr[6];
- volatile uint32_t cksum[2];
-};
-
-struct le_softc {
- union { /* glue to MI code */
- struct lance_softc sc_lance;
- struct am7990_softc sc_am7990;
- struct am79900_softc sc_am79900;
- } u;
-
- int sc_ilacc;
- struct av_lereg *sc_r1; /* LANCE or ILACC registers */
- struct intrhand sc_ih;
-};
-
-int le_syscon_match(struct device *, void *, void *);
-void le_syscon_attach(struct device *, struct device *, void *);
-
-struct cfattach le_syscon_ca = {
- sizeof(struct le_softc), le_syscon_match, le_syscon_attach
-};
-
-void le_syscon_hwinit_ilacc(struct lance_softc *);
-int le_syscon_intr_ilacc(void *);
-int le_syscon_intr_lance(void *);
-uint16_t le_syscon_rdcsr(struct lance_softc *, uint16_t);
-void le_syscon_wrcsr(struct lance_softc *, uint16_t, uint16_t);
-void le_syscon_wrcsr_interrupt(struct lance_softc *, uint16_t, uint16_t);
-
-int
-le_syscon_match(struct device *parent, void *cf, void *aux)
-{
- struct confargs *ca = aux;
-#ifdef AV530
- paddr_t fuse = 0;
-#endif
-
- switch (cpuid) {
-#ifdef AV400
- case AVIION_300_310:
- case AVIION_400_4000:
- case AVIION_410_4100:
- case AVIION_300C_310C:
- case AVIION_300CD_310CD:
- case AVIION_300D_310D:
- case AVIION_4300_25:
- case AVIION_4300_20:
- case AVIION_4300_16:
- switch (ca->ca_paddr) {
- case AV400_LAN:
- break;
- default:
- return 0;
- }
- break;
-#endif
-#ifdef AV530
- case AVIION_4600_530:
- switch (ca->ca_paddr) {
- case AV530_LAN1:
- fuse = AV530_IOFUSE0;
- break;
- case AV530_LAN2:
- fuse = AV530_IOFUSE1;
- break;
- default:
- return 0;
- }
- break;
-#endif
- default:
- return 0;
- }
-
-#ifdef AV530
- if (fuse != 0) {
- /* check IOFUSE register */
- if (badaddr(fuse, 1) != 0)
- return 0;
-
- /* check fuse status */
- return ISSET(*(volatile uint8_t *)fuse, AV530_IOFUSE_LAN);
- }
-#endif
-
- return 1;
-}
-
-void
-le_syscon_attach(struct device *parent, struct device *self, void *aux)
-{
- struct le_softc *lesc = (struct le_softc *)self;
- struct lance_softc *sc = &lesc->u.sc_lance;
- struct confargs *ca = aux;
- u_int etherpages;
- struct pglist pglist;
- vm_page_t pg;
- int i, rc;
- paddr_t pa, pamask;
- vaddr_t va;
- int intsrc;
- uint8_t *enaddr;
-
- switch (cpuid) {
-#ifdef AV530
- case AVIION_4600_530:
- lesc->sc_ilacc = 1;
- pamask = 0xffffffff;
- intsrc = ca->ca_paddr == AV530_LAN1 ?
- INTSRC_ETHERNET1 : INTSRC_ETHERNET2;
- break;
-#endif
- default:
- lesc->sc_ilacc = 0;
- pamask = 0x00ffffff;
- intsrc = INTSRC_ETHERNET1;
- break;
- }
-
- /*
- * Allocate contiguous pages (in the first 16MB if not ILACC)
- * to use as buffers. We aim towards 256KB, which is as much as
- * the VME LANCE boards provide.
- */
- if (physmem >= atop(32 * 1024 * 1024))
- etherpages = atop(256 * 1024);
- else if (physmem >= atop(16 * 1024 * 1024))
- etherpages = atop(128 * 1024);
- else
- etherpages = atop(64 * 1024);
- for (;;) {
- TAILQ_INIT(&pglist);
- rc = uvm_pglistalloc(ptoa(etherpages), 0, pamask,
- 0, 0, &pglist, 1, UVM_PLA_NOWAIT);
- if (rc == 0)
- break;
-
- etherpages >>= 1;
- if (etherpages <= 2) {
- printf(": no available memory, kernel is too large\n");
- return;
- }
- }
-
- va = uvm_km_valloc(kernel_map, ptoa(etherpages));
- if (va == 0) {
- printf(": can't map descriptor memory\n");
- uvm_pglistfree(&pglist);
- return;
- }
-
- pa = VM_PAGE_TO_PHYS(TAILQ_FIRST(&pglist));
-
- sc->sc_mem = (void *)va;
- sc->sc_addr = (u_long)pa & pamask;
- sc->sc_memsize = ptoa(etherpages);
-
- TAILQ_FOREACH(pg, &pglist, pageq) {
- pmap_enter(pmap_kernel(), va, pa,
- PROT_READ | PROT_WRITE,
- PROT_READ | PROT_WRITE | PMAP_WIRED);
- va += PAGE_SIZE;
- pa += PAGE_SIZE;
- }
- pmap_cache_ctrl((vaddr_t)sc->sc_mem,
- (vaddr_t)sc->sc_mem + sc->sc_memsize, CACHE_INH);
- pmap_update(pmap_kernel());
-
- lesc->sc_r1 = (struct av_lereg *)ca->ca_paddr;
-
- /*
- * Get the device Ethernet address.
- */
- enaddr = sc->sc_arpcom.ac_enaddr;
- if (lesc->sc_ilacc) {
- for (i = 0; i < ETHER_ADDR_LEN; i++)
- enaddr[i] = lesc->sc_r1->enaddr[i] >> 24;
- /*
- * If the checksum is invalid, don't trust the address,
- * and force a hopefully unique one to be generated with
- * ether_fakeaddr() at interface attachment time.
- */
- if ((lesc->sc_r1->cksum[0] >> 24) !=
- ((enaddr[0] + enaddr[2] + enaddr[4]) & 0xff) ||
- (lesc->sc_r1->cksum[1] >> 24) !=
- ((enaddr[1] + enaddr[3] + enaddr[5]) & 0xff))
- enaddr[0] = 0xff;
- } else
- myetheraddr(enaddr);
-
- sc->sc_conf3 = LE_C3_BSWP;
-
- sc->sc_copytodesc = lance_copytobuf_contig;
- sc->sc_copyfromdesc = lance_copyfrombuf_contig;
- sc->sc_copytobuf = lance_copytobuf_contig;
- sc->sc_copyfrombuf = lance_copyfrombuf_contig;
- sc->sc_zerobuf = lance_zerobuf_contig;
-
- sc->sc_rdcsr = le_syscon_rdcsr;
- sc->sc_wrcsr = le_syscon_wrcsr;
- sc->sc_hwreset = NULL;
- if (lesc->sc_ilacc)
- sc->sc_hwinit = le_syscon_hwinit_ilacc;
- else
- sc->sc_hwinit = NULL;
-
- if (lesc->sc_ilacc) {
- le_syscon_hwinit_ilacc(sc);
- am79900_config(&lesc->u.sc_am79900);
- } else
- am7990_config(&lesc->u.sc_am7990);
-
- if (lesc->sc_ilacc)
- lesc->sc_ih.ih_fn = le_syscon_intr_ilacc;
- else
- lesc->sc_ih.ih_fn = le_syscon_intr_lance;
- lesc->sc_ih.ih_arg = sc;
- lesc->sc_ih.ih_flags = 0;
- lesc->sc_ih.ih_ipl = IPL_NET;
-
- sysconintr_establish(intsrc, &lesc->sc_ih, self->dv_xname);
-}
-
-void
-le_syscon_hwinit_ilacc(struct lance_softc *sc)
-{
- le_syscon_wrcsr(sc, LE_CSR4,
- LE_C4_DMAPLUS | LE_C4_UINT | LE_C4_TXSTRTM);
-}
-
-int
-le_syscon_intr_ilacc(void *v)
-{
- struct le_softc *lesc = (struct le_softc *)v;
- struct lance_softc *sc = &lesc->u.sc_lance;
- uint16_t csr4;
-
- /* Acknowledge TX start. XXX how to disable this? */
- csr4 = le_syscon_rdcsr(sc, LE_CSR4);
- if (csr4 & LE_C4_TXSTRT) {
- le_syscon_wrcsr(sc, LE_CSR4, csr4 | LE_C4_TXSTRTM);
- return 1;
- }
-
- return am79900_intr(v);
-}
-
-int
-le_syscon_intr_lance(void *v)
-{
- struct le_softc *lesc = (struct le_softc *)v;
- struct lance_softc *sc = &lesc->u.sc_lance;
- int rc;
-
- /*
- * Syscon expects edge interrupts, while LANCE does level
- * interrupts. To avoid missing interrupts while servicing,
- * we disable further device interrupts while servicing.
- *
- * However, am7990_intr() will flip the interrupt enable bit
- * itself; we override wrcsr with a specific version during
- * servicing, so as not to reenable interrupts accidentally...
- */
- sc->sc_wrcsr = le_syscon_wrcsr_interrupt;
-
- rc = am7990_intr(v);
-
- sc->sc_wrcsr = le_syscon_wrcsr;
- /*
- * ...but we should not forget to reenable interrupts at this point!
- */
- le_syscon_wrcsr(sc, LE_CSR0, LE_C0_INEA | le_syscon_rdcsr(sc, LE_CSR0));
-
- return rc;
-}
-
-uint16_t
-le_syscon_rdcsr(struct lance_softc *sc, uint16_t port)
-{
- struct av_lereg *ler1 = ((struct le_softc *)sc)->sc_r1;
- uint16_t val;
-
- ler1->ler1_rap = port;
- val = ler1->ler1_rdp;
- return val;
-}
-
-void
-le_syscon_wrcsr(struct lance_softc *sc, uint16_t port, uint16_t val)
-{
- struct av_lereg *ler1 = ((struct le_softc *)sc)->sc_r1;
-
- ler1->ler1_rap = port;
- ler1->ler1_rdp = val;
-}
-
-void
-le_syscon_wrcsr_interrupt(struct lance_softc *sc, uint16_t port, uint16_t val)
-{
- if (port == LE_CSR0)
- val &= ~LE_C0_INEA;
-
- le_syscon_wrcsr(sc, port, val);
-}
diff --git a/sys/arch/aviion/dev/if_le_vme.c b/sys/arch/aviion/dev/if_le_vme.c
deleted file mode 100644
index ff0922528b0..00000000000
--- a/sys/arch/aviion/dev/if_le_vme.c
+++ /dev/null
@@ -1,359 +0,0 @@
-/* $OpenBSD: if_le_vme.c,v 1.5 2014/12/22 02:26:53 tedu Exp $ */
-
-/*-
- * Copyright (c) 1982, 1992, 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. 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.
- *
- * @(#)if_le.c 8.2 (Berkeley) 10/30/93
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/syslog.h>
-#include <sys/socket.h>
-#include <sys/device.h>
-#include <sys/malloc.h>
-
-#include <net/if.h>
-
-#include <netinet/in.h>
-#include <netinet/if_ether.h>
-
-#include <net/if_media.h>
-
-#include <machine/autoconf.h>
-#include <machine/bus.h>
-#include <machine/cpu.h>
-
-#include <dev/ic/lancereg.h>
-#include <dev/ic/lancevar.h>
-#include <dev/ic/am7990reg.h>
-#include <dev/ic/am7990var.h>
-
-#include <aviion/dev/if_le_vmereg.h>
-#include <aviion/dev/vmevar.h>
-
-struct le_softc {
- struct am7990_softc sc_am7990; /* glue to MI code */
-
- bus_space_tag_t sc_memt; /* dual-ported memory access */
- bus_space_handle_t sc_memh;
-
- bus_space_tag_t sc_iot; /* short io access */
- bus_space_handle_t sc_ioh;
-
- struct intrhand sc_ih; /* interrupt vectoring */
- u_int sc_csr; /* CSR image */
- u_int sc_ipl;
- u_int sc_vec;
-};
-
-void le_vme_attach(struct device *, struct device *, void *);
-int le_vme_match(struct device *, void *, void *);
-
-struct cfattach le_vme_ca = {
- sizeof(struct le_softc), le_vme_match, le_vme_attach
-};
-
-void le_vme_wrcsr(struct lance_softc *, uint16_t, uint16_t);
-uint16_t le_vme_rdcsr(struct lance_softc *, uint16_t);
-void nvram_cmd(struct lance_softc *, u_int, u_int);
-uint16_t nvram_read(struct lance_softc *, u_int);
-void le_vme_etheraddr(struct lance_softc *);
-void le_vme_init(struct lance_softc *);
-void le_vme_reset(struct lance_softc *);
-int le_vme_intr(void *);
-#if 0
-void le_vme_copyfrombuf_contig(struct lance_softc *, void *, int, int);
-void le_vme_copytobuf_contig(struct lance_softc *, void *, int, int);
-void le_vme_zerobuf_contig(struct lance_softc *, int, int);
-#endif
-
-/* send command to the nvram controller */
-void
-nvram_cmd(struct lance_softc *sc, u_int cmd, u_int addr)
-{
- struct le_softc *lesc = (void *)sc;
- int i;
-
- for (i = 0; i < 8; i++) {
- bus_space_write_2(lesc->sc_iot, lesc->sc_ioh, LEREG_EAR,
- (cmd | (addr << 1)) >> i);
- CDELAY;
- }
-}
-
-/* read nvram one bit at a time */
-uint16_t
-nvram_read(struct lance_softc *sc, u_int nvram_addr)
-{
- struct le_softc *lesc = (void *)sc;
- u_int val = 0, mask = 0x04000;
- uint16_t wbit;
-
- lesc->sc_csr = HW_RS | NVRAM_EN | 0x07;
- ENABLE_NVRAM;
- nvram_cmd(sc, NVRAM_RCL, 0);
- DISABLE_NVRAM;
- CDELAY;
- ENABLE_NVRAM;
- nvram_cmd(sc, NVRAM_READ, nvram_addr);
- for (wbit = 0; wbit < 15; wbit++) {
- if (bus_space_read_2(lesc->sc_iot, lesc->sc_ioh,
- LEREG_EAR) & 0x01)
- val |= mask;
- else
- val &= ~mask;
- mask = mask >> 1;
- CDELAY;
- }
- if (bus_space_read_2(lesc->sc_iot, lesc->sc_ioh, LEREG_EAR) & 0x01)
- val |= 0x8000;
- else
- val &= 0x7fff;
- CDELAY;
- DISABLE_NVRAM;
- return (val);
-}
-
-void
-le_vme_etheraddr(struct lance_softc *sc)
-{
- u_char *cp = sc->sc_arpcom.ac_enaddr;
- uint16_t ival[3];
- int i;
-
- for (i = 0; i < 3; i++) {
- ival[i] = nvram_read(sc, i);
- }
- memcpy(cp, &ival[0], 6);
-}
-
-void
-le_vme_wrcsr(struct lance_softc *sc, uint16_t port, uint16_t val)
-{
- struct le_softc *lesc = (void *)sc;
-
- bus_space_write_2(lesc->sc_iot, lesc->sc_ioh, LEREG_RAP, port);
- bus_space_write_2(lesc->sc_iot, lesc->sc_ioh, LEREG_RDP, val);
-}
-
-uint16_t
-le_vme_rdcsr(struct lance_softc *sc, uint16_t port)
-{
- struct le_softc *lesc = (void *)sc;
-
- bus_space_write_2(lesc->sc_iot, lesc->sc_ioh, LEREG_RAP, port);
- return (bus_space_read_2(lesc->sc_iot, lesc->sc_ioh, LEREG_RDP));
-}
-
-/* init board, set ipl and vec */
-void
-le_vme_init(struct lance_softc *sc)
-{
- struct le_softc *lesc = (void *)sc;
-
- lesc->sc_csr = 0x4f;
- WRITE_CSR_AND(lesc->sc_ipl);
- SET_VEC(lesc->sc_vec);
- return;
-}
-
-/* board reset */
-void
-le_vme_reset(struct lance_softc *sc)
-{
- struct le_softc *lesc = (void *)sc;
-
- RESET_HW;
-#ifdef LEDEBUG
- if (sc->sc_debug)
- printf("%s: hardware reset\n", sc->sc_dev.dv_xname);
-#endif
- SYSFAIL_CL;
-}
-
-int
-le_vme_intr(void *arg)
-{
- struct le_softc *lesc = arg;
- struct lance_softc *sc = &lesc->sc_am7990.lsc;
- int rc;
-
- rc = am7990_intr(sc);
- ENABLE_INTR;
- return (rc);
-}
-
-#if 0
-void
-le_vme_copytobuf_contig(struct lance_softc *sc, void *from, int boff, int len)
-{
- struct le_softc *lesc = (void *)sc;
-
- bus_space_write_region_1(lesc->sc_memt, lesc->sc_memh, boff, from, len);
-}
-
-void
-le_vme_copyfrombuf_contig(struct lance_softc *sc, void *to, int boff, int len)
-{
- struct le_softc *lesc = (void *)sc;
-
- bus_space_read_region_1(lesc->sc_memt, lesc->sc_memh, boff, to, len);
-}
-
-void
-le_vme_zerobuf_contig(struct lance_softc *sc, int boff, int len)
-{
- struct le_softc *lesc = (void *)sc;
-
- bus_space_set_region_1(lesc->sc_memt, lesc->sc_memh, boff, 0, len);
-}
-#endif
-
-int
-le_vme_match(struct device *parent, void *vcf, void *args)
-{
- struct vme_attach_args *vaa = args;
- bus_space_tag_t iot, memt;
- bus_space_handle_t ioh;
- int rc;
-
- /* we expect a32 and a16 locators */
- if (vaa->vaa_addr_a16 == (vme_addr_t)-1 ||
- vaa->vaa_addr_a32 == (vme_addr_t)-1)
- return (0);
-
- /* check the dual ported memory */
- if (vmebus_get_bst(parent, VME_A32, VME_D32, &memt) != 0)
- return (0);
- if (bus_space_map(memt, vaa->vaa_addr_a32, PAGE_SIZE, 0, &ioh) != 0)
- return (0);
- rc = badaddr((vaddr_t)bus_space_vaddr(memt, ioh), 2);
- bus_space_unmap(memt, ioh, PAGE_SIZE);
- vmebus_release_bst(parent, memt);
-
- /* check the control space */
- if (vmebus_get_bst(parent, VME_A16, VME_D16, &iot) != 0)
- return (0);
- if (bus_space_map(iot, vaa->vaa_addr_a16, PAGE_SIZE, 0, &ioh) != 0)
- return (0);
- rc |= badaddr((vaddr_t)bus_space_vaddr(iot, ioh), 2);
- bus_space_unmap(iot, ioh, PAGE_SIZE);
- vmebus_release_bst(parent, iot);
-
- return (rc == 0);
-}
-
-void
-le_vme_attach(struct device *parent, struct device *self, void *aux)
-{
- struct le_softc *lesc = (struct le_softc *)self;
- struct lance_softc *sc = &lesc->sc_am7990.lsc;
- struct vme_attach_args *vaa = aux;
-
- /*
- * Allocate an interrupt vector.
- */
- lesc->sc_ipl = vaa->vaa_ipl == 0 ? IPL_NET : vaa->vaa_ipl;
- if (vmeintr_allocate(1, VMEINTR_ANY | VMEINTR_SHARED, lesc->sc_ipl,
- &lesc->sc_vec) != 0) {
- printf(": no more interrupts!\n");
- return;
- }
- printf(" vec %x", lesc->sc_vec);
-
- /*
- * Map the dual-ported memory.
- */
- if (vmebus_get_bst(parent, VME_A32, VME_D32, &lesc->sc_memt) != 0) {
- printf(": can't map memory\n");
- return;
- }
- if (bus_space_map(lesc->sc_memt, vaa->vaa_addr_a32, VLEMEMSIZE,
- BUS_SPACE_MAP_LINEAR, &lesc->sc_memh) != 0) {
- printf(": can't map memory\n");
- goto fail3;
- }
-
- /*
- * Map the control space.
- */
- if (vmebus_get_bst(parent, VME_A16, VME_D16, &lesc->sc_iot) != 0) {
- printf(": can't map registers\n");
- goto fail2;
- }
- if (bus_space_map(lesc->sc_iot, vaa->vaa_addr_a16, PAGE_SIZE,
- 0, &lesc->sc_ioh) != 0) {
- printf(": can't map registers\n");
- goto fail1;
- }
-
- sc->sc_mem = (void *)bus_space_vaddr(lesc->sc_memt, lesc->sc_memh);
- sc->sc_memsize = VLEMEMSIZE;
- sc->sc_addr = vaa->vaa_addr_a32 & 0x00ffffff;
- sc->sc_conf3 = LE_C3_BSWP;
- sc->sc_hwreset = le_vme_reset;
- sc->sc_rdcsr = le_vme_rdcsr;
- sc->sc_wrcsr = le_vme_wrcsr;
- sc->sc_hwinit = le_vme_init;
-#if 0
- sc->sc_copytodesc = le_vme_copytobuf_contig;
- sc->sc_copyfromdesc = le_vme_copyfrombuf_contig;
- sc->sc_copytobuf = le_vme_copytobuf_contig;
- sc->sc_copyfrombuf = le_vme_copyfrombuf_contig;
- sc->sc_zerobuf = le_vme_zerobuf_contig;
-#else
- sc->sc_copytodesc = lance_copytobuf_contig;
- sc->sc_copyfromdesc = lance_copyfrombuf_contig;
- sc->sc_copytobuf = lance_copytobuf_contig;
- sc->sc_copyfrombuf = lance_copyfrombuf_contig;
- sc->sc_zerobuf = lance_zerobuf_contig;
-#endif
-
- /* get Ethernet address */
- le_vme_etheraddr(sc);
-
- am7990_config(&lesc->sc_am7990);
-
- /* connect the interrupt */
- lesc->sc_ih.ih_fn = le_vme_intr;
- lesc->sc_ih.ih_arg = sc;
- lesc->sc_ih.ih_flags = 0;
- lesc->sc_ih.ih_ipl = lesc->sc_ipl;
- vmeintr_establish(lesc->sc_vec, &lesc->sc_ih, self->dv_xname);
-
- return;
-
-fail1:
- vmebus_release_bst(parent, lesc->sc_iot);
-fail2:
- bus_space_unmap(lesc->sc_memt, lesc->sc_memh, VLEMEMSIZE);
-fail3:
- vmebus_release_bst(parent, lesc->sc_memt);
-}
diff --git a/sys/arch/aviion/dev/if_le_vmereg.h b/sys/arch/aviion/dev/if_le_vmereg.h
deleted file mode 100644
index f006b23edba..00000000000
--- a/sys/arch/aviion/dev/if_le_vmereg.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* $OpenBSD: if_le_vmereg.h,v 1.1.1.1 2006/05/09 18:25:00 miod Exp $ */
-
-/*-
- * Copyright (c) 1982, 1992, 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. 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.
- *
- * @(#)if_lereg.h 8.2 (Berkeley) 10/30/93
- */
-
-#define VLEMEMSIZE 0x00040000 /* 256 KB */
-
-/*
- * LANCE registers for Interphase 3207 Hawk
- */
-
-#define LEREG_CSR 0x00
-#define LEREG_VEC 0x02
-#define LEREG_RDP 0x04
-#define LEREG_RAP 0x06
-#define LEREG_EAR 0x08
-
-/* CSR bits */
-#define NVRAM_EN 0x0008 /* NVRAM enable bit (active low) */
-#define INTR_EN 0x0010 /* interrupt enable bit (active low) */
-#define PARITYB 0x0020 /* parity error clear bit */
-#define HW_RS 0x0040 /* hardware reset bit (active low) */
-#define SYSFAILB 0x0080 /* SYSFAIL bit */
-
-#define NVRAM_RWEL 0xe0 /* Reset write enable latch */
-#define NVRAM_STO 0x60 /* Store ram to eeprom */
-#define NVRAM_SLP 0xa0 /* Novram into low power mode */
-#define NVRAM_WRITE 0x20 /* Writes word from location x */
-#define NVRAM_SWEL 0xc0 /* Set write enable latch */
-#define NVRAM_RCL 0x40 /* Recall eeprom data into ram */
-#define NVRAM_READ 0x00 /* Reads word from location x */
-
-#define CDELAY delay(10000)
-#define WRITE_CSR_OR(x) \
- do { \
- lesc->sc_csr |= (x); \
- bus_space_write_2(lesc->sc_iot, lesc->sc_ioh, \
- LEREG_CSR, lesc->sc_csr); \
- } while (0)
-#define WRITE_CSR_AND(x) \
- do { \
- lesc->sc_csr &= ~(x); \
- bus_space_write_2(lesc->sc_iot, lesc->sc_ioh, \
- LEREG_CSR, lesc->sc_csr); \
- } while (0)
-#define ENABLE_NVRAM WRITE_CSR_AND(NVRAM_EN)
-#define DISABLE_NVRAM WRITE_CSR_OR(NVRAM_EN)
-#define ENABLE_INTR WRITE_CSR_AND(INTR_EN)
-#define DISABLE_INTR WRITE_CSR_OR(INTR_EN)
-#define RESET_HW \
- do { \
- WRITE_CSR_AND(HW_RS); \
- CDELAY; \
- } while (0)
-#define SET_VEC(x) \
- bus_space_write_2(lesc->sc_iot, lesc->sc_ioh, LEREG_VEC, (x))
-#define SYSFAIL_CL WRITE_CSR_AND(SYSFAILB)
diff --git a/sys/arch/aviion/dev/mainbus.c b/sys/arch/aviion/dev/mainbus.c
deleted file mode 100644
index cef4dc27823..00000000000
--- a/sys/arch/aviion/dev/mainbus.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/* $OpenBSD: mainbus.c,v 1.8 2014/05/08 22:17:33 miod Exp $ */
-/*
- * Copyright (c) 1998 Steve Murphree, Jr.
- * Copyright (c) 2004, Miodrag Vallat.
- *
- * 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.
- *
- * 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/systm.h>
-#include <sys/reboot.h>
-#include <sys/conf.h>
-#include <sys/device.h>
-#include <sys/disklabel.h>
-#include <sys/extent.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <machine/autoconf.h>
-#include <machine/board.h>
-#include <machine/bus.h>
-#include <machine/cmmu.h>
-#include <machine/cpu.h>
-#include <machine/prom.h>
-
-void mainbus_attach(struct device *, struct device *, void *);
-int mainbus_match(struct device *, void *, void *);
-int mainbus_print(void *, const char *);
-int mainbus_scan(struct device *, void *, void *);
-
-/*
- * bus_space routines for 1:1 obio mappings
- */
-
-int mainbus_map(bus_space_tag_t, bus_addr_t, bus_size_t, int,
- bus_space_handle_t *);
-void mainbus_unmap(bus_space_tag_t, bus_space_handle_t, bus_size_t);
-int mainbus_subregion(bus_space_tag_t, bus_space_handle_t, bus_size_t,
- bus_size_t, bus_space_handle_t *);
-void *mainbus_vaddr(bus_space_tag_t, bus_space_handle_t);
-
-const struct aviion_bus_space_tag mainbus_bustag = {
- ._space_map = mainbus_map,
- ._space_unmap = mainbus_unmap,
- ._space_subregion = mainbus_subregion,
- ._space_vaddr = mainbus_vaddr,
- ._space_read_1 = generic_space_read_1,
- ._space_write_1 = generic_space_write_1,
- ._space_read_2 = generic_space_read_2,
- ._space_write_2 = generic_space_write_2,
- ._space_read_4 = generic_space_read_4,
- ._space_write_4 = generic_space_write_4,
- ._space_read_raw_2 = generic_space_read_raw_2,
- ._space_write_raw_2 = generic_space_write_raw_2,
- ._space_read_raw_4 = generic_space_read_raw_4,
- ._space_write_raw_4 = generic_space_write_raw_4,
-};
-
-/*
- * Obio (internal IO) space is mapped 1:1 (see pmap_bootstrap() for details).
- */
-
-int
-mainbus_map(bus_space_tag_t tag, bus_addr_t addr, bus_size_t size, int flags,
- bus_space_handle_t *ret)
-{
- *ret = (bus_space_handle_t)addr;
- return 0;
-}
-
-void
-mainbus_unmap(bus_space_tag_t tag, bus_space_handle_t handle, bus_size_t size)
-{
- /* nothing to do */
-}
-
-int
-mainbus_subregion(bus_space_tag_t tag, bus_space_handle_t handle,
- bus_addr_t offset, bus_size_t size, bus_space_handle_t *ret)
-{
- *ret = handle + offset;
- return (0);
-}
-
-void *
-mainbus_vaddr(bus_space_tag_t tag, bus_space_handle_t handle)
-{
- return (void *)handle;
-}
-
-/*
- * Configuration glue
- */
-
-struct cfattach mainbus_ca = {
- sizeof(struct device), mainbus_match, mainbus_attach
-};
-
-struct cfdriver mainbus_cd = {
- NULL, "mainbus", DV_DULL
-};
-
-int
-mainbus_match(struct device *parent, void *cf, void *args)
-{
- return (mainbus_cd.cd_ndevs == 0);
-}
-
-void
-mainbus_attach(struct device *parent, struct device *self, void *args)
-{
- extern void cpu_setup_secondary_processors(void);
- extern char cpu_model[];
-
- printf(": %s, cpuid 0x%04x", cpu_model, cpuid);
- printf("\n");
-
- /*
- * Display cpu/mmu details for the main processor.
- */
- cpu_configuration_print(1);
-
-#ifdef MULTIPROCESSOR
- /*
- * Let secondary processors initialize further and print
- * their configuration information now.
- */
- cpu_setup_secondary_processors();
-#endif
-
- (void)config_search(mainbus_scan, self, args);
-}
-
-int
-mainbus_scan(struct device *parent, void *child, void *args)
-{
- struct cfdata *cf = child;
- struct confargs oca;
-
- oca.ca_iot = &mainbus_bustag;
- oca.ca_paddr = (paddr_t)cf->cf_loc[0];
- oca.ca_offset = (paddr_t)-1;
- oca.ca_ipl = (u_int)-1;
-
- if ((*cf->cf_attach->ca_match)(parent, cf, &oca) == 0)
- return (0);
-
- config_attach(parent, cf, &oca, mainbus_print);
- return (1);
-}
-
-int
-mainbus_print(void *args, const char *bus)
-{
- struct confargs *ca = args;
-
- if (ca->ca_paddr != (paddr_t)-1)
- printf(" addr 0x%08lx", ca->ca_paddr);
- return (UNCONF);
-}
diff --git a/sys/arch/aviion/dev/nvram.c b/sys/arch/aviion/dev/nvram.c
deleted file mode 100644
index cf0679c734f..00000000000
--- a/sys/arch/aviion/dev/nvram.c
+++ /dev/null
@@ -1,564 +0,0 @@
-/* $OpenBSD: nvram.c,v 1.12 2015/06/13 07:16:36 jsg 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.
- *
- * 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/kernel.h>
-#include <sys/device.h>
-#include <sys/malloc.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/ioctl.h>
-#include <sys/uio.h>
-#include <sys/timetc.h>
-
-#include <machine/autoconf.h>
-#include <machine/conf.h>
-#include <machine/cpu.h>
-#include <machine/mioctl.h>
-#include <machine/psl.h>
-#include <machine/vmparam.h>
-
-#include <uvm/uvm_param.h>
-
-#include <aviion/dev/nvramreg.h>
-
-struct nvramsoftc {
- struct device sc_dev;
- paddr_t sc_base;
- bus_space_tag_t sc_iot;
- bus_space_handle_t sc_ioh;
- bus_addr_t sc_regs;
- size_t sc_len;
- u_int8_t *sc_nvram;
-};
-
-void nvramattach(struct device *, struct device *, void *);
-int nvrammatch(struct device *, void *, void *);
-
-struct cfattach nvram_ca = {
- sizeof(struct nvramsoftc), nvrammatch, nvramattach
-};
-
-struct cfdriver nvram_cd = {
- NULL, "nvram", DV_DULL
-};
-
-time_t chiptotime(int, int, int, int, int, int);
-int nvramrw(caddr_t, size_t, struct uio *, int);
-
-int
-nvrammatch(parent, vcf, args)
- struct device *parent;
- void *vcf, *args;
-{
- struct confargs *ca = args;
- bus_space_handle_t ioh;
- int rc;
-
- if (bus_space_map(ca->ca_iot, ca->ca_paddr, PAGE_SIZE, 0, &ioh) != 0)
- return (0);
- rc = badaddr((vaddr_t)bus_space_vaddr(ca->ca_iot, ioh), 1) == 0;
- bus_space_unmap(ca->ca_iot, ioh, PAGE_SIZE);
- return (rc);
-}
-
-void
-nvramattach(parent, self, args)
- struct device *parent, *self;
- void *args;
-{
- struct confargs *ca = args;
- struct nvramsoftc *sc = (struct nvramsoftc *)self;
- bus_space_handle_t ioh;
- vsize_t maplen;
-
- sc->sc_len = MK48T02_SIZE;
- sc->sc_regs = AV_NVRAM_TOD_OFF;
-
- sc->sc_iot = ca->ca_iot;
- sc->sc_base = ca->ca_paddr;
-
- /*
- * The NK48T02 is mapped as one byte per longword,
- * thus spans four times as much address space.
- */
- maplen = sc->sc_len * 4;
-
- if (bus_space_map(sc->sc_iot, sc->sc_base, round_page(maplen),
- BUS_SPACE_MAP_LINEAR, &ioh) != 0) {
- printf(": can't map memory!\n");
- return;
- }
-
- sc->sc_ioh = ioh;
-
- printf(": MK48T0%zu\n", sc->sc_len / 1024);
-}
-
-#define LEAPYEAR(y) (((y) & 3) == 0)
-
-/*
- * This code is defunct after 2068.
- * Will Unix still be here then??
- */
-const int dayyr[12] =
-{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };
-
-time_t
-chiptotime(sec, min, hour, day, mon, year)
- int sec, min, hour, day, mon, year;
-{
- int days, yr;
-
- sec = FROMBCD(sec);
- min = FROMBCD(min);
- hour = FROMBCD(hour);
- day = FROMBCD(day);
- mon = FROMBCD(mon);
- year = FROMBCD(year) + YEAR0;
-
- /* simple sanity checks */
- if (year>164 || mon<1 || mon>12 || day<1 || day>31)
- return (0);
- yr = 70;
- days = 0;
-
- if (year < 70) { /* 2000 <= year */
- for (; yr < 100; yr++) /* deal with first 30 years */
- days += LEAPYEAR(yr) ? 366 : 365;
- yr = 0;
- }
-
- for (; yr < year; yr++) /* deal with years left */
- days += LEAPYEAR(yr) ? 366 : 365;
-
- days += dayyr[mon - 1] + day - 1;
-
- if (LEAPYEAR(yr) && mon > 2)
- days++;
-
- /* now have days since Jan 1, 1970; the rest is easy... */
- return ((time_t)days * SECDAY + hour * 3600 + min * 60 + sec);
-}
-
-struct chiptime {
- int sec;
- int min;
- int hour;
- int wday;
- int day;
- int mon;
- int year;
-};
-
-void timetochip(struct chiptime *c);
-
-void
-timetochip(c)
- struct chiptime *c;
-{
- time_t t2, now = time_second;
- int t, t3;
-
- /* January 1 1970 was a Thursday (4 in unix wdays) */
- /* compute the days since the epoch */
- t2 = now / SECDAY;
-
- t3 = (t2 + 4) % 7; /* day of week */
- c->wday = TOBCD(t3 + 1);
-
- /* compute the year */
- t = 69;
- while (t2 >= 0) { /* whittle off years */
- t3 = t2;
- t++;
- t2 -= LEAPYEAR(t) ? 366 : 365;
- }
- c->year = t;
-
- /* t3 = month + day; separate */
- t = LEAPYEAR(t);
- for (t2 = 1; t2 < 12; t2++)
- if (t3 < (dayyr[t2] + ((t && (t2 > 1)) ? 1:0)))
- break;
-
- /* t2 is month */
- c->mon = t2;
- c->day = t3 - dayyr[t2 - 1] + 1;
- if (t && t2 > 2)
- c->day--;
-
- /* the rest is easy */
- t = now % SECDAY;
- c->hour = t / 3600;
- t %= 3600;
- c->min = t / 60;
- c->sec = t % 60;
-
- c->sec = TOBCD(c->sec);
- c->min = TOBCD(c->min);
- c->hour = TOBCD(c->hour);
- c->day = TOBCD(c->day);
- c->mon = TOBCD(c->mon);
- c->year = TOBCD((c->year - YEAR0) % 100);
-}
-
-/*
- * Set up the system's time, given a `reasonable' time value.
- */
-
-void
-inittodr(base)
- time_t base;
-{
- struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[0];
- int sec, min, hour, day, mon, year;
- int badbase = 0, waszero = base == 0;
- struct timespec ts;
-
- ts.tv_sec = ts.tv_nsec = 0;
-
- if (base < 36 * SECYR) { /* this code did not exist until 2006 */
- /*
- * If base is 0, assume filesystem time is just unknown
- * in stead of preposterous. Don't bark.
- */
- if (base != 0)
- printf("WARNING: preposterous time in file system\n");
- /* not going to use it anyway, if the chip is readable */
- base = 36 * SECYR + 109 * SECDAY + 22 * 3600;
- badbase = 1;
- }
-
- bus_space_write_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_CSR << 2), CLK_READ |
- bus_space_read_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_CSR << 2)));
- sec = bus_space_read_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_SEC << 2)) & 0xff;
- min = bus_space_read_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_MIN << 2)) & 0xff;
- hour = bus_space_read_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_HOUR << 2)) & 0xff;
- day = bus_space_read_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_DAY << 2)) & 0xff;
- mon = bus_space_read_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_MONTH << 2)) & 0xff;
- year = bus_space_read_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_YEAR << 2)) & 0xff;
- bus_space_write_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_CSR << 2),
- bus_space_read_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_CSR << 2)) & ~CLK_READ);
-
- if ((ts.tv_sec = chiptotime(sec, min, hour, day, mon, year)) == 0) {
- printf("WARNING: bad date in nvram");
-#ifdef DEBUG
- printf("\nday = %d, mon = %d, year = %d, hour = %d, min = %d, sec = %d",
- FROMBCD(day), FROMBCD(mon), FROMBCD(year) + YEAR0,
- FROMBCD(hour), FROMBCD(min), FROMBCD(sec));
-#endif
- /*
- * Believe the time in the file system for lack of
- * anything better, resetting the clock.
- */
- ts.tv_sec = base;
- if (!badbase)
- resettodr();
- } else {
- int deltat = ts.tv_sec - base;
-
- if (deltat < 0)
- deltat = -deltat;
- if (waszero || deltat < 2 * SECDAY)
- goto done;
- printf("WARNING: clock %s %ld days",
- ts.tv_sec < base ? "lost" : "gained", deltat / SECDAY);
- }
- printf(" -- CHECK AND RESET THE DATE!\n");
-done:
- tc_setclock(&ts);
-}
-
-/*
- * Reset the clock based on the current time.
- * Used when the current clock is preposterous, when the time is changed,
- * and when rebooting. Do nothing if the time is not yet known, e.g.,
- * when crashing during autoconfig.
- */
-void
-resettodr()
-{
- struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[0];
- struct chiptime c;
-
- if (time_second == 1 || sc == NULL)
- return;
- timetochip(&c);
-
- bus_space_write_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_CSR << 2), CLK_WRITE |
- bus_space_read_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_CSR << 2)));
- bus_space_write_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_SEC << 2), c.sec);
- bus_space_write_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_MIN << 2), c.min);
- bus_space_write_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_HOUR << 2), c.hour);
- bus_space_write_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_WDAY << 2), c.wday);
- bus_space_write_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_DAY << 2), c.day);
- bus_space_write_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_MONTH << 2), c.mon);
- bus_space_write_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_YEAR << 2), c.year);
- bus_space_write_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_CSR << 2),
- bus_space_read_4(sc->sc_iot, sc->sc_ioh,
- sc->sc_regs + (CLK_CSR << 2)) & ~CLK_WRITE);
-}
-
-/*ARGSUSED*/
-int
-nvramopen(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
-{
- if (minor(dev) >= nvram_cd.cd_ndevs ||
- nvram_cd.cd_devs[minor(dev)] == NULL)
- return (ENODEV);
-
- return (0);
-}
-
-/*ARGSUSED*/
-int
-nvramclose(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
-{
- /*
- * It might be worth free()ing the NVRAM copy here.
- */
- return (0);
-}
-
-/*ARGSUSED*/
-int
-nvramioctl(dev, cmd, data, flag, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flag;
- struct proc *p;
-{
- int unit = minor(dev);
- struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[unit];
- int error = 0;
-
- switch (cmd) {
- case MIOCGSIZ:
- *(int *)data = sc->sc_len;
- break;
- default:
- error = ENOTTY;
- break;
- }
- return (error);
-}
-
-paddr_t
-nvrammmap(dev, off, prot)
- dev_t dev;
- off_t off;
- int prot;
-{
-#if 0
- int unit = minor(dev);
- struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[unit];
-
- if (minor(dev) != 0)
- return (-1);
-
- /* allow access only in RAM */
- if (off < 0 || off >= round_page(sc->sc_len))
- return (-1);
- return (sc->sc_base + off);
-#else
- /* disallow mmap due to non-linear layout */
- return (-1);
-#endif
-}
-
-int read_nvram(struct nvramsoftc *);
-
-/*
- * Build a local copy of the NVRAM contents.
- */
-int
-read_nvram(struct nvramsoftc *sc)
-{
- u_int cnt;
- u_int8_t *dest;
- u_int32_t *src;
-
- if (sc->sc_nvram == NULL) {
- sc->sc_nvram = (u_int8_t *)malloc(sc->sc_len, M_DEVBUF,
- M_WAITOK | M_CANFAIL);
- if (sc->sc_nvram == NULL)
- return (EAGAIN);
- }
-
- dest = sc->sc_nvram;
- src = (u_int32_t *)bus_space_vaddr(sc->sc_iot, sc->sc_ioh);
- cnt = sc->sc_len;
- while (cnt-- != 0)
- *dest++ = (u_int8_t)*src++;
-
- return (0);
-}
-
-/*ARGSUSED*/
-int
-nvramrw(caddr_t base, size_t len, struct uio *uio, int flags)
-{
- vaddr_t v;
- size_t c;
- struct iovec *iov;
- int error = 0;
-
- if (uio->uio_offset < 0)
- return EINVAL;
-
- while (uio->uio_resid > 0 && error == 0) {
- iov = uio->uio_iov;
- if (iov->iov_len == 0) {
- uio->uio_iov++;
- uio->uio_iovcnt--;
-#ifdef DIAGNOSTIC
- if (uio->uio_iovcnt < 0)
- panic("nvramrw");
-#endif
- continue;
- }
-
- v = uio->uio_offset;
- if (v <= len) {
- c = ulmin(iov->iov_len, MAXPHYS);
- if (c > len - v)
- c = len - v; /* till end of dev */
- } else
- c = 0;
- if (c == 0)
- return (0);
- error = uiomove(base + v, c, uio);
- }
- return (error);
-}
-
-int
-nvramread(dev_t dev, struct uio *uio, int flags)
-{
- int unit = minor(dev);
- struct nvramsoftc *sc = (struct nvramsoftc *)nvram_cd.cd_devs[unit];
- int rc;
-
- /*
- * Get a copy of the NVRAM contents.
- */
- rc = read_nvram(sc);
- if (rc != 0)
- return (rc);
-
- /*
- * Move data from our NVRAM copy to the user.
- */
- return (nvramrw(sc->sc_nvram, sc->sc_len, uio, flags));
-}
-
-int
-nvramwrite(dev_t dev, struct uio *uio, int flags)
-{
- int unit = minor(dev);
- struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[unit];
- u_int cnt;
- u_int8_t *src;
- u_int32_t *dest;
- int rc;
-
- /*
- * Get a copy of the NVRAM contents.
- */
- rc = read_nvram(sc);
- if (rc != 0)
- return (rc);
-
- /*
- * Move data from the user to our NVRAM copy.
- */
- rc = nvramrw(sc->sc_nvram, sc->sc_len, uio, flags);
- if (rc != 0) {
- /* reset NVRAM copy contents */
- read_nvram(sc);
- return (rc);
- }
-
- /*
- * Update the NVRAM. This could be optimized by only working on
- * the areas which have been modified by the user.
- */
- src = sc->sc_nvram;
- dest = (u_int32_t *)bus_space_vaddr(sc->sc_iot, sc->sc_ioh);
- cnt = sc->sc_len;
- while (cnt-- != 0) {
- if ((*dest & 0xff) != *src) {
- *dest = (u_int32_t)*src;
- /*
- * A jumper on the motherboard may write-protect
- * the 0x80 bytes at offset 0x80 (i.e. addresses
- * 0x200-0x3ff), so check our write had successed.
- * If it failed, discard the remainder of the changes
- * and return EROFS.
- */
- if ((*dest & 0xff) != *src)
- rc = EROFS;
- }
- dest++;
- src++;
- }
-
- if (rc != 0) {
- /* reset NVRAM copy contents */
- read_nvram(sc);
- }
-
- return (rc);
-}
diff --git a/sys/arch/aviion/dev/nvramreg.h b/sys/arch/aviion/dev/nvramreg.h
deleted file mode 100644
index 4950663c896..00000000000
--- a/sys/arch/aviion/dev/nvramreg.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* $OpenBSD: nvramreg.h,v 1.3 2007/04/10 17:47:54 miod 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. 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 TOD clock/NVRAM
- */
-
-/*
- * Mostek MK48T08 clock.
- *
- * This chip is 8k in size.
- * The first TOD clock starts at offset 0x1FF8. The following structure
- * describes last 2K of its 8K address space. The first 6K of the NVRAM
- * space is used for various things as follows:
- * 0000-0fff User Area
- * 1000-10ff Networking Area
- * 1100-16f7 Operating System Area
- * 16f8-1ef7 ROM Debugger Area
- * 1ef8-1ff7 Configuration Area (Ethernet address etc)
- * 1ff8-1fff TOD clock
- */
-
-/*
- * On the AViiON, these offsets need shifting two bits, as they are 32 bit
- * registers.
- */
-#define CLK_CSR 0 /* control register */
-#define CLK_SEC 1 /* seconds (0..59; BCD) */
-#define CLK_MIN 2 /* minutes (0..59; BCD) */
-#define CLK_HOUR 3 /* hour (0..23; BCD) */
-#define CLK_WDAY 4 /* weekday (1..7) */
-#define CLK_DAY 5 /* day in month (1..31; BCD) */
-#define CLK_MONTH 6 /* month (1..12; BCD) */
-#define CLK_YEAR 7 /* year (0..99; BCD) */
-#define CLK_NREG 8
-
-/* csr bits */
-#define CLK_WRITE 0x80 /* want to write */
-#define CLK_READ 0x40 /* want to read (freeze clock) */
-
-/*
- * Data General, following Motorola, chose the year `1900' as their base count.
- * It has already wrapped by now...
- */
-#define YEAR0 00
-
-#define AV_NVRAM_TOD_OFF 0x1fe0 /* offset of tod in NVRAM space */
-#define MK48T02_SIZE 2 * 1024
diff --git a/sys/arch/aviion/dev/oaic_syscon.c b/sys/arch/aviion/dev/oaic_syscon.c
deleted file mode 100644
index 3d3402ec051..00000000000
--- a/sys/arch/aviion/dev/oaic_syscon.c
+++ /dev/null
@@ -1,238 +0,0 @@
-/* $OpenBSD: oaic_syscon.c,v 1.2 2013/10/23 10:07:14 miod Exp $ */
-
-/*
- * Copyright (c) 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/device.h>
-#include <sys/buf.h>
-
-#include <scsi/scsi_all.h>
-#include <scsi/scsiconf.h>
-
-#include <machine/autoconf.h>
-#include <machine/board.h>
-#include <machine/bus.h>
-#include <machine/av400.h>
-
-#include <aviion/dev/sysconvar.h>
-
-#include <dev/ic/aic6250reg.h>
-#include <dev/ic/aic6250var.h>
-#if 0
-#include <aviion/dev/dmavar.h>
-#endif
-
-int oaic_syscon_match(struct device *, void *, void *);
-void oaic_syscon_attach(struct device *, struct device *, void *);
-
-struct oaic_syscon_softc {
- struct aic6250_softc sc_base;
- bus_space_tag_t sc_iot;
- bus_space_handle_t sc_ioh;
- struct intrhand sc_ih;
-#if 0
- uint8_t sc_dmac;
-#endif
-};
-
-const struct cfattach oaic_syscon_ca = {
- sizeof(struct oaic_syscon_softc),
- oaic_syscon_match, oaic_syscon_attach
-};
-
-uint8_t oaic_read(struct aic6250_softc *, uint);
-void oaic_write(struct aic6250_softc *, uint, uint8_t);
-
-#if 0
-int oaic_dmastart(struct aic6250_softc *, void *, size_t, int);
-int oaic_dmadone(struct aic6250_softc *);
-void oaic_dmago(void *);
-void oaic_dmastop(void *);
-#endif
-
-int
-oaic_syscon_match(struct device *parent, void *match, void *aux)
-{
- struct confargs *ca = aux;
-
- switch (cpuid) {
-#ifdef AV400
- case AVIION_300_310:
- case AVIION_400_4000:
- case AVIION_410_4100:
- case AVIION_300C_310C:
- case AVIION_300CD_310CD:
- case AVIION_300D_310D:
- case AVIION_4300_25:
- case AVIION_4300_20:
- case AVIION_4300_16:
- switch (ca->ca_paddr) {
- case AV400_SCSI:
- break;
- default:
- return 0;
- }
- break;
-#endif
- default:
- return 0;
- }
-
- return 1;
-}
-
-void
-oaic_syscon_attach(struct device *parent, struct device *self, void *aux)
-{
- struct oaic_syscon_softc *ssc = (struct oaic_syscon_softc *)self;
- struct aic6250_softc *sc = (struct aic6250_softc *)self;
- struct confargs *ca = aux;
- bus_space_handle_t ioh;
- int intsrc;
-
- if (bus_space_map(ca->ca_iot, ca->ca_paddr, AIC_NREG << 2, 0,
- &ioh) != 0) {
- printf(": can't map registers\n");
- return;
- }
- ssc->sc_iot = ca->ca_iot;
- ssc->sc_ioh = ioh;
-
- /*
- * Do NOT ask any question about this.
- */
- *(volatile uint32_t *)0xfff840c0 = 0x6e;
-
- /*
- * According to the hardware manual (chapter 10 ``Programming the
- * Small Computer System Interface'', page 10-2), the ``Clock
- * Frequency Mode'' bit in control register #1 must be clear. This
- * hints the AIC6250 runs at 10MHz.
- */
- sc->sc_freq = 10;
- sc->sc_initiator = 7;
-
- /* port A is an output port, single-ended mode */
- sc->sc_cr0 = AIC_CR0_EN_PORT_A;
- /* port B used as the upper 8 bits of the 16-bit DMA path */
- sc->sc_cr1 = AIC_CR1_ENABLE_16BIT_MEM_BUS;
-
- sc->sc_read = oaic_read;
- sc->sc_write = oaic_write;
-
-#if 0
- sc->sc_dma_start = oaic_dmastart;
- sc->sc_dma_done = oaic_dmadone;
-#endif
-
- aic6250_attach(sc);
-
- ssc->sc_ih.ih_fn = (int(*)(void *))aic6250_intr;
- ssc->sc_ih.ih_arg = sc;
- ssc->sc_ih.ih_flags = 0;
- ssc->sc_ih.ih_ipl = IPL_BIO;
- intsrc = INTSRC_SCSI1;
- sysconintr_establish(intsrc, &ssc->sc_ih, self->dv_xname);
-}
-
-uint8_t
-oaic_read(struct aic6250_softc *sc, uint reg)
-{
- struct oaic_syscon_softc *ssc = (struct oaic_syscon_softc *)sc;
- uint32_t rc;
-
- rc = bus_space_read_4(ssc->sc_iot, ssc->sc_ioh, reg << 2);
- return rc & 0xff;
-}
-
-void
-oaic_write(struct aic6250_softc *sc, uint reg, uint8_t val)
-{
- struct oaic_syscon_softc *ssc = (struct oaic_syscon_softc *)sc;
-
- bus_space_write_4(ssc->sc_iot, ssc->sc_ioh, reg << 2, val);
-}
-
-#if 0
-int
-oaic_dmastart(struct aic6250_softc *sc, void *addr, size_t size, int datain)
-{
- struct oaic_syscon_softc *osc = (struct oaic_syscon_softc *)sc;
- char *vaddr = (char *)addr;
-
- /*
- * The DMA engine can only operate on 16-bit words.
- */
- if (size & 1)
- return EINVAL;
-
- osc->sc_dmac = AIC_DC_DMA_XFER_EN | (datain ? 0 : AIC_DC_TRANSFER_DIR);
- if ((vaddr_t)vaddr & 1) {
- if (datain) {
- /*
- * The AIC_DC_ODD_XFER_START bit ought to have been
- * set before changing phase to DATA IN.
- */
- return EINVAL;
- }
- vaddr--;
- osc->sc_dmac |= AIC_DC_ODD_XFER_START;
- }
-
- return dma_req(vaddr, size,
- datain ? DMADIR_FROM_DEVICE : DMADIR_TO_DEVICE,
- oaic_dmago, oaic_dmastop, sc);
-}
-
-void
-oaic_dmago(void *v)
-{
- struct aic6250_softc *sc = (struct aic6250_softc *)v;
- struct oaic_syscon_softc *osc = (struct oaic_syscon_softc *)sc;
-
- sc->sc_flags |= AIC_DOINGDMA;
-
- oaic_write(sc, AIC_DMA_BYTE_COUNT_H, sc->sc_dleft >> 16);
- oaic_write(sc, AIC_DMA_BYTE_COUNT_M, sc->sc_dleft >> 8);
- oaic_write(sc, AIC_DMA_BYTE_COUNT_L, sc->sc_dleft);
- oaic_write(sc, AIC_DMA_CNTRL, osc->sc_dmac);
-}
-
-void
-oaic_dmastop(void *v)
-{
- struct aic6250_softc *sc = (struct aic6250_softc *)v;
-
- sc->sc_flags &= ~AIC_DOINGDMA;
-}
-
-int
-oaic_dmadone(struct aic6250_softc *sc)
-{
- int resid;
-
- resid = oaic_read(sc, AIC_DMA_BYTE_COUNT_H) << 16 |
- oaic_read(sc, AIC_DMA_BYTE_COUNT_M) << 8 |
- oaic_read(sc, AIC_DMA_BYTE_COUNT_L);
-
- sc->sc_dp += sc->sc_dleft - resid;
- sc->sc_dleft = resid;
-
- return 0;
-}
-#endif
diff --git a/sys/arch/aviion/dev/oosiop_syscon.c b/sys/arch/aviion/dev/oosiop_syscon.c
deleted file mode 100644
index 64d4864b7bf..00000000000
--- a/sys/arch/aviion/dev/oosiop_syscon.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/* $OpenBSD: oosiop_syscon.c,v 1.5 2013/09/16 16:30:51 miod Exp $ */
-
-/*
- * Copyright (c) 2010 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/device.h>
-#include <sys/buf.h>
-
-#include <scsi/scsi_all.h>
-#include <scsi/scsiconf.h>
-
-#include <machine/autoconf.h>
-#include <machine/board.h>
-#include <machine/bus.h>
-#include <machine/av530.h>
-
-#include <aviion/dev/sysconvar.h>
-
-#include <dev/ic/oosiopreg.h>
-#include <dev/ic/oosiopvar.h>
-
-int oosiop_syscon_match(struct device *, void *, void *);
-void oosiop_syscon_attach(struct device *, struct device *, void *);
-
-struct oosiop_syscon_softc {
- struct oosiop_softc sc_base;
- struct intrhand sc_ih;
-};
-
-const struct cfattach oosiop_syscon_ca = {
- sizeof(struct oosiop_syscon_softc),
- oosiop_syscon_match, oosiop_syscon_attach
-};
-
-int
-oosiop_syscon_match(struct device *parent, void *match, void *aux)
-{
- struct confargs *ca = aux;
- paddr_t fuse;
-
- switch (cpuid) {
- case AVIION_4600_530:
- break;
- default:
- return 0;
- }
-
- switch (ca->ca_paddr) {
- case AV530_SCSI1:
- fuse = AV530_IOFUSE0;
- break;
- case AV530_SCSI2:
- fuse = AV530_IOFUSE1;
- break;
- default:
- return 0;
- }
-
- /* check IOFUSE register */
- if (badaddr(fuse, 1) != 0)
- return 0;
-
- /* check fuse status */
- return ISSET(*(volatile uint8_t *)fuse, AV530_IOFUSE_SCSI);
-}
-
-void
-oosiop_syscon_attach(struct device *parent, struct device *self, void *aux)
-{
- struct oosiop_syscon_softc *ssc = (struct oosiop_syscon_softc *)self;
- struct oosiop_softc *sc = (struct oosiop_softc *)self;
- struct confargs *ca = aux;
- bus_space_handle_t ioh;
- int intsrc;
-
- if (bus_space_map(ca->ca_iot, ca->ca_paddr, OOSIOP_NREGS, 0,
- &ioh) != 0) {
- printf(": can't map registers\n");
- return;
- }
- sc->sc_bst = ca->ca_iot;
- sc->sc_bsh = ioh;
- sc->sc_dmat = 0; /* no real use of tag yet */
-
- sc->sc_freq = 33333333; /* XXX 25MHz models? */
- sc->sc_chip = OOSIOP_700;
- sc->sc_id = 7; /* XXX */
-
- sc->sc_scntl0 = OOSIOP_SCNTL0_EPC | OOSIOP_SCNTL0_EPG;
- sc->sc_dmode = OOSIOP_DMODE_BL_4;
- sc->sc_dwt = 0x4f; /* maximum DMA timeout allowable */
- sc->sc_ctest7 = OOSIOP_CTEST7_DC;
-
- oosiop_attach(sc);
-
- ssc->sc_ih.ih_fn = (int(*)(void *))oosiop_intr;
- ssc->sc_ih.ih_arg = sc;
- ssc->sc_ih.ih_flags = 0;
- ssc->sc_ih.ih_ipl = IPL_BIO;
- intsrc = ca->ca_paddr == AV530_SCSI1 ? INTSRC_SCSI1 : INTSRC_SCSI2;
- sysconintr_establish(intsrc, &ssc->sc_ih, self->dv_xname);
-}
diff --git a/sys/arch/aviion/dev/syscon.c b/sys/arch/aviion/dev/syscon.c
deleted file mode 100644
index ea3851b7207..00000000000
--- a/sys/arch/aviion/dev/syscon.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/* $OpenBSD: syscon.c,v 1.10 2014/05/17 12:20:55 miod Exp $ */
-/*
- * Copyright (c) 2007 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice, this permission notice, and the disclaimer below
- * appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-/*
- * Copyright (c) 1999 Steve Murphree, Jr.
- * 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.
- *
- * 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/conf.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/device.h>
-
-#include <machine/autoconf.h>
-#include <machine/board.h>
-#include <machine/cpu.h>
-
-#include <machine/avcommon.h>
-#include <aviion/dev/sysconvar.h>
-
-struct sysconsoftc {
- struct device sc_dev;
-
- struct intrhand sc_abih; /* `abort' switch */
- struct intrhand sc_acih; /* `ac fail' */
- struct intrhand sc_sfih; /* `sys fail' */
-};
-
-void sysconattach(struct device *, struct device *, void *);
-int sysconmatch(struct device *, void *, void *);
-
-int syscon_print(void *, const char *);
-int syscon_scan(struct device *, void *, void *);
-int sysconabort(void *);
-int sysconacfail(void *);
-int sysconsysfail(void *);
-
-struct cfattach syscon_ca = {
- sizeof(struct sysconsoftc), sysconmatch, sysconattach
-};
-
-struct cfdriver syscon_cd = {
- NULL, "syscon", DV_DULL
-};
-
-int
-sysconmatch(struct device *parent, void *cf, void *args)
-{
- return (syscon_cd.cd_ndevs == 0);
-}
-
-void
-sysconattach(struct device *parent, struct device *self, void *args)
-{
- struct sysconsoftc *sc = (struct sysconsoftc *)self;
- int i;
-
- printf("\n");
-
- /*
- * Set up interrupt handlers.
- */
- for (i = 0; i < NINTSRC_SYSCON; i++)
- SLIST_INIT(&sysconintr_handlers[i]);
-
- /*
- * Clear SYSFAIL if lit.
- */
- *(volatile u_int32_t *)AV_UCSR |= UCSR_DRVSFBIT;
- *(volatile u_int32_t *)AV_CLRINT = ISTATE_SYSFAIL;
-
- sc->sc_abih.ih_fn = sysconabort;
- sc->sc_abih.ih_arg = 0;
- sc->sc_abih.ih_flags = INTR_WANTFRAME;
- sc->sc_abih.ih_ipl = IPL_ABORT;
-
- sc->sc_acih.ih_fn = sysconacfail;
- sc->sc_acih.ih_arg = 0;
- sc->sc_acih.ih_flags = INTR_WANTFRAME;
- sc->sc_acih.ih_ipl = IPL_ABORT;
-
- sc->sc_sfih.ih_fn = sysconsysfail;
- sc->sc_sfih.ih_arg = 0;
- sc->sc_sfih.ih_flags = INTR_WANTFRAME;
- sc->sc_sfih.ih_ipl = IPL_ABORT;
-
- sysconintr_establish(INTSRC_ABORT, &sc->sc_abih, "abort");
- sysconintr_establish(INTSRC_ACFAIL, &sc->sc_acih, "acfail");
- sysconintr_establish(INTSRC_SYSFAIL, &sc->sc_sfih, "sysfail");
-
- config_search(syscon_scan, self, args);
-}
-
-int
-syscon_scan(struct device *parent, void *child, void *args)
-{
- struct cfdata *cf = child;
- struct confargs oca, *ca = args;
-
- bzero(&oca, sizeof oca);
- oca.ca_iot = ca->ca_iot;
- oca.ca_offset = (paddr_t)cf->cf_loc[0];
- if (oca.ca_offset != (paddr_t)-1)
- oca.ca_paddr = ca->ca_paddr + oca.ca_offset;
- else
- oca.ca_paddr = (paddr_t)-1;
-
- if ((*cf->cf_attach->ca_match)(parent, cf, &oca) == 0)
- return (0);
-
- config_attach(parent, cf, &oca, syscon_print);
- return (1);
-}
-
-int
-syscon_print(void *args, const char *pnp)
-{
- struct confargs *ca = args;
-
- if (ca->ca_offset != (paddr_t)-1)
- printf(" offset 0x%lx", ca->ca_offset);
- return (UNCONF);
-}
-
-/*
- * Interrupt related code
- */
-
-intrhand_t sysconintr_handlers[NINTSRC_SYSCON];
-
-int
-sysconintr_establish(u_int intsrc, struct intrhand *ih, const char *name)
-{
- intrhand_t *list;
-
- list = &sysconintr_handlers[intsrc];
- if (!SLIST_EMPTY(list)) {
-#ifdef DIAGNOSTIC
- printf("%s: interrupt source %u already registered\n",
- __func__, intsrc);
-#endif
- return (EINVAL);
- }
-
- evcount_attach(&ih->ih_count, name, &ih->ih_ipl);
- SLIST_INSERT_HEAD(list, ih, ih_link);
-
- intsrc_enable(intsrc, ih->ih_ipl);
-
- return (0);
-}
-
-void
-sysconintr_disestablish(u_int intsrc, struct intrhand *ih)
-{
- intrhand_t *list;
-
- list = &sysconintr_handlers[intsrc];
- evcount_detach(&ih->ih_count);
- SLIST_REMOVE(list, ih, intrhand, ih_link);
-
- intsrc_disable(intsrc);
-}
-
-int
-sysconabort(void *eframe)
-{
- *(volatile u_int32_t *)AV_CLRINT = ISTATE_ABORT;
- nmihand(eframe);
- return (1);
-}
-
-int
-sysconsysfail(void *eframe)
-{
- *(volatile u_int32_t *)AV_CLRINT = ISTATE_SYSFAIL;
- printf("SYSFAIL* ASSERTED\n");
- return (1);
-}
-
-int
-sysconacfail(void *eframe)
-{
- *(volatile u_int32_t *)AV_CLRINT = ISTATE_ACFAIL;
- printf("ACFAIL* ASSERTED\n");
- return (1);
-}
diff --git a/sys/arch/aviion/dev/sysconvar.h b/sys/arch/aviion/dev/sysconvar.h
deleted file mode 100644
index b9883b31bfe..00000000000
--- a/sys/arch/aviion/dev/sysconvar.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* $OpenBSD: sysconvar.h,v 1.2 2010/04/21 19:33:47 miod Exp $ */
-
-/*
- * Copyright (c) 2007 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice, this permission notice, and the disclaimer below
- * appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-extern intrhand_t sysconintr_handlers[NINTSRC_SYSCON];
-
-int sysconintr_establish(u_int, struct intrhand *, const char *);
-void sysconintr_disestablish(u_int, struct intrhand *);
diff --git a/sys/arch/aviion/dev/vme.c b/sys/arch/aviion/dev/vme.c
deleted file mode 100644
index 229849f86be..00000000000
--- a/sys/arch/aviion/dev/vme.c
+++ /dev/null
@@ -1,1012 +0,0 @@
-/* $OpenBSD: vme.c,v 1.18 2015/02/10 22:42:35 miod Exp $ */
-/*
- * Copyright (c) 2006, 2007, 2010 Miodrag Vallat.
- *
- * 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.
- *
- * 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/systm.h>
-#include <sys/kernel.h>
-#include <sys/device.h>
-#include <sys/extent.h>
-#include <sys/malloc.h>
-#include <sys/proc.h>
-#include <sys/uio.h>
-
-#include <machine/board.h>
-#include <machine/bus.h>
-#include <machine/conf.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <aviion/dev/vmevar.h>
-
-#include <machine/avcommon.h>
-
-struct vme_softc {
- struct device sc_dev;
-
- struct extent *sc_ext_a16;
- struct extent *sc_ext_a24;
- struct extent *sc_ext_a32;
-
- const struct vme_range *sc_ranges;
-};
-
-int vmematch(struct device *, void *, void *);
-void vmeattach(struct device *, struct device *, void *);
-
-const struct cfattach vme_ca = {
- sizeof(struct vme_softc), vmematch, vmeattach
-};
-
-struct cfdriver vme_cd = {
- NULL, "vme", DV_DULL
-};
-
-/* minor device number encoding */
-#define AWIDTH_FIELD(minor) (minor & 0x0f)
-#define AWIDTH(w) ((w) << 3)
-#define DWIDTH_FIELD(minor) ((minor & 0xf0) >> 4)
-#define DWIDTH(w) ((w) << 3)
-
-uint16_t vme_d8_read_2(bus_space_tag_t, bus_space_handle_t, bus_size_t);
-void vme_d8_read_raw_2(bus_space_tag_t, bus_space_handle_t,
- bus_addr_t, uint8_t *, bus_size_t);
-void vme_d8_write_2(bus_space_tag_t, bus_space_handle_t, bus_size_t,
- uint16_t);
-void vme_d8_write_raw_2(bus_space_tag_t, bus_space_handle_t,
- bus_addr_t, const uint8_t *, bus_size_t);
-uint32_t vme_d8_read_4(bus_space_tag_t, bus_space_handle_t, bus_size_t);
-void vme_d8_write_4(bus_space_tag_t, bus_space_handle_t, bus_size_t,
- uint32_t);
-void vme_d8_read_raw_4(bus_space_tag_t, bus_space_handle_t,
- bus_addr_t, uint8_t *, bus_size_t);
-void vme_d8_write_raw_4(bus_space_tag_t, bus_space_handle_t,
- bus_addr_t, const uint8_t *, bus_size_t);
-
-uint32_t vme_d16_read_4(bus_space_tag_t, bus_space_handle_t, bus_size_t);
-void vme_d16_write_4(bus_space_tag_t, bus_space_handle_t, bus_size_t,
- uint32_t);
-void vme_d16_read_raw_4(bus_space_tag_t, bus_space_handle_t,
- bus_addr_t, uint8_t *, bus_size_t);
-void vme_d16_write_raw_4(bus_space_tag_t, bus_space_handle_t,
- bus_addr_t, const uint8_t *, bus_size_t);
-
-int vme_a16_map(bus_space_tag_t, bus_addr_t, bus_size_t, int,
- bus_space_handle_t *);
-void vme_a16_unmap(bus_space_tag_t, bus_space_handle_t, bus_size_t);
-int vme_a24_map(bus_space_tag_t, bus_addr_t, bus_size_t, int,
- bus_space_handle_t *);
-void vme_a24_unmap(bus_space_tag_t, bus_space_handle_t, bus_size_t);
-int vme_a32_map(bus_space_tag_t, bus_addr_t, bus_size_t, int,
- bus_space_handle_t *);
-void vme_a32_unmap(bus_space_tag_t, bus_space_handle_t, bus_size_t);
-int vme_subregion(bus_space_tag_t, bus_space_handle_t, bus_size_t,
- bus_size_t, bus_space_handle_t *);
-void * vme_vaddr(bus_space_tag_t, bus_space_handle_t);
-
-int vme_map(struct vme_softc *, struct extent *, u_int,
- bus_addr_t, bus_size_t, int, vaddr_t *);
-int vme_map_r(const struct vme_range *, paddr_t, psize_t, int, vm_prot_t,
- vaddr_t *);
-void vme_unmap(struct vme_softc *, struct extent *, u_int,
- vaddr_t, paddr_t, bus_size_t);
-int vmeprint(void *, const char *);
-int vmescan(struct device *, void *, void *);
-
-int vmerw(struct vme_softc *, int, int, struct uio *, int);
-
-int
-vmematch(struct device *parent, void *vcf, void *aux)
-{
- return (platform->get_vme_ranges() != NULL && vme_cd.cd_ndevs == 0);
-}
-
-void
-vmeattach(struct device *parent, struct device *self, void *aux)
-{
- struct vme_softc *sc = (struct vme_softc *)self;
- const struct vme_range *r;
- const char *fmt;
- u_int32_t ucsr;
- int i;
-
- /*
- * Set up interrupt handlers.
- */
- for (i = 0; i < NVMEINTR; i++)
- SLIST_INIT(&vmeintr_handlers[i]);
-
- /*
- * Initialize extents
- */
- sc->sc_ext_a16 = extent_create("vme a16", 0, 1 << (16 - PAGE_SHIFT),
- M_DEVBUF, NULL, 0, EX_NOWAIT);
- if (sc->sc_ext_a16 == NULL)
- goto out1;
- sc->sc_ext_a24 = extent_create("vme a24", 0, 1 << (24 - PAGE_SHIFT),
- M_DEVBUF, NULL, 0, EX_NOWAIT);
- if (sc->sc_ext_a24 == NULL)
- goto out2;
- sc->sc_ext_a32 = extent_create("vme a32", 0, 1 << (32 - PAGE_SHIFT),
- M_DEVBUF, NULL, 0, EX_NOWAIT);
- if (sc->sc_ext_a32 == NULL)
- goto out3;
-
- /*
- * Force a reasonable timeout for VME data transfers.
- * We can not disable this, this would cause autoconf to hang
- * on the first missing device we'll probe.
- */
- ucsr = *(volatile u_int32_t*)AV_UCSR;
- ucsr = (ucsr & ~VTOSELBITS) | VTO128US;
- *(volatile u_int32_t *)AV_UCSR = ucsr;
-
- /*
- * Clear EXTAD to allow VME A24 devices to access the first 16MB
- * of memory.
- */
- *(volatile u_int32_t *)AV_EXTAD = 0x00000000;
-
- /*
- * Use supervisor data address modifiers for VME accesses.
- */
- *(volatile u_int32_t *)AV_EXTAM = 0x0d;
-
- sc->sc_ranges = platform->get_vme_ranges();
- printf("\n");
-
- /*
- * Display VME ranges.
- */
- for (r = sc->sc_ranges; r->vr_width != 0; r++) {
- switch (r->vr_width) {
- default:
- case VME_A32:
- fmt = "%s: A32 %08x-%08x\n";
- break;
- case VME_A24:
- fmt = "%s: A24 %06x-%06x\n";
- break;
- case VME_A16:
- fmt = "%s: A16 %04x-%04x\n";
- break;
- }
- printf(fmt, self->dv_xname, r->vr_start, r->vr_end);
- }
-
- /* scan for child devices */
- config_search(vmescan, self, aux);
- return;
-
-out3:
- extent_destroy(sc->sc_ext_a24);
-out2:
- extent_destroy(sc->sc_ext_a16);
-out1:
- printf(": can't allocate memory\n");
-}
-
-int
-vmescan(struct device *parent, void *vcf, void *aux)
-{
- struct cfdata *cf = vcf;
- struct vme_attach_args vaa;
-
- bzero(&vaa, sizeof vaa);
- vaa.vaa_addr_a16 = (vme_addr_t)cf->cf_loc[0];
- vaa.vaa_addr_a24 = (vme_addr_t)cf->cf_loc[1];
- vaa.vaa_addr_a32 = (vme_addr_t)cf->cf_loc[2];
- vaa.vaa_ipl = (u_int)cf->cf_loc[3];
-
- if ((*cf->cf_attach->ca_match)(parent, cf, &vaa) == 0)
- return 0;
-
- config_attach(parent, cf, &vaa, vmeprint);
- return 1;
-}
-
-int
-vmeprint(void *aux, const char *pnp)
-{
- struct vme_attach_args *vaa = aux;
-
- if (vaa->vaa_addr_a16 != (vme_addr_t)-1)
- printf(" a16 0x%04x", vaa->vaa_addr_a16);
- if (vaa->vaa_addr_a24 != (vme_addr_t)-1)
- printf(" a24 0x%06x", vaa->vaa_addr_a24);
- if (vaa->vaa_addr_a32 != (vme_addr_t)-1)
- printf(" a32 0x%08x", vaa->vaa_addr_a32);
- if (vaa->vaa_ipl != (u_int)-1)
- printf(" ipl %u", vaa->vaa_ipl);
-
- return UNCONF;
-}
-
-/*
- * Interrupt related code
- */
-
-intrhand_t vmeintr_handlers[NVMEINTR];
-
-int
-vmeintr_allocate(u_int count, int flags, int ipl, u_int *array)
-{
- u_int vec, v;
- struct intrhand *ih;
-
- if (count > 1 && ISSET(flags, VMEINTR_CONTIGUOUS)) {
- /*
- * Try to find a range of count unused vectors first.
- * If there isn't, it is not possible to provide exclusive
- * contiguous vectors.
- */
- for (vec = 0; vec <= NVMEINTR - count; vec++) {
- for (v = count; v != 0; v--)
- if (!SLIST_EMPTY(&vmeintr_handlers[vec + v - 1]))
- break;
-
- if (v == 0) {
- for (v = 0; v < count; v++)
- *array++ = vec++;
- return (0);
- }
- }
- if (ISSET(flags, VMEINTR_EXCLUSIVE))
- return EPERM;
-
- /*
- * Try to find a range of count contiguous vectors,
- * sharing the level we intend to register at. If there
- * isn't, it is not possible to provide shared contiguous
- * vectors.
- */
- for (vec = 0; vec <= NVMEINTR - count; vec++) {
- for (v = count; v != 0; v--) {
- ih = SLIST_FIRST(&vmeintr_handlers[vec + v - 1]);
- if (ih == NULL)
- continue;
- if (ih->ih_ipl != ipl ||
- ISSET(ih->ih_flags, INTR_EXCLUSIVE))
- break;
- }
-
- if (v == 0) {
- for (v = 0; v < count; v++)
- *array++ = vec++;
- return 0;
- }
- }
- return EPERM;
- }
-
- /*
- * Pick as many unused vectors as possible.
- */
- for (vec = 0; vec < NVMEINTR; vec++) {
- if (SLIST_EMPTY(&vmeintr_handlers[vec])) {
- *array++ = vec;
- if (--count == 0)
- return 0;
- }
- }
-
- /*
- * There are not enough free vectors, so we'll have to share.
- */
- for (vec = 0; vec < NVMEINTR; vec++) {
- ih = SLIST_FIRST(&vmeintr_handlers[vec]);
- if (ih->ih_ipl == ipl && !ISSET(ih->ih_flags, INTR_EXCLUSIVE)) {
- *array++ = vec;
- if (--count == 0)
- return 0;
- }
- }
-
- /*
- * There are not enough vectors to share.
- */
- return EPERM;
-}
-
-int
-vmeintr_establish(u_int vec, struct intrhand *ih, const char *name)
-{
- struct intrhand *intr;
- intrhand_t *list;
-
- list = &vmeintr_handlers[vec];
- intr = SLIST_FIRST(list);
- if (intr != NULL) {
- if (intr->ih_ipl != ih->ih_ipl) {
-#ifdef DIAGNOSTIC
- printf("%s: can't use ipl %d for vector %x,"
- " it uses ipl %d\n",
- __func__, ih->ih_ipl, vec, intr->ih_ipl);
-#endif
- return EINVAL;
- }
- if (ISSET(intr->ih_flags, INTR_EXCLUSIVE) ||
- ISSET(ih->ih_flags, INTR_EXCLUSIVE)) {
-#ifdef DIAGNOSTIC
- printf("%s: can't share vector %x\n", __func__, vec);
-#endif
- return EINVAL;
- }
- }
-
- evcount_attach(&ih->ih_count, name, &ih->ih_ipl);
- SLIST_INSERT_HEAD(list, ih, ih_link);
-
- /*
- * Enable VME interrupt source for this level.
- */
- intsrc_enable(INTSRC_VME(ih->ih_ipl), ih->ih_ipl);
-
- return 0;
-}
-
-void
-vmeintr_disestablish(u_int vec, struct intrhand *ih)
-{
- struct intrhand *intr;
- intrhand_t *list;
-
- list = &vmeintr_handlers[vec];
- evcount_detach(&ih->ih_count);
- SLIST_REMOVE(list, ih, intrhand, ih_link);
-
- if (!SLIST_EMPTY(list))
- return;
-
- /*
- * Walk the interrupts table to check if this level needs
- * to be disabled.
- */
- for (vec = 0; vec < NVMEINTR; vec++) {
- intr = SLIST_FIRST(&vmeintr_handlers[vec]);
- if (intr != NULL && intr->ih_ipl == ih->ih_ipl)
- break;
- }
- if (vec == NVMEINTR)
- intsrc_disable(INTSRC_VME(ih->ih_ipl));
-}
-
-/*
- * bus_space specific functions
- */
-
-int
-vme_a16_map(bus_space_tag_t tag, bus_addr_t addr, bus_size_t size, int flags,
- bus_space_handle_t *ret)
-{
- struct vme_softc *sc = (void *)vme_cd.cd_devs[0];
- vaddr_t va;
- int rc;
-
- rc = vme_map(sc, sc->sc_ext_a16, VME_A16, addr, size, flags, &va);
- *ret = (bus_space_handle_t)va;
- return rc;
-}
-
-int
-vme_a24_map(bus_space_tag_t tag, bus_addr_t addr, bus_size_t size, int flags,
- bus_space_handle_t *ret)
-{
- struct vme_softc *sc = (void *)vme_cd.cd_devs[0];
- vaddr_t va;
- int rc;
-
- rc = vme_map(sc, sc->sc_ext_a24, VME_A24, addr, size, flags, &va);
- *ret = (bus_space_handle_t)va;
- return rc;
-}
-
-int
-vme_a32_map(bus_space_tag_t tag, bus_addr_t addr, bus_size_t size, int flags,
- bus_space_handle_t *ret)
-{
- struct vme_softc *sc = (void *)vme_cd.cd_devs[0];
- vaddr_t va;
- int rc;
-
- rc = vme_map(sc, sc->sc_ext_a32, VME_A32, addr, size, flags, &va);
- *ret = (bus_space_handle_t)va;
- return rc;
-}
-
-int
-vme_map(struct vme_softc *sc, struct extent *ext, u_int awidth,
- bus_addr_t addr, bus_size_t size, int flags, vaddr_t *rva)
-{
- const struct vme_range *r;
- int rc;
- paddr_t pa;
- psize_t offs, len;
-
- /*
- * Since we need to map VME address ranges on demand, we will allocate
- * with a page granularity.
- */
- pa = trunc_page(addr);
- offs = addr - pa;
- len = round_page(addr + size) - pa;
-
- /*
- * Check that the mapping fits within the available address ranges.
- */
- for (r = sc->sc_ranges; r->vr_width != 0; r++) {
- if (r->vr_width == awidth &&
- r->vr_start <= addr && r->vr_end >= addr + size - 1)
- break;
- }
- if (r->vr_width == 0)
- return EINVAL;
-
- /*
- * Register this range in the per-width extent.
- */
- if (ext != NULL) {
- rc = extent_alloc_region(ext, atop(pa), atop(len),
- EX_NOWAIT | EX_MALLOCOK);
- if (rc != 0)
- return rc;
- }
-
- /*
- * Allocate virtual memory for the range and map it.
- */
- rc = vme_map_r(r, pa, len, flags, PROT_READ | PROT_WRITE, rva);
- if (rc != 0) {
- if (ext != NULL)
- (void)extent_free(ext, atop(pa), atop(len),
- EX_NOWAIT | EX_MALLOCOK);
- return rc;
- }
-
- *rva += offs;
- return 0;
-}
-
-int
-vme_map_r(const struct vme_range *r, paddr_t pa, psize_t len, int flags,
- vm_prot_t prot, vaddr_t *rva)
-{
- vaddr_t ova, va;
- u_int pg;
-
- ova = va = uvm_km_valloc(kernel_map, len);
- if (va == 0)
- return ENOMEM;
-
- pa += r->vr_base;
- for (pg = atop(len); pg != 0; pg--) {
- pmap_kenter_pa(va, pa, prot);
- va += PAGE_SIZE;
- pa += PAGE_SIZE;
- }
- if (flags & BUS_SPACE_MAP_CACHEABLE)
- pmap_cache_ctrl(ova, ova + len, CACHE_GLOBAL);
- pmap_update(pmap_kernel());
-
- *rva = ova;
-
- return 0;
-}
-
-void
-vme_a16_unmap(bus_space_tag_t tag, bus_space_handle_t handle, bus_size_t size)
-{
- struct vme_softc *sc = (void *)vme_cd.cd_devs[0];
- vaddr_t va = (vaddr_t)handle;
- paddr_t pa;
-
- if (pmap_extract(pmap_kernel(), va, &pa) == FALSE)
- return;
-
- return vme_unmap(sc, sc->sc_ext_a16, VME_A16, va, pa, size);
-}
-
-void
-vme_a24_unmap(bus_space_tag_t tag, bus_space_handle_t handle, bus_size_t size)
-{
- struct vme_softc *sc = (void *)vme_cd.cd_devs[0];
- vaddr_t va = (vaddr_t)handle;
- paddr_t pa;
-
- if (pmap_extract(pmap_kernel(), va, &pa) == FALSE)
- return;
-
- return vme_unmap(sc, sc->sc_ext_a24, VME_A24, va, pa, size);
-}
-
-void
-vme_a32_unmap(bus_space_tag_t tag, bus_space_handle_t handle, bus_size_t size)
-{
- struct vme_softc *sc = (void *)vme_cd.cd_devs[0];
- vaddr_t va = (vaddr_t)handle;
- paddr_t pa;
-
- if (pmap_extract(pmap_kernel(), va, &pa) == FALSE)
- return;
-
- return vme_unmap(sc, sc->sc_ext_a32, VME_A32, va, pa, size);
-}
-
-void
-vme_unmap(struct vme_softc *sc, struct extent *ext, u_int awidth,
- vaddr_t vaddr, paddr_t paddr, bus_size_t size)
-{
- const struct vme_range *r;
- vaddr_t va;
- paddr_t pa, addr;
- psize_t len;
-
- va = trunc_page(vaddr);
- pa = trunc_page(paddr);
- len = round_page(paddr + size) - pa;
-
- /*
- * Retrieve the address range this mapping comes from.
- */
- for (r = sc->sc_ranges; r->vr_width != 0; r++) {
- if (r->vr_width != awidth)
- continue;
- addr = paddr - r->vr_base;
- if (r->vr_width == awidth &&
- r->vr_start <= addr && r->vr_end >= addr + size - 1)
- break;
- }
- if (r->vr_width == 0) {
-#ifdef DIAGNOSTIC
- printf("%s: nonsensical A%d mapping at va 0x%08lx pa 0x%08lx\n",
- __func__, AWIDTH(awidth), vaddr, paddr);
-#endif
- return;
- }
-
- /*
- * Undo the mapping.
- */
- pmap_kremove(va, len);
- pmap_update(pmap_kernel());
- uvm_km_free(kernel_map, va, len);
-
- /*
- * Unregister mapping.
- */
- if (ext != NULL) {
- pa -= r->vr_base;
- extent_free(ext, atop(pa), atop(len), EX_NOWAIT | EX_MALLOCOK);
- }
-}
-
-int
-vme_subregion(bus_space_tag_t tag, bus_space_handle_t handle, bus_addr_t offset,
- bus_size_t size, bus_space_handle_t *ret)
-{
- /* since vme_map produces linear mappings, this is safe */
- /* XXX does not check range overflow */
- *ret = handle + offset;
- return 0;
-}
-
-void *
-vme_vaddr(bus_space_tag_t tag, bus_space_handle_t handle)
-{
- return (void *)handle;
-}
-
-/*
- * D8 access routines
- */
-
-uint16_t
-vme_d8_read_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
-{
- volatile uint8_t *addr = (volatile uint8_t *)(h + o);
- return ((uint16_t)addr[0] << 8) | ((uint16_t)addr[1]);
-}
-
-uint32_t
-vme_d8_read_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
-{
- volatile uint8_t *addr = (volatile uint8_t *)(h + o);
- return ((uint32_t)addr[0] << 24) | ((uint32_t)addr[1] << 16) |
- ((uint32_t)addr[2] << 8) | ((uint32_t)addr[3]);
-}
-
-void
-vme_d8_write_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint16_t v)
-{
- volatile uint8_t *addr = (volatile uint8_t *)(h + o);
- addr[0] = v >> 8;
- addr[1] = v;
-}
-
-void
-vme_d8_write_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint32_t v)
-{
- volatile uint8_t *addr = (volatile uint8_t *)(h + o);
- addr[0] = v >> 24;
- addr[1] = v >> 16;
- addr[2] = v >> 8;
- addr[3] = v;
-}
-
-void
-vme_d8_read_raw_2(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
- uint8_t *buf, bus_size_t len)
-{
- len >>= 1;
- while (len-- != 0) {
- *(uint16_t *)buf = vme_d8_read_2(t, h, o);
- buf += 2;
- }
-}
-
-void
-vme_d8_write_raw_2(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
- const uint8_t *buf, bus_size_t len)
-{
- len >>= 1;
- while (len-- != 0) {
- vme_d8_write_2(t, h, o, *(uint16_t *)buf);
- buf += 2;
- }
-}
-
-void
-vme_d8_read_raw_4(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
- uint8_t *buf, bus_size_t len)
-{
- len >>= 2;
- while (len-- != 0) {
- *(uint32_t *)buf = vme_d8_read_4(t, h, o);
- buf += 4;
- }
-}
-
-void
-vme_d8_write_raw_4(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
- const uint8_t *buf, bus_size_t len)
-{
- len >>= 2;
- while (len-- != 0) {
- vme_d8_write_4(t, h, o, *(uint32_t *)buf);
- buf += 4;
- }
-}
-/*
- * D16 access routines
- */
-
-uint32_t
-vme_d16_read_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
-{
- volatile uint16_t *addr = (volatile uint16_t *)(h + o);
- return ((uint32_t)addr[0] << 16) | ((uint32_t)addr[1]);
-}
-
-void
-vme_d16_write_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
- uint32_t v)
-{
- volatile uint16_t *addr = (volatile uint16_t *)(h + o);
- addr[0] = v >> 16;
- addr[1] = v;
-}
-
-void
-vme_d16_read_raw_4(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
- uint8_t *buf, bus_size_t len)
-{
- len >>= 2;
- while (len-- != 0) {
- *(uint32_t *)buf = vme_d16_read_4(t, h, o);
- buf += 4;
- }
-}
-
-void
-vme_d16_write_raw_4(bus_space_tag_t t, bus_space_handle_t h, bus_addr_t o,
- const uint8_t *buf, bus_size_t len)
-{
- len >>= 2;
- while (len-- != 0) {
- vme_d16_write_4(t, h, o, *(uint32_t *)buf);
- buf += 4;
- }
-}
-
-/*
- * Get a bus_space_tag for the requested address and data access modes.
- */
-int
-vmebus_get_bst(struct device *vsc, u_int aspace, u_int dspace,
- bus_space_tag_t *bst)
-{
- struct aviion_bus_space_tag *tag;
-
- switch (dspace) {
- case VME_D32:
- case VME_D16:
- case VME_D8:
- break;
- default:
- return EINVAL;
- }
-
- switch (aspace) {
- case VME_A32:
- case VME_A24:
- case VME_A16:
- break;
- default:
- return EINVAL;
- }
-
- tag = (struct aviion_bus_space_tag *)malloc(sizeof *tag, M_DEVBUF,
- M_NOWAIT);
- if (tag == NULL)
- return ENOMEM;
-
- switch (aspace) {
- default:
- case VME_A32:
- tag->_space_map = vme_a32_map;
- tag->_space_unmap = vme_a32_unmap;
- break;
- case VME_A24:
- tag->_space_map = vme_a24_map;
- tag->_space_unmap = vme_a24_unmap;
- break;
- case VME_A16:
- tag->_space_map = vme_a16_map;
- tag->_space_unmap = vme_a16_unmap;
- break;
- }
-
- tag->_space_subregion = vme_subregion;
- tag->_space_vaddr = vme_vaddr;
- tag->_space_read_1 = generic_space_read_1;
- tag->_space_write_1 = generic_space_write_1;
-
- switch (dspace) {
- default:
- case VME_D32:
- tag->_space_read_2 = generic_space_read_2;
- tag->_space_write_2 = generic_space_write_2;
- tag->_space_read_4 = generic_space_read_4;
- tag->_space_write_4 = generic_space_write_4;
- tag->_space_read_raw_2 = generic_space_read_raw_2;
- tag->_space_write_raw_2 = generic_space_write_raw_2;
- tag->_space_read_raw_4 = generic_space_read_raw_4;
- tag->_space_write_raw_4 = generic_space_write_raw_4;
- break;
- case VME_D16:
- tag->_space_read_2 = generic_space_read_2;
- tag->_space_write_2 = generic_space_write_2;
- tag->_space_read_4 = vme_d16_read_4;
- tag->_space_write_4 = vme_d16_write_4;
- tag->_space_read_raw_2 = generic_space_read_raw_2;
- tag->_space_write_raw_2 = generic_space_write_raw_2;
- tag->_space_read_raw_4 = vme_d16_read_raw_4;
- tag->_space_write_raw_4 = vme_d16_write_raw_4;
- break;
- case VME_D8:
- tag->_space_read_2 = vme_d8_read_2;
- tag->_space_write_2 = vme_d8_write_2;
- tag->_space_read_4 = vme_d8_read_4;
- tag->_space_write_4 = vme_d8_write_4;
- tag->_space_read_raw_2 = vme_d8_read_raw_2;
- tag->_space_write_raw_2 = vme_d8_write_raw_2;
- tag->_space_read_raw_4 = vme_d8_read_raw_4;
- tag->_space_write_raw_4 = vme_d8_write_raw_4;
- break;
- }
-
- *bst = tag;
- return 0;
-}
-
-void
-vmebus_release_bst(struct device *vsc, bus_space_tag_t b)
-{
- free((void *)b, M_DEVBUF, sizeof(struct aviion_bus_space_tag));
-}
-
-/*
- * /dev/vme* access routines
- */
-
-int
-vmeopen(dev_t dev, int flags, int type, struct proc *p)
-{
- struct vme_softc *sc;
-
- if (minor(dev) >= vme_cd.cd_ndevs ||
- (sc = vme_cd.cd_devs[minor(dev)]) == NULL)
- return ENODEV;
-
- if (sc->sc_ranges == NULL) /* failed attach */
- return ENODEV;
-
- switch (AWIDTH_FIELD(minor(dev))) {
- case VME_A32:
- case VME_A24:
- case VME_A16:
- break;
- default:
- return ENODEV;
- }
-
- switch (DWIDTH_FIELD(minor(dev))) {
- case VME_D32:
- case VME_D16:
- case VME_D8:
- break;
- default:
- return ENODEV;
- }
-
- return 0;
-}
-
-int
-vmeclose(dev_t dev, int flags, int type, struct proc *p)
-{
- return 0;
-}
-
-int
-vmeread(dev_t dev, struct uio *uio, int flags)
-{
- struct vme_softc *sc;
- int awidth, dwidth;
-
- sc = vme_cd.cd_devs[minor(dev)];
- awidth = AWIDTH_FIELD(minor(dev));
- dwidth = DWIDTH_FIELD(minor(dev));
-
- return vmerw(sc, awidth, dwidth, uio, flags);
-}
-
-int
-vmewrite(dev_t dev, struct uio *uio, int flags)
-{
- struct vme_softc *sc;
- int awidth, dwidth;
-
- sc = vme_cd.cd_devs[minor(dev)];
- awidth = AWIDTH_FIELD(minor(dev));
- dwidth = DWIDTH_FIELD(minor(dev));
-
- return vmerw(sc, awidth, dwidth, uio, flags);
-}
-
-int
-vmerw(struct vme_softc *sc, int awidth, int dwidth, struct uio *uio, int flags)
-{
- const struct vme_range *r;
- struct iovec *iov;
- psize_t delta, len;
- vaddr_t vmepg;
- int rc = 0;
-
- while (uio->uio_resid > 0) {
- iov = uio->uio_iov;
- if (iov->iov_len == 0) {
- uio->uio_iov++;
- uio->uio_iovcnt--;
- if (uio->uio_iovcnt < 0)
- panic("bogus uio %p", uio);
- continue;
- }
-
- /*
- * Figure out which range we will be working on;
- * if we hit the end of a range we'll report EFAULT.
- */
- for (r = sc->sc_ranges; r->vr_width != 0; r++) {
- if (r->vr_width != awidth)
- continue;
- if ((off_t)r->vr_start <= uio->uio_offset &&
- (off_t)r->vr_end >= uio->uio_offset)
- break;
- }
- if (r->vr_width == 0) {
- rc = EFAULT; /* outside any valid range */
- break;
- }
-
- delta = uio->uio_offset & PAGE_MASK;
- len = ulmin(uio->uio_resid, PAGE_SIZE - delta);
- /* len = ulmin(len, (off_t)r->vr_end - uio->uio_offset); */
-
- rc = vme_map_r(r, trunc_page(uio->uio_offset), PAGE_SIZE, 0,
- uio->uio_rw == UIO_READ ? PROT_READ : PROT_READ | PROT_WRITE,
- &vmepg);
- if (rc != 0)
- break;
-
- /* XXX wrap this because of dwidth */
- rc = uiomove((caddr_t)vmepg + delta, len, uio);
-
- /* inline vme_unmap */
- pmap_kremove(vmepg, PAGE_SIZE);
- pmap_update(pmap_kernel());
- uvm_km_free(kernel_map, vmepg, PAGE_SIZE);
-
- if (rc != 0)
- break;
-
- iov->iov_base += len;
- iov->iov_len -= len;
- uio->uio_offset += len;
- uio->uio_resid -= len;
- }
-
- return rc;
-}
-
-int
-vmeioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
-{
- switch (cmd) {
- default:
- return ENOTTY;
- }
-}
-
-paddr_t
-vmemmap(dev_t dev, off_t off, int prot)
-{
- struct vme_softc *sc;
- const struct vme_range *r;
- int awidth;
-
- sc = vme_cd.cd_devs[minor(dev)];
- awidth = AWIDTH_FIELD(minor(dev));
-
- if ((off & PAGE_MASK) != 0)
- return -1;
-
- /*
- * Figure out which range we will be working on.
- */
- for (r = sc->sc_ranges; r->vr_width != 0; r++) {
- if (r->vr_width != awidth)
- continue;
- if ((off_t)r->vr_start <= off &&
- (off_t)r->vr_end >= off)
- break;
- }
- if (r->vr_width == 0)
- return -1;
-
- return r->vr_base + (paddr_t)off;
-}
diff --git a/sys/arch/aviion/dev/vmevar.h b/sys/arch/aviion/dev/vmevar.h
deleted file mode 100644
index 3d30a2d5b00..00000000000
--- a/sys/arch/aviion/dev/vmevar.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* $OpenBSD: vmevar.h,v 1.4 2010/04/21 19:33:47 miod Exp $ */
-/*
- * Copyright (c) 2006, 2007, Miodrag Vallat
- *
- * 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.
- *
- * 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.
- */
-
-#ifndef _AVIION_VME_H_
-#define _AVIION_VME_H_
-
-typedef u_int32_t vme_addr_t;
-
-/*
- * VME address and data widths
- */
-
-#define VME_A32 0x04 /* 100..000 */
-#define VME_A24 0x03 /* 011..000 */
-#define VME_A16 0x02 /* 010..000 */
-#define VME_D32 0x04 /* 100..000 */
-#define VME_D16 0x02 /* 010..000 */
-#define VME_D8 0x01 /* 001..000 */
-
-/*
- * VME address range
- */
-
-struct vme_range {
- u_int vr_width;
- vme_addr_t vr_start;
- vme_addr_t vr_end;
- paddr_t vr_base;
-};
-
-/*
- * Attachment information for VME devices.
- *
- * Drivers are supposed to do their interrupt vector allocation
- * themselves.
- */
-struct vme_attach_args {
- /* address locators */
- vme_addr_t vaa_addr_a16;
- vme_addr_t vaa_addr_a24;
- vme_addr_t vaa_addr_a32;
- /* interrupt level if specified */
- u_int vaa_ipl;
-};
-
-/*
- * There are 256 possible vectors for VME devices.
- * One or more vectors may be allocated by vmeintr_allocate(), and then
- * each vector is setup with vmeintr_establish(). Nothing is done to
- * prevent the vector to be used in-between, so make sure no interrupt
- * can occur between the vector allocation and the interrupt handler
- * registration.
- */
-#define NVMEINTR 256
-extern intrhand_t vmeintr_handlers[NVMEINTR];
-
-int vmeintr_allocate(u_int, int, int, u_int *);
-#define VMEINTR_ANY 0x00 /* any vector will do */
-#define VMEINTR_CONTIGUOUS 0x01 /* allocate a contiguous range */
-#define VMEINTR_SHARED 0x00 /* sharing is ok */
-#define VMEINTR_EXCLUSIVE 0x02 /* do not share this vector */
-void vmeintr_disestablish(u_int, struct intrhand *);
-int vmeintr_establish(u_int, struct intrhand *, const char *);
-
-/*
- * VME device drivers need to obtain their bus_space_tag_t with
- * vmebus_get_bst(), specifying the address and data width to use for
- * bus accesses.
- * Resources associated to the tag can be released with vmebus_release_bst()
- * when bus accesses are no longer necessary.
- */
-int vmebus_get_bst(struct device *, u_int, u_int, bus_space_tag_t *);
-void vmebus_release_bst(struct device *, bus_space_tag_t);
-
-#endif /* _AVIION_VME_H_ */
diff --git a/sys/arch/aviion/include/_float.h b/sys/arch/aviion/include/_float.h
deleted file mode 100644
index f372beaa892..00000000000
--- a/sys/arch/aviion/include/_float.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: _float.h,v 1.1 2012/06/26 16:12:43 deraadt Exp $ */
-
-#include <m88k/_float.h>
diff --git a/sys/arch/aviion/include/_types.h b/sys/arch/aviion/include/_types.h
deleted file mode 100644
index a0d494de320..00000000000
--- a/sys/arch/aviion/include/_types.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* $OpenBSD: _types.h,v 1.4 2012/11/05 19:39:34 miod Exp $ */
-
-/* public domain */
-#include <m88k/_types.h>
diff --git a/sys/arch/aviion/include/asm.h b/sys/arch/aviion/include/asm.h
deleted file mode 100644
index 6718fd7d0ed..00000000000
--- a/sys/arch/aviion/include/asm.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: asm.h,v 1.1.1.1 2006/04/18 10:56:59 miod Exp $ */
-/* public domain */
-#include <m88k/asm.h>
diff --git a/sys/arch/aviion/include/asm_macro.h b/sys/arch/aviion/include/asm_macro.h
deleted file mode 100644
index 4ee7243850a..00000000000
--- a/sys/arch/aviion/include/asm_macro.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: asm_macro.h,v 1.1.1.1 2006/04/18 10:56:59 miod Exp $ */
-/* public domain */
-#include <m88k/asm_macro.h>
diff --git a/sys/arch/aviion/include/atomic.h b/sys/arch/aviion/include/atomic.h
deleted file mode 100644
index 860cfdf9638..00000000000
--- a/sys/arch/aviion/include/atomic.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* $OpenBSD: atomic.h,v 1.3 2011/03/23 16:54:34 pirofti Exp $ */
-
-/* Public Domain */
-
-#ifndef _MACHINE_ATOMIC_H_
-#define _MACHINE_ATOMIC_H_
-
-#include <m88k/atomic.h>
-
-#endif /* _MACHINE_ATOMIC_H_ */
diff --git a/sys/arch/aviion/include/autoconf.h b/sys/arch/aviion/include/autoconf.h
deleted file mode 100644
index 87c4fac0de6..00000000000
--- a/sys/arch/aviion/include/autoconf.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* $OpenBSD: autoconf.h,v 1.3 2013/10/10 21:24:59 miod Exp $ */
-/*
- * Copyright (c) 1999, 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.
- *
- */
-/*
- * Autoconfiguration information.
- */
-
-#ifndef _MACHINE_AUTOCONF_H_
-#define _MACHINE_AUTOCONF_H_
-
-#include <machine/bus.h>
-
-struct confargs {
- bus_space_tag_t ca_iot;
- paddr_t ca_paddr; /* physical address */
- paddr_t ca_offset; /* offset from parent */
- u_int ca_ipl; /* interrupt level */
-};
-
-void cmdline_parse(void);
-void myetheraddr(u_char *);
-
-extern char bootargs[256];
-
-#endif
diff --git a/sys/arch/aviion/include/av400.h b/sys/arch/aviion/include/av400.h
deleted file mode 100644
index f680189fa6e..00000000000
--- a/sys/arch/aviion/include/av400.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/* $OpenBSD: av400.h,v 1.10 2013/10/10 21:24:59 miod Exp $ */
-/*
- * Copyright (c) 1999 Steve Murphree, Jr.
- * 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 Steve Murphree, Jr.
- * 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.
- *
- */
-
-#ifndef _MACHINE_AV400_H_
-#define _MACHINE_AV400_H_
-
-#define AV400_PROM 0xffc00000
-#define AV400_PROM_SIZE 0x00200000
-#define AV400_SRAM 0xffe00000
-#define AV400_SRAM_SIZE 0x00020000
-#define AV400_UTILITY 0xfff00000
-#define AV400_UTILITY_SIZE 0x00100000
-
-/*
- * AV400 VME mappings
- */
-
-#define AV400_VME32_BASE 0x00000000
-#define AV400_VME32_START1 0x10000000
-#define AV400_VME32_END1 0x7fffffff
-#define AV400_VME32_START2 0x90000000
-#define AV400_VME32_END2 0xfdffffff
-#define AV400_VME24_BASE 0xfe000000
-#define AV400_VME24_START 0x00000000
-#define AV400_VME24_END 0x00ffffff
-#define AV400_VME16_BASE 0xffff0000
-#define AV400_VME16_START 0x00000000
-#define AV400_VME16_END 0x0000ffff
-
-/*
- * AV400 declarations for hardware level device registers and such.
- */
-
-#define AV400_SETSWI 0xfff84080 /* generate soft interrupt */
-#define AV400_CLRSWI 0xfff84084 /* reset soft interrupt */
-
-#define AV400_VIRQLV 0xfff85000
-#define AV400_VIACK1V 0xfff85004
-#define AV400_VIACK2V 0xfff85008
-#define AV400_VIACK3V 0xfff8500c
-#define AV400_VIACK4V 0xfff85010
-#define AV400_VIACK5V 0xfff85014
-#define AV400_VIACK6V 0xfff85018
-#define AV400_VIACK7V 0xfff8501c
-#define AV400_VIRQV 0xfff85020
-
-/*
- * IEN and IST register bits
- * See ``Programming System control and I/O registers for the 100, 200, 300,
- * 400, 3000 and 4000 series'', section 3 (Interrupts).
- */
-
-#define AV400_IRQ_RESERVED 0x1800018c /* all reserved bits */
-#define AV400_IRQ_ABORT 0x80000000 /* 31 - Abort */
-#define AV400_IRQ_ACF 0x40000000 /* 30 - AC Fail */
-#define AV400_IRQ_ARBTO 0x20000000 /* 29 - VME Arbiter Timeout */
-#define AV400_IRQ_ZBUF 0x04000000 /* 26 - Z Buffer */
-#define AV400_IRQ_VID 0x02000000 /* 25 - Video */
-#define AV400_IRQ_PAR 0x01000000 /* 24 - Parity Error */
-#define AV400_IRQ_VME7 0x00800000 /* 23 - VMEBus level 7 */
-#define AV400_IRQ_KBD 0x00400000 /* 22 - Keyboard */
-#define AV400_IRQ_CIOI 0x00200000 /* 21 - CIO */
-#define AV400_IRQ_SF 0x00100000 /* 20 - System Failure */
-#define AV400_IRQ_VME6 0x00080000 /* 19 - VMEBus level 6 */
-#define AV400_IRQ_PPI 0x00040000 /* 18 - Parallel Port */
-#define AV400_IRQ_DI1 0x00020000 /* 17 - DUART1 */
-#define AV400_IRQ_DI2 0x00010000 /* 16 - DUART2 */
-#define AV400_IRQ_ECI 0x00008000 /* 15 - Ethernet Controller */
-#define AV400_IRQ_VME5 0x00004000 /* 14 - VMEBus level 5 */
-#define AV400_IRQ_DTC 0x00002000 /* 13 - DMA Terminal Count */
-#define AV400_IRQ_VME4 0x00001000 /* 12 - VMEBus level 4 */
-#define AV400_IRQ_DWP 0x00000800 /* 11 - DMA Write Protect */
-#define AV400_IRQ_VME3 0x00000400 /* 10 - VMEBus level 3 */
-#define AV400_IRQ_DVB 0x00000200 /* 09 - DMA Valid Bit */
-#define AV400_IRQ_VME2 0x00000040 /* 06 - VMEBus level 2 */
-#define AV400_IRQ_SCI 0x00000020 /* 05 - SCSI Controller */
-#define AV400_IRQ_VME1 0x00000010 /* 04 - VMEBus level 1 */
-#define AV400_IRQ_SWI1 0x00000002 /* 01 - SW Interrupt level 1 */
-#define AV400_IRQ_SWI0 0x00000001 /* 00 - SW Interrupt level 0 */
-
-#define AV400_IST_STRING "\20" \
- "\40ABRT\37ACF\36ARBTO\33ZBUF\32VID\31PAR" \
- "\30IRQ7\27KBD\26CIOI\25SF\24IRQ6\23PPI\22DI1\21DI2" \
- "\20ECI\17IRQ5\16DTC\15IRQ4\14DWP\13IRQ3\12DVB" \
- "\7IRQ2\6SCI\5IRQ1\2SWI1\1SWI0"
-
-/*
- * Onboard device addresses
- */
-
-#define AV400_SCSI 0xfff8a000
-#define AV400_LAN 0xfff8c000
-
-/*
- * CMMU addresses
- */
-
-#define AV400_CMMU_D0 0xfff00000
-#define AV400_CMMU_I0 0xfff01000
-#define AV400_CMMU_D1 0xfff02000
-#define AV400_CMMU_I1 0xfff03000
-#define AV400_CMMU_D2 0xfff04000
-#define AV400_CMMU_I2 0xfff05000
-#define AV400_CMMU_D3 0xfff06000
-#define AV400_CMMU_I3 0xfff07000
-
-#endif /* _MACHINE_AV400_H_ */
diff --git a/sys/arch/aviion/include/av530.h b/sys/arch/aviion/include/av530.h
deleted file mode 100644
index ebe2bf710b4..00000000000
--- a/sys/arch/aviion/include/av530.h
+++ /dev/null
@@ -1,245 +0,0 @@
-/* $OpenBSD: av530.h,v 1.5 2013/09/24 20:14:35 miod Exp $ */
-/*
- * Copyright (c) 2006, 2010 Miodrag Vallat
- *
- * 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.
- *
- * 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.
- */
-
-#ifndef _MACHINE_AV530_H_
-#define _MACHINE_AV530_H_
-
-#define AV530_PROM 0xffc00000
-#define AV530_PROM_SIZE 0x00080000
-#define AV530_UTILITY 0xfff00000
-#define AV530_UTILITY_SIZE 0x00100000
-
-/*
- * AV530 VME mappings
- */
-
-#define AV530_VME32_BASE 0x00000000
-#define AV530_VME32_START1 0x40000000
-#define AV530_VME32_END1 0x7fffffff
-#define AV530_VME32_START2 0x90000000
-#define AV530_VME32_END2 0xfdffffff
-#define AV530_VME24_BASE 0xfe000000
-#define AV530_VME24_START 0x00000000
-#define AV530_VME24_END 0x00ffffff
-#define AV530_VME16_BASE 0xffff0000
-#define AV530_VME16_START 0x00000000
-#define AV530_VME16_END 0x0000ffff
-
-/*
- * AV530 declarations for hardware level device registers and such.
- */
-
-#define AV530_SETSWI 0xfff84080 /* generate soft interrupt */
-#define AV530_CLRSWI 0xfff84084 /* reset soft interrupt */
-
-#define AV530_VIRQLV 0xfff85000
-#define AV530_VIACK1V 0xfff85004
-#define AV530_VIACK2V 0xfff85008
-#define AV530_VIACK3V 0xfff8500c
-#define AV530_VIACK4V 0xfff85010
-#define AV530_VIACK5V 0xfff85014
-#define AV530_VIACK6V 0xfff85018
-#define AV530_VIACK7V 0xfff8501c
-#define AV530_VIRQV 0xfff85020
-
-/*
- * IEN and IST register bits
- * See ``Programming System Control and I/O Registers: AViiON 4600 and
- * 530 series'', section 3 (Interrupts).
- */
-
-#define AV530_IRQ_RESERVED 0x0020aa00 /* all reserved bits */
-#define AV530_IRQ_ABORT 0x80000000 /* 31 - Abort */
-#define AV530_IRQ_ACF 0x40000000 /* 30 - AC Fail */
-#define AV530_IRQ_ARBTO 0x20000000 /* 29 - VME Arbiter Timeout */
-#define AV530_IRQ_DTI 0x10000000 /* 28 - DUART Timer Interrupt */
-#define AV530_IRQ_SWI7 0x08000000 /* 27 - SW Interrupt level 7 */
-#define AV530_IRQ_SWI6 0x04000000 /* 26 - SW Interrupt level 6 */
-#define AV530_IRQ_SWI5 0x02000000 /* 25 - SW Interrupt level 5 */
-#define AV530_IRQ_SWI4 0x01000000 /* 24 - SW Interrupt level 4 */
-#define AV530_IRQ_VME7 0x00800000 /* 23 - VMEBus level 7 */
-#define AV530_IRQ_KBD 0x00400000 /* 22 - Keyboard */
-#define AV530_IRQ_SF 0x00100000 /* 20 - System Failure */
-#define AV530_IRQ_VME6 0x00080000 /* 19 - VMEBus level 6 */
-#define AV530_IRQ_MEM 0x00040000 /* 18 - Memory Error */
-#define AV530_IRQ_DI 0x00020000 /* 17 - DUART */
-#define AV530_IRQ_SIGHPI 0x00010000 /* 16 - SIGHPI */
-#define AV530_IRQ_VME5 0x00004000 /* 14 - VMEBus level 5 */
-#define AV530_IRQ_VME4 0x00001000 /* 12 - VMEBus level 4 */
-#define AV530_IRQ_VME3 0x00000400 /* 10 - VMEBus level 3 */
-#define AV530_IRQ_LMI 0x00000100 /* 08 - Location Monitor */
-#define AV530_IRQ_SIGLPI 0x00000080 /* 07 - SIGLPI */
-#define AV530_IRQ_VME2 0x00000040 /* 06 - VMEBus level 2 */
-#define AV530_IRQ_VME1 0x00000010 /* 04 - VMEBus level 1 */
-#define AV530_IRQ_SWI3 0x00000008 /* 03 - SW Interrupt level 3 */
-#define AV530_IRQ_SWI2 0x00000004 /* 02 - SW Interrupt level 2 */
-#define AV530_IRQ_SWI1 0x00000002 /* 01 - SW Interrupt level 1 */
-#define AV530_IRQ_SWI0 0x00000001 /* 00 - SW Interrupt level 0 */
-
-#define AV530_IST_STRING "\20" \
- "\40ABRT\37ACF\36ARBTO\35DTI\34SWI7\33SWI6\32SWI5\31SWI4" \
- "\30IRQ7\27KBD\25SF\24IRQ6\23MEM\22DI\21SIGHPI" \
- "\17IRQ5\15IRQ4\13IRQ3\11LMI" \
- "\10SIGLPI\7IRQ2\5IRQ1\4SWI3\3SWI2\2SWI1\1SWI0"
-
-/*
- * Software interrupts 0 to 3, and 4 to 7, are used to deliver IPIs to
- * CPU0-3. We use two software interrupts per CPU because we want clock
- * IPIs to be maskable.
- */
-#define AV530_CLOCK_IPI_MASK (AV530_IRQ_SWI7 | AV530_IRQ_SWI6 | \
- AV530_IRQ_SWI5 | AV530_IRQ_SWI4)
-#define AV530_IPI_MASK (AV530_IRQ_SWI3 | AV530_IRQ_SWI2 | \
- AV530_IRQ_SWI1 | AV530_IRQ_SWI0)
-/* values for SETSWI and CLRSWI registers */
-#define AV530_SWI_IPI_BIT(cpu) (0x01 << (cpu))
-#define AV530_SWI_CLOCK_IPI_BIT(cpu) (0x10 << (cpu))
-/* values for IEN and IST registers */
-#define AV530_SWI_IPI_MASK(cpu) (AV530_IRQ_SWI0 << (cpu))
-#define AV530_SWI_CLOCK_IPI_MASK(cpu) (AV530_IRQ_SWI4 << (cpu))
-
-/*
- * Extended interrupts
- */
-
-#define AV_EXIEN_BASE 0xfff8e000
-#define AV_EXIEN0 0xfff8e004
-#define AV_EXIEN1 0xfff8e008
-#define AV_EXIEN2 0xfff8e010
-#define AV_EXIEN3 0xfff8e020
-#define AV_EXIENALL 0xfff8e03c
-#define AV_EXIEN(cpu) (AV_EXIEN_BASE + (4 << (cpu)))
-
-#define AV_EXIST 0xfff8e040
-
-/*
- * EXIEN and EXIST register bits
- * See ``Programming System Control and I/O Registers: AViiON 4600 and
- * 530 series'', section 3 (Interrupts).
- */
-
-#define AV530_EXIRQ_RESERVED 0x04000e9f /* all reserved bits */
-#define AV530_EXIRQ_RTCOF 0x80000000 /* 31 - RTC Overflow */
-#define AV530_EXIRQ_PIT3OF 0x40000000 /* 30 - PIT 3 Overflow */
-#define AV530_EXIRQ_PIT2OF 0x20000000 /* 29 - PIT 2 Overflow */
-#define AV530_EXIRQ_PIT1OF 0x10000000 /* 28 - PIT 1 Overflow */
-#define AV530_EXIRQ_PIT0OF 0x08000000 /* 27 - PIT 0 Overflow */
-#define AV530_EXIRQ_DMA4C 0x02000000 /* 25 - DMA4 Channel Complete */
-#define AV530_EXIRQ_DMA3C 0x01000000 /* 24 - DMA3 Channel Complete */
-#define AV530_EXIRQ_DMA2C 0x00800000 /* 23 - DMA2 Channel Complete */
-#define AV530_EXIRQ_DMA1C 0x00400000 /* 22 - DMA1 Channel Complete */
-#define AV530_EXIRQ_DMA0C 0x00200000 /* 21 - DMA0 Channel Complete */
-#define AV530_EXIRQ_SCC 0x00100000 /* 20 - SCC */
-#define AV530_EXIRQ_LAN0 0x00080000 /* 19 - Ethernet 0 */
-#define AV530_EXIRQ_LAN1 0x00040000 /* 18 - Ethernet 1 */
-#define AV530_EXIRQ_SCSI0 0x00020000 /* 17 - SCSI0 */
-#define AV530_EXIRQ_SCSI1 0x00010000 /* 16 - SCSI1 */
-#define AV530_EXIRQ_VIDEO 0x00008000 /* 15 - Video */
-#define AV530_EXIRQ_ZBUF 0x00004000 /* 14 - Z Buffer */
-#define AV530_EXIRQ_DUART2 0x00002000 /* 13 - DUART2 */
-#define AV530_EXIRQ_VDMA 0x00001000 /* 12 - VDMA */
-#define AV530_EXIRQ_IOEXP1 0x00000100 /* 8 - IO Expansion 1 */
-#define AV530_EXIRQ_IOEXP2 0x00000040 /* 6 - IO Expansion 2 */
-#define AV530_EXIRQ_PDMA 0x00000020 /* 5 - Parallel Printer DMA */
-
-#define AV530_EXIST_STRING "\20" \
- "\40RTCOF\37PIT3OF\36PIT2OF\35PIT1OF\34PIT0OF\32DMA4\31DMA3" \
- "\30DMA2\27DMA1\26DMA0\25SCC\24LAN0\23LAN1\22SCSI0\21SCSI1" \
- "\20VIDEO\17ZBUF\16DUART2\15VDMA\11IOEXP1" \
- "\7IOEXP2\6PDMA"
-
-/*
- * Miscellaneous registers
- */
-
-#define AV530_SRST 0xfff83100 /* software reset */
-#define SRST_KBD 0x08
-#define SRST_DUART2 0x02
-#define SRST_DUART1 0x01
-#define AV530_IOBRDID0 0xfffcf000 /* byte access */
-#define AV530_IOBRDID1 0xfffcf004 /* byte access */
-#define AV530_CONFIG 0xfff8fffc
-
-#define AV530_IOFUSE0 0xfffb0040 /* byte access */
-#define AV530_IOFUSE1 0xfffb00c0 /* byte access */
-#define AV530_IOFUSE_LAN 0x02
-#define AV530_IOFUSE_SCSI 0x01
-
-/*
- * PIT and RTC
- */
-
-#define AV530_PIT0_CNT 0xfff8f004
-#define AV530_PIT1_CNT 0xfff8f008
-#define AV530_PIT2_CNT 0xfff8f010
-#define AV530_PIT3_CNT 0xfff8f020
-#define AV530_PIT0_CS 0xfff8f044
-#define AV530_PIT1_CS 0xfff8f048
-#define AV530_PIT2_CS 0xfff8f050
-#define AV530_PIT3_CS 0xfff8f060
-#define AV530_PIT_CMD_ALL 0xfff8f07c
-#define AV530_PIT_CTEN 0x00000008
-#define AV530_PIT_TEST 0x00000004
-#define AV530_PIT_IACK 0x00000002
-#define AV530_PIT_RESET 0x00000001
-
-#define AV530_RTC_CNT 0xfff8f084
-#define AV530_RTC_CS 0xfff8f088
-#define AV530_RTC_IACK 0x00000002
-#define AV530_RTC_RESET 0x00000001
-
-/*
- * Onboard device addresses
- */
-
-#define AV530_SCSI1 0xfffb0000
-#define AV530_SCSI2 0xfffb0080
-#define AV530_LAN1 0xfffb0100
-#define AV530_LAN2 0xfffb0140
-
-/*
- * CMMU addresses
- */
-
-#define AV530_CMMU_D0 0xfff00000
-#define AV530_CMMU_I0 0xfff01000
-#define AV530_CMMU_D1 0xfff02000
-#define AV530_CMMU_I1 0xfff03000
-
-#define AV530_CMMU6_D0 0xfff00000
-#define AV530_CMMU6_D1 0xfff01000
-#define AV530_CMMU6_I0 0xfff04000
-#define AV530_CMMU6_I1 0xfff05000
-#define AV530_CMMU6_I2 0xfff06000
-#define AV530_CMMU6_I3 0xfff07000
-#define AV530_CMMU6_D2 0xfff08000
-#define AV530_CMMU6_D3 0xfff09000
-#define AV530_CMMU6_I4 0xfff0c000
-#define AV530_CMMU6_I5 0xfff0d000
-#define AV530_CMMU6_I6 0xfff0e000
-#define AV530_CMMU6_I7 0xfff0f000
-
-#endif /* _MACHINE_AV530_H_ */
diff --git a/sys/arch/aviion/include/avcommon.h b/sys/arch/aviion/include/avcommon.h
deleted file mode 100644
index c5f05347f85..00000000000
--- a/sys/arch/aviion/include/avcommon.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* $OpenBSD: avcommon.h,v 1.6 2011/03/23 16:54:34 pirofti Exp $ */
-/*
- * Copyright (c) 1999 Steve Murphree, Jr.
- * 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 Steve Murphree, Jr.
- * 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.
- *
- */
-
-#ifndef _MACHINE_AVCOMMON_H_
-#define _MACHINE_AVCOMMON_H_
-
-/*
- * Common declarations for hardware level device registers and such,
- * for 88100-based designs.
- */
-
-/* per-processor interrupt enable registers */
-#define AV_IEN_BASE 0xfff84000
-#define AV_IEN0 0xfff84004 /* interrupt enable CPU 0 */
-#define AV_IEN1 0xfff84008 /* interrupt enable CPU 1 */
-#define AV_IEN2 0xfff84010 /* interrupt enable CPU 2 */
-#define AV_IEN3 0xfff84020 /* interrupt enable CPU 3 */
-#define AV_IENALL 0xfff8403c /* simultaneous write */
-#define AV_IEN(cpu) (AV_IEN_BASE + (4 << (cpu)))
-
-#define AV_IST 0xfff84040 /* interrupt status register */
-
-#define AV_ISTATE 0xfff84088 /* HW interrupt status */
-#define AV_CLRINT 0xfff8408c /* reset HW interrupt */
-
-#define AV_GCSR 0xfff86000 /* global control and status reg */
-#define AV_GLOBAL0 0xfff86001 /* global control and status regs */
-#define AV_GLOBAL1 0xfff86003
-#define AV_LRST 0x80
-#define AV_SYSCON 0x40
-#define AV_BRDID 0xfff86005
-#define AV_CGCSR0 0xfff86007
-#define AV_CGCSR1 0xfff86009
-#define AV_CGCSR2 0xfff8600b
-#define AV_CGCSR3 0xfff8600d
-#define AV_CGCSR4 0xfff8600f
-#define AV_UCSR 0xfff87000 /* utility control and status reg */
-#define AV_BASAD 0xfff87004 /* base address reg */
-#define AV_GLBRES 0xfff8700c /* global reset reg */
-
-#define AV_CCSR 0xfff88000 /* CPU board control status reg */
-#define AV_ERROR 0xfff88004 /* Mbus fault reg */
-#define AV_PCNFA 0xfff88008 /* Pbus A decoder reg */
-#define AV_PCNFB 0xfff8800c /* Pbus B decoder reg */
-#define AV_EXTAD 0xfff88010 /* A24 master A24-A31 addr reg */
-#define AV_EXTAM 0xfff88014 /* AM3-AM0 addr modifiers reg */
-#define AV_WHOAMI 0xfff88018 /* whoami reg */
-#define AV_WMAD 0xfff88020 /* write mbus addr decoder reg */
-#define AV_RMAD 0xfff88024 /* read mbus addr decoder reg */
-#define AV_WVAD 0xfff88028 /* write vmebus addr decoder reg */
-#define AV_RVAD 0xfff8802c /* read vmebus adds decoder reg */
-
-/*
- * ISTATE and CLRINT register bits
- */
-
-#define ISTATE_ABORT 0x04
-#define ISTATE_ACFAIL 0x02
-#define ISTATE_SYSFAIL 0x01
-
-/*
- * UCSR register bits
- */
-
-#define UCSR_PWRUPBIT 0x00004000 /* powerup indicator */
-#define UCSR_DRVSFBIT 0x00002000 /* Board system fail */
-#define UCSR_BRIRQBIT 0x00001000 /* drives VME IRQ1 broadcast int */
-#define UCSR_ROBINBIT 0x00000800 /* sel round robin VME arbiter mode */
-#define UCSR_BRLVBITS 0x00000600 /* VME bus request level 0-3 */
-#define UCSR_RNEVERBIT 0x00000100 /* VME bus never release once req'd */
-#define UCSR_RONRBIT 0x00000080 /* VME bus req release on no request */
-#define UCSR_RWDBIT 0x00000040 /* VME bus request release when done */
-#define UCSR_EARBTOBIT 0x00000020 /* enable VME arbiter bus timeout */
-#define VTOSELBITS 0x00000018 /* VMEbus timeout select bits */
-#define VTO32US 0x00 /* 32 usec */
-#define VTO64US 0x01 /* 64 usec */
-#define VTO128US 0x10 /* 128 usec */
-#define VTODISABLE 0x18 /* disabled */
-
-/* Z8536 counter/timer register (not found on all models) */
-#define CIO_BASE 0xfff83000
-#define CIO_PORTC 0xfff83000
-#define CIO_PORTB 0xfff83004
-#define CIO_PORTA 0xfff83008
-#define CIO_CTRL 0xfff8300c
-
-#define CONSOLE_DART_BASE 0xfff82000
-
-#if defined(_KERNEL) && !defined(_LOCORE)
-
-#include <machine/intr.h>
-
-/*
- * Interrupt masks, one per IPL level.
- */
-extern u_int32_t int_mask_val[NIPLS];
-extern u_int32_t ext_int_mask_val[NIPLS];
-
-#endif
-
-#endif /* _MACHINE_AVCOMMON_H_ */
diff --git a/sys/arch/aviion/include/board.h b/sys/arch/aviion/include/board.h
deleted file mode 100644
index 9102a931416..00000000000
--- a/sys/arch/aviion/include/board.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/* $OpenBSD: board.h,v 1.14 2013/10/23 10:07:14 miod Exp $ */
-/*
- * Copyright (c) 2006, 2007, Miodrag Vallat
- *
- * 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.
- *
- * 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.
- */
-
-#ifndef _MACHINE_BOARD_H_
-#define _MACHINE_BOARD_H_
-
-#if !defined(_LOCORE)
-
-/*
- * cpuid values
- */
-
-#define AVIION_300_310 0x7904 /* mono Maverick */
-#define AVIION_5100_6100 0x7906 /* 20MHz Topgun */
-#define AVIION_400_4000 0x7908 /* 16MHz Mav+ */
-#define AVIION_410_4100 0x790c /* 20MHz Mav+ */
-#define AVIION_300C_310C 0x7910 /* color Maverick */
-#define AVIION_5200_6200 0x7912 /* 25MHz Topgun */
-#define AVIION_5240_6240 0x7918 /* 25MHz Shotgun */
-#define AVIION_300CD_310CD 0x7920 /* dual duart color Maverick */
-#define AVIION_300D_310D 0x7924 /* dual duart mono Maverick */
-#define AVIION_4600_530 0x7930 /* Rolling Rock */
-#define AVIION_4300_25 0x7932 /* 25MHz Terra */
-#define AVIION_4300_20 0x7934 /* 20MHz Terra */
-#define AVIION_4300_16 0x7936 /* 16MHz Terra */
-#define AVIION_5255_6255 0x7942 /* 25MHz Tophat */
-#define AVIION_350 0x7944 /* KME */
-#define AVIION_6280 0x7946 /* High Noon */
-#define AVIION_8500_9500 0x794a /* Odyssey */
-#define AVIION_9500_HA 0x794c /* Oz */
-#define AVIION_500 0x794e /* Robin Hood */
-#define AVIION_5500 0x7950 /* Schooner */
-#define AVIION_450 0x7958 /* Inner Tube */
-#define AVIION_8500_9500_45_1MB 0x795a /* 45MHz Iliad (1MB L2) */
-#define AVIION_10000 0x7960 /* Sierra */
-#define AVIION_10000_QT 0x7962 /* Sierra QT */
-#define AVIION_5500PLUS 0x7964 /* Schooner+ */
-#define AVIION_450PLUS 0x7966 /* Inner Tube+ */
-#define AVIION_8500_9500_50_1MB 0x7968 /* 50MHz Iliad (1MB L2) */
-#define AVIION_8500_9500_50_2MB 0x796a /* 50MHz Iliad (2MB L2) */
-
-/* did the following ever hit the market? */
-#define AVIION_UNKNOWN1 0x7926 /* mono Montezuma */
-#define AVIION_UNKNOWN2 0x7928 /* color Montezuma */
-#define AVIION_UNKNOWN3 0x7956 /* Flintstone */
-#define AVIION_UNKNOWN1_DIS 0xfff0 /* mono disabled Montezuma */
-#define AVIION_UNKNOWN2_DIS 0xfff1 /* color disabled Montezuma */
-
-extern int32_t cpuid;
-
-struct pmap_table;
-struct vme_range;
-
-struct board {
- u_int (*bootstrap)(void);
- vaddr_t (*memsize)(void);
- void (*startup)(void);
- paddr_t (*get_boot_device)(uint32_t *, u_int);
-
- void (*intr)(struct trapframe *);
- void (*init_clocks)(void);
- u_int (*getipl)(void);
- u_int (*setipl)(u_int);
- u_int (*raiseipl)(u_int);
-#ifdef MULTIPROCESSOR
- void (*send_ipi)(int, cpuid_t);
- void (*smp_setup)(struct cpu_info *);
-#endif
-
- u_int32_t (*intsrc)(int);
- u_int32_t (*exintsrc)(int);
- const struct vme_range *(*get_vme_ranges)(void);
-
- const struct pmap_table *ptable;
-};
-
-#define md_interrupt_func(f) platform->intr(f)
-
-#define DECLARE_BOARD(b) \
-extern const struct board board_av##b; \
-u_int av##b##_bootstrap(void); \
-vaddr_t av##b##_memsize(void); \
-void av##b##_startup(void); \
-paddr_t av##b##_get_boot_device(uint32_t *, u_int); \
-void av##b##_intr(struct trapframe *); \
-void av##b##_init_clocks(void); \
-u_int av##b##_getipl(void); \
-u_int av##b##_setipl(u_int); \
-u_int av##b##_raiseipl(u_int); \
-void av##b##_send_ipi(int, cpuid_t); \
-void av##b##_smp_setup(struct cpu_info *); \
-u_int32_t av##b##_intsrc(int); \
-u_int32_t av##b##_exintsrc(int); \
-const struct vme_range *av##b##_get_vme_ranges(void);
-
-DECLARE_BOARD(400);
-DECLARE_BOARD(530);
-DECLARE_BOARD(5000);
-DECLARE_BOARD(6280);
-
-extern const struct board *platform;/* just to have people confuse both names */
-
-/*
- * Logical values for interrupt sources.
- * When adding new sources, keep INTSRC_VME as the last item - syscon
- * depends on this.
- */
-
-#define INTSRC_ABORT 1 /* abort button */
-#define INTSRC_ACFAIL 2 /* AC failure */
-#define INTSRC_SYSFAIL 3 /* system failure */
-#define INTSRC_CLOCK 4 /* clock chip */
-#define INTSRC_DUART1 5 /* console MC68692 */
-#define INTSRC_DUART2 6 /* secondary MC68692 */
-#define INTSRC_ETHERNET1 7 /* first on-board Ethernet */
-#define INTSRC_ETHERNET2 8 /* second on-board Ethernet */
-#define INTSRC_SCSI1 9 /* first on-board SCSI controller */
-#define INTSRC_SCSI2 10 /* second on-board SCSI controller */
-#define INTSRC_DMA 11 /* DMA completion interrupt */
-#define NINTSRC_SYSCON 12 /* total number of non-VME sources */
-#define INTSRC_VME(lvl) (NINTSRC_SYSCON + (lvl) - 1) /* seven VME levels */
-
-#define IS_VME_INTSRC(intsrc) ((intsrc) >= NINTSRC_SYSCON)
-#define VME_INTSRC_LEVEL(intsrc) ((intsrc) - NINTSRC_SYSCON + 1)
-
-void intsrc_enable(u_int, int);
-void intsrc_disable(u_int);
-
-void cio_init_clocks(void);
-void rtc_init_clocks(void);
-
-#endif /* _LOCORE */
-#endif /* _MACHINE_BOARD_H_ */
diff --git a/sys/arch/aviion/include/bus.h b/sys/arch/aviion/include/bus.h
deleted file mode 100644
index b95b396e839..00000000000
--- a/sys/arch/aviion/include/bus.h
+++ /dev/null
@@ -1,365 +0,0 @@
-/* $OpenBSD: bus.h,v 1.5 2011/09/27 20:47:30 miod Exp $ */
-
-/*
- * Copyright (c) 2003-2004 Opsycon AB Sweden. All rights reserved.
- * Copyright (c) 2004, Miodrag Vallat.
- *
- * 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.
- *
- * 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.
- */
-
-#ifndef _MACHINE_BUS_H_
-#define _MACHINE_BUS_H_
-
-#include <machine/asm_macro.h>
-
-#ifdef __STDC__
-#define CAT(a,b) a##b
-#define CAT3(a,b,c) a##b##c
-#else
-#define CAT(a,b) a/**/b
-#define CAT3(a,b,c) a/**/b/**/c
-#endif
-
-/*
- * bus_space implementation
- */
-
-typedef u_long bus_addr_t;
-typedef u_long bus_size_t;
-
-struct aviion_bus_space_tag;
-typedef const struct aviion_bus_space_tag *bus_space_tag_t;
-typedef u_long bus_space_handle_t;
-
-struct aviion_bus_space_tag {
- int (*_space_map)(bus_space_tag_t, bus_addr_t,
- bus_size_t, int, bus_space_handle_t *);
- void (*_space_unmap)(bus_space_tag_t, bus_space_handle_t,
- bus_size_t);
- int (*_space_subregion)(bus_space_tag_t, bus_space_handle_t,
- bus_size_t, bus_size_t, bus_space_handle_t *);
- void * (*_space_vaddr)(bus_space_tag_t, bus_space_handle_t);
- /* alloc, free not implemented yet */
-
- u_int8_t (*_space_read_1)(bus_space_tag_t , bus_space_handle_t,
- bus_size_t);
- void (*_space_write_1)(bus_space_tag_t , bus_space_handle_t,
- bus_size_t, u_int8_t);
- u_int16_t (*_space_read_2)(bus_space_tag_t , bus_space_handle_t,
- bus_size_t);
- void (*_space_write_2)(bus_space_tag_t , bus_space_handle_t,
- bus_size_t, u_int16_t);
- u_int32_t (*_space_read_4)(bus_space_tag_t , bus_space_handle_t,
- bus_size_t);
- void (*_space_write_4)(bus_space_tag_t , bus_space_handle_t,
- bus_size_t, u_int32_t);
- void (*_space_read_raw_2)(bus_space_tag_t, bus_space_handle_t,
- bus_addr_t, u_int8_t *, bus_size_t);
- void (*_space_write_raw_2)(bus_space_tag_t, bus_space_handle_t,
- bus_addr_t, const u_int8_t *, bus_size_t);
- void (*_space_read_raw_4)(bus_space_tag_t, bus_space_handle_t,
- bus_addr_t, u_int8_t *, bus_size_t);
- void (*_space_write_raw_4)(bus_space_tag_t, bus_space_handle_t,
- bus_addr_t, const u_int8_t *, bus_size_t);
-};
-
-#define bus_space_read_1(t, h, o) (*(t)->_space_read_1)((t), (h), (o))
-#define bus_space_read_2(t, h, o) (*(t)->_space_read_2)((t), (h), (o))
-#define bus_space_read_4(t, h, o) (*(t)->_space_read_4)((t), (h), (o))
-
-#define bus_space_write_1(t, h, o, v) (*(t)->_space_write_1)((t), (h), (o), (v))
-#define bus_space_write_2(t, h, o, v) (*(t)->_space_write_2)((t), (h), (o), (v))
-#define bus_space_write_4(t, h, o, v) (*(t)->_space_write_4)((t), (h), (o), (v))
-
-#define bus_space_read_raw_multi_2(t, h, a, b, l) \
- (*(t)->_space_read_raw_2)((t), (h), (a), (b), (l))
-#define bus_space_read_raw_multi_4(t, h, a, b, l) \
- (*(t)->_space_read_raw_4)((t), (h), (a), (b), (l))
-
-#define bus_space_write_raw_multi_2(t, h, a, b, l) \
- (*(t)->_space_write_raw_2)((t), (h), (a), (b), (l))
-#define bus_space_write_raw_multi_4(t, h, a, b, l) \
- (*(t)->_space_write_raw_4)((t), (h), (a), (b), (l))
-
-#define bus_space_map(t, o, s, c, p) \
- (*(t)->_space_map)((t), (o), (s), (c), (p))
-#define bus_space_unmap(t, h, s) \
- (*(t)->_space_unmap)((t), (h), (s))
-#define bus_space_subregion(t, h, o, s, p) \
- (*(t)->_space_subregion)((t), (h), (o), (s), (p))
-
-#define BUS_SPACE_MAP_CACHEABLE 0x01
-#define BUS_SPACE_MAP_LINEAR 0x02
-#define BUS_SPACE_MAP_PREFETCHABLE 0x04
-
-#define bus_space_vaddr(t, h) (*(t)->_space_vaddr)((t), (h))
-
-/*----------------------------------------------------------------------------*/
-#define bus_space_read_multi(n,m) \
-static __inline void \
-CAT(bus_space_read_multi_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \
- bus_size_t o, CAT3(u_int,m,_t) *x, size_t cnt) \
-{ \
- while (cnt--) \
- *x++ = CAT(bus_space_read_,n)(bst, bsh, o); \
-}
-
-bus_space_read_multi(1,8)
-bus_space_read_multi(2,16)
-bus_space_read_multi(4,32)
-
-/*----------------------------------------------------------------------------*/
-#define bus_space_read_region(n,m) \
-static __inline void \
-CAT(bus_space_read_region_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \
- bus_addr_t ba, CAT3(u_int,m,_t) *x, size_t cnt) \
-{ \
- while (cnt--) \
- *x++ = CAT(bus_space_read_,n)(bst, bsh, ba++); \
-}
-
-bus_space_read_region(1,8)
-bus_space_read_region(2,16)
-bus_space_read_region(4,32)
-
-/*----------------------------------------------------------------------------*/
-#define bus_space_read_raw_region(n,m) \
-static __inline void \
-CAT(bus_space_read_raw_region_,n)(bus_space_tag_t bst, \
- bus_space_handle_t bsh, \
- bus_addr_t ba, u_int8_t *x, size_t cnt) \
-{ \
- cnt >>= ((n) >> 1); \
- while (cnt--) { \
- CAT(bus_space_read_raw_multi_,n)(bst, bsh, ba, x, (n)); \
- ba += (n); \
- x += (n); \
- } \
-}
-
-bus_space_read_raw_region(2,16)
-bus_space_read_raw_region(4,32)
-
-/*----------------------------------------------------------------------------*/
-#define bus_space_write_multi(n,m) \
-static __inline void \
-CAT(bus_space_write_multi_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \
- bus_size_t o, const CAT3(u_int,m,_t) *x, size_t cnt) \
-{ \
- while (cnt--) { \
- CAT(bus_space_write_,n)(bst, bsh, o, *x++); \
- } \
-}
-
-bus_space_write_multi(1,8)
-bus_space_write_multi(2,16)
-bus_space_write_multi(4,32)
-
-/*----------------------------------------------------------------------------*/
-#define bus_space_write_region(n,m) \
-static __inline void \
-CAT(bus_space_write_region_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \
- bus_addr_t ba, const CAT3(u_int,m,_t) *x, size_t cnt) \
-{ \
- while (cnt--) { \
- CAT(bus_space_write_,n)(bst, bsh, ba, *x++); \
- ba += sizeof(x); \
- } \
-}
-
-bus_space_write_region(1,8)
-bus_space_write_region(2,16)
-bus_space_write_region(4,32)
-
-/*----------------------------------------------------------------------------*/
-#define bus_space_write_raw_region(n,m) \
-static __inline void \
-CAT(bus_space_write_raw_region_,n)(bus_space_tag_t bst, \
- bus_space_handle_t bsh, \
- bus_addr_t ba, const u_int8_t *x, size_t cnt) \
-{ \
- cnt >>= ((n) >> 1); \
- while (cnt--) { \
- CAT(bus_space_write_raw_multi_,n)(bst, bsh, ba, x, (n)); \
- ba += (n); \
- x += (n); \
- } \
-}
-
-bus_space_write_raw_region(2,16)
-bus_space_write_raw_region(4,32)
-
-/*----------------------------------------------------------------------------*/
-#define bus_space_set_region(n,m) \
-static __inline void \
-CAT(bus_space_set_region_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \
- bus_addr_t ba, CAT3(u_int,m,_t) x, size_t cnt) \
-{ \
- while (cnt--) { \
- CAT(bus_space_write_,n)(bst, bsh, ba, x); \
- ba += sizeof(x); \
- } \
-}
-
-bus_space_set_region(1,8)
-bus_space_set_region(2,16)
-bus_space_set_region(4,32)
-
-/*----------------------------------------------------------------------------*/
-#define bus_space_copy(n) \
-static __inline void \
-CAT(bus_space_copy_,n)(bus_space_tag_t bst, bus_space_handle_t bsh1, \
- bus_size_t o1, bus_space_handle_t bsh2, bus_size_t o2, bus_size_t cnt) \
-{ \
- while (cnt--) { \
- CAT(bus_space_write_,n)(bst, bsh2, o2, \
- CAT(bus_space_read_,n)(bst, bsh1, o1)); \
- o1 += (n); \
- o2 += (n); \
- } \
-}
-
-bus_space_copy(1)
-bus_space_copy(2)
-bus_space_copy(4)
-
-uint8_t generic_space_read_1(bus_space_tag_t, bus_space_handle_t, bus_size_t);
-uint16_t generic_space_read_2(bus_space_tag_t, bus_space_handle_t, bus_size_t);
-uint32_t generic_space_read_4(bus_space_tag_t, bus_space_handle_t, bus_size_t);
-void generic_space_read_raw_2(bus_space_tag_t, bus_space_handle_t,
- bus_addr_t, uint8_t *, bus_size_t);
-void generic_space_write_1(bus_space_tag_t, bus_space_handle_t, bus_size_t,
- uint8_t);
-void generic_space_write_2(bus_space_tag_t, bus_space_handle_t, bus_size_t,
- uint16_t);
-void generic_space_write_4(bus_space_tag_t, bus_space_handle_t, bus_size_t,
- uint32_t);
-void generic_space_write_raw_2(bus_space_tag_t, bus_space_handle_t,
- bus_addr_t, const uint8_t *, bus_size_t);
-void generic_space_read_raw_4(bus_space_tag_t, bus_space_handle_t,
- bus_addr_t, uint8_t *, bus_size_t);
-void generic_space_write_raw_4(bus_space_tag_t, bus_space_handle_t,
- bus_addr_t, const uint8_t *, bus_size_t);
-
-/*----------------------------------------------------------------------------*/
-/*
- * Bus read/write barrier methods.
- *
- * void bus_space_barrier(bus_space_tag_t tag,
- * bus_space_handle_t bsh, bus_size_t offset,
- * bus_size_t len, int flags);
- *
- */
-static inline void
-bus_space_barrier(bus_space_tag_t t, bus_space_handle_t h, bus_size_t offset,
- bus_size_t length, int flags)
-{
- flush_pipeline();
-}
-
-#define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */
-#define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */
-
-/*
- * bus_dma implementation
- */
-
-#define BUS_DMA_WAITOK 0x000 /* safe to sleep (pseudo-flag) */
-#define BUS_DMA_NOWAIT 0x001 /* not safe to sleep */
-#define BUS_DMA_ALLOCNOW 0x002 /* perform resource allocation now */
-#define BUS_DMA_COHERENT 0x004 /* hint: map memory DMA coherent */
-#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */
-#define BUS_DMA_BUS2 0x020
-#define BUS_DMA_BUS3 0x040
-#define BUS_DMA_BUS4 0x080
-#define BUS_DMA_READ 0x100 /* mapping is device -> memory only */
-#define BUS_DMA_WRITE 0x200 /* mapping is memory -> device only */
-#define BUS_DMA_STREAMING 0x400 /* hint: sequential, unidirectional */
-#define BUS_DMA_ZERO 0x800 /* zero memory in dmamem_alloc */
-
-#define BUS_DMASYNC_PREREAD 0x01
-#define BUS_DMASYNC_POSTREAD 0x02
-#define BUS_DMASYNC_PREWRITE 0x04
-#define BUS_DMASYNC_POSTWRITE 0x08
-
-typedef u_int32_t bus_dma_tag_t; /* ignored, really */
-
-/*
- * bus_dma_segment_t
- *
- * Describes a single contiguous DMA transaction. Values
- * are suitable for programming into DMA registers.
- */
-struct m88k_bus_dma_segment {
- bus_addr_t ds_addr; /* DMA address */
- bus_size_t ds_len; /* length of transfer */
-};
-typedef struct m88k_bus_dma_segment bus_dma_segment_t;
-
-/*
- * bus_dmamap_t
- *
- * Describes a DMA mapping.
- */
-struct m88k_bus_dmamap {
- bus_size_t _dm_size; /* largest DMA transfer mappable */
- int _dm_segcnt; /* number of segs this map can map */
- bus_size_t _dm_maxsegsz; /* largest possible segment */
- bus_size_t _dm_boundary; /* don't cross this */
-
- bus_size_t dm_mapsize; /* size of the mapping */
- int dm_nsegs; /* # valid segments in mapping */
- bus_dma_segment_t dm_segs[1]; /* segments; variable length */
-};
-typedef struct m88k_bus_dmamap *bus_dmamap_t;
-
-struct mbuf;
-struct proc;
-struct uio;
-
-int bus_dmamap_create(bus_dma_tag_t, bus_size_t, int, bus_size_t,
- bus_size_t, int, bus_dmamap_t *);
-void bus_dmamap_destroy(bus_dma_tag_t, bus_dmamap_t);
-int bus_dmamap_load(bus_dma_tag_t, bus_dmamap_t, void *,
- bus_size_t, struct proc *, int);
-int bus_dmamap_load_mbuf(bus_dma_tag_t, bus_dmamap_t,
- struct mbuf *, int);
-int bus_dmamap_load_uio(bus_dma_tag_t, bus_dmamap_t,
- struct uio *, int);
-int bus_dmamap_load_raw(bus_dma_tag_t, bus_dmamap_t, bus_dma_segment_t *,
- int, bus_size_t, int);
-void bus_dmamap_unload(bus_dma_tag_t, bus_dmamap_t);
-void bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_addr_t,
- bus_size_t, int);
-
-int bus_dmamem_alloc(bus_dma_tag_t tag, bus_size_t size,
- bus_size_t alignment, bus_size_t boundary,
- bus_dma_segment_t *segs, int nsegs, int *rsegs, int flags);
-void bus_dmamem_free(bus_dma_tag_t tag, bus_dma_segment_t *segs,
- int nsegs);
-int bus_dmamem_map(bus_dma_tag_t tag, bus_dma_segment_t *segs,
- int nsegs, size_t size, caddr_t *kvap, int flags);
-void bus_dmamem_unmap(bus_dma_tag_t tag, caddr_t kva,
- size_t size);
-paddr_t bus_dmamem_mmap(bus_dma_tag_t tag, bus_dma_segment_t *segs,
- int nsegs, off_t off, int prot, int flags);
-
-#endif /* _MACHINE_BUS_H_ */
diff --git a/sys/arch/aviion/include/cdefs.h b/sys/arch/aviion/include/cdefs.h
deleted file mode 100644
index a71166facba..00000000000
--- a/sys/arch/aviion/include/cdefs.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* $OpenBSD: cdefs.h,v 1.1.1.1 2006/04/18 10:56:58 miod Exp $ */
-/* public domain */
-
-#include <m88k/cdefs.h>
diff --git a/sys/arch/aviion/include/cmmu.h b/sys/arch/aviion/include/cmmu.h
deleted file mode 100644
index ed0c1ea8935..00000000000
--- a/sys/arch/aviion/include/cmmu.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: cmmu.h,v 1.1.1.1 2006/04/18 10:56:58 miod Exp $ */
-/* public domain */
-#include <m88k/cmmu.h>
diff --git a/sys/arch/aviion/include/conf.h b/sys/arch/aviion/include/conf.h
deleted file mode 100644
index bb42e64d8ef..00000000000
--- a/sys/arch/aviion/include/conf.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* $OpenBSD: conf.h,v 1.1.1.1 2006/04/27 15:47:48 miod Exp $ */
-/*
- * Copyright (c) 2002, Miodrag Vallat.
- * All rights reserved.
- *
- * Permission to redistribute, use, copy, and modify this software
- * is hereby granted without fee, provided that the following
- * conditions are met:
- *
- * 1. This entire notice is included in all source code copies of any
- * software which is or includes a copy or modification of this
- * software.
- * 2. 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/conf.h>
-
-#define mmread mmrw
-#define mmwrite mmrw
-cdev_decl(mm);
-
-cdev_decl(nvram);
-
-cdev_decl(vme);
-
-cdev_decl(dart);
diff --git a/sys/arch/aviion/include/cpu.h b/sys/arch/aviion/include/cpu.h
deleted file mode 100644
index 137c0ef0ce2..00000000000
--- a/sys/arch/aviion/include/cpu.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* $OpenBSD: cpu.h,v 1.4 2011/03/23 16:54:34 pirofti Exp $ */
-/*
- * Copyright (c) 1996 Nivas Madhur
- * 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. 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.
- */
-#ifndef _MACHINE_CPU_H_
-#define _MACHINE_CPU_H_
-
-#include <m88k/cpu.h>
-
-#ifdef _KERNEL
-
-#include <sys/evcount.h>
-
-/*
- * Generic interrupt handler structure. Handlers may be chained.
- */
-struct intrhand {
- SLIST_ENTRY(intrhand) ih_link;
- int (*ih_fn)(void *);
- void *ih_arg;
- int ih_ipl;
- int ih_flags;
-#define INTR_WANTFRAME 0x01
-#define INTR_EXCLUSIVE 0x02
- struct evcount ih_count;
-};
-typedef SLIST_HEAD(, intrhand) intrhand_t;
-
-void doboot(void);
-void nmihand(void *);
-
-#endif /* _KERNEL */
-
-#endif
diff --git a/sys/arch/aviion/include/db_machdep.h b/sys/arch/aviion/include/db_machdep.h
deleted file mode 100644
index 3fb91666b6c..00000000000
--- a/sys/arch/aviion/include/db_machdep.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* $OpenBSD: db_machdep.h,v 1.1.1.1 2006/04/18 10:56:58 miod Exp $ */
-/* public domain */
-#include <m88k/db_machdep.h>
-
-#ifdef DDB
-
-void m88k_db_prom_cmd(db_expr_t, int, db_expr_t, char *);
-
-#define EXTRA_MACHDEP_COMMANDS \
- { "prom", m88k_db_prom_cmd, 0, NULL },
-
-#endif
diff --git a/sys/arch/aviion/include/disklabel.h b/sys/arch/aviion/include/disklabel.h
deleted file mode 100644
index 1d34fef8f6e..00000000000
--- a/sys/arch/aviion/include/disklabel.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/* $OpenBSD: disklabel.h,v 1.14 2015/09/30 14:57:03 krw Exp $ */
-
-/*
- * Copyright (c) 2010 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef _MACHINE_DISKLABEL_H_
-#define _MACHINE_DISKLABEL_H_
-
-#define LABELSECTOR 1 /* sector containing label */
-#define LABELOFFSET 0 /* offset of label in sector */
-#define MAXPARTITIONS 16 /* number of partitions */
-
-/*
- * AViiON native disk identification
- */
-
-#define VDM_LABEL_SIGNATURE 0x1234abcd
-
-#define VDM_LABEL_SECTOR 0
-#define VDM_LABEL_OFFSET 0x1c8
-#define VDM_LABEL_OFFSET_ALT 0x1c0
-
-struct vdm_label {
- uint32_t signature;
- uint32_t version;
- uint32_t unused[2];
-};
-
-#define VDM_LABEL_VERSION 0
-
-struct vdm_boot_info {
- uint32_t padding[6];
- uint32_t signature;
- uint32_t boot_start;
- uint32_t boot_size;
- uint32_t version;
-};
-
-#define VDM_BOOT_INFO_VERSION 1
-#define VDM_BOOT_DEFAULT_SIZE 500
-
-/*
- * MBR identification information is in <sys/disklabel.h>
- */
-
-/* DG/UX VDM partition type (apparently not used on m88k AViiON) */
-#define DOSPTYP_DGUX_VDM 0xdf
-
-/*
- * DG/UX VDM structures
- */
-
-#define VDIT_SECTOR 1
-
-struct vdm_self_id {
- union {
- uint8_t _kind;
- uint32_t _blkno;
- } u;
- uint32_t node_number;
-} __packed;
-
-#define VDM_ID_KIND(id) ((id)->u._kind)
-#define VDM_BLKNO_MASK 0x00ffffff /* low 24 bits */
-#define VDM_ID_BLKNO(id) (((id)->u._blkno) & VDM_BLKNO_MASK)
-#define VDM_NO_NODE_NUMBER 012345670123
-#define VDM_NO_BLK_NUMBER 0xffffffff
-
-#define VDIT_BLOCK 0x12
-#define VDIT_PORTION_HEADER_BLOCK 0x13
-#define VDIT_BLOCK_HEAD_BE 0x14
-#define VDIT_BLOCK_HEAD_LE 0x18
-
-struct vdit_block_header {
- struct vdm_self_id id;
- uint32_t nextblk;
- uint32_t timestamp;
- uint32_t secondary_vdit;
- uint16_t chunksz;
- uint16_t padding;
-} __packed;
-
-typedef uint32_t vdit_timestamp_t;
-typedef uint32_t vdit_id_t;
-
-struct vdit_entry_header {
- uint16_t type;
- uint16_t size;
- vdit_timestamp_t timestamp;
-} __packed;
-
-#define VDIT_ENTRY_SENTINEL 0x00
-#define VDIT_ENTRY_UNUSED 0x01
-#define VDIT_ENTRY_BOOT_INFO 0x02
-#define VDIT_ENTRY_SUBDRIVER_INFO 0x03
-#define VDIT_ENTRY_INSTANCE 0x04
-
-#define VDIT_NAME_MAX 0x20
-
-struct vdit_instance_id {
- vdit_timestamp_t generation_timestamp;
- vdit_id_t system_id;
-} __packed;
-
-struct vdit_boot_info_entry {
- uint16_t version;
- struct vdit_instance_id default_swap;
- struct vdit_instance_id default_root;
-} __packed;
-
-struct vdit_subdriver_entry {
- uint16_t version;
- vdit_id_t subdriver_id;
- char name[VDIT_NAME_MAX];
-} __packed;
-
-#define VDM_SUBDRIVER_VDMPHYS "vdmphys"
-#define VDM_SUBDRIVER_VDMPART "vdmpart"
-#define VDM_SUBDRIVER_VDMAGGR "vdmaggr"
-#define VDM_SUBDRIVER_VDMREMAP "vdmremap"
-
-struct vdit_instance_entry {
- uint16_t version;
- char name[VDIT_NAME_MAX];
- vdit_id_t subdriver_id;
- struct vdit_instance_id instance_id;
- uint8_t exported;
-} __packed;
-
-#define VDM_INSTANCE_OPENBSD "OpenBSD"
-
-struct vdit_vdmphys_instance {
- struct vdit_instance_entry instance;
- uint16_t version;
- uint16_t mode;
-#define VDMPHYS_MODE_READONLY 0x00
-#define VDMPHYS_MODE_READWRITE 0x01
-} __packed;
-
-struct vdit_vdmpart_instance {
- struct vdit_instance_entry instance;
- uint16_t version;
- struct vdit_instance_id child_instance;
- uint32_t start_blkno;
- uint32_t size;
- struct vdit_instance_id remap_instance;
-} __packed;
-
-struct vdit_vdmaggr_instance {
- struct vdit_instance_entry instance;
- uint16_t version;
- uint16_t aggr_count;
- uint32_t stripe_size;
- struct vdit_instance_id pieces[0];
-} __packed;
-
-struct vdit_vdmremap_instance {
- struct vdit_instance_entry instance;
- uint16_t version;
- struct vdit_instance_id primary_remap_table;
- struct vdit_instance_id secondary_remap_table;
- struct vdit_instance_id remap_area;
-} __packed;
-
-#endif /* _MACHINE_DISKLABEL_H_ */
diff --git a/sys/arch/aviion/include/endian.h b/sys/arch/aviion/include/endian.h
deleted file mode 100644
index 032fbddb8bb..00000000000
--- a/sys/arch/aviion/include/endian.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: endian.h,v 1.1.1.1 2006/04/18 10:56:58 miod Exp $ */
-/* public domain */
-#include <m88k/endian.h>
diff --git a/sys/arch/aviion/include/exec.h b/sys/arch/aviion/include/exec.h
deleted file mode 100644
index f6ce953a253..00000000000
--- a/sys/arch/aviion/include/exec.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: exec.h,v 1.1.1.1 2006/04/18 10:56:58 miod Exp $ */
-/* public domain */
-#include <m88k/exec.h>
diff --git a/sys/arch/aviion/include/fenv.h b/sys/arch/aviion/include/fenv.h
deleted file mode 100644
index b18bcdccfc2..00000000000
--- a/sys/arch/aviion/include/fenv.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: fenv.h,v 1.2 2013/06/01 21:20:54 jasper Exp $ */
-/* public domain */
-#include <m88k/fenv.h>
diff --git a/sys/arch/aviion/include/fpu.h b/sys/arch/aviion/include/fpu.h
deleted file mode 100644
index fa7b95f0fab..00000000000
--- a/sys/arch/aviion/include/fpu.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: fpu.h,v 1.1 2007/12/08 18:39:49 miod Exp $ */
-/* public domain */
-#include <m88k/fpu.h>
diff --git a/sys/arch/aviion/include/frame.h b/sys/arch/aviion/include/frame.h
deleted file mode 100644
index b8edc441167..00000000000
--- a/sys/arch/aviion/include/frame.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: frame.h,v 1.3 2007/01/13 22:00:56 miod Exp $ */
-/* public domain */
-#include <m88k/frame.h>
diff --git a/sys/arch/aviion/include/ieee.h b/sys/arch/aviion/include/ieee.h
deleted file mode 100644
index 649d084f37c..00000000000
--- a/sys/arch/aviion/include/ieee.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: ieee.h,v 1.1.1.1 2006/04/18 10:56:58 miod Exp $ */
-/* public domain */
-#include <m88k/ieee.h>
diff --git a/sys/arch/aviion/include/ieeefp.h b/sys/arch/aviion/include/ieeefp.h
deleted file mode 100644
index 0636e67fa04..00000000000
--- a/sys/arch/aviion/include/ieeefp.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: ieeefp.h,v 1.1.1.1 2006/04/18 10:56:58 miod Exp $ */
-/* public domain */
-#include <m88k/ieeefp.h>
diff --git a/sys/arch/aviion/include/intr.h b/sys/arch/aviion/include/intr.h
deleted file mode 100644
index 089194eb011..00000000000
--- a/sys/arch/aviion/include/intr.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* $OpenBSD: intr.h,v 1.5 2013/06/16 14:49:49 kettenis Exp $ */
-/*
- * Copyright (C) 2000 Steve Murphree, Jr.
- * 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.
- *
- * 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.
- */
-
-#ifndef _MACHINE_INTR_H_
-#define _MACHINE_INTR_H_
-
-/*
- * IPL levels.
- * We use 6 as IPL_HIGH so that abort can be programmed at 7 so that
- * it is always possible to break into the system unless interrupts
- * are disabled.
- */
-
-#define IPL_NONE 0
-#define IPL_SOFTINT 1
-#define IPL_BIO 2
-#define IPL_NET 3
-#define IPL_TTY 3
-#define IPL_VM 3
-#define IPL_CLOCK 5
-#define IPL_STATCLOCK 5
-#define IPL_SCHED 5
-#define IPL_HIGH 6
-#define IPL_NMI 7
-#define IPL_ABORT 7
-
-#define NIPLS 8
-
-#define IPL_MPSAFE 0 /* no "mpsafe" interrupts */
-
-#include <m88k/intr.h>
-
-#endif /* _MACHINE_INTR_H_ */
diff --git a/sys/arch/aviion/include/kcore.h b/sys/arch/aviion/include/kcore.h
deleted file mode 100644
index 473f50f7419..00000000000
--- a/sys/arch/aviion/include/kcore.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: kcore.h,v 1.1.1.1 2006/04/18 10:56:58 miod Exp $ */
-/* public domain */
-#include <m88k/kcore.h>
diff --git a/sys/arch/aviion/include/limits.h b/sys/arch/aviion/include/limits.h
deleted file mode 100644
index be9d462ada5..00000000000
--- a/sys/arch/aviion/include/limits.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: limits.h,v 1.1.1.1 2006/04/18 10:56:58 miod Exp $ */
-/* public domain */
-#include <m88k/limits.h>
diff --git a/sys/arch/aviion/include/loadfile_machdep.h b/sys/arch/aviion/include/loadfile_machdep.h
deleted file mode 100644
index eb745832b02..00000000000
--- a/sys/arch/aviion/include/loadfile_machdep.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* $OpenBSD: loadfile_machdep.h,v 1.1 2013/10/09 21:26:02 miod Exp $ */
-
-/*-
- * Copyright (c) 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Christos Zoulas.
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
- */
-
-#define BOOT_ELF
-
-#define LOAD_KERNEL LOAD_ALL
-#define COUNT_KERNEL COUNT_ALL
-
-#define LOADADDR(a) (((u_long)(a)) + offset)
-#define ALIGNENTRY(a) ((u_long)(a) & ~0x0fff)
-#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
-#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
-#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
-#define WARN(a) (void)(printf a, \
- printf((errno ? ": %s\n" : "\n"), \
- strerror(errno)))
-#define PROGRESS(a) (void) printf a
-#define ALLOC(a) alloc(a)
-#define FREE(a, b) free(a, b)
diff --git a/sys/arch/aviion/include/lock.h b/sys/arch/aviion/include/lock.h
deleted file mode 100644
index 0cdae0b6892..00000000000
--- a/sys/arch/aviion/include/lock.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: lock.h,v 1.1.1.1 2006/04/18 10:56:58 miod Exp $ */
-/* public domain */
-#include <m88k/lock.h>
diff --git a/sys/arch/aviion/include/m88100.h b/sys/arch/aviion/include/m88100.h
deleted file mode 100644
index fce9db0ec16..00000000000
--- a/sys/arch/aviion/include/m88100.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: m88100.h,v 1.1.1.1 2006/04/18 10:56:57 miod Exp $ */
-/* public domain */
-#include <m88k/m88100.h>
diff --git a/sys/arch/aviion/include/m8820x.h b/sys/arch/aviion/include/m8820x.h
deleted file mode 100644
index 83d69a8a1b9..00000000000
--- a/sys/arch/aviion/include/m8820x.h
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef _MACHINE_M8820X_H_
-#define _MACHINE_M8820X_H_
-/* $OpenBSD: m8820x.h,v 1.3 2011/03/23 16:54:34 pirofti Exp $ */
-/*
- * Copyright (c) 2004, Miodrag Vallat.
- *
- * 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.
- *
- * 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) 1993-1992 Carnegie Mellon University
- * 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.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-
-/*
- * Code features to enable
- */
-
-#define M88200_HAS_SPLIT_ADDRESS
-#define M88200_HAS_ASYMMETRICAL_ASSOCIATION
-
-#include <m88k/m8820x.h>
-
-#endif /* _MACHINE_M8820X_H_ */
diff --git a/sys/arch/aviion/include/mioctl.h b/sys/arch/aviion/include/mioctl.h
deleted file mode 100644
index 5ad5d742068..00000000000
--- a/sys/arch/aviion/include/mioctl.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* $OpenBSD: mioctl.h,v 1.1.1.1 2006/04/18 10:57:32 miod 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.
- *
- * 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.
- */
-
-#define MIOCGSIZ _IOR('m', 1, int)
diff --git a/sys/arch/aviion/include/mmu.h b/sys/arch/aviion/include/mmu.h
deleted file mode 100644
index adf65ae0eb2..00000000000
--- a/sys/arch/aviion/include/mmu.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: mmu.h,v 1.1.1.1 2006/04/18 10:56:57 miod Exp $ */
-/* public domain */
-#include <m88k/mmu.h>
diff --git a/sys/arch/aviion/include/mplock.h b/sys/arch/aviion/include/mplock.h
deleted file mode 100644
index 4193327f6e6..00000000000
--- a/sys/arch/aviion/include/mplock.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: mplock.h,v 1.1 2007/12/02 21:20:15 miod Exp $ */
-/* public domain */
-#include <m88k/mplock.h>
diff --git a/sys/arch/aviion/include/mutex.h b/sys/arch/aviion/include/mutex.h
deleted file mode 100644
index 5e56be4e3de..00000000000
--- a/sys/arch/aviion/include/mutex.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: mutex.h,v 1.1.1.1 2006/04/18 10:56:57 miod Exp $ */
-/* public domain */
-#include <m88k/mutex.h>
diff --git a/sys/arch/aviion/include/param.h b/sys/arch/aviion/include/param.h
deleted file mode 100644
index f877f3750a9..00000000000
--- a/sys/arch/aviion/include/param.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* $OpenBSD: param.h,v 1.5 2013/11/02 23:06:18 miod Exp $ */
-
-/*
- * Copyright (c) 1999 Steve Murphree, Jr.
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1982, 1986, 1990 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.
- */
-
-#ifndef _MACHINE_PARAM_H_
-#define _MACHINE_PARAM_H_
-
-#define _MACHINE aviion
-#define MACHINE "aviion"
-
-#include <m88k/param.h>
-
-#define KERNBASE 0x00000000 /* start of kernel virtual */
-#define KERNTEXTOFF 0x00080000 /* start of kernel text */
-
-#endif /* _MACHINE_PARAM_H_ */
diff --git a/sys/arch/aviion/include/pcb.h b/sys/arch/aviion/include/pcb.h
deleted file mode 100644
index bfdbed39c4e..00000000000
--- a/sys/arch/aviion/include/pcb.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: pcb.h,v 1.1.1.1 2006/04/18 10:56:57 miod Exp $ */
-/* public domain */
-#include <m88k/pcb.h>
diff --git a/sys/arch/aviion/include/pmap.h b/sys/arch/aviion/include/pmap.h
deleted file mode 100644
index 0e283e73df5..00000000000
--- a/sys/arch/aviion/include/pmap.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: pmap.h,v 1.3 2010/12/31 21:38:08 miod Exp $ */
-/* public domain */
-#include <m88k/pmap.h>
diff --git a/sys/arch/aviion/include/pmap_table.h b/sys/arch/aviion/include/pmap_table.h
deleted file mode 100644
index 13926ee010f..00000000000
--- a/sys/arch/aviion/include/pmap_table.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: pmap_table.h,v 1.1.1.1 2006/04/18 10:56:57 miod Exp $ */
-/* public domain */
-#include <m88k/pmap_table.h>
diff --git a/sys/arch/aviion/include/proc.h b/sys/arch/aviion/include/proc.h
deleted file mode 100644
index f817e0a19a0..00000000000
--- a/sys/arch/aviion/include/proc.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: proc.h,v 1.1.1.1 2006/04/18 10:56:57 miod Exp $ */
-/* public domain */
-#include <m88k/proc.h>
diff --git a/sys/arch/aviion/include/profile.h b/sys/arch/aviion/include/profile.h
deleted file mode 100644
index f39a8d51c12..00000000000
--- a/sys/arch/aviion/include/profile.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: profile.h,v 1.1.1.1 2006/04/18 10:56:57 miod Exp $ */
-/* public domain */
-#include <m88k/profile.h>
diff --git a/sys/arch/aviion/include/prom.h b/sys/arch/aviion/include/prom.h
deleted file mode 100644
index ce577504523..00000000000
--- a/sys/arch/aviion/include/prom.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* $OpenBSD: prom.h,v 1.6 2013/10/10 21:24:59 miod Exp $ */
-/*
- * Copyright (c) 2006, Miodrag Vallat.
- *
- * 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.
- *
- * 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.
- */
-
-#ifndef _MACHINE_PROM_H_
-#define _MACHINE_PROM_H_
-
-#include <sys/cdefs.h>
-
-/* SCM trap vector */
-#define SCM_VECTOR 496
-
-/* system calls */
-#define SCM_CHAR 0x00
-#define SCM_OCHAR 0x20
-#define SCM_PTLINE 0x21
-#define SCM_OCRLF 0x26
-#define SCM_HALT 0x63
-#define SCM_STDIO 0x70
-#define SCM_JPSTART 0x100
-#define SCM_REBOOT 0x101
-#define SCM_CPUID 0x102
-#define SCM_MSIZE 0x103
-#define SCM_REVNUM 0x104
-#define SCM_HOSTID 0x107
-#define SCM_INVALID 0x112
-#define SCM_COMMID 0x114
-
-/* 88204 PROMs only system calls */
-#define SCM_SYSID 0x31
-#define SCM_CPUCONFIG 0x107
-
-/* SCM_JPSTART return values */
-#define JPSTART_OK 0
-#define JPSTART_NO_JP 1
-#define JPSTART_SINGLE_JP 2
-#define JPSTART_NOT_IDLE 3
-#define JPSTART_NO_ANSWER 4
-
-struct scm_cpuconfig {
- u_int32_t version;
-#define SCM_CPUCONFIG_VERSION 0
- u_int32_t cpucount; /* # of CPUs */
- u_int16_t igang, dgang; /* # of CMMUs per CPU */
- u_int32_t isplit, dsplit; /* CMMU split bits */
- u_int32_t :32;
-};
-
-int scm_cpuconfig(struct scm_cpuconfig *);
-u_int scm_cpuid(void);
-int scm_getc(void);
-void scm_getenaddr(u_char *);
-__dead void scm_halt(void);
-u_int scm_jpstart(cpuid_t, vaddr_t);
-u_int scm_memsize(int);
-void scm_printf(const char *);
-u_int scm_promver(void);
-void scm_putc(int);
-void scm_putcrlf(void);
-__dead void scm_reboot(const char *);
-u_int scm_sysid(void);
-
-/*
- * SCM boot device names
- */
-
-/* cied */
-#define SCM_CIEN 0x6369656e
-/* cimd */
-/* cird */
-/* cisc */
-#define SCM_DGEN 0x6467656e
-#define SCM_DGSC 0x64677363
-/* hada */
-#define SCM_HKEN 0x686b656e
-#define SCM_INEN 0x696e656e
-#define SCM_INSC 0x696e7363
-#define SCM_NCSC 0x6e637363
-/* nvrd */
-/* pefn */
-/* vitr */
-
-#endif /* _MACHINE_PROM_H_ */
diff --git a/sys/arch/aviion/include/psl.h b/sys/arch/aviion/include/psl.h
deleted file mode 100644
index e35cdc1d2de..00000000000
--- a/sys/arch/aviion/include/psl.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: psl.h,v 1.1.1.1 2006/04/18 10:56:57 miod Exp $ */
-/* public domain */
-#include <m88k/psl.h>
diff --git a/sys/arch/aviion/include/ptrace.h b/sys/arch/aviion/include/ptrace.h
deleted file mode 100644
index 10829d63115..00000000000
--- a/sys/arch/aviion/include/ptrace.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: ptrace.h,v 1.1.1.1 2006/04/18 10:56:57 miod Exp $ */
-/* public domain */
-#include <m88k/ptrace.h>
diff --git a/sys/arch/aviion/include/reg.h b/sys/arch/aviion/include/reg.h
deleted file mode 100644
index 41fe8baa196..00000000000
--- a/sys/arch/aviion/include/reg.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: reg.h,v 1.1.1.1 2006/04/18 10:56:57 miod Exp $ */
-/* public domain */
-#include <m88k/reg.h>
diff --git a/sys/arch/aviion/include/reloc.h b/sys/arch/aviion/include/reloc.h
deleted file mode 100644
index 438115f5419..00000000000
--- a/sys/arch/aviion/include/reloc.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: reloc.h,v 1.1 2013/01/05 11:20:55 miod Exp $ */
-/* public domain */
-#include <m88k/reloc.h>
diff --git a/sys/arch/aviion/include/setjmp.h b/sys/arch/aviion/include/setjmp.h
deleted file mode 100644
index 9b76f992596..00000000000
--- a/sys/arch/aviion/include/setjmp.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: setjmp.h,v 1.1.1.1 2006/04/18 10:56:57 miod Exp $ */
-/* public domain */
-#include <m88k/setjmp.h>
diff --git a/sys/arch/aviion/include/signal.h b/sys/arch/aviion/include/signal.h
deleted file mode 100644
index b07e06a5c0c..00000000000
--- a/sys/arch/aviion/include/signal.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: signal.h,v 1.1.1.1 2006/04/18 10:56:57 miod Exp $ */
-/* public domain */
-#include <m88k/signal.h>
diff --git a/sys/arch/aviion/include/spinlock.h b/sys/arch/aviion/include/spinlock.h
deleted file mode 100644
index 6472d550dc7..00000000000
--- a/sys/arch/aviion/include/spinlock.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: spinlock.h,v 1.1.1.1 2006/04/18 10:56:57 miod Exp $ */
-/* public domain */
-#include <m88k/spinlock.h>
diff --git a/sys/arch/aviion/include/stdarg.h b/sys/arch/aviion/include/stdarg.h
deleted file mode 100644
index 3ccfba69a9e..00000000000
--- a/sys/arch/aviion/include/stdarg.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: stdarg.h,v 1.1.1.1 2006/04/18 10:56:57 miod Exp $ */
-/* public domain */
-#include <m88k/stdarg.h>
diff --git a/sys/arch/aviion/include/tcb.h b/sys/arch/aviion/include/tcb.h
deleted file mode 100644
index 9b8af0732f6..00000000000
--- a/sys/arch/aviion/include/tcb.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: tcb.h,v 1.2 2013/06/01 21:20:54 jasper Exp $ */
-/* public domain */
-#include <m88k/tcb.h>
diff --git a/sys/arch/aviion/include/trap.h b/sys/arch/aviion/include/trap.h
deleted file mode 100644
index cb81662344c..00000000000
--- a/sys/arch/aviion/include/trap.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* $OpenBSD: trap.h,v 1.2 2006/05/20 12:04:54 miod Exp $ */
-/* public domain */
-#include <machine/board.h> /* md_interrupt_func */
-#include <m88k/trap.h>
diff --git a/sys/arch/aviion/include/varargs.h b/sys/arch/aviion/include/varargs.h
deleted file mode 100644
index a0761678631..00000000000
--- a/sys/arch/aviion/include/varargs.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: varargs.h,v 1.1.1.1 2006/04/18 10:56:56 miod Exp $ */
-/* public domain */
-#include <m88k/varargs.h>
diff --git a/sys/arch/aviion/include/vmparam.h b/sys/arch/aviion/include/vmparam.h
deleted file mode 100644
index dada6a4b2d7..00000000000
--- a/sys/arch/aviion/include/vmparam.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* $OpenBSD: vmparam.h,v 1.2 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 4MB of address space.
- */
-#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0x00000000)
-#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xffc00000)
-
-#include <m88k/vmparam.h>
diff --git a/sys/arch/aviion/stand/Makefile b/sys/arch/aviion/stand/Makefile
deleted file mode 100644
index e624aa2056f..00000000000
--- a/sys/arch/aviion/stand/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-# $OpenBSD: Makefile,v 1.8 2013/10/17 16:30:07 miod Exp $
-
-SUBDIR= a2coff installboot vdmtool
-
-.if ${MACHINE} == "aviion"
-SUBDIR+= libprom libsa libz
-SUBDIR+= boot
-.endif
-
-.include <bsd.subdir.mk>
diff --git a/sys/arch/aviion/stand/Makefile.inc b/sys/arch/aviion/stand/Makefile.inc
deleted file mode 100644
index b04e4f56b45..00000000000
--- a/sys/arch/aviion/stand/Makefile.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.4 2013/10/08 21:55:20 miod Exp $
-
-MDEC_DIR?= /usr/mdec
-
-CWARNFLAGS= -Wall -Werror -fno-stack-protector
-
-HOSTCFLAGS+= ${CWARNFLAGS}
-CFLAGS+= ${CWARNFLAGS} -mmemcpy
-CFLAGS+= -fno-builtin-printf -fno-builtin-putchar -fno-builtin-vprintf
-
-# Load addresses for bootstrap code
-# This should work on 8MB machines, if each bootstrap code fits in 60KB
-# (not 64!)
-STAGE1_RELOC=0x7c0000
-STAGE2_RELOC=0x7d0000
diff --git a/sys/arch/aviion/stand/a2coff/Makefile b/sys/arch/aviion/stand/a2coff/Makefile
deleted file mode 100644
index 8ea7d1bdc17..00000000000
--- a/sys/arch/aviion/stand/a2coff/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-# $OpenBSD: Makefile,v 1.3 2013/10/08 21:49:40 miod Exp $
-
-MAN= a2coff.8
-MANSUBDIR=aviion
-.if ${MACHINE} == "aviion"
-PROG= a2coff
-BINDIR=/usr/mdec
-NOPIE=
-HOSTCFLAGS?= -O2 ${PIPE} ${DEBUG}
-.else
-NOPROG=
-.endif
-
-.include <bsd.prog.mk>
-CFLAGS= ${HOSTCFLAGS}
diff --git a/sys/arch/aviion/stand/a2coff/a2coff.8 b/sys/arch/aviion/stand/a2coff/a2coff.8
deleted file mode 100644
index 4cdfbaa09aa..00000000000
--- a/sys/arch/aviion/stand/a2coff/a2coff.8
+++ /dev/null
@@ -1,43 +0,0 @@
-.\" $OpenBSD: a2coff.8,v 1.5 2015/01/15 19:06:32 schwarze Exp $
-.\"
-.\" Copyright (c) 2006, Miodrag Vallat
-.\"
-.\" 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.
-.\"
-.\" 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.
-.\"
-.Dd $Mdocdate: January 15 2015 $
-.Dt A2COFF 8 aviion
-.Os
-.Sh NAME
-.Nm a2coff
-.Nd convert standalone ELF binaries to 88KBCS COFF format
-.Sh SYNOPSIS
-.Nm a2coff
-.Ar source
-.Ar destination
-.Sh DESCRIPTION
-.Nm a2coff
-converts standalone binaries, such as kernels or boot blocks, from
-.Xr elf 5
-format to COFF format, suitable for booting
-from the Data General AViiON PROMs.
-.Sh SEE ALSO
-.Xr elf 5
diff --git a/sys/arch/aviion/stand/a2coff/a2coff.c b/sys/arch/aviion/stand/a2coff/a2coff.c
deleted file mode 100644
index aa7edeed061..00000000000
--- a/sys/arch/aviion/stand/a2coff/a2coff.c
+++ /dev/null
@@ -1,344 +0,0 @@
-/* $OpenBSD: a2coff.c,v 1.13 2014/07/12 19:01:49 tedu Exp $ */
-/*
- * Copyright (c) 2006, 2013, Miodrag Vallat
- *
- * 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.
- *
- * 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.
- */
-
-/*
- * Quick and dirty ELF to 88K BCS ECOFF converter. Will only work for
- * standalone binaries with no relocations, and will drop symbols.
- * Also, bss is merged into the data section to cope with PROMs which
- * do not zero-fill the bss upon loading (sad but true).
- *
- * This should really only be used to build a BSD/aviion bootloader.
- */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <err.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include <a.out.h> /* ZMAGIC */
-#define ELFSIZE 32
-#include <sys/exec_elf.h>
-
-#define MINIMAL_ALIGN 8
-#define ECOFF_ALIGN 0x200
-
-/*
- * We can't use the standard ecoff defines, first, because the system
- * we are building this tool on might not have ecoff support at all (thus
- * no <machine/ecoff_machdep.h> file), second, because the common defines
- * do not know about the scnhdr changes for 88K BCS.
- * So we'll provide our own, working, definitions.
- */
-struct ecoff_filehdr {
- u_short f_magic; /* magic number */
- u_short f_nscns; /* # of sections */
- u_int f_timdat; /* time and date stamp */
- u_long f_symptr; /* file offset of symbol table */
- u_int f_nsyms; /* # of symbol table entries */
- u_short f_opthdr; /* sizeof the optional header */
- u_short f_flags; /* flags??? */
-};
-
-struct ecoff_aouthdr {
- u_short magic;
- u_short vstamp;
-#if 0
- ECOFF_PAD
-#endif
- u_long tsize;
- u_long dsize;
- u_long bsize;
- u_long entry;
- u_long text_start;
- u_long data_start;
-#if 0 /* not on m88k */
- u_long bss_start;
- ECOFF_MACHDEP;
-#endif
-};
-
-struct ecoff_scnhdr { /* needed for size info */
- char s_name[8]; /* name */
- u_long s_paddr; /* physical addr? for ROMing?*/
- u_long s_vaddr; /* virtual addr? */
- u_long s_size; /* size */
- u_long s_scnptr; /* file offset of raw data */
- u_long s_relptr; /* file offset of reloc data */
- u_long s_lnnoptr; /* file offset of line data */
-#if 0
- u_short s_nreloc; /* # of relocation entries */
- u_short s_nlnno; /* # of line entries */
-#else
- /* m88k specific changes */
- u_long s_nreloc;
- union {
- u_long _s_nlnno;
- u_long _s_vendor;
- } _s_s;
-#define s_nlnno _s_s._s_nlnno
-#define s_vendor _s_s._s_vendor
-#endif
- u_long s_flags;
-};
-
-struct ecoff_exechdr {
- struct ecoff_filehdr f;
- struct ecoff_aouthdr a;
-};
-
-#define round(qty, pow2) (((qty) + (pow2 - 1)) & ~(pow2 - 1UL))
-
-void convert_elf(const char *, int, int, Elf_Ehdr *);
-void copybits(int, int, u_int32_t);
-void usage(void);
-void zerobits(int, u_int32_t);
-
-int
-main(int argc, char *argv[])
-{
- Elf_Ehdr head;
- int infd, outfd;
- int n;
-
- if (argc != 3)
- usage();
-
- infd = open(argv[1], O_RDONLY);
- if (infd < 0)
- err(1, argv[1]);
-
- n = read(infd, &head, sizeof(head));
- if (n < sizeof(head))
- err(1, "read");
-
- if (!IS_ELF(head))
- err(1, "%s: bad magic", argv[1]);
-
- outfd = open(argv[2], O_WRONLY | O_TRUNC | O_CREAT, 0644);
- if (outfd < 0)
- err(1, argv[2]);
-
- convert_elf(argv[1], infd, outfd, &head);
-
- close(infd);
- close(outfd);
-
- exit(0);
-}
-
-char buf[4096];
-#define min(a ,b) ((a) < (b) ? (a) : (b))
-
-void
-copybits(int from, int to, u_int32_t count)
-{
- int chunk;
-
- while (count != 0) {
- chunk = min(count, sizeof buf);
- if (read(from, buf, chunk) != chunk)
- err(1, "read");
- if (write(to, buf, chunk) != chunk)
- err(1, "write");
- count -= chunk;
- }
-}
-
-void
-zerobits(int to, u_int32_t count)
-{
- int chunk;
-
- memset(buf, 0, sizeof buf);
- while (count != 0) {
- chunk = min(count, sizeof buf);
- if (write(to, buf, chunk) != chunk)
- err(1, "write");
- count -= chunk;
- }
-}
-
-__dead void
-usage(void)
-{
- extern char *__progname;
-
- fprintf(stderr, "usage: %s infile outfile\n", __progname);
- exit(1);
-}
-
-/*
- * Convert an ELF binary into BCS ECOFF format.
- * We merge all program headers into a single ECOFF section for simplicity.
- * However, PROM version 01.14 on AV4300 will fail to load a BCS binary
- * unless it has a non-empty data section, so we put the smallest possible
- * bunch of zeroes as a second section to appease it.
- */
-void
-convert_elf(const char *infile, int infd, int outfd, Elf_Ehdr *ehdr)
-{
- struct ecoff_exechdr ehead;
- struct ecoff_scnhdr escn[2];
- Elf_Phdr *phdr;
- off_t outpos;
- uint delta, ptload;
- Elf_Addr minaddr, maxaddr;
- int n, last;
-
- phdr = calloc(ehdr->e_phnum, sizeof(Elf_Phdr));
- if (phdr == NULL)
- err(1, "calloc");
-
- for (n = 0; n < ehdr->e_phnum; n++) {
- if (lseek(infd, ehdr->e_phoff + n * ehdr->e_phentsize,
- SEEK_SET) == (off_t) -1)
- err(1, "seek");
- if (read(infd, phdr + n, sizeof *phdr) != sizeof(*phdr))
- err(1, "read");
- }
-
- ptload = 0;
- for (n = 0; n < ehdr->e_phnum; n++)
- if (phdr[n].p_type == PT_LOAD)
- ptload++;
- if (ptload > 3)
- errx(1, "%s: too many PT_LOAD program headers", infile);
-
- maxaddr = 0;
- minaddr = (Elf_Addr)-1;
-
- for (n = 0; n < ehdr->e_phnum; n++) {
- if (phdr[n].p_type != PT_LOAD)
- continue;
- if (phdr[n].p_paddr < minaddr)
- minaddr = phdr[n].p_paddr;
- if (phdr[n].p_paddr + phdr[n].p_memsz > maxaddr)
- maxaddr = phdr[n].p_paddr + phdr[n].p_memsz;
- }
- maxaddr = round(maxaddr, MINIMAL_ALIGN);
-
- /*
- * Header
- */
-
- memset(&ehead, 0, sizeof ehead);
- memset(&escn, 0, sizeof escn);
-
- ehead.f.f_magic = 0x016d; /* MC88OMAGIC */
- ehead.f.f_nscns = 2;
- ehead.f.f_opthdr = sizeof ehead.a;
- ehead.f.f_flags = 0x020f;
- /* F_RELFLG | F_EXEC | F_LNNO | 8 | F_AR16WR */
-
- ehead.a.magic = ZMAGIC;
- ehead.a.tsize = maxaddr - minaddr; /* ignored */
- ehead.a.dsize = MINIMAL_ALIGN; /* ignored */
- ehead.a.bsize = 0; /* ignored */
- ehead.a.entry = ehdr->e_entry;
- ehead.a.text_start = minaddr; /* ignored */
- ehead.a.data_start = maxaddr; /* ignored */
-
- n = write(outfd, &ehead, sizeof(ehead));
- if (n != sizeof(ehead))
- err(1, "write");
-
- /*
- * Sections
- */
-
- strncpy(escn[0].s_name, ".text", sizeof escn[0].s_name);
- escn[0].s_paddr = minaddr; /* ignored, 1:1 mapping */
- escn[0].s_size = maxaddr - minaddr;
- escn[0].s_scnptr = round(sizeof(ehead) + sizeof(escn), MINIMAL_ALIGN);
- escn[0].s_flags = 0x20; /* STYP_TEXT */
-
- strncpy(escn[1].s_name, ".data", sizeof escn[1].s_name);
- escn[1].s_paddr = escn[0].s_paddr + escn[0].s_size;
- escn[1].s_size = MINIMAL_ALIGN;
- escn[1].s_scnptr = escn[0].s_scnptr + escn[0].s_size;
- escn[1].s_flags = 0x40; /* STYP_DATA */
-
- /* adjust load addresses */
- escn[0].s_vaddr = escn[0].s_paddr;
- escn[1].s_vaddr = escn[1].s_paddr;
-
- n = write(outfd, &escn, sizeof(escn));
- if (n != sizeof(escn))
- err(1, "write");
-
- /*
- * Copy ``text'' section (all PT_LOAD program headers).
- */
-
- outpos = escn[0].s_scnptr;
- if (lseek(outfd, outpos, SEEK_SET) == (off_t) -1)
- err(1, "seek");
- for (n = 0, last = -1; n < ehdr->e_phnum; n++) {
- if (phdr[n].p_type != PT_LOAD)
- continue;
- if (last >= 0) {
- delta = (phdr[n].p_paddr - phdr[last].p_paddr) -
- phdr[last].p_memsz;
- if (delta != 0) {
- zerobits(outfd, delta);
- outpos += delta;
- }
- }
-#ifdef DEBUG
- printf("copying %s: source %x dest %llx size %x\n",
- escn[0].s_name, phdr[n].p_offset, outpos, phdr[n].p_filesz);
-#endif
- if (lseek(infd, phdr[n].p_offset, SEEK_SET) == (off_t) -1)
- err(1, "seek");
- copybits(infd, outfd, phdr[n].p_filesz);
- delta = phdr[n].p_memsz - phdr[n].p_filesz;
- if (delta != 0)
- zerobits(outfd, delta);
- outpos += phdr[n].p_memsz;
- last = n;
- }
-
- free(phdr);
-
- /*
- * Fill ``data'' section.
- */
-
- zerobits(outfd, escn[1].s_size);
- outpos += escn[1].s_size;
-
- /*
- * Round file to a multiple of 512 bytes, since ``recent'' PROM
- * (such as rev 1.20 on AV530) will reject files not being properly
- * rounded to a multiple of 512 bytes.
- */
-
- if ((outpos % ECOFF_ALIGN) != 0)
- zerobits(outfd, ECOFF_ALIGN - (outpos % ECOFF_ALIGN));
-}
diff --git a/sys/arch/aviion/stand/boot/Makefile b/sys/arch/aviion/stand/boot/Makefile
deleted file mode 100644
index 130a604b67a..00000000000
--- a/sys/arch/aviion/stand/boot/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-# $OpenBSD: Makefile,v 1.7 2015/06/14 19:37:11 miod Exp $
-
-SIZE?= size
-
-S= ${.CURDIR}/../../../..
-DEFS= -DSUN_BOOTPARAMS
-#DEFS+= -DNETIF_DEBUG
-INCPATH=-I${.CURDIR} -I${.CURDIR}/../libsa -I${.CURDIR}/../libprom \
- -I${S} -I${S}/lib/libsa
-CFLAGS+=${DEFS} ${INCPATH} ${COPTS} -DSTAGE1_RELOC=${STAGE1_RELOC}
-CLEANFILES+=boot boot.ELF
-
-.include "${S}/arch/aviion/stand/Makefile.inc"
-.include "${S}/arch/aviion/stand/libprom/Makefile.inc"
-.include "${S}/arch/aviion/stand/libsa/Makefile.inc"
-.include "${S}/arch/aviion/stand/libz/Makefile.inc"
-
-# Keep crt.c first in the object list for ld's sake.
-SRCS= crt.c boot.c conf.c devopen.c version.c
-SRCS+= oaic.c oosiop.c scsi.c sd.c
-SRCS+= dev_net.c if_le.c
-.PATH: ${S}/lib/libkern
-SRCS+= moddi3.c muldi3.c negdi2.c qdivrem.c
-OBJS= ${SRCS:S/.c/.o/g}
-LIBS= ${LIBSA} ${LIBPROM} ${LIBZ}
-LDFLAGS+= -N -Ttext ${STAGE2_RELOC} -e start
-NOPIE=
-
-all: boot
-
-boot: boot.ELF
- ${MDEC_DIR}/a2coff boot.ELF boot
-
-boot.ELF: ${OBJS} ${LIBS}
- ${LD} ${LDFLAGS} -o $@ ${OBJS} ${LIBS}
- @${SIZE} $@
-
-install: boot
- ${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
- boot ${DESTDIR}${MDEC_DIR}/boot
-
-.include <bsd.prog.mk>
diff --git a/sys/arch/aviion/stand/boot/boot.c b/sys/arch/aviion/stand/boot/boot.c
deleted file mode 100644
index fd2dc5476a8..00000000000
--- a/sys/arch/aviion/stand/boot/boot.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/* $OpenBSD: boot.c,v 1.6 2015/11/16 19:33:52 miod 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.
- *
- * 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. 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 <sys/stat.h>
-#define _KERNEL
-#include <sys/fcntl.h>
-#undef _KERNEL
-
-#include <machine/prom.h>
-
-#include <lib/libkern/libkern.h>
-#include "stand.h"
-#include "libsa.h"
-
-extern int devparse(const char *, uint *, uint *, uint *, uint *,
- const char **, const char **, char **);
-extern const char version[];
-
-char line[80];
-struct boot_info bi;
-
-char rnddata[BOOTRANDOM_MAX]; /* XXX dummy */
-
-int loadrandom(const char *, char *, size_t);
-
-void
-boot(const char *args, uint bootdev, uint bootunit, uint bootlun)
-{
- char *p, *file, *fname;
- char rndpath[MAXPATHLEN];
- int ask;
- int ret;
- int rnd_loaded = 0;
- uint controller, unit, lun, part;
- const char *device, *ctrl;
-
- printf("\n>> OpenBSD/" MACHINE " boot %s\n", version);
-
- bi.bootdev = bootdev;
- bi.bootunit = bootunit;
- bi.bootlun = bootlun;
- bi.bootpart = 0;
-
- /*
- * Older PROM version put a \r at the end of a manually entered
- * boot string.
- */
- if ((p = strchr(args, '\r')) != NULL)
- *p = '\0';
-
- ret = parse_args(args, &file, 1);
- ask = boothowto & RB_ASKNAME;
- for (;;) {
- if (ask != 0) {
- printf("boot: ");
- getln(line, sizeof line);
- if (line[0] == '\0')
- continue;
-
- ret = parse_args(line, &file, 0);
- args = line;
- }
- if (ret != 0) {
- printf("boot: returning to SCM\n");
- break;
- }
-
- /*
- * Try and load randomness from the boot device.
- */
- if (rnd_loaded == 0) {
- if (devparse(file, &controller, &unit, &lun, &part,
- &device, &ctrl, &fname) == 0 &&
- fname - file < sizeof(rndpath)) {
- memcpy(rndpath, file, fname - file);
- rndpath[fname - file] = '\0';
- strlcat(rndpath, BOOTRANDOM, sizeof rndpath);
- rnd_loaded = loadrandom(rndpath, rnddata,
- sizeof(rnddata));
- }
- }
-
- printf("%s: ", file);
- exec(file, args,
- bi.bootdev, bi.bootunit, bi.bootlun, bi.bootpart);
- printf("boot: %s: %s\n", file, strerror(errno));
- ask = 1;
- }
-}
-
-int
-loadrandom(const char *name, char *buf, size_t buflen)
-{
- struct stat sb;
- int fd;
- int rc = 0;
-
- fd = open(name, O_RDONLY);
- if (fd == -1) {
- if (errno != EPERM)
- printf("cannot open %s: %s\n", name, strerror(errno));
- return 0;
- }
- if (fstat(fd, &sb) == -1 || sb.st_uid != 0 || !S_ISREG(sb.st_mode) ||
- (sb.st_mode & (S_IWOTH|S_IROTH)))
- goto fail;
- (void) read(fd, buf, buflen);
- rc = 1;
-fail:
- close(fd);
- return rc;
-}
diff --git a/sys/arch/aviion/stand/boot/conf.c b/sys/arch/aviion/stand/boot/conf.c
deleted file mode 100644
index 83dd548c59f..00000000000
--- a/sys/arch/aviion/stand/boot/conf.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* $OpenBSD: conf.c,v 1.3 2014/08/21 14:24:08 mpi Exp $ */
-
-#include <sys/types.h>
-#include <netinet/in.h>
-
-#include <stand.h>
-#include <ufs.h>
-#include <nfs.h>
-
-struct fs_ops file_system[] = {
- { ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek, ufs_stat },
- { nfs_open, nfs_close, nfs_read, nfs_write, nfs_seek, nfs_stat }
-};
-int nfsys = sizeof(file_system) / sizeof(file_system[0]);
-
-extern int sdstrategy(void *, int, daddr32_t, size_t, void *, size_t *);
-extern int sdopen(struct open_file *, ...);
-extern int sdclose(struct open_file *);
-
-extern int net_strategy(void *, int, daddr32_t, size_t, void *, size_t *);
-extern int net_open(struct open_file *, ...);
-extern int net_close(struct open_file *);
-
-struct devsw devsw[] = {
- { "sd", sdstrategy, sdopen, sdclose, noioctl },
- { "inen", net_strategy, net_open, net_close, noioctl }
-};
-int ndevs = sizeof(devsw) / sizeof(devsw[0]);
-
-extern struct netif_driver le_driver;
-
-struct netif_driver *netif_drivers[] = {
- &le_driver
-};
-int n_netif_drivers = sizeof(netif_drivers) / sizeof(netif_drivers[0]);
-
-/* XXX */
-int netif_debug;
-int debug;
-int errno;
diff --git a/sys/arch/aviion/stand/boot/crt.c b/sys/arch/aviion/stand/boot/crt.c
deleted file mode 100644
index f68e5e6630a..00000000000
--- a/sys/arch/aviion/stand/boot/crt.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* $OpenBSD: crt.c,v 1.3 2013/10/16 16:59:34 miod Exp $ */
-
-#include <sys/types.h>
-#include <machine/prom.h>
-
-#include "stand.h"
-
-extern void boot(char *, int, int, int);
-
-/*
- * This is the boot code entry point.
- * Note that we do not bother to set r31, and use the default value supplied
- * by the PROM, which is the top of memory, minus the PROM data area (usually
- * 128KB).
- */
-void
-start(char *args, int dev, int unit, int lun)
-{
- extern int edata, end;
-
- /*
- * This code enables the SFU1 and is used for single stage
- * bootstraps or the first stage of a two stage bootstrap.
- * Do not use any low register to enable the SFU1. This wipes out
- * the args. Not cool at all... r25 seems free.
- */
- asm(" ldcr %%r25,%%cr1" ::: "r25");
- asm(" clr %r25,%r25,1<3>"); /* bit 3 is SFU1D */
- asm(" stcr %r25,%cr1");
-
- memset(&edata, 0, ((int)&end - (int)&edata));
-
- boot(args, dev, unit, lun);
- _rtt();
- /* NOTREACHED */
-}
diff --git a/sys/arch/aviion/stand/boot/dev_net.c b/sys/arch/aviion/stand/boot/dev_net.c
deleted file mode 100644
index ae8324adef8..00000000000
--- a/sys/arch/aviion/stand/boot/dev_net.c
+++ /dev/null
@@ -1,187 +0,0 @@
-/* $OpenBSD: dev_net.c,v 1.2 2014/08/21 14:24:08 mpi 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.
- */
-
-/*
- * This module implements a "raw device" interface suitable for
- * use by the stand-alone I/O library NFS code. This interface
- * does not support any "block" access, and exists only for the
- * purpose of initializing the network interface, getting boot
- * parameters, and performing the NFS mount.
- *
- * At open time, this does:
- *
- * find interface - netif_open()
- * RARP for IP address - rarp_getipaddress()
- * RPC/bootparams - callrpc(d, RPC_BOOTPARAMS, ...)
- * RPC/mountd - nfs_mount(sock, ip, path)
- *
- * the root file handle from mountd is saved in a global
- * for use by the NFS open code (NFS/lookup).
- */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netinet/if_ether.h>
-
-#include <machine/prom.h>
-
-#include "stand.h"
-#include "libsa.h"
-#include "prom.h"
-#include "net.h"
-#include "netif.h"
-#include "bootparam.h"
-#include "nfs.h"
-
-extern int nfs_root_node[]; /* XXX - get from nfs_mount() */
-
-struct in_addr myip, rootip, gateip, mask;
-char rootpath[FNAME_SIZE];
-
-int netdev_sock = -1;
-static int open_count;
-
-int net_mountroot(struct open_file *, char *);
-
-/*
- * Called by devopen after it sets f->f_dev to our devsw entry.
- * This opens the low-level device and sets f->f_devdata.
- */
-int
-net_open(f, devname)
- struct open_file *f;
- char *devname; /* Device part of file name (or NULL). */
-{
- int error = 0;
-
- /* On first open, do netif open, mount, etc. */
- if (open_count == 0) {
- /* Find network interface. */
- if ((netdev_sock = netif_open(devname)) < 0)
- return (error=ENXIO);
- if ((error = net_mountroot(f, devname)) != 0)
- return (error);
- }
- open_count++;
- f->f_devdata = nfs_root_node;
- return (error);
-}
-
-int
-net_close(f)
- struct open_file *f;
-{
- /* On last close, do netif close, etc. */
- if (open_count > 0)
- if (--open_count == 0)
- netif_close(netdev_sock);
- f->f_devdata = NULL;
- return (0);
-}
-
-int
-net_strategy(void *devdata, int rw, daddr32_t blk, size_t size, void *buf,
- size_t *rsize)
-{
- return EIO;
-}
-
-int
-net_mountroot(f, devname)
- struct open_file *f;
- char *devname; /* Device part of file name (or NULL). */
-{
- int error;
-
-#ifdef DEBUG
- printf("net_mountroot: %s\n", devname);
-#endif
-
- /*
- * Get info for NFS boot: our IP address, our hostname,
- * server IP address, and our root path on the server.
- * There are two ways to do this: The old, Sun way,
- * and the more modern, BOOTP way. (RFC951, RFC1048)
- */
-
-#ifdef SUN_BOOTPARAMS
- /* Get boot info using RARP and Sun bootparams. */
-
- /* Get our IP address. (rarp.c) */
- if (rarp_getipaddress(netdev_sock) == -1)
- return (EIO);
- printf("boot: client IP address: %s\n", intoa(myip.s_addr));
-
- /* Get our hostname, server IP address. */
- if (bp_whoami(netdev_sock))
- return (EIO);
- printf("boot: client name: %s\n", hostname);
-
- /* Get the root pathname. */
- if (bp_getfile(netdev_sock, "root", &rootip, rootpath))
- return (EIO);
-
-#else
-
- /* Get boot info using BOOTP way. (RFC951, RFC1048) */
- bootp(netdev_sock);
-
- printf("Using IP address: %s\n", intoa(myip.s_addr));
-
- printf("myip: %s (%s)", hostname, intoa(myip));
- if (gateip)
- printf(", gateip: %s", intoa(gateip));
- if (mask)
- printf(", mask: %s", intoa(mask));
- printf("\n");
-
-#endif
-
- printf("root addr=%s path=%s\n", intoa(rootip.s_addr), rootpath);
-
- /* Get the NFS file handle (mount). */
- error = nfs_mount(netdev_sock, rootip, rootpath);
-
- return (error);
-}
-
-/*
- * machdep_common_ether: get ethernet address
- */
-void
-machdep_common_ether(ether)
- u_char *ether;
-{
- scm_getenaddr(ether);
-}
diff --git a/sys/arch/aviion/stand/boot/devopen.c b/sys/arch/aviion/stand/boot/devopen.c
deleted file mode 100644
index a8f68a496f6..00000000000
--- a/sys/arch/aviion/stand/boot/devopen.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/* $OpenBSD: devopen.c,v 1.5 2014/02/24 20:15:37 miod Exp $ */
-
-/*
- * Copyright (c) 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-
-#include <sys/param.h>
-#include <stand.h>
-
-#include "libsa.h"
-
-int devparse(const char *, uint *, uint *, uint *, uint *,
- const char **, const char **, char **);
-
-/*
- * Parse the boot commandline into a proper device specification and
- * kernel filename.
- */
-int
-devparse(const char *fname, uint *controller, uint *unit, uint *lun, uint *part,
- const char **dev, const char **ctrl, char **file)
-{
- struct devsw *dp;
- int i;
- const char *po, *pc, *pc2, *p, *comma;
- static char devctrl[1 + 4];
- char device[1 + 4];
- size_t devlen;
-
- /* defaults */
- *controller = *unit = *lun = *part = 0;
- device[0] = '\0';
- devctrl[0] = '\0';
-
- /*
- * Attempt to parse the name as
- * ctrlnam([num[,unit[,lun]]])[partname:]filename
- * or
- * devnam([num|ctrlnam([num]][,initiator])[,unit[,lun]])
- * [partname:]filename
- *
- * With device names being "sd" or "st" for storage devices,
- * or a controller name for network devices, and controller names
- * being four letter long ("dgen", "dgsc", "inen", "ncsc" ...)
- *
- * Initiator id is always ignored.
- */
-
- po = strchr(fname, '(');
- if (po != NULL) {
- pc = strchr(fname, ')');
- if (pc == NULL || pc < po)
- return EINVAL;
- p = strchr(po + 1, '(');
-
- if (p != NULL && p < pc) {
- pc2 = strchr(pc + 1, ')');
- if (pc2 == NULL)
- return EINVAL;
- } else
- pc2 = NULL; /* XXX gcc3 -Wuninitialized */
-
- devlen = po++ - fname;
- if (devlen > 4)
- return EINVAL;
- memcpy(device, fname, devlen);
- device[devlen] = '\0';
-
- if (p != NULL && p < pc) {
- /* second form. extract controller name */
- devlen = p++ - po;
- if (devlen > 4)
- return EINVAL;
- memcpy(devctrl, po, devlen);
- devctrl[devlen] = '\0';
-
- *controller = strtol(p, NULL, 0);
- po = pc + 1;
- pc = pc2;
- } else {
- /* first form. extract controller number */
- *controller = strtol(po, NULL, 0);
- }
-
- comma = strchr(po, ',');
- if (comma != NULL && comma < pc) {
- comma++;
- *unit = strtol(comma, NULL, 0);
- po = comma;
- }
-
- comma = strchr(po, ',');
- if (comma != NULL && comma < pc) {
- comma++;
- *lun = strtol(comma, NULL, 0);
- po = comma;
- }
-
- pc++;
- fname = pc;
- } else {
- /* no controller, keep defaults */
- }
-
- p = strchr(fname, ':');
- if (p != NULL) {
- *part = strtol(fname, NULL, 0);
- fname = p + 1;
- }
-
- while (*fname == '/' || *fname == ':')
- fname++;
-
- *file = (char *)fname;
-
- for (dp = devsw, i = 0; i < ndevs; dp++, i++)
- if (dp->dv_name != NULL && strcmp(dp->dv_name, device) == 0)
- break;
- if (i == ndevs)
- return ENXIO;
-
- *dev = dp->dv_name;
- *ctrl = devctrl;
- return 0;
-}
-
-/*
- * Parse the boot commandline into a proper device specification and
- * kernel filename.
- */
-int
-devopen(struct open_file *f, const char *fname, char **file)
-{
- struct devsw *dp;
- int error, i;
- uint controller, unit, lun, part;
- const char *device, *ctrl;
-
- error = devparse(fname, &controller, &unit, &lun, &part, &device, &ctrl,
- file);
- if (error != 0)
- return error;
-
- for (dp = devsw, i = 0; i < ndevs; dp++, i++)
- if (dp->dv_name != NULL && strcmp(dp->dv_name, device) == 0)
- break;
- if (i == ndevs)
- return ENXIO;
-
- error = (*dp->dv_open)(f, ctrl, controller, unit, lun, part);
- if (error == 0) {
- f->f_dev = dp;
- /* update global boot_info */
- bi.bootdev = controller;
- bi.bootunit = unit;
- bi.bootlun = lun;
- bi.bootpart = part;
- }
-
- return error;
-}
diff --git a/sys/arch/aviion/stand/boot/if_le.c b/sys/arch/aviion/stand/boot/if_le.c
deleted file mode 100644
index 60495de2a06..00000000000
--- a/sys/arch/aviion/stand/boot/if_le.c
+++ /dev/null
@@ -1,448 +0,0 @@
-/* $OpenBSD: if_le.c,v 1.3 2014/08/21 14:24:08 mpi 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.
- *
- * 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 Adam Glass
- * 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 Adam Glass.
- * 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 Adam Glass ``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.
- */
-
-#include <sys/param.h>
-#include <sys/types.h>
-
-#include <netinet/in.h>
-
-#include <machine/prom.h>
-
-#include "stand.h"
-#include "libsa.h"
-#include "net.h"
-#include "netif.h"
-
-#include "if_lereg.h"
-
-int le_debug = 0;
-
-void le_end(struct netif *);
-void le_error(struct netif *, char *, volatile struct lereg1 *);
-int le_get(struct iodesc *, void *, size_t, time_t);
-void le_init(struct iodesc *, void *);
-int le_match(struct netif *, void *);
-int le_poll(struct iodesc *, void *, int);
-int le_probe(struct netif *, void *);
-int le_put(struct iodesc *, void *, size_t);
-void le_reset(struct netif *, u_char *);
-extern void machdep_common_ether(u_char *);
-
-struct netif_stats le_stats;
-
-struct netif_dif le0_dif = {
- 0, /* unit */
- 1, /* nsel */
- &le_stats,
- 0,
- 0,
-};
-
-struct netif_driver le_driver = {
- "le", /* netif_bname */
- le_match, /* match */
- le_probe, /* probe */
- le_init, /* init */
- le_get, /* get */
- le_put, /* put */
- le_end, /* end */
- &le0_dif, /* netif_ifs */
- 1, /* netif_nifs */
-};
-
-struct le_configuration {
- unsigned int phys_addr;
- int used;
-} le_config[] = {
- { 0xfff8c000, 0 } /* AV400 */
-};
-
-int nle_config = sizeof(le_config) / (sizeof(le_config[0]));
-
-struct {
- struct lereg1 *sc_r1; /* LANCE registers */
- struct lereg2 *sc_r2; /* RAM */
- int next_rmd;
- int next_tmd;
-} le_softc;
-
-int
-le_match(nif, machdep_hint)
- struct netif *nif;
- void *machdep_hint;
-{
- char *name;
- int i, val = 0;
-
- name = machdep_hint;
- if (name && !bcmp(le_driver.netif_bname, name, 2))
- val += 10;
- for (i = 0; i < nle_config; i++) {
- if (le_config[i].used)
- continue;
- if (le_debug)
- printf("le%d: le_match --> %d\n", i, val + 1);
- le_config[i].used++;
- return val + 1;
- }
- if (le_debug)
- printf("le%d: le_match --> 0\n", i);
- return 0;
-}
-
-int
-le_probe(nif, machdep_hint)
- struct netif *nif;
- void *machdep_hint;
-{
-
- /* the set unit is the current unit */
- if (le_debug)
- printf("le%d: le_probe called\n", nif->nif_unit);
-
- return 0;
-}
-
-void
-le_error(nif, str, ler1)
- struct netif *nif;
- char *str;
- volatile struct lereg1 *ler1;
-{
- /* ler1->ler1_rap = LE_CSRO done in caller */
- if (ler1->ler1_rdp & LE_C0_BABL)
- panic("le%d: been babbling, found by '%s'", nif->nif_unit, str);
- if (ler1->ler1_rdp & LE_C0_CERR) {
- le_stats.collision_error++;
- ler1->ler1_rdp = LE_C0_CERR;
- }
- if (ler1->ler1_rdp & LE_C0_MISS) {
- le_stats.missed++;
- ler1->ler1_rdp = LE_C0_MISS;
- }
- if (ler1->ler1_rdp & LE_C0_MERR) {
- printf("le%d: memory error in '%s'\n", nif->nif_unit, str);
- panic("memory error");
- }
-}
-
-void
-le_reset(nif, myea)
- struct netif *nif;
- u_char *myea;
-{
- struct lereg1 *ler1 = le_softc.sc_r1;
- struct lereg2 *ler2 = le_softc.sc_r2;
- unsigned int a;
- int timo = 100000, stat = 0, i;
-
- if (le_debug)
- printf("le%d: le_reset called\n", nif->nif_unit);
- ler1->ler1_rap = LE_CSR0;
- ler1->ler1_rdp = LE_C0_STOP; /* do nothing until we are finished */
-
- bzero(ler2, sizeof(*ler2));
-
- ler2->ler2_mode = LE_MODE_NORMAL;
- ler2->ler2_padr[0] = myea[1];
- ler2->ler2_padr[1] = myea[0];
- ler2->ler2_padr[2] = myea[3];
- ler2->ler2_padr[3] = myea[2];
- ler2->ler2_padr[4] = myea[5];
- ler2->ler2_padr[5] = myea[4];
-
- ler2->ler2_ladrf0 = 0;
- ler2->ler2_ladrf1 = 0;
-
- a = (u_int) ler2->ler2_rmd;
- ler2->ler2_rlen = LE_RLEN | (a >> 16);
- ler2->ler2_rdra = a & LE_ADDR_LOW_MASK;
-
- a = (u_int) ler2->ler2_tmd;
- ler2->ler2_tlen = LE_TLEN | (a >> 16);
- ler2->ler2_tdra = a & LE_ADDR_LOW_MASK;
-
- ler1->ler1_rap = LE_CSR1;
- a = (u_int) ler2;
- ler1->ler1_rdp = a & LE_ADDR_LOW_MASK;
- ler1->ler1_rap = LE_CSR2;
- ler1->ler1_rdp = a >> 16;
-
- for (i = 0; i < LERBUF; i++) {
- a = (u_int) & ler2->ler2_rbuf[i];
- ler2->ler2_rmd[i].rmd0 = a & LE_ADDR_LOW_MASK;
- ler2->ler2_rmd[i].rmd1_bits = LE_R1_OWN;
- ler2->ler2_rmd[i].rmd1_hadr = a >> 16;
- ler2->ler2_rmd[i].rmd2 = -LEMTU;
- ler2->ler2_rmd[i].rmd3 = 0;
- }
- for (i = 0; i < LETBUF; i++) {
- a = (u_int) & ler2->ler2_tbuf[i];
- ler2->ler2_tmd[i].tmd0 = a & LE_ADDR_LOW_MASK;
- ler2->ler2_tmd[i].tmd1_bits = 0;
- ler2->ler2_tmd[i].tmd1_hadr = a >> 16;
- ler2->ler2_tmd[i].tmd2 = 0;
- ler2->ler2_tmd[i].tmd3 = 0;
- }
-
- ler1->ler1_rap = LE_CSR3;
- ler1->ler1_rdp = LE_C3_BSWP;
-
- ler1->ler1_rap = LE_CSR0;
- ler1->ler1_rdp = LE_C0_INIT;
- do {
- if (--timo == 0) {
- printf("le%d: init timeout, stat = 0x%x\n",
- nif->nif_unit, stat);
- break;
- }
- stat = ler1->ler1_rdp;
- } while ((stat & LE_C0_IDON) == 0);
-
- ler1->ler1_rdp = LE_C0_IDON;
- le_softc.next_rmd = 0;
- le_softc.next_tmd = 0;
- ler1->ler1_rap = LE_CSR0;
- ler1->ler1_rdp = LE_C0_STRT;
-}
-
-int
-le_poll(desc, pkt, len)
- struct iodesc *desc;
- void *pkt;
- int len;
-{
- struct lereg1 *ler1 = le_softc.sc_r1;
- struct lereg2 *ler2 = le_softc.sc_r2;
- unsigned int a;
- int length;
- struct lermd *rmd;
-
- ler1->ler1_rap = LE_CSR0;
- if ((ler1->ler1_rdp & LE_C0_RINT) != 0)
- ler1->ler1_rdp = LE_C0_RINT;
- rmd = &ler2->ler2_rmd[le_softc.next_rmd];
- if (rmd->rmd1_bits & LE_R1_OWN) {
- return (0);
- }
- if (ler1->ler1_rdp & LE_C0_ERR)
- le_error(desc->io_netif, "le_poll", ler1);
- if (rmd->rmd1_bits & LE_R1_ERR) {
- printf("le%d_poll: rmd status 0x%x\n", desc->io_netif->nif_unit,
- rmd->rmd1_bits);
- length = 0;
- goto cleanup;
- }
- if ((rmd->rmd1_bits & (LE_R1_STP | LE_R1_ENP)) != (LE_R1_STP | LE_R1_ENP))
- panic("le_poll: chained packet");
-
- length = rmd->rmd3;
- if (length >= LEMTU) {
- length = 0;
- panic("csr0 when bad things happen: %x", ler1->ler1_rdp);
- goto cleanup;
- }
- if (!length)
- goto cleanup;
- length -= 4;
- if (length > 0) {
- /*
- * if buffer is smaller than the packet truncate it.
- * (is this wise?)
- */
- if (length > len)
- length = len;
-
- bcopy((void *)&ler2->ler2_rbuf[le_softc.next_rmd], pkt, length);
- }
-cleanup:
- a = (u_int) & ler2->ler2_rbuf[le_softc.next_rmd];
- rmd->rmd0 = a & LE_ADDR_LOW_MASK;
- rmd->rmd1_hadr = a >> 16;
- rmd->rmd2 = -LEMTU;
- le_softc.next_rmd =
- (le_softc.next_rmd == (LERBUF - 1)) ? 0 : (le_softc.next_rmd + 1);
- rmd->rmd1_bits = LE_R1_OWN;
- return length;
-}
-
-int
-le_put(desc, pkt, len)
- struct iodesc *desc;
- void *pkt;
- size_t len;
-{
- volatile struct lereg1 *ler1 = le_softc.sc_r1;
- volatile struct lereg2 *ler2 = le_softc.sc_r2;
- volatile struct letmd *tmd;
- int timo = 100000, stat = 0;
- unsigned int a;
-
- ler1->ler1_rap = LE_CSR0;
- if (ler1->ler1_rdp & LE_C0_ERR)
- le_error(desc->io_netif, "le_put(way before xmit)", ler1);
- tmd = &ler2->ler2_tmd[le_softc.next_tmd];
- while (tmd->tmd1_bits & LE_T1_OWN) {
- printf("le%d: output buffer busy\n", desc->io_netif->nif_unit);
- }
- bcopy(pkt, (void *)ler2->ler2_tbuf[le_softc.next_tmd], len);
- if (len < 64)
- tmd->tmd2 = -64;
- else
- tmd->tmd2 = -len;
- tmd->tmd3 = 0;
- if (ler1->ler1_rdp & LE_C0_ERR)
- le_error(desc->io_netif, "le_put(before xmit)", ler1);
- tmd->tmd1_bits = LE_T1_STP | LE_T1_ENP | LE_T1_OWN;
- a = (u_int) & ler2->ler2_tbuf[le_softc.next_tmd];
- tmd->tmd0 = a & LE_ADDR_LOW_MASK;
- tmd->tmd1_hadr = a >> 16;
- ler1->ler1_rdp = LE_C0_TDMD;
- if (ler1->ler1_rdp & LE_C0_ERR)
- le_error(desc->io_netif, "le_put(after xmit)", ler1);
- do {
- if (--timo == 0) {
- printf("le%d: transmit timeout, stat = 0x%x\n",
- desc->io_netif->nif_unit, stat);
- if (ler1->ler1_rdp & LE_C0_ERR)
- le_error(desc->io_netif, "le_put(timeout)", ler1);
- break;
- }
- stat = ler1->ler1_rdp;
- } while ((stat & LE_C0_TINT) == 0);
- ler1->ler1_rdp = LE_C0_TINT;
- if (ler1->ler1_rdp & LE_C0_ERR) {
- if ((ler1->ler1_rdp & (LE_C0_BABL | LE_C0_CERR | LE_C0_MISS |
- LE_C0_MERR)) !=
- LE_C0_CERR)
- printf("le_put: xmit error, buf %d\n", le_softc.next_tmd);
- le_error(desc->io_netif, "le_put(xmit error)", ler1);
- }
- le_softc.next_tmd = 0;
-/* (le_softc.next_tmd == (LETBUF - 1)) ? 0 : le_softc.next_tmd + 1;*/
- if (tmd->tmd1_bits & LE_T1_DEF)
- le_stats.deferred++;
- if (tmd->tmd1_bits & LE_T1_ONE)
- le_stats.collisions++;
- if (tmd->tmd1_bits & LE_T1_MORE)
- le_stats.collisions += 2;
- if (tmd->tmd1_bits & LE_T1_ERR) {
- printf("le%d: transmit error, error = 0x%x\n", desc->io_netif->nif_unit,
- tmd->tmd3);
- return -1;
- }
- if (le_debug) {
- printf("le%d: le_put() successful: sent %ld\n",
- desc->io_netif->nif_unit, len);
- printf("le%d: le_put(): tmd1_bits: %x tmd3: %x\n",
- desc->io_netif->nif_unit,
- (unsigned int) tmd->tmd1_bits,
- (unsigned int) tmd->tmd3);
- }
- return len;
-}
-
-int
-le_get(desc, pkt, len, timeout)
- struct iodesc *desc;
- void *pkt;
- size_t len;
- time_t timeout;
-{
- time_t t;
- int cc;
-
- t = getsecs();
- cc = 0;
- while (((getsecs() - t) < timeout) && !cc) {
- cc = le_poll(desc, pkt, len);
- }
- return cc;
-}
-/*
- * init le device. return 0 on failure, 1 if ok.
- */
-void
-le_init(desc, machdep_hint)
- struct iodesc *desc;
- void *machdep_hint;
-{
- u_long eram = STAGE1_RELOC;
- struct netif *nif = desc->io_netif;
-
- if (le_debug)
- printf("le%d: le_init called\n", desc->io_netif->nif_unit);
- machdep_common_ether(desc->myea);
- bzero(&le_softc, sizeof(le_softc));
- le_softc.sc_r1 =
- (struct lereg1 *) le_config[desc->io_netif->nif_unit].phys_addr;
- le_softc.sc_r2 = (struct lereg2 *) (eram - (1024 * 1024));
- le_reset(desc->io_netif, desc->myea);
- printf("device: %s%d attached to %s\n", nif->nif_driver->netif_bname,
- nif->nif_unit, ether_sprintf(desc->myea));
-}
-
-void
-le_end(nif)
- struct netif *nif;
-{
- struct lereg1 *ler1 = le_softc.sc_r1;
-
- if (le_debug)
- printf("le%d: le_end called\n", nif->nif_unit);
- ler1->ler1_rap = LE_CSR0;
- ler1->ler1_rdp = LE_C0_STOP;
-}
diff --git a/sys/arch/aviion/stand/boot/if_lereg.h b/sys/arch/aviion/stand/boot/if_lereg.h
deleted file mode 100644
index 3734771cc30..00000000000
--- a/sys/arch/aviion/stand/boot/if_lereg.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/* $OpenBSD: if_lereg.h,v 1.1 2013/10/17 16:30:07 miod Exp $ */
-
-/*-
- * Copyright (c) 1982, 1992, 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. 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.
- *
- * @(#)if_lereg.h 8.2 (Berkeley) 10/30/93
- */
-
-#define LEMTU 1518
-#define LEMINSIZE 60 /* should be 64 if mode DTCR is set */
-#define LERBUF 8
-#define LERBUFLOG2 3
-#define LE_RLEN (LERBUFLOG2 << 13)
-#define LETBUF 1
-#define LETBUFLOG2 0
-#define LE_TLEN (LETBUFLOG2 << 13)
-
-/*
- * LANCE registers. Although there are 16 bit registers, on the AV400
- * design, they need to be accessed as 32 bit registers. Bus magic...
- */
-struct lereg1 {
- volatile u_int32_t ler1_rdp; /* register data port */
- volatile u_int32_t ler1_rap; /* register address port */
-};
-
-/* register addresses */
-#define LE_CSR0 0 /* Control and status register */
-#define LE_CSR1 1 /* low address of init block */
-#define LE_CSR2 2 /* high address of init block */
-#define LE_CSR3 3 /* Bus master and control */
-
-/* Control and status register 0 (csr0) */
-#define LE_C0_ERR 0x8000 /* error summary */
-#define LE_C0_BABL 0x4000 /* transmitter timeout error */
-#define LE_C0_CERR 0x2000 /* collision */
-#define LE_C0_MISS 0x1000 /* missed a packet */
-#define LE_C0_MERR 0x0800 /* memory error */
-#define LE_C0_RINT 0x0400 /* receiver interrupt */
-#define LE_C0_TINT 0x0200 /* transmitter interrupt */
-#define LE_C0_IDON 0x0100 /* initialization done */
-#define LE_C0_INTR 0x0080 /* interrupt condition */
-#define LE_C0_INEA 0x0040 /* interrupt enable */
-#define LE_C0_RXON 0x0020 /* receiver on */
-#define LE_C0_TXON 0x0010 /* transmitter on */
-#define LE_C0_TDMD 0x0008 /* transmit demand */
-#define LE_C0_STOP 0x0004 /* disable all external activity */
-#define LE_C0_STRT 0x0002 /* enable external activity */
-#define LE_C0_INIT 0x0001 /* begin initialization */
-
-#define LE_C0_BITS \
- "\20\20ERR\17BABL\16CERR\15MISS\14MERR\13RINT\
-\12TINT\11IDON\10INTR\07INEA\06RXON\05TXON\04TDMD\03STOP\02STRT\01INIT"
-
-/* Control and status register 3 (csr3) */
-#define LE_C3_BSWP 0x4 /* byte swap */
-#define LE_C3_ACON 0x2 /* ALE control, eh? */
-#define LE_C3_BCON 0x1 /* byte control */
-/*
- * Current size is 13,758 bytes with 8 x 1518 receive buffers and
- * 1 x 1518 transmit buffer.
- */
-struct lereg2 {
- /* initialization block */
- volatile u_short ler2_mode; /* mode */
- volatile u_char ler2_padr[6]; /* physical address */
-#ifdef new_code
- volatile u_short ler2_ladrf[4]; /* logical address filter */
-#else
- volatile u_long ler2_ladrf0; /* logical address filter */
- volatile u_long ler2_ladrf1; /* logical address filter */
-#endif
- volatile u_short ler2_rdra; /* receive descriptor addr */
- volatile u_short ler2_rlen; /* rda high and ring size */
- volatile u_short ler2_tdra; /* transmit descriptor addr */
- volatile u_short ler2_tlen; /* tda high and ring size */
- /* receive message descriptors. bits/hadr are byte order dependent. */
- struct lermd {
- volatile u_short rmd0; /* low address of packet */
- volatile u_char rmd1_bits; /* descriptor bits */
- volatile u_char rmd1_hadr; /* high address of packet */
- volatile short rmd2; /* buffer byte count */
- volatile u_short rmd3; /* message byte count */
- } ler2_rmd[LERBUF];
- /* transmit message descriptors */
- struct letmd {
- volatile u_short tmd0; /* low address of packet */
- volatile u_char tmd1_bits; /* descriptor bits */
- volatile u_char tmd1_hadr; /* high address of packet */
- volatile short tmd2; /* buffer byte count */
- volatile u_short tmd3; /* transmit error bits */
- } ler2_tmd[LETBUF];
- volatile char ler2_rbuf[LERBUF][LEMTU];
- volatile char ler2_tbuf[LETBUF][LEMTU];
-};
-/* Initialzation block (mode) */
-#define LE_MODE_PROM 0x8000 /* promiscuous mode */
-/* 0x7f80 reserved, must be zero */
-#define LE_MODE_INTL 0x0040 /* internal loopback */
-#define LE_MODE_DRTY 0x0020 /* disable retry */
-#define LE_MODE_COLL 0x0010 /* force a collision */
-#define LE_MODE_DTCR 0x0008 /* disable transmit CRC */
-#define LE_MODE_LOOP 0x0004 /* loopback mode */
-#define LE_MODE_DTX 0x0002 /* disable transmitter */
-#define LE_MODE_DRX 0x0001 /* disable receiver */
-#define LE_MODE_NORMAL 0 /* none of the above */
-
-
-/* Receive message descriptor 1 (rmd1_bits) */
-#define LE_R1_OWN 0x80 /* LANCE owns the packet */
-#define LE_R1_ERR 0x40 /* error summary */
-#define LE_R1_FRAM 0x20 /* framing error */
-#define LE_R1_OFLO 0x10 /* overflow error */
-#define LE_R1_CRC 0x08 /* CRC error */
-#define LE_R1_BUFF 0x04 /* buffer error */
-#define LE_R1_STP 0x02 /* start of packet */
-#define LE_R1_ENP 0x01 /* end of packet */
-
-#define LE_R1_BITS \
- "\20\10OWN\7ERR\6FRAM\5OFLO\4CRC\3BUFF\2STP\1ENP"
-
-/* Transmit message descriptor 1 (tmd1_bits) */
-#define LE_T1_OWN 0x80 /* LANCE owns the packet */
-#define LE_T1_ERR 0x40 /* error summary */
-#define LE_T1_MORE 0x10 /* multiple collisions */
-#define LE_T1_ONE 0x08 /* single collision */
-#define LE_T1_DEF 0x04 /* defferred transmit */
-#define LE_T1_STP 0x02 /* start of packet */
-#define LE_T1_ENP 0x01 /* end of packet */
-
-#define LE_T1_BITS \
- "\20\10OWN\7ERR\6RES\5MORE\4ONE\3DEF\2STP\1ENP"
-
-/* Transmit message descriptor 3 (tmd3) */
-#define LE_T3_BUFF 0x8000 /* buffer error */
-#define LE_T3_UFLO 0x4000 /* underflow error */
-#define LE_T3_LCOL 0x1000 /* late collision */
-#define LE_T3_LCAR 0x0800 /* loss of carrier */
-#define LE_T3_RTRY 0x0400 /* retry error */
-#define LE_T3_TDR_MASK 0x03ff /* time domain reflectometry counter */
-
-#define LE_XMD2_ONES 0xf000
-
-#define LE_T3_BITS \
- "\20\20BUFF\17UFLO\16RES\15LCOL\14LCAR\13RTRY"
-
-
-#define LE_ADDR_LOW_MASK (0xffff)
diff --git a/sys/arch/aviion/stand/boot/oaic.c b/sys/arch/aviion/stand/boot/oaic.c
deleted file mode 100644
index e52ceee204d..00000000000
--- a/sys/arch/aviion/stand/boot/oaic.c
+++ /dev/null
@@ -1,1229 +0,0 @@
-/* $OpenBSD: oaic.c,v 1.3 2014/07/12 19:01:49 tedu Exp $ */
-
-/*
- * Copyright (c) 2010, 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
- * Derived from sys/dev/ic/aic6360.c under the following licence terms:
- */
-/* OpenBSD: aic6360.c,v 1.26 2011/04/03 12:42:36 krw Exp */
-/* $NetBSD: aic6360.c,v 1.52 1996/12/10 21:27:51 thorpej Exp $ */
-/*
- * Copyright (c) 1994, 1995, 1996 Charles Hannum. 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 Charles M. Hannum.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * Copyright (c) 1994 Jarle Greipsland
- * 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.
- *
- * 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.
- */
-
-/*
- * Acknowledgements: Many of the algorithms used in this driver are
- * inspired by the work of Julian Elischer (julian@tfs.com) and
- * Charles Hannum (mycroft@duality.gnu.ai.mit.edu). Thanks a million!
- */
-
-/* TODO list:
- * 1) Get the DMA stuff working.
- * 2) Get the synch stuff working (requires DMA first).
- */
-
-#include <sys/param.h>
-#include <stand.h>
-#include "libsa.h"
-
-#include "scsi.h"
-
-#include <dev/ic/aic6250reg.h>
-
-/*
- * ACB. Holds additional information for each SCSI command Comments: We
- * need a separate scsi command block because we may need to overwrite it
- * with a request sense command. Basicly, we refrain from fiddling with
- * the scsi_xfer struct (except do the expected updating of return values).
- * We'll generally update: xs->{flags,resid,error,sense,status} and
- * occasionally xs->retries.
- */
-struct aic6250_acb {
- struct scsi_generic *scsi_cmd;
- int scsi_cmd_length;
- void *data_addr; /* Saved data pointer */
- int data_length; /* Residue */
-
- uint8_t target_stat; /* SCSI status byte */
-
- int xsflags;
- int error;
-};
-
-struct aic6250_softc {
- uint32_t sc_baseaddr;
-
- int sc_tgtid;
- int sc_tgtlun;
-
- struct aic6250_acb *sc_nexus; /* current command */
- struct aic6250_acb sc_acb;
-
- /* Data about the current nexus (updated for every cmd switch) */
- u_char *sc_dp; /* Current data pointer */
- size_t sc_dleft; /* Data bytes left to transfer */
- u_char *sc_cp; /* Current command pointer */
- size_t sc_cleft; /* Command bytes left to transfer */
-
- /* Adapter state */
- uint8_t sc_phase; /* Current bus phase */
- uint8_t sc_prevphase; /* Previous bus phase */
- uint8_t sc_state; /* State applicable to the adapter */
-#define AIC_INIT 0
-#define AIC_IDLE 1
-#define AIC_SELECTING 2 /* SCSI command is arbiting */
-#define AIC_RESELECTED 3 /* Has been reselected */
-#define AIC_CONNECTED 4 /* Actively using the SCSI bus */
-#define AIC_DISCONNECT 5 /* MSG_DISCONNECT received */
-#define AIC_CMDCOMPLETE 6 /* MSG_CMDCOMPLETE received */
-#define AIC_CLEANING 7
- uint8_t sc_flags;
-#define AIC_DROP_MSGIN 0x01 /* Discard all msgs (parity err detected) */
-#define AIC_ABORTING 0x02 /* Bailing out */
- uint8_t sc_selid; /* Reselection ID */
-
- uint8_t sc_imr0;
- uint8_t sc_imr1;
- uint8_t sc_cr0;
- uint8_t sc_cr1;
- uint sc_selto; /* Selection timeout (when polling) */
-
- /* Message stuff */
- uint8_t sc_msgpriq; /* Messages we want to send */
- uint8_t sc_msgoutq; /* Messages sent during last MESSAGE OUT */
- uint8_t sc_lastmsg; /* Message last transmitted */
- uint8_t sc_currmsg; /* Message currently ready to transmit */
-#define SEND_DEV_RESET 0x01
-#define SEND_PARITY_ERROR 0x02
-#define SEND_INIT_DET_ERR 0x04
-#define SEND_REJECT 0x08
-#define SEND_IDENTIFY 0x10
-#define SEND_ABORT 0x20
-#define AIC_MAX_MSG_LEN 8
- uint8_t sc_omess[AIC_MAX_MSG_LEN];
- uint8_t *sc_omp; /* Outgoing message pointer */
- uint8_t sc_imess[AIC_MAX_MSG_LEN];
- uint8_t *sc_imp; /* Incoming message pointer */
-
- /* Hardware stuff */
- int sc_initiator; /* Our scsi id */
- int sc_freq; /* Clock frequency in MHz */
-};
-
-int aic6250_intr(void *);
-
-void aic6250_init(struct aic6250_softc *);
-void aic6250_done(struct aic6250_softc *, struct aic6250_acb *);
-void aic6250_sched_msgout(struct aic6250_softc *, uint8_t);
-void aic6250_select(struct aic6250_softc *, struct aic6250_acb *);
-void aic6250_seltimeout(void *);
-void aic6250_sched(struct aic6250_softc *);
-void aic6250_scsi_reset(struct aic6250_softc *);
-void aic6250_reset(struct aic6250_softc *);
-void aic6250_acb_free(void *, void *);
-void *aic6250_acb_alloc(void *);
-int aic6250_reselect(struct aic6250_softc *, int);
-void aic6250_msgin(struct aic6250_softc *);
-void aic6250_msgout(struct aic6250_softc *);
-void aic6250_ack(struct aic6250_softc *);
-int aic6250_dataout_pio(struct aic6250_softc *, uint8_t *, int, int);
-int aic6250_datain_pio(struct aic6250_softc *, uint8_t *, int, int);
-
-#define oaic_read(sc, addr) \
- (*(volatile uint32_t *)((sc)->sc_baseaddr + ((addr) << 2)) & 0xff)
-#define oaic_write(sc, addr, val) \
- *(volatile uint32_t *)((sc)->sc_baseaddr + ((addr) << 2)) = (val)
-
-/*
- * Attach the AIC6250, fill out some high and low level data structures
- */
-void *
-oaic_attach(uint32_t addr, int id, int lun)
-{
- struct aic6250_softc *sc;
-
- sc = (struct aic6250_softc *)alloc(sizeof *sc);
- if (sc == NULL)
- return NULL;
-
- memset(sc, 0, sizeof *sc);
- sc->sc_baseaddr = addr;
- /* XXX */
- sc->sc_freq = 10;
- sc->sc_initiator = 7;
- sc->sc_cr0 = AIC_CR0_EN_PORT_A;
- sc->sc_cr1 = AIC_CR1_ENABLE_16BIT_MEM_BUS;
- /* XXX */
-
- sc->sc_state = AIC_INIT;
-
- if (sc->sc_freq >= 20)
- sc->sc_cr1 |= AIC_CR1_CLK_FREQ_MODE;
-
- aic6250_init(sc); /* init chip and driver */
-
- sc->sc_tgtid = id;
- sc->sc_tgtlun = lun;
-
- return sc;
-}
-
-void
-oaic_detach(void *cookie)
-{
- free(cookie, sizeof(struct aic6250_softc));
-}
-
-/*
- * Initialize AIC6250 chip itself.
- */
-void
-aic6250_reset(struct aic6250_softc *sc)
-{
- /* reset chip */
- oaic_write(sc, AIC_CONTROL_REG1, AIC_CR1_CHIP_SW_RESET);
- delay(200);
- oaic_write(sc, AIC_CONTROL_REG1, 0);
-
- oaic_write(sc, AIC_CONTROL_REG1, sc->sc_cr1);
- oaic_write(sc, AIC_CONTROL_REG0, sc->sc_cr0 | sc->sc_initiator);
- /* asynchronous operation */
- oaic_write(sc, AIC_OFFSET_CNTRL, 0);
-
- sc->sc_imr0 = sc->sc_imr1 = 0;
- oaic_write(sc, AIC_INT_MSK_REG0, sc->sc_imr0);
- oaic_write(sc, AIC_INT_MSK_REG1, sc->sc_imr1);
-
- oaic_write(sc, AIC_DMA_BYTE_COUNT_L, 0);
- oaic_write(sc, AIC_DMA_BYTE_COUNT_M, 0);
- oaic_write(sc, AIC_DMA_BYTE_COUNT_H, 0);
- oaic_write(sc, AIC_DMA_CNTRL, 0);
- oaic_write(sc, AIC_PORT_A, 0);
- oaic_write(sc, AIC_PORT_B, 0);
-}
-
-/* Pull the SCSI RST line for 500 us */
-void
-aic6250_scsi_reset(struct aic6250_softc *sc)
-{
- /* reset SCSI bus */
- oaic_write(sc, AIC_CONTROL_REG1,
- sc->sc_cr1 | AIC_CR1_SCSI_RST_OUT);
- delay(500);
- oaic_write(sc, AIC_CONTROL_REG1, sc->sc_cr1);
- delay(50);
-}
-
-/*
- * Initialize aic SCSI driver.
- */
-void
-aic6250_init(struct aic6250_softc *sc)
-{
- struct aic6250_acb *acb;
-
- aic6250_reset(sc);
- aic6250_scsi_reset(sc);
- aic6250_reset(sc);
-
- if (sc->sc_state == AIC_INIT) {
- /* First time through; initialize. */
- sc->sc_nexus = NULL;
- } else {
- /* Cancel any active commands. */
- sc->sc_state = AIC_CLEANING;
- if ((acb = sc->sc_nexus) != NULL) {
- acb->error = XS_DRIVER_STUFFUP;
- aic6250_done(sc, acb);
- }
- }
-
- sc->sc_prevphase = PH_INVALID;
- sc->sc_state = AIC_IDLE;
- sc->sc_imr0 = AIC_IMR_EN_ERROR_INT;
- sc->sc_imr1 = AIC_IMR1_EN_SCSI_RST_INT;
- oaic_write(sc, AIC_INT_MSK_REG0, sc->sc_imr0);
- oaic_write(sc, AIC_INT_MSK_REG1, sc->sc_imr1);
-}
-
-/*
- * DRIVER FUNCTIONS CALLABLE FROM HIGHER LEVEL DRIVERS
- */
-
-/*
- * Expected sequence:
- * 1) Command inserted into ready list
- * 2) Command selected for execution
- * 3) Command won arbitration and has selected target device
- * 4) Send message out (identify message, eventually also sync.negotiations)
- * 5) Send command
- * 5a) Receive disconnect message, disconnect.
- * 5b) Reselected by target
- * 5c) Receive identify message from target.
- * 6) Send or receive data
- * 7) Receive status
- * 8) Receive message (command complete etc.)
- * 9) If status == SCSI_CHECK construct a synthetic request sense SCSI cmd.
- * Repeat 2-8 (no disconnects please...)
- */
-
-/*
- * Start a SCSI-command
- * This function is called by the higher level SCSI-driver to queue/run
- * SCSI-commands.
- */
-int
-oaic_scsicmd(void *cookie, void *cmdbuf, size_t cmdlen, void *databuf,
- size_t datalen, size_t *resid)
-{
- struct aic6250_softc *sc = cookie;
- struct aic6250_acb *acb = &sc->sc_acb;
-
- if (resid != NULL)
- *resid = 0;
-
- acb->xsflags = datalen != 0 ? SCSI_DATA_IN : 0; /* XXX */
- acb->scsi_cmd = cmdbuf;
- acb->scsi_cmd_length = cmdlen;
- acb->data_addr = databuf;
- acb->data_length = datalen;
- acb->target_stat = 0;
-
- aic6250_sched(sc);
-
- for (;;) {
- uint8_t sr0, sr1, sr0mask, sr1mask;
-
- /*
- * If we had interrupts enabled, would we
- * have got an interrupt?
- */
- sr0mask = 0;
- sr1mask = 0;
-
- if (sc->sc_imr0 & AIC_IMR_EN_ERROR_INT)
- sr1mask |= AIC_SR1_ERROR;
- if (sc->sc_imr0 & AIC_IMR_EN_CMD_DONE_INT)
- sr1mask |= AIC_SR1_CMD_DONE;
- if (sc->sc_imr0 & AIC_IMR_EN_SEL_OUT_INT)
- sr1mask |= AIC_SR1_SEL_OUT;
- if (sc->sc_imr0 & AIC_IMR_EN_RESEL_INT)
- sr1mask |= AIC_SR1_RESELECTED;
- if (sc->sc_imr0 & AIC_IMR_EN_SELECT_INT)
- sr1mask |= AIC_SR1_SELECTED;
-
- if (sc->sc_imr1 & AIC_IMR1_EN_SCSI_RST_INT)
- sr0mask |= AIC_SR0_SCSI_RST_OCCURED;
-#if 0 /* these bits are never set */
- if (sc->sc_imr1 & AIC_IMR1_EN_MEM_PARITY_ERR_INT)
- sr0mask |= AIC_SR0_MEMORY_PARITY_ERR;
- if (sc->sc_imr1 & AIC_IMR1_EN_PHASE_MISMATCH_INT)
- sr0mask |= AIC_SR0_PHASE_MISMATCH_ERR;
-#endif
- if (sc->sc_imr1 & AIC_IMR1_EN_BUS_FREE_DETECT_INT)
- sr0mask |= AIC_SR0_BUS_FREE_DETECT;
- if (sc->sc_imr1 & AIC_IMR1_EN_SCSI_PARITY_ERR_INT)
- sr0mask |= AIC_SR0_SCSI_PARITY_ERR;
- if (sc->sc_imr1 & AIC_IMR1_EN_PHASE_CHANGE_INT)
- sr0mask |= AIC_SR0_SCSI_PHASE_CHG_ATTN;
-
- sr0 = oaic_read(sc, AIC_STATUS_REG0);
- sr1 = oaic_read(sc, AIC_STATUS_REG1);
-
- if ((sr0 & sr0mask) != 0 || (sr1 & sr1mask) != 0) {
- aic6250_intr(sc);
- }
- if ((acb->xsflags & ITSDONE) != 0)
- break;
- delay(1000);
-
- /* process the selection timeout timer as well if necessary */
- if (sc->sc_selto != 0) {
- sc->sc_selto--;
- if (sc->sc_selto == 0) {
- aic6250_seltimeout(sc);
- }
- }
- }
-
- if (resid != NULL && acb->error == 0)
- *resid = datalen;
-
- return acb->error;
-}
-
-/*
- * LOW LEVEL SCSI UTILITIES
- */
-
-void
-aic6250_ack(struct aic6250_softc *sc)
-{
- oaic_write(sc, AIC_SCSI_SIGNAL_REG,
- oaic_read(sc, AIC_SCSI_SIGNAL_REG) | AIC_SS_ACK_OUT);
- while ((oaic_read(sc, AIC_SCSI_SIGNAL_REG) & AIC_SS_REQ_IN) != 0)
- continue;
- oaic_write(sc, AIC_SCSI_SIGNAL_REG,
- oaic_read(sc, AIC_SCSI_SIGNAL_REG) & ~AIC_SS_ACK_OUT);
-}
-
-void
-aic6250_sched_msgout(struct aic6250_softc *sc, uint8_t m)
-{
- if (sc->sc_msgpriq == 0)
- oaic_write(sc, AIC_SCSI_SIGNAL_REG,
- sc->sc_phase | AIC_SS_ATN_OUT);
- sc->sc_msgpriq |= m;
-}
-
-/*
- * Start a selection. This is used by aic6250_sched() to select an idle target,
- * and by aic6250_done() to immediately reselect a target to get sense
- * information.
- */
-void
-aic6250_select(struct aic6250_softc *sc, struct aic6250_acb *acb)
-{
- oaic_write(sc, AIC_SCSI_ID_DATA,
- (1 << sc->sc_initiator) | (1 << sc->sc_tgtid));
-
- /* Always enable reselections. */
- sc->sc_imr1 |= AIC_IMR1_EN_SCSI_RST_INT;
- sc->sc_imr1 &=
- ~(AIC_IMR1_EN_SCSI_REQ_ON_INT | AIC_IMR1_EN_SCSI_PARITY_ERR_INT |
- AIC_IMR1_EN_BUS_FREE_DETECT_INT | AIC_IMR1_EN_PHASE_CHANGE_INT);
- oaic_write(sc, AIC_INT_MSK_REG1, sc->sc_imr1);
- sc->sc_imr0 = AIC_IMR_ARB_SEL_START | AIC_IMR_EN_ERROR_INT |
- AIC_IMR_EN_CMD_DONE_INT | AIC_IMR_EN_SEL_OUT_INT |
- AIC_IMR_EN_RESEL_INT | AIC_IMR_EN_SELECT_INT;
- oaic_write(sc, AIC_INT_MSK_REG0, sc->sc_imr0);
-
- sc->sc_state = AIC_SELECTING;
-}
-
-int
-aic6250_reselect(struct aic6250_softc *sc, int message)
-{
- uint8_t selid;
- struct aic6250_acb *acb;
-
- /*
- * The SCSI chip made a snapshot of the data bus while the reselection
- * was being negotiated. This enables us to determine which target did
- * the reselect.
- */
- selid = sc->sc_selid & ~(1 << sc->sc_initiator);
- if (selid & (selid - 1)) {
- printf("insc: reselect with invalid selid %02x\n", selid);
- goto reset;
- }
-
- acb = sc->sc_nexus;
- if (acb == NULL) {
- printf("insc: unexpected reselect\n");
- goto abort;
- }
-
- /* Make this nexus active again. */
- sc->sc_state = AIC_CONNECTED;
-
- /* Do an implicit RESTORE POINTERS. */
- sc->sc_dp = acb->data_addr;
- sc->sc_dleft = acb->data_length;
- sc->sc_cp = (uint8_t *)acb->scsi_cmd;
- sc->sc_cleft = acb->scsi_cmd_length;
-
- return (0);
-
-reset:
- aic6250_sched_msgout(sc, SEND_DEV_RESET);
- return (1);
-
-abort:
- aic6250_sched_msgout(sc, SEND_ABORT);
- return (1);
-}
-
-/*
- * Schedule a SCSI operation. This has now been pulled out of the interrupt
- * handler so that we may call it from aic6250_scsi_cmd and aic6250_done.
- * This may save us an unnecessary interrupt just to get things going.
- * Should only be called when state == AIC_IDLE and at bio pl.
- */
-void
-aic6250_sched(struct aic6250_softc *sc)
-{
- struct aic6250_acb *acb;
-
- acb = &sc->sc_acb;
- sc->sc_nexus = acb;
- aic6250_select(sc, acb);
-}
-
-/*
- * POST PROCESSING OF SCSI_CMD (usually current)
- */
-void
-aic6250_done(struct aic6250_softc *sc, struct aic6250_acb *acb)
-{
- switch (acb->target_stat) {
- case SCSI_OK:
- acb->error = XS_NOERROR;
- break;
- case SCSI_BUSY:
- acb->error = XS_BUSY;
- break;
- case SCSI_CHECK:
- acb->error = XS_DRIVER_STUFFUP;
- break;
- default:
- acb->error = XS_RESET;
- break;
- }
-
- acb->xsflags |= ITSDONE;
- sc->sc_nexus = NULL;
- sc->sc_state = AIC_IDLE;
-
- /* Nothing to start; just enable reselections. */
- sc->sc_imr1 |= AIC_IMR1_EN_SCSI_RST_INT;
- sc->sc_imr1 &=
- ~(AIC_IMR1_EN_SCSI_REQ_ON_INT | AIC_IMR1_EN_SCSI_PARITY_ERR_INT |
- AIC_IMR1_EN_BUS_FREE_DETECT_INT | AIC_IMR1_EN_PHASE_CHANGE_INT);
- oaic_write(sc, AIC_INT_MSK_REG1, sc->sc_imr1);
- sc->sc_imr0 = AIC_IMR_EN_ERROR_INT |
- AIC_IMR_EN_RESEL_INT | AIC_IMR_EN_SELECT_INT;
- oaic_write(sc, AIC_INT_MSK_REG0, sc->sc_imr0);
-}
-
-/*
- * INTERRUPT/PROTOCOL ENGINE
- */
-
-/*
- * Precondition:
- * The SCSI bus is already in the MSGI phase and there is a message byte
- * on the bus, along with an asserted REQ signal.
- */
-void
-aic6250_msgin(struct aic6250_softc *sc)
-{
- uint8_t sr0, scsisig;
- int n;
- uint8_t msgbyte;
-
- if (sc->sc_prevphase == PH_MSGIN) {
- /* This is a continuation of the previous message. */
- n = sc->sc_imp - sc->sc_imess;
- goto nextbyte;
- }
-
- /* This is a new MESSAGE IN phase. Clean up our state. */
- sc->sc_flags &= ~AIC_DROP_MSGIN;
-
-nextmsg:
- n = 0;
- sc->sc_imp = &sc->sc_imess[n];
-
-nextbyte:
- /*
- * Read a whole message, but don't ack the last byte. If we reject the
- * message, we have to assert ATN during the message transfer phase
- * itself.
- */
- for (;;) {
- for (;;) {
- scsisig = oaic_read(sc, AIC_SCSI_SIGNAL_REG);
- if ((scsisig & PH_MASK) != PH_MSGIN) {
- /*
- * Target left MESSAGE IN, probably because it
- * a) noticed our ATN signal, or
- * b) ran out of messages.
- */
- goto out;
- }
- if ((scsisig & AIC_SS_REQ_IN) != 0)
- break;
- }
-
- /* If parity error, just dump everything on the floor. */
- sr0 = oaic_read(sc, AIC_STATUS_REG0);
- if ((sr0 & AIC_SR0_SCSI_PARITY_ERR) != 0) {
- sc->sc_flags |= AIC_DROP_MSGIN;
- aic6250_sched_msgout(sc, SEND_PARITY_ERROR);
- }
-
- /* Gather incoming message bytes if needed. */
- msgbyte = oaic_read(sc, AIC_SCSI_ID_DATA);
- if ((sc->sc_flags & AIC_DROP_MSGIN) == 0) {
- if (n >= AIC_MAX_MSG_LEN) {
- sc->sc_flags |= AIC_DROP_MSGIN;
- aic6250_sched_msgout(sc, SEND_REJECT);
- } else {
- *sc->sc_imp++ = msgbyte;
- n++;
-
- /*
- * This testing is suboptimal, but most
- * messages will be of the one byte variety, so
- * it should not affect performance
- * significantly.
- */
- if (n == 1 && IS1BYTEMSG(sc->sc_imess[0]))
- break;
- if (n == 2 && IS2BYTEMSG(sc->sc_imess[0]))
- break;
- if (n >= 3 && ISEXTMSG(sc->sc_imess[0]) &&
- n == sc->sc_imess[1] + 2)
- break;
- }
- }
-
- /*
- * If we reach this spot we're either:
- * a) in the middle of a multi-byte message, or
- * b) dropping bytes.
- */
- aic6250_ack(sc);
- }
-
- /* We now have a complete message. Parse it. */
- switch (sc->sc_state) {
- struct aic6250_acb *acb;
-
- case AIC_CONNECTED:
- acb = sc->sc_nexus;
-
- switch (sc->sc_imess[0]) {
- case MSG_CMDCOMPLETE:
- sc->sc_state = AIC_CMDCOMPLETE;
- break;
-
- case MSG_PARITY_ERROR:
- /* Resend the last message. */
- aic6250_sched_msgout(sc, sc->sc_lastmsg);
- break;
-
- case MSG_MESSAGE_REJECT:
- switch (sc->sc_lastmsg) {
- case SEND_INIT_DET_ERR:
- aic6250_sched_msgout(sc, SEND_ABORT);
- break;
- }
- break;
-
- case MSG_NOOP:
- break;
-
- case MSG_DISCONNECT:
- sc->sc_state = AIC_DISCONNECT;
- break;
-
- case MSG_SAVEDATAPOINTER:
- acb->data_addr = sc->sc_dp;
- acb->data_length = sc->sc_dleft;
- break;
-
- case MSG_RESTOREPOINTERS:
- sc->sc_dp = acb->data_addr;
- sc->sc_dleft = acb->data_length;
- sc->sc_cp = (uint8_t *)acb->scsi_cmd;
- sc->sc_cleft = acb->scsi_cmd_length;
- break;
-
- default:
- aic6250_sched_msgout(sc, SEND_REJECT);
- break;
- }
- break;
-
- case AIC_RESELECTED:
- if (!MSG_ISIDENTIFY(sc->sc_imess[0])) {
- printf("insc: reselect without IDENTIFY\n");
- goto reset;
- }
-
- (void) aic6250_reselect(sc, sc->sc_imess[0]);
- break;
-
- default:
- printf("insc: unexpected MESSAGE IN\n");
- reset:
- aic6250_sched_msgout(sc, SEND_DEV_RESET);
- break;
-
-#ifdef notdef
- abort:
- aic6250_sched_msgout(sc, SEND_ABORT);
- break;
-#endif
- }
-
- aic6250_ack(sc);
-
- /* Go get the next message, if any. */
- goto nextmsg;
-
-out:
- /*
- * We need to explicitely un-busy.
- */
- oaic_write(sc, AIC_SCSI_SIGNAL_REG,
- oaic_read(sc, AIC_SCSI_SIGNAL_REG) &
- ~(AIC_SS_SEL_OUT | AIC_SS_BSY_OUT | AIC_SS_ACK_OUT));
-}
-
-/*
- * Send the highest priority, scheduled message.
- */
-void
-aic6250_msgout(struct aic6250_softc *sc)
-{
- uint8_t scsisig;
- int n;
-
- if (sc->sc_prevphase == PH_MSGOUT) {
- if (sc->sc_omp == sc->sc_omess) {
- /*
- * This is a retransmission.
- *
- * We get here if the target stayed in MESSAGE OUT
- * phase. Section 5.1.9.2 of the SCSI 2 spec indicates
- * that all of the previously transmitted messages must
- * be sent again, in the same order. Therefore, we
- * requeue all the previously transmitted messages, and
- * start again from the top. Our simple priority
- * scheme keeps the messages in the right order.
- */
- sc->sc_msgpriq |= sc->sc_msgoutq;
- /*
- * Set ATN. If we're just sending a trivial 1-byte
- * message, we'll clear ATN later on anyway.
- */
- oaic_write(sc, AIC_SCSI_SIGNAL_REG,
- PH_MSGOUT | AIC_SS_ATN_OUT);
- } else {
- /* This is a continuation of the previous message. */
- n = sc->sc_omp - sc->sc_omess;
- goto nextbyte;
- }
- }
-
- /* No messages transmitted so far. */
- sc->sc_msgoutq = 0;
- sc->sc_lastmsg = 0;
-
-nextmsg:
- /* Pick up highest priority message. */
- sc->sc_currmsg = sc->sc_msgpriq & -sc->sc_msgpriq;
- sc->sc_msgpriq &= ~sc->sc_currmsg;
- sc->sc_msgoutq |= sc->sc_currmsg;
-
- /* Build the outgoing message data. */
- switch (sc->sc_currmsg) {
- case SEND_IDENTIFY:
- sc->sc_omess[0] =
- MSG_IDENTIFY(sc->sc_tgtlun, 1);
- n = 1;
- break;
-
- case SEND_DEV_RESET:
- sc->sc_flags |= AIC_ABORTING;
- sc->sc_omess[0] = MSG_BUS_DEV_RESET;
- n = 1;
- break;
-
- case SEND_REJECT:
- sc->sc_omess[0] = MSG_MESSAGE_REJECT;
- n = 1;
- break;
-
- case SEND_PARITY_ERROR:
- sc->sc_omess[0] = MSG_PARITY_ERROR;
- n = 1;
- break;
-
- case SEND_INIT_DET_ERR:
- sc->sc_omess[0] = MSG_INITIATOR_DET_ERR;
- n = 1;
- break;
-
- case SEND_ABORT:
- sc->sc_flags |= AIC_ABORTING;
- sc->sc_omess[0] = MSG_ABORT;
- n = 1;
- break;
-
- default:
- printf("insc: unexpected MESSAGE OUT\n");
- sc->sc_omess[0] = MSG_NOOP;
- n = 1;
- break;
- }
- sc->sc_omp = &sc->sc_omess[n];
-
-nextbyte:
- /* Send message bytes. */
- for (;;) {
- for (;;) {
- scsisig = oaic_read(sc, AIC_SCSI_SIGNAL_REG);
- if ((scsisig & PH_MASK) != PH_MSGOUT) {
- /*
- * Target left MESSAGE OUT, possibly to reject
- * our message.
- *
- * If this is the last message being sent, then
- * we deassert ATN, since either the target is
- * going to ignore this message, or it's going
- * to ask for a retransmission via MESSAGE
- * PARITY ERROR (in which case we reassert ATN
- * anyway).
- */
- if (sc->sc_msgpriq == 0)
- oaic_write(sc, AIC_SCSI_SIGNAL_REG,
- scsisig & ~AIC_SS_ATN_OUT);
- return;
- }
- if ((scsisig & AIC_SS_REQ_IN) != 0)
- break;
- }
-
- /* Clear ATN before last byte if this is the last message. */
- if (n == 1 && sc->sc_msgpriq == 0)
- oaic_write(sc, AIC_SCSI_SIGNAL_REG,
- scsisig & ~AIC_SS_ATN_OUT);
- /* Send message byte. */
- oaic_write(sc, AIC_SCSI_ID_DATA, *--sc->sc_omp);
- --n;
- /* Keep track of the last message we've sent any bytes of. */
- sc->sc_lastmsg = sc->sc_currmsg;
-
- aic6250_ack(sc);
-
- if (n == 0)
- break;
- }
-
- /* We get here only if the entire message has been transmitted. */
- if (sc->sc_msgpriq != 0) {
- /* There are more outgoing messages. */
- goto nextmsg;
- }
-
- /*
- * The last message has been transmitted. We need to remember the last
- * message transmitted (in case the target switches to MESSAGE IN phase
- * and sends a MESSAGE REJECT), and the list of messages transmitted
- * this time around (in case the target stays in MESSAGE OUT phase to
- * request a retransmit).
- */
-}
-
-/* aic6250_dataout_pio: perform a data transfer in CPU-controlled PIO mode.
- * Precondition: The SCSI bus should be in the DOUT or CMDOUT phase, with REQ
- * asserted and ACK deasserted (i.e. waiting for a data byte).
- */
-int
-aic6250_dataout_pio(struct aic6250_softc *sc, uint8_t *p, int n, int phase)
-{
- uint8_t scsisig;
- int out = 0;
-
- sc->sc_imr1 &= ~AIC_IMR1_EN_SCSI_REQ_ON_INT;
- oaic_write(sc, AIC_INT_MSK_REG1, sc->sc_imr1);
-
- /* I have tried to make the main loop as tight as possible. This
- * means that some of the code following the loop is a bit more
- * complex than otherwise.
- */
- while (out != n) {
- for (;;) {
- scsisig = oaic_read(sc, AIC_SCSI_SIGNAL_REG);
- if ((scsisig & AIC_SS_REQ_IN) != 0)
- break;
- }
- if ((scsisig & PH_MASK) != phase)
- break;
-
- oaic_write(sc, AIC_SCSI_ID_DATA, *p++);
- out++;
-
- aic6250_ack(sc);
- }
-
- sc->sc_imr1 |= AIC_IMR1_EN_SCSI_REQ_ON_INT;
- oaic_write(sc, AIC_INT_MSK_REG1, sc->sc_imr1);
-
- return out;
-}
-
-/* aic6250_datain_pio: perform data transfers using the FIFO datapath in the
- * aic6250.
- * Precondition: The SCSI bus should be in the DIN or STAT phase, with REQ
- * asserted and ACK deasserted (i.e. at least one byte is ready).
- * For now, uses a pretty dumb algorithm, hangs around until all data has been
- * transferred. This, is OK for fast targets, but not so smart for slow
- * targets which don't disconnect or for huge transfers.
- */
-int
-aic6250_datain_pio(struct aic6250_softc *sc, uint8_t *p, int n, int phase)
-{
- uint8_t scsisig;
- int in = 0;
-
- sc->sc_imr1 &= ~AIC_IMR1_EN_SCSI_REQ_ON_INT;
- oaic_write(sc, AIC_INT_MSK_REG1, sc->sc_imr1);
-
- /* We leave this loop if one or more of the following is true:
- * a) phase != PH_DATAIN && FIFOs are empty
- * b) SCSIRSTI is set (a reset has occurred) or busfree is detected.
- */
- while (in != n) {
- for (;;) {
- scsisig = oaic_read(sc, AIC_SCSI_SIGNAL_REG);
- if ((scsisig & AIC_SS_REQ_IN) != 0)
- break;
- }
- if ((scsisig & PH_MASK) != phase)
- break;
-
- *p++ = oaic_read(sc, AIC_SCSI_ID_DATA);
- in++;
-
- aic6250_ack(sc);
- }
-
- sc->sc_imr1 |= AIC_IMR1_EN_SCSI_REQ_ON_INT;
- oaic_write(sc, AIC_INT_MSK_REG1, sc->sc_imr1);
-
- return in;
-}
-
-/*
- * This is the workhorse routine of the driver.
- * Deficiencies (for now):
- * 1) always uses programmed I/O
- */
-int
-aic6250_intr(void *arg)
-{
- struct aic6250_softc *sc = arg;
- uint8_t sr1, sr0;
- struct aic6250_acb *acb;
- int n, first = 1;
-
- /* Read SR1 before writing to IMR0 (which will reset some SR1 bits). */
- sr1 = oaic_read(sc, AIC_STATUS_REG1);
- oaic_write(sc, AIC_INT_MSK_REG0, 0);
-
-loop:
- sr0 = oaic_read(sc, AIC_STATUS_REG0);
- /*
- * First check for abnormal conditions, such as reset.
- */
- if ((sr0 & AIC_SR0_SCSI_RST_OCCURED) != 0) {
- printf("insc: SCSI bus reset\n");
- while ((oaic_read(sc, AIC_STATUS_REG1) &
- AIC_SR1_SCSI_RST_IN) != 0)
- delay(5);
- goto reset;
- }
-
- /*
- * Check for less serious errors.
- */
- if ((sr0 & AIC_SR0_SCSI_PARITY_ERR) != 0) {
- printf("insc: SCSI bus parity error\n");
- if (sc->sc_prevphase == PH_MSGIN) {
- sc->sc_flags |= AIC_DROP_MSGIN;
- aic6250_sched_msgout(sc, SEND_PARITY_ERROR);
- } else
- aic6250_sched_msgout(sc, SEND_INIT_DET_ERR);
- }
-
-
- /*
- * If we're not already busy doing something test for the following
- * conditions:
- * 1) We have been reselected by something
- * 2) We have selected something successfully
- * 3) Our selection process has timed out
- * 4) This is really a bus free interrupt just to get a new command
- * going?
- * 5) Spurious interrupt?
- */
- switch (sc->sc_state) {
- case AIC_IDLE:
- case AIC_SELECTING:
- if (first)
- first = 0;
- else
- sr1 = oaic_read(sc, AIC_STATUS_REG1);
-
- if (sc->sc_state == AIC_SELECTING &&
- (sr1 & AIC_SR1_SEL_OUT) != 0) {
- /* start selection timeout */
- acb = sc->sc_nexus;
- sc->sc_selto = 250; /* msec */
- sc->sc_imr0 &= ~AIC_IMR_EN_SEL_OUT_INT;
- goto out;
- }
-
- if ((sr1 & AIC_SR1_RESELECTED) != 0) {
- /* kill selection timeout timer */
- sc->sc_imr0 &=
- ~(AIC_IMR_EN_SEL_OUT_INT | AIC_IMR_EN_CMD_DONE_INT);
- sc->sc_selto = 0;
-
- /* Save reselection ID. */
- sc->sc_selid = oaic_read(sc, AIC_SOURCE_DEST_ID);
-
- sc->sc_state = AIC_RESELECTED;
- } else if ((sr1 & (AIC_SR1_SELECTED | AIC_SR1_CMD_DONE)) != 0) {
- /* kill selection timeout timer */
- sc->sc_imr0 &=
- ~(AIC_IMR_EN_SEL_OUT_INT | AIC_IMR_EN_CMD_DONE_INT);
- sc->sc_selto = 0;
-
- /* We have selected a target. Things to do:
- * a) Determine what message(s) to send.
- * b) Verify that we're still selecting the target.
- * c) Mark device as busy.
- */
- if (sc->sc_state != AIC_SELECTING) {
- printf("insc: selection out while idle\n");
- goto reset;
- }
- acb = sc->sc_nexus;
-
- sc->sc_msgpriq = SEND_IDENTIFY;
-
- /* Do an implicit RESTORE POINTERS. */
- sc->sc_dp = acb->data_addr;
- sc->sc_dleft = acb->data_length;
- sc->sc_cp = (uint8_t *)acb->scsi_cmd;
- sc->sc_cleft = acb->scsi_cmd_length;
-
- sc->sc_state = AIC_CONNECTED;
- } else {
- if (sc->sc_state != AIC_IDLE) {
- printf("insc: BUS FREE while not idle\n");
- goto out;
- }
-
- goto sched;
- }
-
- /*
- * Turn off selection stuff, and prepare to catch bus free
- * interrupts, parity errors, and phase changes.
- */
- sc->sc_imr1 |=
- AIC_IMR1_EN_SCSI_REQ_ON_INT | AIC_IMR1_EN_SCSI_RST_INT |
- AIC_IMR1_EN_BUS_FREE_DETECT_INT |
- AIC_IMR1_EN_SCSI_PARITY_ERR_INT |
- AIC_IMR1_EN_PHASE_CHANGE_INT;
- oaic_write(sc, AIC_INT_MSK_REG1, sc->sc_imr1);
-
- sc->sc_flags = 0;
- sc->sc_prevphase = PH_INVALID;
- goto dophase;
- }
-
- if ((sr0 & AIC_SR0_BUS_FREE_DETECT) != 0) {
- /* We've gone to BUS FREE phase. */
- switch (sc->sc_state) {
- case AIC_RESELECTED:
- goto sched;
-
- case AIC_CONNECTED:
- acb = sc->sc_nexus;
-
- if ((sc->sc_flags & AIC_ABORTING) == 0) {
- /*
- * Section 5.1.1 of the SCSI 2 spec suggests
- * issuing a REQUEST SENSE following an
- * unexpected disconnect. Some devices go into
- * a contingent allegiance condition when
- * disconnecting, and this is necessary to
- * clean up their state.
- */
- printf("insc: unexpected disconnect\n");
- goto out;
- }
-
- acb->error = XS_DRIVER_STUFFUP;
- goto finish;
-
- case AIC_DISCONNECT:
- acb = sc->sc_nexus;
-#if 1 /* XXX */
- acb->data_addr = sc->sc_dp;
- acb->data_length = sc->sc_dleft;
-#endif
- sc->sc_nexus = NULL;
- goto sched;
-
- case AIC_CMDCOMPLETE:
- acb = sc->sc_nexus;
- goto finish;
- }
- }
-
-dophase:
- if ((sr0 & AIC_SR0_SCSI_REQ_ON) == 0) {
- /* Wait for AIC_SR0_SCSI_REQ_ON. */
- goto out;
- }
-
- sc->sc_phase = oaic_read(sc, AIC_SCSI_SIGNAL_REG) & PH_MASK;
- oaic_write(sc, AIC_SCSI_SIGNAL_REG, sc->sc_phase);
-
- switch (sc->sc_phase) {
- case PH_MSGOUT:
- if (sc->sc_state != AIC_CONNECTED &&
- sc->sc_state != AIC_RESELECTED)
- break;
- aic6250_msgout(sc);
- sc->sc_prevphase = PH_MSGOUT;
- goto loop;
-
- case PH_MSGIN:
- if (sc->sc_state != AIC_CONNECTED &&
- sc->sc_state != AIC_RESELECTED)
- break;
- aic6250_msgin(sc);
- sc->sc_prevphase = PH_MSGIN;
- goto loop;
-
- case PH_CMD:
- if (sc->sc_state != AIC_CONNECTED)
- break;
- n = aic6250_dataout_pio(sc, sc->sc_cp, sc->sc_cleft, PH_CMD);
- sc->sc_cp += n;
- sc->sc_cleft -= n;
- sc->sc_prevphase = PH_CMD;
- goto loop;
-
- case PH_DATAOUT:
- if (sc->sc_state != AIC_CONNECTED)
- break;
- n = aic6250_dataout_pio(sc, sc->sc_dp, sc->sc_dleft, PH_DATAOUT);
- sc->sc_dp += n;
- sc->sc_dleft -= n;
- sc->sc_prevphase = PH_DATAOUT;
- goto loop;
-
- case PH_DATAIN:
- if (sc->sc_state != AIC_CONNECTED)
- break;
- n = aic6250_datain_pio(sc, sc->sc_dp, sc->sc_dleft, PH_DATAIN);
- sc->sc_dp += n;
- sc->sc_dleft -= n;
- sc->sc_prevphase = PH_DATAIN;
- goto loop;
-
- case PH_STAT:
- if (sc->sc_state != AIC_CONNECTED)
- break;
- acb = sc->sc_nexus;
- aic6250_datain_pio(sc, &acb->target_stat, 1, PH_STAT);
- sc->sc_prevphase = PH_STAT;
- goto loop;
- }
-
- printf("insc: unexpected bus phase\n");
-reset:
- aic6250_init(sc);
- return 1;
-
-finish:
- aic6250_done(sc, acb);
- goto out;
-
-sched:
- sc->sc_state = AIC_IDLE;
-
-out:
- sc->sc_imr0 |= AIC_IMR_EN_ERROR_INT;
- oaic_write(sc, AIC_INT_MSK_REG0, sc->sc_imr0);
- return 1;
-}
-
-void
-aic6250_seltimeout(void *arg)
-{
- struct aic6250_softc *sc = arg;
- struct aic6250_acb *acb;
-
- if (sc->sc_state != AIC_SELECTING) {
- printf("insc: selection timeout while idle\n");
- aic6250_init(sc);
- return;
- }
-
- acb = sc->sc_nexus;
-
- oaic_write(sc, AIC_SCSI_ID_DATA, 0);
- delay(200);
-
- acb->error = XS_SELTIMEOUT;
- aic6250_done(sc, acb);
-
- sc->sc_imr0 |= AIC_IMR_EN_ERROR_INT;
- oaic_write(sc, AIC_INT_MSK_REG0, sc->sc_imr0);
-}
diff --git a/sys/arch/aviion/stand/boot/oaic.h b/sys/arch/aviion/stand/boot/oaic.h
deleted file mode 100644
index 03f85bc76bd..00000000000
--- a/sys/arch/aviion/stand/boot/oaic.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* $OpenBSD: oaic.h,v 1.1 2013/10/16 16:59:34 miod Exp $ */
-
-/*
- * Copyright (c) 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-void *oaic_attach(uint32_t, int, int);
-void oaic_detach(void *);
-int oaic_scsicmd(void *, void *, size_t, void *, size_t, size_t *);
diff --git a/sys/arch/aviion/stand/boot/oosiop.c b/sys/arch/aviion/stand/boot/oosiop.c
deleted file mode 100644
index 34dc9ab90cc..00000000000
--- a/sys/arch/aviion/stand/boot/oosiop.c
+++ /dev/null
@@ -1,917 +0,0 @@
-/* $OpenBSD: oosiop.c,v 1.6 2014/07/12 19:01:49 tedu Exp $ */
-/* OpenBSD: oosiop.c,v 1.20 2013/10/09 18:22:06 miod Exp */
-/* OpenBSD: oosiopvar.h,v 1.5 2011/04/03 12:42:36 krw Exp */
-/* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */
-/* $NetBSD: oosiopvar.h,v 1.2 2003/05/03 18:11:23 wiz Exp $ */
-
-/*
- * Copyright (c) 2001 Shuichiro URATA. 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.
- *
- * 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>
-#define offsetof(s, e) ((size_t)&((s *)0)->e)
-
-#include <stand.h>
-#include "libsa.h"
-
-#include "scsi.h"
-
-#include <dev/ic/oosiopreg.h>
-
-#define OOSIOP_NTGT 8 /* Max targets */
-
-struct oosiop_xfer {
- /* script for DMA (move*nsg+jump) */
- uint32_t datain_scr[2 * 2];
- uint32_t dataout_scr[2 * 2];
-
- u_int8_t msgin[8];
- u_int8_t msgout[8];
- u_int8_t status;
-};
-
-#define SCSI_OOSIOP_NOSTATUS 0xff /* device didn't report status */
-
-struct oosiop_cb {
- int flags;
-
- int id; /* target scsi id */
- int lun; /* target lun */
-
- int curdp; /* current data pointer */
- int savedp; /* saved data pointer */
- int msgoutlen;
-
- int xsflags; /* copy of xs->flags */
- int datalen; /* copy of xs->datalen */
- uint32_t databuf;
- int cmdlen; /* copy of xs->cmdlen */
- uint32_t cmdbuf;
-
- struct oosiop_xfer *xfer; /* DMA xfer block */
-
- int status;
- int error;
-};
-
-/* oosiop_cb flags */
-#define CBF_SELTOUT 0x01 /* Selection timeout */
-#define CBF_TIMEOUT 0x02 /* Command timeout */
-
-struct oosiop_softc {
- uint32_t sc_baseaddr;
- uint32_t *sc_scr; /* ptr to script memory */
-
- int sc_tgtid;
- int sc_tgtlun;
-
- int sc_id; /* SCSI ID of this interface */
- int sc_freq; /* SCLK frequency */
- int sc_ccf; /* asynchronous divisor (*10) */
- u_int8_t sc_dcntl;
-
- int sc_pending;
-
- struct oosiop_xfer sc_xfer;
- struct oosiop_cb sc_cb;
-
- struct oosiop_cb *sc_nexus;
- struct oosiop_cb *sc_curcb; /* current command */
-
- uint32_t sc_reselbuf; /* msgin buffer for reselection */
- int sc_resid; /* reselected target id */
-
- int sc_nextdsp;
-
- uint8_t sc_scntl0;
- uint8_t sc_dmode;
- uint8_t sc_dwt;
- uint8_t sc_ctest7;
-};
-
-#define oosiop_read_1(sc, addr) \
- *(volatile uint8_t *)((sc)->sc_baseaddr + (addr))
-#define oosiop_write_1(sc, addr, data) \
- *(volatile uint8_t *)((sc)->sc_baseaddr + (addr)) = (data)
-#define oosiop_read_4(sc, addr) \
- letoh32(*(volatile uint32_t *)((sc)->sc_baseaddr + (addr)))
-#define oosiop_write_4(sc, addr, data) \
- *(volatile uint32_t *)((sc)->sc_baseaddr + (addr)) = htole32(data)
-
-/* 53C700 script */
-#include <dev/microcode/siop/oosiop.out>
-
-static __inline void oosiop_relocate_io(struct oosiop_softc *, uint32_t);
-static __inline void oosiop_relocate_tc(struct oosiop_softc *, uint32_t);
-static __inline void oosiop_fixup_select(struct oosiop_softc *, uint32_t,
- int);
-static __inline void oosiop_fixup_jump(struct oosiop_softc *, uint32_t,
- uint32_t);
-static __inline void oosiop_fixup_move(struct oosiop_softc *, uint32_t,
- uint32_t, uint32_t);
-
-void oosiop_load_script(struct oosiop_softc *);
-void oosiop_setup_sgdma(struct oosiop_softc *, struct oosiop_cb *);
-void oosiop_setup_dma(struct oosiop_softc *);
-void oosiop_flush_fifo(struct oosiop_softc *);
-void oosiop_clear_fifo(struct oosiop_softc *);
-void oosiop_phasemismatch(struct oosiop_softc *);
-static __inline void oosiop_setup_syncxfer(struct oosiop_softc *);
-void oosiop_done(struct oosiop_softc *, struct oosiop_cb *);
-void oosiop_reset(struct oosiop_softc *);
-void oosiop_reset_bus(struct oosiop_softc *);
-void oosiop_scriptintr(struct oosiop_softc *);
-void oosiop_msgin(struct oosiop_softc *, struct oosiop_cb *);
-void oosiop_setup(struct oosiop_softc *, struct oosiop_cb *);
-void oosiop_processintr(struct oosiop_softc *, u_int8_t);
-
-/* Trap interrupt code for unexpected data I/O */
-#define DATAIN_TRAP 0xdead0001
-#define DATAOUT_TRAP 0xdead0002
-
-void *
-oosiop_attach(uint32_t addr, int id, int lun)
-{
- struct oosiop_softc *sc;
-
- sc = (struct oosiop_softc *)alloc(sizeof *sc);
- if (sc == NULL)
- return NULL;
-
- memset(sc, 0, sizeof *sc);
- sc->sc_baseaddr = addr;
- sc->sc_scr = (uint32_t *)alloc(sizeof(oosiop_script));
-
- /* XXX */
- sc->sc_id = 7;
- sc->sc_freq = 33333333;
- sc->sc_scntl0 = OOSIOP_SCNTL0_EPC | OOSIOP_SCNTL0_EPG;
- sc->sc_dmode = OOSIOP_DMODE_BL_4;
- sc->sc_dwt = 0x4f;
- sc->sc_ctest7 = OOSIOP_CTEST7_DC;
- /* XXX */
-
- /* Setup asynchronous clock divisor parameters */
- if (sc->sc_freq <= 25000000) {
- sc->sc_ccf = 10;
- sc->sc_dcntl = OOSIOP_DCNTL_CF_1;
- } else if (sc->sc_freq <= 37500000) {
- sc->sc_ccf = 15;
- sc->sc_dcntl = OOSIOP_DCNTL_CF_1_5;
- } else if (sc->sc_freq <= 50000000) {
- sc->sc_ccf = 20;
- sc->sc_dcntl = OOSIOP_DCNTL_CF_2;
- } else {
- sc->sc_ccf = 30;
- sc->sc_dcntl = OOSIOP_DCNTL_CF_3;
- }
-
- sc->sc_cb.xfer = &sc->sc_xfer;
- sc->sc_reselbuf = (uint32_t)&sc->sc_xfer.msgin;
-
- /*
- * Reset all
- */
- oosiop_reset(sc);
- oosiop_reset_bus(sc);
-
- /*
- * Start SCRIPTS processor
- */
- oosiop_load_script(sc);
- oosiop_write_4(sc, OOSIOP_DSP, (uint32_t)sc->sc_scr + Ent_wait_reselect);
-
- sc->sc_tgtid = id;
- sc->sc_tgtlun = lun;
-
- return sc;
-}
-
-void
-oosiop_detach(void *cookie)
-{
- struct oosiop_softc *sc = cookie;
-
- free(sc->sc_scr, sizeof(oosiop_script));
- free(sc, sizeof *sc);
-}
-
-static __inline void
-oosiop_relocate_io(struct oosiop_softc *sc, uint32_t addr)
-{
- uint32_t dcmd;
- int32_t dsps;
-
- dcmd = letoh32(sc->sc_scr[addr / 4 + 0]);
- dsps = letoh32(sc->sc_scr[addr / 4 + 1]);
-
- /* convert relative to absolute */
- if (dcmd & 0x04000000) {
- dcmd &= ~0x04000000;
-#if 0
- /*
- * sign extension isn't needed here because
- * ncr53cxxx.c generates 32 bit dsps.
- */
- dsps <<= 8;
- dsps >>= 8;
-#endif
- sc->sc_scr[addr / 4 + 0] = htole32(dcmd);
- dsps += addr + 8;
- }
-
- sc->sc_scr[addr / 4 + 1] = htole32(dsps + (uint32_t)sc->sc_scr);
-}
-
-static __inline void
-oosiop_relocate_tc(struct oosiop_softc *sc, uint32_t addr)
-{
- uint32_t dcmd;
- int32_t dsps;
-
- dcmd = letoh32(sc->sc_scr[addr / 4 + 0]);
- dsps = letoh32(sc->sc_scr[addr / 4 + 1]);
-
- /* convert relative to absolute */
- if (dcmd & 0x00800000) {
- dcmd &= ~0x00800000;
- sc->sc_scr[addr / 4] = htole32(dcmd);
-#if 0
- /*
- * sign extension isn't needed here because
- * ncr53cxxx.c generates 32 bit dsps.
- */
- dsps <<= 8;
- dsps >>= 8;
-#endif
- dsps += addr + 8;
- }
-
- sc->sc_scr[addr / 4 + 1] = htole32(dsps + (uint32_t)sc->sc_scr);
-}
-
-static __inline void
-oosiop_fixup_select(struct oosiop_softc *sc, uint32_t addr, int id)
-{
- uint32_t dcmd;
-
- dcmd = letoh32(sc->sc_scr[addr / 4]);
- dcmd &= 0xff00ffff;
- dcmd |= 0x00010000 << id;
- sc->sc_scr[addr / 4] = htole32(dcmd);
-}
-
-static __inline void
-oosiop_fixup_jump(struct oosiop_softc *sc, uint32_t addr, uint32_t dst)
-{
-
- sc->sc_scr[addr / 4 + 1] = htole32(dst);
-}
-
-static __inline void
-oosiop_fixup_move(struct oosiop_softc *sc, uint32_t addr, uint32_t dbc,
- uint32_t dsps)
-{
- uint32_t dcmd;
-
- dcmd = letoh32(sc->sc_scr[addr / 4]);
- dcmd &= 0xff000000;
- dcmd |= dbc & 0x00ffffff;
- sc->sc_scr[addr / 4 + 0] = htole32(dcmd);
- sc->sc_scr[addr / 4 + 1] = htole32(dsps);
-}
-
-void
-oosiop_load_script(struct oosiop_softc *sc)
-{
- int i;
-
- /* load script */
- for (i = 0; i < sizeof(oosiop_script) / sizeof(oosiop_script[0]); i++)
- sc->sc_scr[i] = htole32(oosiop_script[i]);
-
- /* relocate script */
- for (i = 0; i < (sizeof(oosiop_script) / 8); i++) {
- switch (oosiop_script[i * 2] >> 27) {
- case 0x08: /* select */
- case 0x0a: /* wait reselect */
- oosiop_relocate_io(sc, i * 8);
- break;
- case 0x10: /* jump */
- case 0x11: /* call */
- oosiop_relocate_tc(sc, i * 8);
- break;
- }
- }
-
- oosiop_fixup_move(sc, Ent_p_resel_msgin_move, 1, sc->sc_reselbuf);
-}
-
-void
-oosiop_setup_sgdma(struct oosiop_softc *sc, struct oosiop_cb *cb)
-{
- struct oosiop_xfer *xfer = cb->xfer;
- int n, off;
-
- off = cb->curdp;
-
- if (cb->xsflags & (SCSI_DATA_IN | SCSI_DATA_OUT)) {
- /* build MOVE block */
- if (cb->xsflags & SCSI_DATA_IN) {
- n = 0;
- xfer->datain_scr[n * 2 + 0] =
- htole32(0x09000000 | (cb->datalen - off));
- xfer->datain_scr[n * 2 + 1] =
- htole32(cb->databuf + off);
- n++;
- xfer->datain_scr[n * 2 + 0] = htole32(0x80080000);
- xfer->datain_scr[n * 2 + 1] =
- htole32((uint32_t)sc->sc_scr + Ent_phasedispatch);
- }
- if (cb->xsflags & SCSI_DATA_OUT) {
- n = 0;
- xfer->dataout_scr[n * 2 + 0] =
- htole32(0x08000000 | (cb->datalen - off));
- xfer->dataout_scr[n * 2 + 1] =
- htole32(cb->databuf + off);
- n++;
- xfer->dataout_scr[n * 2 + 0] = htole32(0x80080000);
- xfer->dataout_scr[n * 2 + 1] =
- htole32((uint32_t)sc->sc_scr + Ent_phasedispatch);
- }
- }
- if ((cb->xsflags & SCSI_DATA_IN) == 0) {
- xfer->datain_scr[0] = htole32(0x98080000);
- xfer->datain_scr[1] = htole32(DATAIN_TRAP);
- }
- if ((cb->xsflags & SCSI_DATA_OUT) == 0) {
- xfer->dataout_scr[0] = htole32(0x98080000);
- xfer->dataout_scr[1] = htole32(DATAOUT_TRAP);
- }
-}
-
-/*
- * Setup DMA pointer into script.
- */
-void
-oosiop_setup_dma(struct oosiop_softc *sc)
-{
- struct oosiop_cb *cb;
- uint32_t xferbase;
-
- cb = sc->sc_curcb;
- xferbase = (uint32_t)cb->xfer;
-
- oosiop_fixup_select(sc, Ent_p_select, cb->id);
- oosiop_fixup_jump(sc, Ent_p_datain_jump, xferbase +
- offsetof(struct oosiop_xfer, datain_scr[0]));
- oosiop_fixup_jump(sc, Ent_p_dataout_jump, xferbase +
- offsetof(struct oosiop_xfer, dataout_scr[0]));
- oosiop_fixup_move(sc, Ent_p_msgin_move, 1, xferbase +
- offsetof(struct oosiop_xfer, msgin[0]));
- oosiop_fixup_move(sc, Ent_p_extmsglen_move, 1, xferbase +
- offsetof(struct oosiop_xfer, msgin[1]));
- oosiop_fixup_move(sc, Ent_p_msgout_move, cb->msgoutlen, xferbase +
- offsetof(struct oosiop_xfer, msgout[0]));
- oosiop_fixup_move(sc, Ent_p_status_move, 1, xferbase +
- offsetof(struct oosiop_xfer, status));
- oosiop_fixup_move(sc, Ent_p_cmdout_move, cb->cmdlen, cb->cmdbuf);
-}
-
-void
-oosiop_flush_fifo(struct oosiop_softc *sc)
-{
-
- oosiop_write_1(sc, OOSIOP_DFIFO, oosiop_read_1(sc, OOSIOP_DFIFO) |
- OOSIOP_DFIFO_FLF);
- while ((oosiop_read_1(sc, OOSIOP_CTEST1) & OOSIOP_CTEST1_FMT) !=
- OOSIOP_CTEST1_FMT)
- ;
- oosiop_write_1(sc, OOSIOP_DFIFO, oosiop_read_1(sc, OOSIOP_DFIFO) &
- ~OOSIOP_DFIFO_FLF);
-}
-
-void
-oosiop_clear_fifo(struct oosiop_softc *sc)
-{
-
- oosiop_write_1(sc, OOSIOP_DFIFO, oosiop_read_1(sc, OOSIOP_DFIFO) |
- OOSIOP_DFIFO_CLF);
- while ((oosiop_read_1(sc, OOSIOP_CTEST1) & OOSIOP_CTEST1_FMT) !=
- OOSIOP_CTEST1_FMT)
- ;
- oosiop_write_1(sc, OOSIOP_DFIFO, oosiop_read_1(sc, OOSIOP_DFIFO) &
- ~OOSIOP_DFIFO_CLF);
-}
-
-void
-oosiop_phasemismatch(struct oosiop_softc *sc)
-{
- struct oosiop_cb *cb;
- uint32_t dsp, dbc, n, i, len;
- u_int8_t dfifo, sstat1;
-
- cb = sc->sc_curcb;
- if (cb == NULL)
- return;
-
- dsp = oosiop_read_4(sc, OOSIOP_DSP);
- dbc = oosiop_read_4(sc, OOSIOP_DBC) & OOSIOP_DBC_MAX;
- len = 0;
-
- n = dsp - (uint32_t)cb->xfer - 8;
- if (n >= offsetof(struct oosiop_xfer, datain_scr[0]) &&
- n < offsetof(struct oosiop_xfer, datain_scr[2 * 2])) {
- n -= offsetof(struct oosiop_xfer, datain_scr[0]);
- n >>= 3;
- for (i = 0; i <= n; i++)
- len += letoh32(cb->xfer->datain_scr[i * 2]) &
- 0x00ffffff;
- /* All data in the chip are already flushed */
- } else if (n >= offsetof(struct oosiop_xfer, dataout_scr[0]) &&
- n < offsetof(struct oosiop_xfer, dataout_scr[2 * 2])) {
- n -= offsetof(struct oosiop_xfer, dataout_scr[0]);
- n >>= 3;
- for (i = 0; i <= n; i++)
- len += letoh32(cb->xfer->dataout_scr[i * 2]) &
- 0x00ffffff;
-
- dfifo = oosiop_read_1(sc, OOSIOP_DFIFO);
- dbc += ((dfifo & OOSIOP_DFIFO_BO) - (dbc & OOSIOP_DFIFO_BO)) &
- OOSIOP_DFIFO_BO;
-
- sstat1 = oosiop_read_1(sc, OOSIOP_SSTAT1);
- if (sstat1 & OOSIOP_SSTAT1_OLF)
- dbc++;
-
- oosiop_clear_fifo(sc);
- } else {
-#if 0 /* XXX happens with dsp == Ent_p_cmdout_move ?!? */
- printf("ncsc: phase mismatch addr=%p\n",
- oosiop_read_4(sc, OOSIOP_DSP) - 8);
-#endif
- oosiop_clear_fifo(sc);
- return;
- }
-
- len -= dbc;
- if (len) {
- cb->curdp += len;
- oosiop_setup_sgdma(sc, cb);
- }
-}
-
-static __inline void
-oosiop_setup_syncxfer(struct oosiop_softc *sc)
-{
- oosiop_write_1(sc, OOSIOP_SXFER, 0);
-}
-
-int
-oosiop_scsicmd(void *cookie, void *cmdbuf, size_t cmdlen, void *databuf,
- size_t datalen, size_t *resid)
-{
- struct oosiop_softc *sc = cookie;
- struct oosiop_cb *cb = &sc->sc_cb;
- struct oosiop_xfer *xfer;
-
- if (resid != NULL)
- *resid = 0;
- cb->xsflags = datalen != 0 ? SCSI_DATA_IN : 0; /* XXX */
- cb->cmdbuf = (uint32_t)cmdbuf;
- cb->cmdlen = cmdlen;
- cb->datalen = 0;
- cb->flags = 0;
- cb->id = sc->sc_tgtid;
- cb->lun = sc->sc_tgtlun;
- xfer = cb->xfer;
-
- /* Setup data buffer DMA */
- if (cb->xsflags & (SCSI_DATA_IN | SCSI_DATA_OUT)) {
- cb->datalen = datalen;
- cb->databuf = (uint32_t)databuf;
- }
-
- xfer->status = SCSI_OOSIOP_NOSTATUS;
-
- oosiop_setup(sc, cb);
- sc->sc_pending = 1;
-
- /* Abort script to start selection */
- oosiop_write_1(sc, OOSIOP_ISTAT, OOSIOP_ISTAT_ABRT);
-
- for (;;) {
- u_int8_t istat;
-
- while (((istat = oosiop_read_1(sc, OOSIOP_ISTAT)) &
- (OOSIOP_ISTAT_SIP | OOSIOP_ISTAT_DIP)) == 0) {
- delay(1000);
- }
- oosiop_processintr(sc, istat);
-
- if (cb->xsflags & ITSDONE)
- break;
- }
-
- if (resid != NULL && cb->error == 0)
- *resid = datalen;
- return cb->error;
-}
-
-void
-oosiop_setup(struct oosiop_softc *sc, struct oosiop_cb *cb)
-{
- struct oosiop_xfer *xfer = cb->xfer;
-
- cb->curdp = 0;
- cb->savedp = 0;
-
- oosiop_setup_sgdma(sc, cb);
-
- /* Setup msgout buffer */
- xfer->msgout[0] = MSG_IDENTIFY(cb->lun,
- (((struct scsi_generic *)cb->cmdbuf)->opcode != REQUEST_SENSE));
- cb->msgoutlen = 1;
-}
-
-void
-oosiop_done(struct oosiop_softc *sc, struct oosiop_cb *cb)
-{
-
- cb->status = cb->xfer->status;
-
- if (cb->flags & CBF_SELTOUT)
- cb->error = XS_SELTIMEOUT;
- else if (cb->flags & CBF_TIMEOUT)
- cb->error = XS_TIMEOUT;
- else switch (cb->status) {
- case SCSI_OK:
- cb->error = XS_NOERROR;
- break;
-
- case SCSI_BUSY:
- cb->error = XS_BUSY;
- break;
- case SCSI_CHECK:
- cb->error = XS_DRIVER_STUFFUP;
- break;
- case SCSI_OOSIOP_NOSTATUS:
- /* the status byte was not updated, cmd was aborted. */
- cb->error = XS_SELTIMEOUT;
- break;
-
- default:
- cb->error = XS_RESET;
- break;
- }
-
- /* Put it on the free list. */
- cb->xsflags |= ITSDONE;
-
- if (cb == sc->sc_curcb)
- sc->sc_curcb = NULL;
- sc->sc_nexus = NULL;
-}
-
-void
-oosiop_reset(struct oosiop_softc *sc)
-{
- /* Stop SCRIPTS processor */
- oosiop_write_1(sc, OOSIOP_ISTAT, OOSIOP_ISTAT_ABRT);
- delay(100);
- oosiop_write_1(sc, OOSIOP_ISTAT, 0);
-
- /* Reset the chip */
- oosiop_write_1(sc, OOSIOP_DCNTL, sc->sc_dcntl | OOSIOP_DCNTL_RST);
- delay(100);
- oosiop_write_1(sc, OOSIOP_DCNTL, sc->sc_dcntl);
- delay(10000);
-
- /* Set up various chip parameters */
- oosiop_write_1(sc, OOSIOP_SCNTL0, OOSIOP_ARB_FULL | sc->sc_scntl0);
- oosiop_write_1(sc, OOSIOP_SCNTL1, OOSIOP_SCNTL1_ESR);
- oosiop_write_1(sc, OOSIOP_DCNTL, sc->sc_dcntl);
- oosiop_write_1(sc, OOSIOP_DMODE, sc->sc_dmode);
- oosiop_write_1(sc, OOSIOP_SCID, OOSIOP_SCID_VALUE(sc->sc_id));
- oosiop_write_1(sc, OOSIOP_DWT, sc->sc_dwt);
- oosiop_write_1(sc, OOSIOP_CTEST7, sc->sc_ctest7);
- oosiop_write_1(sc, OOSIOP_SXFER, 0);
-
- /* Clear all interrupts */
- (void)oosiop_read_1(sc, OOSIOP_SSTAT0);
- (void)oosiop_read_1(sc, OOSIOP_SSTAT1);
- (void)oosiop_read_1(sc, OOSIOP_DSTAT);
-
- /* Enable interrupts */
- oosiop_write_1(sc, OOSIOP_SIEN,
- OOSIOP_SIEN_M_A | OOSIOP_SIEN_STO | OOSIOP_SIEN_SGE |
- OOSIOP_SIEN_UDC | OOSIOP_SIEN_RST | OOSIOP_SIEN_PAR);
- oosiop_write_1(sc, OOSIOP_DIEN,
- OOSIOP_DIEN_ABRT | OOSIOP_DIEN_SSI | OOSIOP_DIEN_SIR |
- OOSIOP_DIEN_WTD | OOSIOP_DIEN_IID);
-}
-
-void
-oosiop_reset_bus(struct oosiop_softc *sc)
-{
- /* Assert SCSI RST */
- oosiop_write_1(sc, OOSIOP_SCNTL1, OOSIOP_SCNTL1_RST);
- delay(25); /* Reset hold time (25us) */
- oosiop_write_1(sc, OOSIOP_SCNTL1, 0);
-
- /* Remove all nexuses */
- if (sc->sc_nexus) {
- sc->sc_nexus->xfer->status =
- SCSI_OOSIOP_NOSTATUS; /* XXX */
- oosiop_done(sc, sc->sc_nexus);
- }
-
- sc->sc_curcb = NULL;
-
- delay(250000); /* Reset to selection (250ms) */
-}
-
-void
-oosiop_processintr(struct oosiop_softc *sc, u_int8_t istat)
-{
- struct oosiop_cb *cb;
- uint32_t dcmd;
- u_int8_t dstat, sstat0;
-
- sc->sc_nextdsp = Ent_wait_reselect;
-
- /* DMA interrupts */
- if (istat & OOSIOP_ISTAT_DIP) {
- oosiop_write_1(sc, OOSIOP_ISTAT, 0);
-
- dstat = oosiop_read_1(sc, OOSIOP_DSTAT);
-
- if (dstat & OOSIOP_DSTAT_ABRT) {
- sc->sc_nextdsp = oosiop_read_4(sc, OOSIOP_DSP) -
- (uint32_t)sc->sc_scr - 8;
-
- if (sc->sc_nextdsp == Ent_p_resel_msgin_move &&
- (oosiop_read_1(sc, OOSIOP_SBCL) & OOSIOP_ACK)) {
- if ((dstat & OOSIOP_DSTAT_DFE) == 0)
- oosiop_flush_fifo(sc);
- sc->sc_nextdsp += 8;
- }
- }
-
- if (dstat & OOSIOP_DSTAT_SSI) {
- sc->sc_nextdsp = oosiop_read_4(sc, OOSIOP_DSP) -
- (uint32_t)sc->sc_scr;
- printf("ncsc: single step %p\n", sc->sc_nextdsp);
- }
-
- if (dstat & OOSIOP_DSTAT_SIR) {
- if ((dstat & OOSIOP_DSTAT_DFE) == 0)
- oosiop_flush_fifo(sc);
- oosiop_scriptintr(sc);
- }
-
- if (dstat & OOSIOP_DSTAT_WTD) {
- printf("ncsc: DMA time out\n");
- oosiop_reset(sc);
- }
-
- if (dstat & OOSIOP_DSTAT_IID) {
- dcmd = oosiop_read_4(sc, OOSIOP_DBC);
- if ((dcmd & 0xf8000000) == 0x48000000) {
- printf("ncsc: REQ asserted on WAIT DISCONNECT\n");
- sc->sc_nextdsp = Ent_phasedispatch; /* XXX */
- } else {
- printf("ncsc: invalid SCRIPTS instruction "
- "addr=%p dcmd=%p dsps=%p\n",
- oosiop_read_4(sc, OOSIOP_DSP) - 8, dcmd,
- oosiop_read_4(sc, OOSIOP_DSPS));
- oosiop_reset(sc);
- oosiop_load_script(sc);
- }
- }
-
- if ((dstat & OOSIOP_DSTAT_DFE) == 0)
- oosiop_clear_fifo(sc);
- }
-
- /* SCSI interrupts */
- if (istat & OOSIOP_ISTAT_SIP) {
- if (istat & OOSIOP_ISTAT_DIP)
- delay(1);
- sstat0 = oosiop_read_1(sc, OOSIOP_SSTAT0);
-
- if (sstat0 & OOSIOP_SSTAT0_M_A) {
- /* SCSI phase mismatch during MOVE operation */
- oosiop_phasemismatch(sc);
- sc->sc_nextdsp = Ent_phasedispatch;
- }
-
- if (sstat0 & OOSIOP_SSTAT0_STO) {
- if (sc->sc_curcb) {
- sc->sc_curcb->flags |= CBF_SELTOUT;
- oosiop_done(sc, sc->sc_curcb);
- }
- }
-
- if (sstat0 & OOSIOP_SSTAT0_SGE) {
- printf("ncsc: SCSI gross error\n");
- oosiop_reset(sc);
- }
-
- if (sstat0 & OOSIOP_SSTAT0_UDC) {
- /* XXX */
- if (sc->sc_curcb) {
- printf("ncsc: unexpected disconnect\n");
- oosiop_done(sc, sc->sc_curcb);
- }
- }
-
- if (sstat0 & OOSIOP_SSTAT0_RST)
- oosiop_reset(sc);
-
- if (sstat0 & OOSIOP_SSTAT0_PAR)
- printf("ncsc: parity error\n");
- }
-
- /* Start next command if available */
- if (sc->sc_nextdsp == Ent_wait_reselect && sc->sc_pending != 0) {
- sc->sc_pending = 0;
- cb = sc->sc_curcb = &sc->sc_cb;
- sc->sc_nexus = cb;
- oosiop_setup_dma(sc);
- oosiop_setup_syncxfer(sc);
- sc->sc_nextdsp = Ent_start_select;
- }
-
- /* Restart script */
- oosiop_write_4(sc, OOSIOP_DSP, sc->sc_nextdsp + (uint32_t)sc->sc_scr);
-}
-
-void
-oosiop_scriptintr(struct oosiop_softc *sc)
-{
- struct oosiop_cb *cb;
- uint32_t icode;
- uint32_t dsp;
- int i;
- u_int8_t sfbr, resid, resmsg;
-
- cb = sc->sc_curcb;
- icode = oosiop_read_4(sc, OOSIOP_DSPS);
-
- switch (icode) {
- case A_int_done:
- if (cb)
- oosiop_done(sc, cb);
- break;
-
- case A_int_msgin:
- if (cb)
- oosiop_msgin(sc, cb);
- break;
-
- case A_int_extmsg:
- /* extended message in DMA setup request */
- sfbr = oosiop_read_1(sc, OOSIOP_SFBR);
- oosiop_fixup_move(sc, Ent_p_extmsgin_move, sfbr,
- (uint32_t)cb->xfer +
- offsetof(struct oosiop_xfer, msgin[2]));
- sc->sc_nextdsp = Ent_rcv_extmsg;
- break;
-
- case A_int_resel:
- /* reselected */
- resid = oosiop_read_1(sc, OOSIOP_SFBR);
- for (i = 0; i < OOSIOP_NTGT; i++)
- if (resid & (1 << i))
- break;
- if (i == OOSIOP_NTGT) {
- printf("ncsc: missing reselection target id\n");
- break;
- }
- sc->sc_resid = i;
- sc->sc_nextdsp = Ent_wait_resel_identify;
-
- if (cb) {
- /* Current command was lost arbitration */
- sc->sc_nexus = NULL;
- sc->sc_curcb = NULL;
- }
-
- break;
-
- case A_int_res_id:
- cb = sc->sc_nexus;
- resmsg = oosiop_read_1(sc, OOSIOP_SFBR);
- if (MSG_ISIDENTIFY(resmsg) && cb &&
- (resmsg & MSG_IDENTIFY_LUNMASK) == cb->lun) {
- sc->sc_curcb = cb;
- /* might be overkill */
- oosiop_setup_dma(sc);
- oosiop_setup_syncxfer(sc);
- if (cb->curdp != cb->savedp) {
- cb->curdp = cb->savedp;
- oosiop_setup_sgdma(sc, cb);
- }
- sc->sc_nextdsp = Ent_ack_msgin;
- } else {
- /* Reselection from invalid target */
- oosiop_reset_bus(sc);
- }
- break;
-
- case A_int_resfail:
- /* reselect failed */
- break;
-
- case A_int_disc:
- /* disconnected */
- sc->sc_curcb = NULL;
- break;
-
- case A_int_err:
- /* generic error */
- dsp = oosiop_read_4(sc, OOSIOP_DSP);
- printf("ncsc: script error at %p\n",
- dsp - 8);
- sc->sc_curcb = NULL;
- break;
-
- case DATAIN_TRAP:
- printf("ncsc: unexpected datain\n");
- /* XXX: need to reset? */
- break;
-
- case DATAOUT_TRAP:
- printf("ncsc: unexpected dataout\n");
- /* XXX: need to reset? */
- break;
-
- default:
- printf("ncsc: unknown intr code %p\n",
- icode);
- break;
- }
-}
-
-void
-oosiop_msgin(struct oosiop_softc *sc, struct oosiop_cb *cb)
-{
- struct oosiop_xfer *xfer;
- int msgout;
-
- xfer = cb->xfer;
- sc->sc_nextdsp = Ent_ack_msgin;
- msgout = 0;
-
- switch (xfer->msgin[0]) {
- case MSG_SAVEDATAPOINTER:
- cb->savedp = cb->curdp;
- break;
-
- case MSG_RESTOREPOINTERS:
- if (cb->curdp != cb->savedp) {
- cb->curdp = cb->savedp;
- oosiop_setup_sgdma(sc, cb);
- }
- break;
-
- case MSG_MESSAGE_REJECT:
- break;
-
- default:
- /* Reject message */
- xfer->msgout[0] = MSG_MESSAGE_REJECT;
- cb->msgoutlen = 1;
- msgout = 1;
- }
-
- if (msgout) {
- oosiop_fixup_move(sc, Ent_p_msgout_move, cb->msgoutlen,
- (uint32_t)cb->xfer +
- offsetof(struct oosiop_xfer, msgout[0]));
- sc->sc_nextdsp = Ent_sendmsg;
- }
-}
diff --git a/sys/arch/aviion/stand/boot/oosiop.h b/sys/arch/aviion/stand/boot/oosiop.h
deleted file mode 100644
index 622305db647..00000000000
--- a/sys/arch/aviion/stand/boot/oosiop.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* $OpenBSD: oosiop.h,v 1.1 2013/10/08 21:55:21 miod Exp $ */
-
-/*
- * Copyright (c) 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-void *oosiop_attach(uint32_t, int, int);
-void oosiop_detach(void *);
-int oosiop_scsicmd(void *, void *, size_t, void *, size_t, size_t *);
diff --git a/sys/arch/aviion/stand/boot/scsi.c b/sys/arch/aviion/stand/boot/scsi.c
deleted file mode 100644
index 5bce368030c..00000000000
--- a/sys/arch/aviion/stand/boot/scsi.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/* $OpenBSD: scsi.c,v 1.4 2014/07/12 19:01:49 tedu Exp $ */
-
-/*
- * Copyright (c) 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <stand.h>
-
-#include "libsa.h"
-#include "prom.h"
-
-#include "scsi.h"
-#include <scsi/scsi_disk.h>
-
-struct scsi_private *
-scsi_initialize(const char *ctrlname, int ctrl, int unit, int lun, int part)
-{
- struct scsi_private *priv;
-
- priv = alloc(sizeof(struct scsi_private));
- if (priv == NULL)
- return NULL;
-
- memset(priv, 0, sizeof(struct scsi_private));
- priv->part = part;
-
- /* provide default based upon system type */
- if (*ctrlname == '\0') {
- switch (cpuid()) {
- case AVIION_300_310:
- case AVIION_400_4000:
- case AVIION_410_4100:
- case AVIION_300C_310C:
- case AVIION_300CD_310CD:
- case AVIION_300D_310D:
- case AVIION_4300_25:
- case AVIION_4300_20:
- case AVIION_4300_16:
- ctrlname = "insc";
- break;
- case AVIION_4600_530:
- ctrlname = "ncsc";
- break;
- }
- }
-
- if (strcmp(ctrlname, "insc") == 0) {
- if (ctrl == 0) {
- *(volatile uint32_t *)0xfff840c0 = 0x6e;
- ctrl = 0xfff8a000;
- } else
- goto done;
-
- if (badaddr((void *)ctrl, 4) != 0)
- goto done;
-
- /* initialize controller */
- priv->scsicookie = oaic_attach(ctrl, unit, lun);
- priv->scsicmd = oaic_scsicmd;
- priv->scsidetach = oaic_detach;
- } else
- if (strcmp(ctrlname, "ncsc") == 0) {
- if (ctrl == 0)
- ctrl = 0xfffb0000;
- else if (ctrl == 1)
- ctrl = 0xfffb0080;
- else
- goto done;
-
- if (badaddr((void *)ctrl, 4) != 0)
- goto done;
-
- /* initialize controller */
- priv->scsicookie = oosiop_attach(ctrl, unit, lun);
- priv->scsicmd = oosiop_scsicmd;
- priv->scsidetach = oosiop_detach;
- }
-
-done:
- if (priv->scsicookie == NULL) {
- free(priv, sizeof(struct scsi_private));
- priv = NULL;
- }
-
- return priv;
-}
-
-int
-scsi_tur(struct scsi_private *priv)
-{
- struct scsi_test_unit_ready cmd;
- int i, rc;
-
- for (i = TEST_READY_RETRIES; i != 0; i--) {
- memset(&cmd, 0, sizeof cmd);
- cmd.opcode = TEST_UNIT_READY;
-
- rc = (*priv->scsicmd)(priv->scsicookie,
- &cmd, sizeof cmd, NULL, 0, NULL);
- if (rc == 0)
- break;
- }
-
- return rc;
-}
-
-int
-scsi_read(struct scsi_private *priv, daddr32_t blk, size_t size, void *buf,
- size_t *rsize)
-{
- union {
- struct scsi_rw rw;
- struct scsi_rw_big rw_big;
- struct scsi_rw_12 rw_12;
- } cmd;
- int nsecs;
- size_t cmdlen;
- int i, rc;
-
- nsecs = (size + DEV_BSIZE - 1) >> _DEV_BSHIFT;
-
- for (i = SCSI_RETRIES; i != 0; i--) {
- memset(&cmd, 0, sizeof cmd);
-
- /* XXX SDEV_ONLYBIG quirk */
- if ((blk & 0x1fffff) == blk && (nsecs & 0xff) == nsecs) {
- cmd.rw.opcode = READ_COMMAND;
- _lto3b(blk, cmd.rw.addr);
- cmd.rw.length = nsecs;
- cmdlen = sizeof cmd.rw;
- } else if ((nsecs & 0xffff) == nsecs) {
- cmd.rw_big.opcode = READ_BIG;
- _lto4b(blk, cmd.rw_big.addr);
- _lto2b(nsecs, cmd.rw_big.length);
- cmdlen = sizeof cmd.rw_big;
- } else {
- cmd.rw_12.opcode = READ_12;
- _lto4b(blk, cmd.rw_12.addr);
- _lto4b(nsecs, cmd.rw_12.length);
- cmdlen = sizeof cmd.rw_12;
- }
-
- rc = (*priv->scsicmd)(priv->scsicookie,
- &cmd, sizeof cmd, buf, size, rsize);
- if (rc == 0)
- break;
- }
-
- return rc;
-}
diff --git a/sys/arch/aviion/stand/boot/scsi.h b/sys/arch/aviion/stand/boot/scsi.h
deleted file mode 100644
index d54affbf6e4..00000000000
--- a/sys/arch/aviion/stand/boot/scsi.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* $OpenBSD: scsi.h,v 1.4 2013/10/16 16:59:34 miod Exp $ */
-
-#include <scsi/scsi_all.h>
-#include <scsi/scsiconf.h>
-
-/*
- * The following are defines from <scsi/scsiconf.h> not available to
- * !_KERNEL code, under the following licence terms:
- */
-
-/* OpenBSD: scsiconf.h,v 1.157 2013/09/27 11:43:19 krw Exp */
-/* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */
-
-/*
- * Copyright (c) 1993, 1994, 1995 Charles Hannum. 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 Charles Hannum.
- * 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.
- */
-
-/*
- * Originally written by Julian Elischer (julian@tfs.com)
- * for TRW Financial Systems for use under the MACH(2.5) operating system.
- *
- * TRW Financial Systems, in accordance with their agreement with Carnegie
- * Mellon University, makes this software available to CMU to distribute
- * or use in any manner that they see fit as long as this message is kept with
- * the software. For this reason TFS also grants any other persons or
- * organisations permission to use or modify this software.
- *
- * TFS supplies this software to be publicly redistributed
- * on the understanding that TFS is not responsible for the correct
- * functioning of this software in any circumstances.
- *
- * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
- */
-
-#define ITSDONE 0x00008 /* the transfer is as done as it gets */
-#define SCSI_DATA_IN 0x00800 /* expect data to come INTO memory */
-#define SCSI_DATA_OUT 0x01000 /* expect data to flow OUT of memory */
-
-#define XS_NOERROR 0 /* there is no error, (sense is invalid) */
-#define XS_SENSE 1 /* Check the returned sense for the error */
-#define XS_DRIVER_STUFFUP 2 /* Driver failed to perform operation */
-#define XS_SELTIMEOUT 3 /* The device timed out.. turned off? */
-#define XS_TIMEOUT 4 /* The Timeout reported was caught by SW */
-#define XS_BUSY 5 /* The device busy, try again later? */
-#define XS_SHORTSENSE 6 /* Check the ATAPI sense for the error */
-#define XS_RESET 8 /* bus was reset; possible retry command */
-#define XS_NO_CCB 9 /* device should requeue io and retry */
-
-#define TEST_READY_RETRIES 5
-
-#define SCSI_RETRIES 4
-
-#include <scsi/scsi_message.h>
-
-#include <sys/disklabel.h>
-
-struct scsi_private {
- void *scsicookie;
- int (*scsicmd)(void *, void *, size_t, void *, size_t, size_t *);
- void (*scsidetach)(void *);
-
- struct disklabel label;
- int part;
-};
-
-struct scsi_private *
- scsi_initialize(const char *, int, int, int, int);
-
-int scsi_tur(struct scsi_private *);
-int scsi_read(struct scsi_private *, daddr32_t, size_t, void *, size_t *);
-
-#include "oaic.h"
-#include "oosiop.h"
diff --git a/sys/arch/aviion/stand/boot/sd.c b/sys/arch/aviion/stand/boot/sd.c
deleted file mode 100644
index 2f4f3b3fcb1..00000000000
--- a/sys/arch/aviion/stand/boot/sd.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/* $OpenBSD: sd.c,v 1.8 2015/10/01 16:08:19 krw Exp $ */
-
-/*
- * Copyright (c) 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <stand.h>
-
-#include "scsi.h"
-
-int
-sdopen(struct open_file *f, const char *ctrlname, int ctrl, int unit, int lun,
- int part)
-{
- struct scsi_private *priv;
- struct vdm_label *vdl;
- int rc;
- char buf[DEV_BSIZE];
- char *msg;
- size_t z;
-
- f->f_devdata = priv = scsi_initialize(ctrlname, ctrl, unit, lun, part);
- if (priv == NULL)
- return ENXIO;
-
- /* send TUR */
- rc = scsi_tur(priv);
- if (rc != 0)
- return EIO;
-
- /* read disklabel. We expect a VDM label since this is the only way
- * we can boot from disk. */
- rc = scsi_read(priv, VDM_LABEL_SECTOR, sizeof buf, buf, &z);
- if (rc != 0 || z != sizeof buf)
- return EIO;
-
- vdl = (struct vdm_label *)(buf + VDM_LABEL_OFFSET);
- if (vdl->signature != VDM_LABEL_SIGNATURE)
- vdl = (struct vdm_label *)(buf + VDM_LABEL_OFFSET_ALT);
- if (vdl->signature != VDM_LABEL_SIGNATURE)
- return EINVAL;
-
- /* XXX ought to search for an OpenBSD vdmpart too. Too lazy for now */
- rc = scsi_read(priv, LABELSECTOR, sizeof buf, buf, &z);
- if (rc != 0 || z != sizeof buf)
- return EIO;
-
- msg = getdisklabel(buf, &priv->label);
- if (msg != NULL) {
- printf("%s\n", msg);
- return EINVAL;
- }
-
- return 0;
-}
-
-int
-sdstrategy(void *devdata, int rw, daddr32_t blk, size_t size, void *buf,
- size_t *rsize)
-{
- struct scsi_private *priv = devdata;
-
- if (rw != F_READ)
- return EROFS;
-
- blk += priv->label.d_partitions[priv->part].p_offset;
-
- return scsi_read(priv, blk, size, buf, rsize) != 0 ? EIO : 0;
-}
-
-int
-sdclose(struct open_file *f)
-{
- struct scsi_private *priv;
-
- if (f->f_devdata != NULL) {
- priv = (struct scsi_private *)f->f_devdata;
- if (priv->scsicookie != NULL)
- (*priv->scsidetach)(priv->scsicookie);
- free(priv, sizeof(struct scsi_private));
- f->f_devdata = NULL;
- }
-
- return 0;
-}
diff --git a/sys/arch/aviion/stand/boot/version.c b/sys/arch/aviion/stand/boot/version.c
deleted file mode 100644
index 4069d2ddfa1..00000000000
--- a/sys/arch/aviion/stand/boot/version.c
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $OpenBSD: version.c,v 1.6 2014/02/24 20:15:37 miod Exp $ */
-
-const char version[] = "0.6";
diff --git a/sys/arch/aviion/stand/installboot/Makefile b/sys/arch/aviion/stand/installboot/Makefile
deleted file mode 100644
index 95150cfef9a..00000000000
--- a/sys/arch/aviion/stand/installboot/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# $OpenBSD: Makefile,v 1.1 2013/09/29 17:51:34 miod Exp $
-
-MAN= installboot.8
-MANSUBDIR= aviion
-
-.if ${MACHINE} == "aviion"
-PROG= installboot
-BINDIR= /usr/mdec
-DPADD= ${LIBUTIL}
-LDADD= -lutil
-LDSTATIC= -static
-.else
-NOPROG=
-.endif
-
-.include <bsd.prog.mk>
diff --git a/sys/arch/aviion/stand/installboot/installboot.8 b/sys/arch/aviion/stand/installboot/installboot.8
deleted file mode 100644
index 64e060687c9..00000000000
--- a/sys/arch/aviion/stand/installboot/installboot.8
+++ /dev/null
@@ -1,69 +0,0 @@
-.\" $OpenBSD: installboot.8,v 1.2 2013/09/29 21:30:49 jmc Exp $
-.\"
-.\" Copyright (c) 1994 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.
-.\"
-.Dd $Mdocdate: September 29 2013 $
-.Dt INSTALLBOOT 8 aviion
-.Os
-.Sh NAME
-.Nm installboot
-.Nd install a bootstrap on a disk
-.Sh SYNOPSIS
-.Nm installboot
-.Op Fl nv
-.Ar boot
-.Ar rawdev
-.Sh DESCRIPTION
-.Nm installboot
-is used to install a boot program into the VDM boot area of a disk.
-.Pp
-The options are as follows:
-.Bl -tag -width flag
-.It Fl n
-Do not actually write anything on the disk.
-.It Fl v
-Be verbose, printing out boot area and boot file information.
-.El
-.Pp
-The arguments are:
-.Bl -tag -width rawdev
-.It Ar boot
-The name of the boot program to be installed.
-.It Ar rawdev
-The name of the raw disk device in which the boot program is to be installed.
-It may be abbreviated into a form recognizable by
-.Xr opendev 3 .
-.El
-.Sh EXAMPLES
-.Bd -literal
-# /usr/mdec/installboot /usr/mdec/boot sd0
-.Ed
-.Sh SEE ALSO
-.Xr disklabel 8 ,
-.Xr init 8
diff --git a/sys/arch/aviion/stand/installboot/installboot.c b/sys/arch/aviion/stand/installboot/installboot.c
deleted file mode 100644
index a6fba2d789f..00000000000
--- a/sys/arch/aviion/stand/installboot/installboot.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/* $OpenBSD: installboot.c,v 1.3 2013/10/01 20:32:30 miod Exp $ */
-
-/*
- * Copyright (c) 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <unistd.h>
-#include <err.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <util.h>
-#include <sys/disklabel.h>
-#include <sys/stat.h>
-
-int nowrite, verbose;
-char *boot, *dev;
-
-void analyze_label_sector(uint8_t *, struct vdm_label **,
- struct vdm_boot_info **);
-void read_sector(int, uint32_t, void *);
-void usage(void);
-void write_sector(int, uint32_t, void *);
-
-#define VDM_BLOCK_SIZE 0x200
-
-uint8_t buf[VDM_BLOCK_SIZE];
-
-void
-usage()
-{
- fprintf(stderr, "usage: installboot [-nv] boot rawdev\n");
- exit(1);
-}
-
-int
-main(int argc, char *argv[])
-{
- int c;
- int bootfd, devfd;
- size_t chunk;
- uint32_t blkno;
- struct stat stat;
- struct vdm_label *dl;
- struct vdm_boot_info *bi;
-
- while ((c = getopt(argc, argv, "nv")) != -1) {
- switch (c) {
- case 'n':
- nowrite = 1;
- break;
- case 'v':
- verbose = 1;
- break;
- default:
- usage();
- }
- }
-
- if (argc - optind != 2)
- usage();
-
- boot = argv[optind];
- dev = argv[optind + 1];
-
- bootfd = open(boot, O_RDONLY);
- if (bootfd < 0)
- err(1, "open(%s)", boot);
-
- if (fstat(bootfd, &stat) != 0)
- err(1, "fstat(%s)", boot);
-
- devfd = opendev(dev, nowrite ? O_RDONLY : O_RDWR, OPENDEV_PART, &dev);
- if (devfd < 0)
- err(1, "open(%s)", dev);
-
- /*
- * Figure out the boot area span.
- */
-
- read_sector(devfd, VDM_LABEL_SECTOR, buf);
- analyze_label_sector(buf, &dl, &bi);
-
- if (bi != NULL) {
- if (verbose)
- printf("boot area: sectors %u-%u\n",
- bi->boot_start, bi->boot_start + bi->boot_size - 1);
- } else {
- errx(1, "no boot area found on %s", dev);
- }
-
- /*
- * Write the file into the boot area.
- */
-
- if (stat.st_size > bi->boot_size * VDM_BLOCK_SIZE)
- err(1, "boot file too large, boot area is only %u bytes",
- bi->boot_size * VDM_BLOCK_SIZE);
-
- if (nowrite)
- return 0;
-
- blkno = bi->boot_start;
- if (verbose)
- printf("writing %lld bytes from sector %u onwards\n",
- stat.st_size, blkno);
- while (stat.st_size != 0) {
- if (stat.st_size > sizeof buf)
- chunk = sizeof buf;
- else {
- chunk = stat.st_size;
- memset(buf, 0, sizeof buf);
- }
- if (read(bootfd, buf, chunk) != chunk)
- err(1, "read");
- write_sector(devfd, blkno++, buf);
- stat.st_size -= chunk;
- }
-
- close(bootfd);
- close(devfd);
- return 0;
-}
-
-void
-read_sector(int fd, uint32_t secno, void *buf)
-{
- if (lseek(fd, (off_t)secno * VDM_BLOCK_SIZE, SEEK_SET) == -1)
- err(1, "lseek");
-
- if (read(fd, buf, VDM_BLOCK_SIZE) != VDM_BLOCK_SIZE)
- err(1, "read(%d,%08x)", fd, secno);
-}
-
-void
-write_sector(int fd, uint32_t secno, void *buf)
-{
- if (lseek(fd, (off_t)secno * VDM_BLOCK_SIZE, SEEK_SET) == -1)
- err(1, "lseek");
-
- if (write(fd, buf, VDM_BLOCK_SIZE) != VDM_BLOCK_SIZE)
- err(1, "write(%d,%08x)", fd, secno);
-}
-
-void
-analyze_label_sector(uint8_t *sector, struct vdm_label **dl,
- struct vdm_boot_info **dbi)
-{
- struct vdm_label *l;
- struct vdm_boot_info *bi;
-
- l = (struct vdm_label *)(sector + VDM_LABEL_OFFSET);
- if (betoh32(l->signature) != VDM_LABEL_SIGNATURE) {
- l = (struct vdm_label *)(sector + VDM_LABEL_OFFSET_ALT);
- if (betoh32(l->signature) != VDM_LABEL_SIGNATURE)
- l = NULL;
- }
-
- if (l != NULL) {
- bi = (struct vdm_boot_info *)
- (sector + VDM_BLOCK_SIZE - sizeof *bi);
- if (betoh32(bi->signature) != VDM_LABEL_SIGNATURE)
- bi = NULL;
- } else
- bi = NULL;
-
- *dl = l;
- *dbi = bi;
-}
diff --git a/sys/arch/aviion/stand/libprom/Makefile b/sys/arch/aviion/stand/libprom/Makefile
deleted file mode 100644
index 8b59141ca6a..00000000000
--- a/sys/arch/aviion/stand/libprom/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-# $OpenBSD: Makefile,v 1.3 2013/10/16 16:59:35 miod Exp $
-
-LIB=prom
-
-NOPIC=
-NOPROFILE=
-NOPIE=
-
-S=${.CURDIR}/../../../..
-DIR_SA=$S/lib/libsa
-
-CFLAGS+=-I${.CURDIR}/../../include -I${DIR_SA}
-
-SRCS= cpuid.c getc.c getenaddr.c halt.c putc.c
-
-install:
-
-.include <bsd.lib.mk>
diff --git a/sys/arch/aviion/stand/libprom/Makefile.inc b/sys/arch/aviion/stand/libprom/Makefile.inc
deleted file mode 100644
index c09c6289bb7..00000000000
--- a/sys/arch/aviion/stand/libprom/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.1 2006/05/16 22:48:18 miod Exp $
-
-LIB_PROM_DIR=${S}/arch/aviion/stand/libprom
-
-LIBPROM_DIR!= cd ${LIB_PROM_DIR}; \
- printf "xxx:\n\techo \$${.OBJDIR}\n" | ${MAKE} -r -s -f - xxx
-
-LIBPROM=${LIBPROM_DIR}/libprom.a
-
-$(LIBPROM): .NOTMAIN __always_make_libprom
- @echo making sure the libprom is up to date...
- @(cd ${LIB_PROM_DIR}; ${MAKE})
-
-__always_make_libprom: .NOTMAIN
diff --git a/sys/arch/aviion/stand/libprom/cpuid.c b/sys/arch/aviion/stand/libprom/cpuid.c
deleted file mode 100644
index a459286991e..00000000000
--- a/sys/arch/aviion/stand/libprom/cpuid.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* $OpenBSD: cpuid.c,v 1.2 2014/03/29 18:09:29 guenther Exp $ */
-
-/*
- * Copyright (c) 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <sys/types.h>
-
-#include "prom.h"
-
-uint
-cpuid(void)
-{
- uint ret;
-
- SCM_CALL(SCM_CPUID);
- __asm__ volatile ("or %0, %%r0, %%r2" : "=r" (ret));
-
- return ret;
-}
diff --git a/sys/arch/aviion/stand/libprom/getc.c b/sys/arch/aviion/stand/libprom/getc.c
deleted file mode 100644
index 607288fab51..00000000000
--- a/sys/arch/aviion/stand/libprom/getc.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* $OpenBSD: getc.c,v 1.3 2014/03/29 18:09:29 guenther Exp $ */
-/*
- * Copyright (c) 2006, Miodrag Vallat
- *
- * 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.
- *
- * 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/types.h>
-
-#include "prom.h"
-
-int
-getchar(void)
-{
- u_int ret;
-
- SCM_CALL(SCM_CHAR);
- __asm__ volatile ("or %0, %%r0, %%r2" : "=r" (ret));
-
- return (ret & 0xff);
-}
diff --git a/sys/arch/aviion/stand/libprom/getenaddr.c b/sys/arch/aviion/stand/libprom/getenaddr.c
deleted file mode 100644
index 8f7a426f3c0..00000000000
--- a/sys/arch/aviion/stand/libprom/getenaddr.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* $OpenBSD: getenaddr.c,v 1.3 2014/03/29 18:09:29 guenther Exp $ */
-/*
- * Copyright (c) 2006, Miodrag Vallat
- *
- * 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.
- *
- * 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/types.h>
-
-#include "prom.h"
-
-void
-scm_getenaddr(u_char *ea)
-{
- u_char *addr;
-
- SCM_CALL(SCM_COMMID);
- __asm__ volatile ("or %0, %%r0, %%r2" : "=r" (addr));
-
- ea[0] = addr[0];
- ea[1] = addr[1];
- ea[2] = addr[2];
- ea[3] = addr[3];
- ea[4] = addr[4];
- ea[5] = addr[5];
-}
diff --git a/sys/arch/aviion/stand/libprom/halt.c b/sys/arch/aviion/stand/libprom/halt.c
deleted file mode 100644
index 79994872944..00000000000
--- a/sys/arch/aviion/stand/libprom/halt.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* $OpenBSD: halt.c,v 1.1 2006/05/16 22:48:18 miod Exp $ */
-/*
- * Copyright (c) 2006, Miodrag Vallat
- *
- * 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.
- *
- * 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/types.h>
-
-#include "prom.h"
-
-__dead void
-_rtt()
-{
- SCM_CALL(SCM_HALT);
- for (;;) ;
-}
diff --git a/sys/arch/aviion/stand/libprom/prom.h b/sys/arch/aviion/stand/libprom/prom.h
deleted file mode 100644
index 68a52d0ed0e..00000000000
--- a/sys/arch/aviion/stand/libprom/prom.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* $OpenBSD: prom.h,v 1.4 2014/03/29 18:09:29 guenther Exp $ */
-/*
- * Copyright (c) 2006, Miodrag Vallat
- *
- * 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.
- *
- * 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.
- */
-
-#define SCM_CHAR 0x00
-#define SCM_OCHAR 0x20
-#define SCM_OCRLF 0x26
-#define SCM_HALT 0x63
-#define SCM_CPUID 0x102
-#define SCM_COMMID 0x114
-
-uint cpuid(void);
-void scm_getenaddr(u_char *);
-
-/*
- * Simpler version of SCM_CALL() from aviion/prom.c since we are using
- * in PROM context.
- */
-
-#define SCM_CALL(x) \
- __asm__ volatile ("or %%r9,%%r0," __STRING(x) "; tb0 0,%%r0,496" \
- ::: "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", \
- "r9", "r10", "r11", "r12", "r13")
-
-/*
- * cpuid values
- */
-
-#define AVIION_300_310 0x7904 /* mono Maverick */
-#define AVIION_5100_6100 0x7906 /* 20MHz Topgun */
-#define AVIION_400_4000 0x7908 /* 16MHz Mav+ */
-#define AVIION_410_4100 0x790c /* 20MHz Mav+ */
-#define AVIION_300C_310C 0x7910 /* color Maverick */
-#define AVIION_5200_6200 0x7912 /* 25MHz Topgun */
-#define AVIION_5240_6240 0x7918 /* 25MHz Shotgun */
-#define AVIION_300CD_310CD 0x7920 /* dual duart color Maverick */
-#define AVIION_300D_310D 0x7924 /* dual duart mono Maverick */
-#define AVIION_4600_530 0x7930 /* Rolling Rock */
-#define AVIION_4300_25 0x7932 /* 25MHz Terra */
-#define AVIION_4300_20 0x7934 /* 20MHz Terra */
-#define AVIION_4300_16 0x7936 /* 16MHz Terra */
-#define AVIION_5255_6255 0x7942 /* 25MHz Tophat */
-#define AVIION_350 0x7944 /* KME */
-#define AVIION_6280 0x7946 /* High Noon */
-#define AVIION_8500_9500 0x794a /* Odyssey */
-#define AVIION_9500_HA 0x794c /* Oz */
-#define AVIION_500 0x794e /* Robin Hood */
-#define AVIION_5500 0x7950 /* Schooner */
-#define AVIION_450 0x7958 /* Inner Tube */
-#define AVIION_8500_9500_45_1MB 0x795a /* 45MHz Iliad (1MB L2) */
-#define AVIION_10000 0x7960 /* Sierra */
-#define AVIION_10000_QT 0x7962 /* Sierra QT */
-#define AVIION_5500PLUS 0x7964 /* Schooner+ */
-#define AVIION_450PLUS 0x7966 /* Inner Tube+ */
-#define AVIION_8500_9500_50_1MB 0x7968 /* 50MHz Iliad (1MB L2) */
-#define AVIION_8500_9500_50_2MB 0x796a /* 50MHz Iliad (2MB L2) */
-
-/* did the following ever hit the market? */
-#define AVIION_UNKNOWN1 0x7926 /* mono Montezuma */
-#define AVIION_UNKNOWN2 0x7928 /* color Montezuma */
-#define AVIION_UNKNOWN3 0x7956 /* Flintstone */
-#define AVIION_UNKNOWN1_DIS 0xfff0 /* mono disabled Montezuma */
-#define AVIION_UNKNOWN2_DIS 0xfff1 /* color disabled Montezuma */
diff --git a/sys/arch/aviion/stand/libprom/putc.c b/sys/arch/aviion/stand/libprom/putc.c
deleted file mode 100644
index 65e14a5c109..00000000000
--- a/sys/arch/aviion/stand/libprom/putc.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* $OpenBSD: putc.c,v 1.3 2014/03/29 18:09:29 guenther Exp $ */
-/*
- * Copyright (c) 2006, Miodrag Vallat
- *
- * 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.
- *
- * 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/types.h>
-
-#include "prom.h"
-
-void
-putchar(int c)
-{
- if (c == '\n') {
- SCM_CALL(SCM_OCRLF);
- } else {
- __asm__ volatile ("or %%r2, %%r0, %0" : : "r" (c));
- SCM_CALL(SCM_OCHAR);
- }
-}
-
diff --git a/sys/arch/aviion/stand/libsa/Makefile b/sys/arch/aviion/stand/libsa/Makefile
deleted file mode 100644
index 977ba6c9721..00000000000
--- a/sys/arch/aviion/stand/libsa/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-# $OpenBSD: Makefile,v 1.7 2015/11/16 19:33:52 miod Exp $
-
-LIB=sa
-
-NOPIC=nopic
-NOPROFILE=noprofile
-NOPIE=
-
-# Logically src/sys
-S=${.CURDIR}/../../../..
-
-SRCS= clock.c delay.S exec.c fault.c parse_args.c setjmp.S
-
-.PATH: ${S}/lib/libsa
-SRCS+= alloc.c memcpy.c exit.c getfile.c getln.c globals.c loadfile.c \
- printf.c strerror.c memset.c memcmp.c strncpy.c strcmp.c strlen.c \
- strlcpy.c strlcat.c snprintf.c strchr.c strtol.c \
- close.c closeall.c dev.c dkcksum.c \
- lseek.c open.c nullfs.c read.c fstat.c disklabel.c \
- ufs.c cread.c
-SRCS+= arp.c ether.c in_cksum.c net.c netif.c netudp.c rpc.c nfs.c \
- rarp.c bootparam.c
-
-.PATH: ${S}/lib/libkern/arch/m88k ${S}/lib/libkern
-SRCS+= ashrdi3.c bzero.c __main.c
-
-# DBG= -DDEBUG -DNETIF_DEBUG -DNFS_DEBUG -DRPC_DEBUG \
-# -DNET_DEBUG -DRARP_DEBUG -DETHER_DEBUG
-
-#DEFS= -DCOMPAT_UFS
-DEFS= -D__INTERNAL_LIBSA_CREAD -D_STANDALONE
-#-DNETIF_DEBUG
-INCL= -I${.CURDIR} -I${.CURDIR}/../libprom -I${S}/lib/libsa -I${S}
-CFLAGS+= ${XCFLAGS} ${COPTS} ${DEFS} ${DBG} ${INCL}
-
-all: libsa.a
-
-install:
-
-.include <bsd.lib.mk>
diff --git a/sys/arch/aviion/stand/libsa/Makefile.inc b/sys/arch/aviion/stand/libsa/Makefile.inc
deleted file mode 100644
index e7684c0719a..00000000000
--- a/sys/arch/aviion/stand/libsa/Makefile.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.1 2006/05/16 22:48:18 miod Exp $
-
-LIB_SA_DIR=${S}/arch/aviion/stand/libsa
-
-LIBSA_DIR!= cd ${LIB_SA_DIR}; \
- printf "xxx:\n\techo \$${.OBJDIR}\n" | ${MAKE} -r -s -f - xxx
-
-LIBSA=${LIBSA_DIR}/libsa.a
-SRTOBJ?= ${LIBSA_DIR}/SRT0.o
-
-$(LIBSA): .NOTMAIN __always_make_libsa
- @echo making sure the libsa is up to date...
- @(cd ${LIB_SA_DIR}; ${MAKE} "XCFLAGS=${CFLAGS}")
-
-__always_make_libsa: .NOTMAIN
diff --git a/sys/arch/aviion/stand/libsa/clock.c b/sys/arch/aviion/stand/libsa/clock.c
deleted file mode 100644
index 859bd447205..00000000000
--- a/sys/arch/aviion/stand/libsa/clock.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/* $OpenBSD: clock.c,v 1.2 2013/10/08 21:55:21 miod Exp $ */
-
-
-#include <sys/types.h>
-#include <machine/prom.h>
-
-#include "stand.h"
-#include "libsa.h"
-
-#include "nvramreg.h"
-
-/*
- * BCD to decimal and decimal to BCD.
- */
-#define FROMBCD(x) (((x) >> 4) * 10 + ((x) & 0xf))
-#define TOBCD(x) (((x) / 10 * 16) + ((x) % 10))
-
-#define LEAPYEAR(y) (((y) & 3) == 0)
-
-/*
- * This code is defunct after 2068.
- * Will Unix still be here then??
- */
-const int dayyr[12] =
-{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };
-
-u_long
-chiptotime(sec, min, hour, day, mon, year)
- int sec, min, hour, day, mon, year;
-{
- int days, yr;
-
- sec = FROMBCD(sec);
- min = FROMBCD(min);
- hour = FROMBCD(hour);
- day = FROMBCD(day);
- mon = FROMBCD(mon);
- year = FROMBCD(year) + YEAR0;
-
- /* simple sanity checks */
- if (year > 164 || mon < 1 || mon > 12 || day < 1 || day > 31)
- return (0);
- yr = 70;
- days = 0;
-
- if (year < 70) {
- for (; yr < year; yr++)
- days += LEAPYEAR(yr) ? 366 : 365;
- yr = 0;
- }
-
- for (; yr < year; yr++)
- days += LEAPYEAR(yr) ? 366 : 365;
-
- days += dayyr[mon - 1] + day - 1;
-
- if (LEAPYEAR(yr) && mon > 2)
- days++;
-
- /* now have days since Jan 1, 1970; the rest is easy... */
- return (days * SECDAY + hour * 3600 + min * 60 + sec);
-}
-
-time_t
-getsecs()
-{
- int sec, min, hour, day, mon, year;
-#define TOD_BASE (0xfff80000 + AV400_NVRAM_TOD_OFF)
-
- *(volatile u_int32_t *)(TOD_BASE + (CLK_CSR << 2)) = CLK_READ |
- *(volatile u_int32_t *)(TOD_BASE + (CLK_CSR << 2));
- sec = *(volatile u_int32_t *)(TOD_BASE + (CLK_SEC << 2)) & 0xff;
- min = *(volatile u_int32_t *)(TOD_BASE + (CLK_MIN << 2)) & 0xff;
- hour = *(volatile u_int32_t *)(TOD_BASE + (CLK_HOUR << 2)) & 0xff;
- day = *(volatile u_int32_t *)(TOD_BASE + (CLK_DAY << 2)) & 0xff;
- mon = *(volatile u_int32_t *)(TOD_BASE + (CLK_MONTH << 2)) & 0xff;
- year = *(volatile u_int32_t *)(TOD_BASE + (CLK_YEAR << 2)) & 0xff;
- *(volatile u_int32_t *)(TOD_BASE + (CLK_CSR << 2)) = ~CLK_READ &
- *(volatile u_int32_t *)(TOD_BASE + (CLK_CSR << 2));
-
- return (chiptotime(sec, min, hour, day, mon, year));
-}
diff --git a/sys/arch/aviion/stand/libsa/delay.S b/sys/arch/aviion/stand/libsa/delay.S
deleted file mode 100644
index 462b12ab5fe..00000000000
--- a/sys/arch/aviion/stand/libsa/delay.S
+++ /dev/null
@@ -1,55 +0,0 @@
-/* $OpenBSD: delay.S,v 1.1 2013/10/08 21:55:21 miod Exp $ */
-/*
- * Mach Operating System
- * Copyright (c) 1993-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.
- *
- * CARNEGIE MELLON AND OMRON ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON AND OMRON DISCLAIM ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-#include <machine/asm.h>
-
-/*
- * void delay(int us)
- *
- * The processor loops (busy waits) for the given number of microseconds:
- * Thus, delay(1000000) will delay for one second.
- * (originally from Mach 2.5)
- */
-ENTRY(delay)
- bcnd eq0, %r2, 2f
- or.u %r3, %r0, %hi16(_C_LABEL(aviion_delay_const))
- ld %r3, %r3, %lo16(_C_LABEL(aviion_delay_const))
- mul %r4, %r2, %r3
- subu %r4, %r4, 4 /* overhead of these instructions */
-
- /* now loop for the given number of cycles */
-1:
- bcnd.n gt0, %r4, 1b
- subu %r4, %r4, 2 /* two cycles per iteration */
-2:
- jmp %r1
-
- .data
-
-GLOBAL(aviion_delay_const)
- .word 33
diff --git a/sys/arch/aviion/stand/libsa/exec.c b/sys/arch/aviion/stand/libsa/exec.c
deleted file mode 100644
index c5ecb997b0a..00000000000
--- a/sys/arch/aviion/stand/libsa/exec.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* $OpenBSD: exec.c,v 1.4 2014/02/24 20:15:37 miod Exp $ */
-
-
-/*-
- * 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. 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 <machine/prom.h>
-
-#include "stand.h"
-#include "libsa.h"
-
-#include <lib/libsa/loadfile.h>
-
-#define BOOT_MAGIC 0x6274ef2e /* need to match locore.S */
-
-/*ARGSUSED*/
-void
-exec(char *file, const char *args, uint bootdev, uint bootunit, uint bootlun,
- uint bootpart)
-{
- u_long marks[MARK_MAX];
- int rc;
- void (*entry)(const char *, uint, uint, uint, uint, uint, uint);
-
- marks[MARK_START] = 0;
- rc = loadfile(file, marks, LOAD_KERNEL | COUNT_KERNEL);
- if (rc != 0)
- return;
-
- entry = (void(*)(const char *, uint, uint, uint, uint, uint, uint))
- marks[MARK_START];
- (*entry)(args, bootdev, bootunit, bootlun, BOOT_MAGIC + 1,
- bootpart, marks[MARK_END]);
-
- printf("exec: kernel returned!\n");
-}
diff --git a/sys/arch/aviion/stand/libsa/fault.c b/sys/arch/aviion/stand/libsa/fault.c
deleted file mode 100644
index bba55c500ee..00000000000
--- a/sys/arch/aviion/stand/libsa/fault.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/* $OpenBSD: fault.c,v 1.2 2014/03/29 18:09:29 guenther Exp $ */
-
-/*
- * Copyright (c) 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
- * Standalone code to recover from faults. Allows for hardware detection.
- */
-
-#include <sys/param.h>
-
-#include <machine/asm.h>
-#include <machine/asm_macro.h>
-#include <machine/prom.h>
-#include <machine/psl.h>
-
-#include "stand.h"
-#include "libsa.h"
-
-typedef struct label_t {
- long val[19];
-} label_t;
-
-extern int setjmp(label_t *);
-extern void longjmp(label_t *);
-
-static label_t badaddr_jmpbuf;
-static uint32_t badaddr_psr;
-
-static uint32_t prom_vbr;
-static uint32_t vector_page[512 * 2] __attribute__ ((__aligned__(0x1000)));
-
-static __inline__ uint32_t
-get_vbr()
-{
- uint32_t vbr;
- __asm__ volatile ("ldcr %0, %%cr7" : "=r"(vbr));
- return vbr;
-}
-
-static __inline__ void
-set_vbr(uint32_t vbr)
-{
- __asm__ volatile ("stcr %0, %%cr7" :: "r"(vbr));
-}
-
-/*
- * This is an horribly crude logic to recover from data access exceptions
- * by longjmp'ing back to badaddr(). We should theoretically at least use
- * an `rte' somewhere to unfreeze the scoreboard. But since we restore a
- * PSR with interrupts disabled, this turns out to be safe.
- */
-static void
-libsa_fault_handler(void)
-{
- set_psr(badaddr_psr | PSR_IND); /* undo SFRZ */
- flush_pipeline();
-
- longjmp(&badaddr_jmpbuf);
- /* NOTREACHED */
-}
-
-static __inline__ uint32_t
-br(uint32_t delta)
-{
- return 0xc0000000 | (((int32_t)delta >> 2) & 0x03ffffff);
-}
-
-static void
-libsa_fault_init()
-{
- int vec;
- uint32_t *insn;
- uint32_t br_insn;
-
- prom_vbr = get_vbr();
-
- insn = vector_page;
- br_insn = br(prom_vbr - (uint32_t)&vector_page - 4);
- for (vec = 512; vec != 0; vec--) {
- *insn++ = 0xf4005800; /* nop */
- *insn++ = br_insn; /* br into prom vbr page */
- }
-
- /* override data access exception */
- vector_page[3 * 2 + 1] =
- br((uint32_t)&libsa_fault_handler -
- (uint32_t)&vector_page[3 * 2 + 1]);
-}
-
-int
-badaddr(void *addr, int len)
-{
- int rc;
-
- if (vector_page[0] == 0)
- libsa_fault_init();
-
- badaddr_psr = get_psr();
- set_psr(badaddr_psr | PSR_IND);
-
- set_vbr((uint32_t)&vector_page);
-
- if (setjmp(&badaddr_jmpbuf) == 0) {
- switch (len) {
- case 1:
- (void)*(volatile uint8_t *)addr;
- rc = 0;
- break;
- case 2:
- if ((uint32_t)addr & 1)
- rc = 1;
- else {
- (void)*(volatile uint16_t *)addr;
- rc = 0;
- }
- break;
- case 4:
- if ((uint32_t)addr & 3)
- rc = 1;
- else {
- (void)*(volatile uint32_t *)addr;
- rc = 0;
- }
- break;
- default:
- rc = 1;
- break;
- }
- } else {
- rc = 1;
- }
-
- set_vbr(prom_vbr);
- flush_pipeline();
- set_psr(badaddr_psr);
-
- return rc;
-}
diff --git a/sys/arch/aviion/stand/libsa/libsa.h b/sys/arch/aviion/stand/libsa/libsa.h
deleted file mode 100644
index a9ba67de0a9..00000000000
--- a/sys/arch/aviion/stand/libsa/libsa.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* $OpenBSD: libsa.h,v 1.5 2013/10/16 16:59:35 miod Exp $ */
-
-/*
- * libsa prototypes
- */
-
-#include <machine/prom.h>
-
-extern int boothowto;
-
-struct boot_info {
- unsigned int bootdev;
- unsigned int bootunit;
- unsigned int bootlun;
- unsigned int bootpart;
-};
-
-extern struct boot_info bi;
-
-int badaddr(void *, int);
-void delay(unsigned int);
-void exec(char *, const char *, uint, uint, uint, uint);
-int parse_args(const char *, char **, int);
diff --git a/sys/arch/aviion/stand/libsa/nvramreg.h b/sys/arch/aviion/stand/libsa/nvramreg.h
deleted file mode 100644
index bbce5c66a4c..00000000000
--- a/sys/arch/aviion/stand/libsa/nvramreg.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* $OpenBSD: nvramreg.h,v 1.2 2007/04/10 17:47:54 miod 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. 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 TOD clock/NVRAM
- */
-
-/*
- * Mostek MK48T08 clock.
- *
- * This chip is 8k in size.
- * The first TOD clock starts at offset 0x1FF8. The following structure
- * describes last 2K of its 8K address space. The first 6K of the NVRAM
- * space is used for various things as follows:
- * 0000-0fff User Area
- * 1000-10ff Networking Area
- * 1100-16f7 Operating System Area
- * 16f8-1ef7 ROM Debugger Area
- * 1ef8-1ff7 Configuration Area (Ethernet address etc)
- * 1ff8-1fff TOD clock
- */
-
-/*
- * On AV400, these offsets need shifting two bits, as they are 32 bit
- * registers.
- */
-#define CLK_CSR 0 /* control register */
-#define CLK_SEC 1 /* seconds (0..59; BCD) */
-#define CLK_MIN 2 /* minutes (0..59; BCD) */
-#define CLK_HOUR 3 /* hour (0..23; BCD) */
-#define CLK_WDAY 4 /* weekday (1..7) */
-#define CLK_DAY 5 /* day in month (1..31; BCD) */
-#define CLK_MONTH 6 /* month (1..12; BCD) */
-#define CLK_YEAR 7 /* year (0..99; BCD) */
-#define CLK_NREG 8
-
-/* csr bits */
-#define CLK_WRITE 0x80 /* want to write */
-#define CLK_READ 0x40 /* want to read (freeze clock) */
-
-/*
- * Data General, following Motorola, chose the year `1900' as their base count.
- * It has already wrapped by now...
- */
-#define YEAR0 00
-
-#define AV400_NVRAM_TOD_OFF 0x1fe0 /* offset of tod in NVRAM space */
-#define MK48T02_SIZE 2 * 1024
diff --git a/sys/arch/aviion/stand/libsa/parse_args.c b/sys/arch/aviion/stand/libsa/parse_args.c
deleted file mode 100644
index 34f3b2eb5bb..00000000000
--- a/sys/arch/aviion/stand/libsa/parse_args.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/* $OpenBSD: parse_args.c,v 1.6 2013/10/16 16:59:35 miod 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.
- *
- * 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 <machine/prom.h>
-
-#include "stand.h"
-#include "libsa.h"
-
-#define KERNEL_NAME "bsd"
-
-int boothowto = 0;
-
-/* skip end of token and whitespace */
-static const char *stws(const char *);
-static const char *
-stws(const char *p)
-{
- while (*p != ' ' && *p != '\0')
- p++;
-
- while (*p == ' ')
- p++;
-
- return p;
-}
-
-int
-parse_args(const char *line, char **filep, int first)
-{
- const char *po, *pc, *p;
- char *name;
- size_t namelen;
-
- if (first == 0) {
- /* recognize the special ``halt'' keyword */
- if (strcmp(line, "halt") == 0)
- return (1);
- }
-
- /* skip boot device; up to two nested foo(...) constructs */
- p = line;
- po = strchr(line, '(');
- if (po != NULL) {
- pc = strchr(po + 1, ')');
- if (pc != NULL) {
- p = strchr(po + 1, '(');
- if (p == NULL || pc < p)
- p = pc + 1;
- else if (pc != NULL) {
- p = strchr(pc + 1, ')');
- if (p != NULL)
- p = p + 1;
- else
- p = line;
- }
- }
- }
-
- /* skip partition number if any */
- pc = strchr(p, ':');
- if (pc != NULL)
- p = pc + 1;
-
- /* figure out how long the kernel name is */
- pc = strchr(p, ' ');
- if (pc == NULL)
- pc = p + strlen(p);
-
- if (p == pc) {
- /* empty, use the default kernel name */
- namelen = 1 + (p - line) + strlen(KERNEL_NAME);
- name = (char *)alloc(namelen);
- if (name == NULL)
- panic("out of memory");
- memcpy(name, line, p - line);
- memcpy(name + (p - line), KERNEL_NAME, sizeof(KERNEL_NAME));
- } else {
- namelen = pc - line;
- name = (char *)alloc(1 + namelen);
- if (name == NULL)
- panic("out of memory");
- memcpy(name, line, namelen);
- name[namelen] = '\0';
- }
- *filep = name;
-
- /*
- * If this commandline is the one passed by the PROM, then look
- * for options specific to the standalone code.
- */
-
- if (first) {
- p = stws(p);
- while (*p != '\0') {
- if (*p++ == '-')
- while (*p != ' ' && *p != '\0')
- switch (*p++) {
- case 'a':
- boothowto |= RB_ASKNAME;
- break;
- }
- p = stws(p);
- }
- }
-
- return 0;
-}
diff --git a/sys/arch/aviion/stand/libsa/setjmp.S b/sys/arch/aviion/stand/libsa/setjmp.S
deleted file mode 100644
index b51b22508c5..00000000000
--- a/sys/arch/aviion/stand/libsa/setjmp.S
+++ /dev/null
@@ -1,79 +0,0 @@
-/* $OpenBSD: setjmp.S,v 1.1 2013/10/08 21:55:22 miod Exp $ */
-/*
- * Mach Operating System
- * Copyright (c) 1993-1992 Carnegie Mellon University
- * Copyright (c) 1991 OMRON Corporation
- * Copyright (c) 1996 Nivas Madhur
- * Copyright (c) 1998 Steve Murphree, Jr.
- * 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.
- *
- * CARNEGIE MELLON AND OMRON ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON AND OMRON DISCLAIM ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-#include <machine/asm.h>
-
-/* int setjmp(label_t *); */
-ENTRY(setjmp)
- st %r1, %r2, 0
- st %r14, %r2, 4
- st %r15, %r2, 2*4
- st %r16, %r2, 3*4
- st %r17, %r2, 4*4
- st %r18, %r2, 5*4
- st %r19, %r2, 6*4
- st %r20, %r2, 7*4
- st %r21, %r2, 8*4
- st %r22, %r2, 9*4
- st %r23, %r2, 10*4
- st %r24, %r2, 11*4
- st %r25, %r2, 12*4
- st %r26, %r2, 13*4
- st %r27, %r2, 14*4
- st %r28, %r2, 15*4
- st %r29, %r2, 16*4
- st %r30, %r2, 17*4
- st %r31, %r2, 18*4
- jmp.n %r1
- or %r2, %r0, %r0
-
-/* void longjmp(label_t*); */
-ENTRY(longjmp)
- ld %r1, %r2, 0
- ld %r14, %r2, 4
- ld %r15, %r2, 2*4
- ld %r16, %r2, 3*4
- ld %r17, %r2, 4*4
- ld %r18, %r2, 5*4
- ld %r19, %r2, 6*4
- ld %r20, %r2, 7*4
- ld %r21, %r2, 8*4
- ld %r22, %r2, 9*4
- ld %r23, %r2, 10*4
- ld %r24, %r2, 11*4
- ld %r25, %r2, 12*4
- ld %r26, %r2, 13*4
- ld %r27, %r2, 14*4
- ld %r28, %r2, 15*4
- ld %r29, %r2, 16*4
- ld %r30, %r2, 17*4
- ld %r31, %r2, 18*4
- jmp.n %r1
- or %r2, %r0, 1
diff --git a/sys/arch/aviion/stand/libz/Makefile b/sys/arch/aviion/stand/libz/Makefile
deleted file mode 100644
index 2f50fcf7123..00000000000
--- a/sys/arch/aviion/stand/libz/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $OpenBSD: Makefile,v 1.1 2006/05/16 22:48:18 miod Exp $
-
-S=${.CURDIR}/../../../..
-ZDST=${.OBJDIR}
-
-.PATH: ${S}/lib/libz
-
-.include "${S}/lib/libz/Makefile"
diff --git a/sys/arch/aviion/stand/libz/Makefile.inc b/sys/arch/aviion/stand/libz/Makefile.inc
deleted file mode 100644
index 1ee745fd0f9..00000000000
--- a/sys/arch/aviion/stand/libz/Makefile.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.1 2006/05/16 22:48:18 miod Exp $
-
-LIB_Z_DIR=${S}/arch/aviion/stand/libz
-
-LIBZ_DIR!= cd ${LIB_Z_DIR}; \
- printf "xxx:\n\techo \$${.OBJDIR}\n" | ${MAKE} -r -s -f - xxx
-
-LIBZ=${LIBZ_DIR}/libz.a
-
-$(LIBZ): .NOTMAIN __always_make_libz
- @echo making sure the libz is up to date...
- @(cd ${LIB_Z_DIR}; ${MAKE} "XCFLAGS=${CFLAGS}")
-
-__always_make_libz: .NOTMAIN
diff --git a/sys/arch/aviion/stand/vdmtool/Makefile b/sys/arch/aviion/stand/vdmtool/Makefile
deleted file mode 100644
index 38a67c43af8..00000000000
--- a/sys/arch/aviion/stand/vdmtool/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# $OpenBSD: Makefile,v 1.1 2013/10/01 20:32:30 miod Exp $
-
-MAN= vdmtool.8
-MANSUBDIR= aviion
-
-.if ${MACHINE} == "aviion"
-PROG= vdmtool
-BINDIR= /usr/mdec
-DPADD= ${LIBUTIL}
-LDADD= -lutil
-LDSTATIC= -static
-.else
-NOPROG=
-.endif
-
-.include <bsd.prog.mk>
diff --git a/sys/arch/aviion/stand/vdmtool/vdmtool.8 b/sys/arch/aviion/stand/vdmtool/vdmtool.8
deleted file mode 100644
index faf90441d54..00000000000
--- a/sys/arch/aviion/stand/vdmtool/vdmtool.8
+++ /dev/null
@@ -1,51 +0,0 @@
-.\" $OpenBSD: vdmtool.8,v 1.2 2013/10/01 22:24:53 jmc Exp $
-.\"
-.\" Copyright (c) 2013 Miodrag Vallat.
-.\"
-.\" Permission to use, copy, modify, and distribute this software for any
-.\" purpose with or without fee is hereby granted, provided that the above
-.\" copyright notice and this permission notice appear in all copies.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.\"
-.Dd $Mdocdate: October 1 2013 $
-.Dt VDMTOOL 8 aviion
-.Os
-.Sh NAME
-.Nm vdmtool
-.Nd display or initialize DG/UX disk volume information
-.Sh SYNOPSIS
-.Nm vdmtool
-.Op Fl iv
-.Ar rawdev
-.Sh DESCRIPTION
-.Nm vdmtool
-displays
-.\" rather crude
-information about the DG/UX volume information found on a disk.
-It may also be used to set up a "boot area" on a new disk, to turn it into
-a bootable device.
-.Pp
-The options are as follows:
-.Bl -tag -width rawdev
-.It Fl i
-Do not display volume information, but initialize a "boot area" instead.
-This will overwrite the first sector of the disk with a valid boot area
-descriptor, which declares the first 251KB of the disk as a boot area.
-.It Fl v
-Be more verbose, printing out VDIT sector information, as well as any
-unparsed byte in the VDIT structures.
-.It Ar rawdev
-The name of the raw disk device to operate upon.
-It may be abbreviated into a form recognizable by
-.Xr opendev 3 .
-.El
-.Sh SEE ALSO
-.Xr disklabel 8 ,
-.Xr installboot 8
diff --git a/sys/arch/aviion/stand/vdmtool/vdmtool.c b/sys/arch/aviion/stand/vdmtool/vdmtool.c
deleted file mode 100644
index d0ebbf30369..00000000000
--- a/sys/arch/aviion/stand/vdmtool/vdmtool.c
+++ /dev/null
@@ -1,641 +0,0 @@
-/* $OpenBSD: vdmtool.c,v 1.5 2014/08/14 17:55:28 tobias Exp $ */
-
-/*
- * Copyright (c) 2013 Miodrag Vallat.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <unistd.h>
-#include <err.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <util.h>
-#include <sys/disklabel.h>
-
-void initialize(int);
-void report(int);
-void usage(void);
-
-int verbose;
-
-#define VDM_BLOCK_SIZE 0x200
-
-void
-usage()
-{
- fprintf(stderr, "usage: vdmtool [-iv] rawdev\n");
- exit(1);
-}
-
-int
-main(int argc, char *argv[])
-{
- int c;
- int fd;
- int iflag = 0;
- int exitcode = 0;
- char *realpath;
-
- while ((c = getopt(argc, argv, "iqv")) != -1) {
- switch (c) {
- case 'i':
- iflag = 1;
- break;
- case 'v':
- verbose = 1;
- break;
- default:
- usage();
- }
- }
-
- if (argc - optind != 1)
- usage();
-
- fd = opendev(argv[optind], iflag ? O_RDWR : O_RDONLY, OPENDEV_PART,
- &realpath);
- if (fd < 0)
- err(1, "open(%s)", realpath);
-
- if (iflag)
- initialize(fd);
- else
- report(fd);
-
- close(fd);
- exit(exitcode);
-}
-
-void
-read_sector(int fd, uint32_t secno, void *buf)
-{
- if (lseek(fd, (off_t)secno * VDM_BLOCK_SIZE, SEEK_SET) == -1)
- err(1, "lseek");
-
- if (read(fd, buf, VDM_BLOCK_SIZE) != VDM_BLOCK_SIZE)
- err(1, "read(%d,%08x)", fd, secno);
-}
-
-void
-write_sector(int fd, uint32_t secno, void *buf)
-{
- if (lseek(fd, (off_t)secno * VDM_BLOCK_SIZE, SEEK_SET) == -1)
- err(1, "lseek");
-
- if (write(fd, buf, VDM_BLOCK_SIZE) != VDM_BLOCK_SIZE)
- err(1, "write(%d,%08x)", fd, secno);
-}
-
-void
-analyze_label_sector(uint8_t *sector, struct vdm_label **dl,
- struct vdm_boot_info **dbi)
-{
- struct vdm_label *l;
- struct vdm_boot_info *bi;
-
- l = (struct vdm_label *)(sector + VDM_LABEL_OFFSET);
- if (betoh32(l->signature) != VDM_LABEL_SIGNATURE) {
- l = (struct vdm_label *)(sector + VDM_LABEL_OFFSET_ALT);
- if (betoh32(l->signature) != VDM_LABEL_SIGNATURE)
- l = NULL;
- }
-
- if (l != NULL) {
- bi = (struct vdm_boot_info *)
- (sector + VDM_BLOCK_SIZE - sizeof *bi);
- if (betoh32(bi->signature) != VDM_LABEL_SIGNATURE)
- bi = NULL;
- } else
- bi = NULL;
-
- *dl = l;
- *dbi = bi;
-}
-
-uint32_t
-get_vdit_size(int fd, uint32_t secno)
-{
- uint8_t sector[VDM_BLOCK_SIZE];
- struct vdit_block_header *hdr;
- uint32_t cursize = 0;
- int kind = VDIT_BLOCK_HEAD_BE;
-
- for (;;) {
- read_sector(fd, secno, sector);
- hdr = (struct vdit_block_header *)sector;
- if (VDM_ID_KIND(&hdr->id) != kind) {
- printf("unexpected VDIT block kind "
- "on sector %08x: %02x\n",
- secno, VDM_ID_KIND(&hdr->id));
- return 0;
- }
-
- if (verbose)
- printf("sector %08x: vdit frag type %02x, length %04x, "
- "next frag at %08x\n",
- secno, VDM_ID_KIND(&hdr->id),
- betoh16(hdr->chunksz), secno);
-
- cursize += betoh16(hdr->chunksz);
- if (betoh32(hdr->nextblk) == VDM_NO_BLK_NUMBER)
- break;
-
- secno = betoh32(hdr->nextblk);
- kind = VDIT_PORTION_HEADER_BLOCK;
- }
-
- return cursize;
-}
-
-vdit_id_t subdriver_vdmphys_id;
-vdit_id_t subdriver_vdmpart_id;
-vdit_id_t subdriver_vdmaggr_id;
-vdit_id_t subdriver_vdmremap_id;
-
-void
-register_subdriver(uint8_t *buf)
-{
- struct vdit_subdriver_entry entry;
- vdit_id_t id, *regid;
-
- memcpy(&entry, buf, sizeof entry);
- entry.version = betoh16(entry.version);
- memcpy(&id, &entry.subdriver_id, sizeof id);
- id = betoh32(id);
-
- if (strcmp(entry.name, VDM_SUBDRIVER_VDMPHYS) == 0)
- regid = &subdriver_vdmphys_id;
- else if (strcmp(entry.name, VDM_SUBDRIVER_VDMPART) == 0)
- regid = &subdriver_vdmpart_id;
- else if (strcmp(entry.name, VDM_SUBDRIVER_VDMAGGR) == 0)
- regid = &subdriver_vdmaggr_id;
- else if (strcmp(entry.name, VDM_SUBDRIVER_VDMREMAP) == 0)
- regid = &subdriver_vdmremap_id;
- else
- regid = NULL;
-
- if (regid != NULL) {
- if (*regid != 0)
- printf("WARNING: subdriver \"%s\" overridden\n",
- entry.name);
- *regid = id;
- }
-}
-
-void
-print_vdit_instance_id(struct vdit_instance_id *buf, const char *descr)
-{
- struct vdit_instance_id instance;
-
- memcpy(&instance, buf, sizeof instance);
- instance.generation_timestamp = betoh32(instance.generation_timestamp);
- instance.system_id = betoh32(instance.system_id);
- if (instance.generation_timestamp != 0 || instance.system_id != 0 ||
- verbose)
- printf("%s id %08x:%08x",
- descr, instance.generation_timestamp, instance.system_id);
-}
-
-uint32_t
-print_vdit_boot_info(uint8_t *buf, uint32_t size)
-{
- struct vdit_boot_info_entry entry;
-
- if (size < sizeof entry) {
- printf("\tTRUNCATED ENTRY (%02x bytes, expected %02zx)\n",
- size, sizeof entry);
- return 0;
- }
-
- memcpy(&entry, buf, sizeof entry);
- entry.version = betoh16(entry.version);
- printf("\tboot info: version %02x", entry.version);
- print_vdit_instance_id(&entry.default_swap, " default swap");
- print_vdit_instance_id(&entry.default_root, " default root");
- printf("\n");
-
- return size - sizeof entry;
-}
-
-uint32_t
-print_vdit_subdriver_info(uint8_t *buf, uint32_t size)
-{
- struct vdit_subdriver_entry entry;
- vdit_id_t id;
-
- if (size < sizeof entry) {
- printf("\tTRUNCATED ENTRY (%02x bytes, expected %02zx)\n",
- size, sizeof entry);
- return 0;
- }
-
- memcpy(&entry, buf, sizeof entry);
- entry.version = betoh16(entry.version);
- printf("\tsubdriver: version %02x", entry.version);
- memcpy(&id, &entry.subdriver_id, sizeof id);
- id = betoh32(id);
- printf(" id %08x name \"%s\"\n", id, entry.name);
-
- return size - sizeof entry;
-}
-
-uint32_t
-print_vdmphys_instance(uint8_t *buf, uint32_t size)
-{
- struct vdit_vdmphys_instance entry;
-
- if (size < sizeof entry) {
- printf("\tTRUNCATED ENTRY (%02x bytes, expected %02zx)\n",
- size, sizeof entry);
- return 0;
- }
-
- memcpy(&entry, buf, sizeof entry);
- entry.version = betoh16(entry.version);
- entry.mode = betoh16(entry.mode);
- printf("\tvdmphys: version %02x mode %02x\n",
- entry.version, entry.mode);
-
- return size - sizeof entry;
-}
-
-uint32_t
-print_vdmpart_instance(uint8_t *buf, uint32_t size)
-{
- struct vdit_vdmpart_instance entry;
-
- if (size < sizeof entry) {
- printf("\tTRUNCATED ENTRY (%02x bytes, expected %02zx)\n",
- size, sizeof entry);
- return 0;
- }
-
- memcpy(&entry, buf, sizeof entry);
- entry.version = betoh16(entry.version);
- entry.start_blkno = betoh32(entry.start_blkno);
- entry.size = betoh32(entry.size);
- printf("\tvdmpart: version %02x", entry.version);
- print_vdit_instance_id(&entry.child_instance, " child");
- printf("\n");
- printf("\t\tstarting block %08x size %08x",
- entry.start_blkno, entry.size);
- print_vdit_instance_id(&entry.remap_instance, " remap");
- printf("\n");
-
- return size - sizeof entry;
-}
-
-uint32_t
-print_vdmaggr_instance(uint8_t *buf, uint32_t size)
-{
- struct vdit_vdmaggr_instance entry;
- struct vdit_instance_id *aggr;
- uint32_t aggrsize;
- uint stripe;
-
- if (size < sizeof entry) {
- printf("\tTRUNCATED ENTRY (%02x bytes, expected %02zx)\n",
- size, sizeof entry);
- return 0;
- }
-
- memcpy(&entry, buf, sizeof entry);
- entry.version = betoh16(entry.version);
- entry.aggr_count = betoh16(entry.aggr_count);
- entry.stripe_size = betoh32(entry.stripe_size);
- printf("\tvdmaggr: version %02x count %02x stripe size %08x\n",
- entry.version, entry.aggr_count, entry.stripe_size);
-
- aggrsize = entry.aggr_count * sizeof(struct vdit_instance_id) +
- sizeof entry;
- if (size < aggrsize) {
- printf("\tTRUNCATED ENTRY (%02x bytes, expected %02x)\n",
- size, aggrsize);
- return 0;
- }
-
- aggr = (struct vdit_instance_id *)(buf + sizeof entry);
- for (stripe = 0; stripe < entry.aggr_count; stripe++) {
- printf("\t\tstripe %u", stripe);
- print_vdit_instance_id(aggr++, "");
- printf("\n");
- }
-
- return size - aggrsize;
-}
-
-uint32_t
-print_vdmremap_instance(uint8_t *buf, uint32_t size)
-{
- struct vdit_vdmremap_instance entry;
-
- if (size < sizeof entry) {
- printf("\tTRUNCATED ENTRY (%02x bytes, expected %02zx)\n",
- size, sizeof entry);
- return 0;
- }
-
- memcpy(&entry, buf, sizeof entry);
- entry.version = betoh16(entry.version);
- printf("\tvdmremap: version %02x", entry.version);
- print_vdit_instance_id(&entry.primary_remap_table,
- " primary remap table");
- printf("\n");
- print_vdit_instance_id(&entry.secondary_remap_table,
- "\t\tsecondary remap table");
- printf("\n");
- print_vdit_instance_id(&entry.remap_area, "\t\tremap area");
- printf("\n");
-
- return size - sizeof entry;
-}
-
-uint32_t
-print_vdit_instance_info(uint8_t *buf, uint32_t size)
-{
- struct vdit_instance_entry entry;
- vdit_id_t id;
-
- if (size < sizeof entry) {
- printf("\tTRUNCATED ENTRY (%02x bytes, expected %02zx)\n",
- size, sizeof entry);
- return 0;
- }
-
- memcpy(&entry, buf, sizeof entry);
- entry.version = betoh16(entry.version);
- printf("\tinstance: version %02x name \"%s\"\n",
- entry.version, entry.name);
- memcpy(&id, &entry.subdriver_id, sizeof id);
- id = betoh32(id);
- printf("\t\tsubdriver id %08x", id);
- print_vdit_instance_id(&entry.instance_id, "");
- printf(" export %d\n", entry.exported);
-
- if (id == subdriver_vdmphys_id)
- return print_vdmphys_instance(buf, size);
- if (id == subdriver_vdmpart_id)
- return print_vdmpart_instance(buf, size);
- if (id == subdriver_vdmaggr_id)
- return print_vdmaggr_instance(buf, size);
- if (id == subdriver_vdmremap_id)
- return print_vdmremap_instance(buf, size);
-
- return size - sizeof entry;
-}
-
-uint8_t *
-print_vdit_entry(uint8_t *buf)
-{
- struct vdit_entry_header hdr;
- uint32_t remaining, cnt;
- uint8_t *rembuf;
-
- memcpy(&hdr, buf, sizeof hdr);
- hdr.type = betoh16(hdr.type);
- hdr.size = betoh16(hdr.size);
-
- printf("vdit entry: type %02x size %02x\n", hdr.type, hdr.size);
- if (hdr.type == VDIT_ENTRY_SENTINEL)
- return NULL;
-
- remaining = hdr.size - sizeof hdr;
-
- switch (hdr.type) {
- case VDIT_ENTRY_UNUSED:
- remaining = 0; /* don't print anything */
- break;
- case VDIT_ENTRY_BOOT_INFO:
- remaining = print_vdit_boot_info(buf + sizeof hdr, remaining);
- break;
- case VDIT_ENTRY_SUBDRIVER_INFO:
- register_subdriver(buf + sizeof hdr);
- remaining = print_vdit_subdriver_info(buf + sizeof hdr,
- remaining);
- break;
- case VDIT_ENTRY_INSTANCE:
- remaining = print_vdit_instance_info(buf + sizeof hdr,
- remaining);
- break;
- }
-
- if (remaining == 4) {
- /* timestamp */
- remaining -= 4;
- }
-
- if (remaining != 0 && verbose) {
- printf("\t%02x bytes unparsed", remaining);
- rembuf = buf + hdr.size - remaining;
- cnt = 0;
- while (remaining-- != 0) {
- if (cnt % 16 == 0)
- printf("\n ");
- printf("%02x ", *rembuf++);
- cnt++;
- }
- printf("\n");
- }
-
- return buf + hdr.size;
-}
-
-uint8_t *
-append_vdit_sector(uint32_t secno, uint8_t *buf, uint8_t *sector, int kind)
-{
- struct vdit_block_header *hdr;
-
- hdr = (struct vdit_block_header *)sector;
- if (VDM_ID_KIND(&hdr->id) != kind) {
- printf("unexpected block kind on sector %08x: %02x\n",
- secno, VDM_ID_KIND(&hdr->id));
- return NULL;
- }
-
-#ifdef DEBUG
- printf("sector %08x: vdit block %08x\n",
- secno, VDM_ID_BLKNO(&hdr->id));
-#endif
-
- memcpy(buf, sector + sizeof *hdr, VDM_BLOCK_SIZE - (sizeof *hdr));
- return buf + VDM_BLOCK_SIZE - (sizeof *hdr);
-}
-
-uint8_t *
-append_vdit_portion(int fd, uint32_t secno, uint8_t *buf, uint8_t *sector,
- int kind)
-{
- struct vdit_block_header *hdr;
- u_int chunksz;
-
- hdr = (struct vdit_block_header *)sector;
- if (VDM_ID_KIND(&hdr->id) != kind) {
- printf("unexpected block kind on sector %08x: %02x\n",
- secno, VDM_ID_KIND(&hdr->id));
- return NULL;
- }
-
- /* store first sector of the portion */
- chunksz = betoh16(hdr->chunksz);
- buf = append_vdit_sector(secno, buf, sector, kind);
- chunksz--;
- secno++;
-
- /* do the others */
- while (chunksz-- != 0) {
- read_sector(fd, secno, sector);
- buf = append_vdit_sector(secno, buf, sector, VDIT_BLOCK);
- if (buf == NULL)
- return NULL;
- secno++;
- }
-
- return buf;
-}
-
-uint8_t *
-read_vdit(int fd, uint32_t secno, size_t *vditsize)
-{
- uint8_t sector[VDM_BLOCK_SIZE];
- struct vdit_block_header hdr;
- uint32_t vdit_size;
- uint8_t *buf, *curbuf;
- int first = 1;
-
- vdit_size = get_vdit_size(fd, secno);
-#ifdef DEBUG
- printf("vdit size: %02x sectors\n", vdit_size);
-#endif
-
- buf = (uint8_t *)malloc(VDM_BLOCK_SIZE * vdit_size);
- if (buf == NULL)
- err(1, "malloc");
- memset(buf, 0, VDM_BLOCK_SIZE * vdit_size);
-
- curbuf = buf;
- for (;;) {
- /* read first sector of portion */
- read_sector(fd, secno, sector);
- memcpy(&hdr, sector, sizeof hdr);
-
- curbuf = append_vdit_portion(fd, secno, curbuf, sector,
- first ? VDIT_BLOCK_HEAD_BE : VDIT_PORTION_HEADER_BLOCK);
- if (curbuf == NULL) {
- free(buf);
- return NULL;
- }
- first = 0;
-
- if (hdr.nextblk == VDM_NO_BLK_NUMBER)
- break;
-
- secno = betoh32(hdr.nextblk);
- }
-
- if (verbose)
- printf("vdit final size: 0x%zx bytes\n", curbuf - buf);
-
- *vditsize = curbuf - buf;
- return buf;
-}
-
-void
-report(int fd)
-{
- uint8_t *vdit, *vdit2, *tmpvdit;
- size_t vditsize, vditsize2;
- struct vdm_label *dl;
- struct vdm_boot_info *bi;
- struct disklabel *lp;
- uint8_t sector[VDM_BLOCK_SIZE];
- struct vdit_block_header *hdr;
-
- read_sector(fd, VDM_LABEL_SECTOR, sector);
- analyze_label_sector(sector, &dl, &bi);
-
- if (dl == NULL)
- return;
-
- printf("label version %04x\n", betoh16(dl->version));
-
- if (bi != NULL)
- printf("disk boot info: start %08x size %08x version %08x\n",
- betoh32(bi->boot_start),
- betoh32(bi->boot_size), betoh32(bi->version));
-
- read_sector(fd, VDIT_SECTOR, sector);
- hdr = (struct vdit_block_header *)sector;
- if (VDM_ID_KIND(&hdr->id) != VDIT_BLOCK_HEAD_BE) {
- lp = (struct disklabel *)(sector + LABELOFFSET);
- if (lp->d_magic == DISKMAGIC && lp->d_magic2 == DISKMAGIC) {
- if (verbose)
- printf("no VDIT but a native OpenBSD label\n");
- return;
- }
- errx(3, "unexpected block kind on sector %08x: %02x",
- 1, VDM_ID_KIND(&hdr->id));
- }
-
- vdit = read_vdit(fd, 1, &vditsize);
- if (vdit != NULL) {
- tmpvdit = vdit;
- while (tmpvdit != NULL)
- tmpvdit = print_vdit_entry(tmpvdit);
-
- vdit2 = read_vdit(fd, betoh32(hdr->secondary_vdit), &vditsize2);
- if (vdit2 == NULL)
- printf("can't read backup VDIT\n");
- else {
- if (vditsize2 < vditsize) {
- printf("WARNING: backup VDIT is smaller "
- "than main VDIT!\n");
- vditsize = vditsize2;
- }
- if (memcmp(vdit, vdit2, vditsize) != 0)
- printf("VDIT and backup VDIT differ!\n");
- free(vdit2);
- }
-
- free(vdit);
- }
-}
-
-/*
- * Build a minimal VDM label and boot area.
- * Allows you to shoot yourself in the foot, badly.
- */
-void
-initialize(int fd)
-{
- uint8_t sector[VDM_BLOCK_SIZE];
- struct vdm_label dl;
- struct vdm_boot_info bi;
-
- memset(sector, 0, sizeof sector);
- memset(&dl, 0, sizeof dl);
- memset(&bi, 0, sizeof bi);
-
- dl.signature = htobe32(VDM_LABEL_SIGNATURE);
- bi.signature = htobe32(VDM_LABEL_SIGNATURE);
- bi.boot_start = htobe32(8);
- bi.boot_size = htobe32(VDM_BOOT_DEFAULT_SIZE);
- bi.version = htobe32(VDM_BOOT_INFO_VERSION);
-
- memcpy(sector + VDM_LABEL_OFFSET_ALT, &dl, sizeof dl);
- memcpy(sector + VDM_BLOCK_SIZE - sizeof bi, &bi, sizeof bi);
-
- write_sector(fd, VDM_LABEL_SECTOR, sector);
-}
diff --git a/sys/kern/Makefile b/sys/kern/Makefile
index 6e0ff3e706e..2e1294a37f1 100644
--- a/sys/kern/Makefile
+++ b/sys/kern/Makefile
@@ -1,8 +1,8 @@
-# $OpenBSD: Makefile,v 1.39 2015/07/21 04:14:48 jasper Exp $
+# $OpenBSD: Makefile,v 1.40 2015/12/01 07:50:02 deraadt Exp $
# Makefile for kernel tags files, init_sysent, etc.
-ARCH= alpha amd64 armish armv7 aviion \
+ARCH= alpha amd64 armish armv7 \
hppa hppa64 i386 landisk loongson \
luna88k macppc octeon sgi socppc \
solbourne sparc sparc64 vax zaurus