diff options
| author | ad <ad@NetBSD.org> | 2007-06-10 00:52:29 +0000 |
|---|---|---|
| committer | ad <ad@NetBSD.org> | 2007-06-10 00:52:29 +0000 |
| commit | 3f8edbdfd789bb885e72c19bdf0ce1b007033b2e (patch) | |
| tree | 3e4f4f5368838061d2b294b8984a8bfc216d5b66 /sys | |
| parent | 54630771e7f9d1c90715bb416d7b58ae9e70ab00 (diff) | |
G/C dead code.
Diffstat (limited to 'sys')
65 files changed, 1 insertions, 6332 deletions
diff --git a/sys/arch/README b/sys/arch/README index e363a8593f9..1fcf3cf936d 100644 --- a/sys/arch/README +++ b/sys/arch/README @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.42 2007/04/08 09:35:51 scw Exp $ +$NetBSD: README,v 1.43 2007/06/10 00:59:34 ad Exp $ acorn26: Acorn ARM2- and ARM3-based machines (arm, 20000509) acorn32: Acorn computers Ltd. ARM 6/7/SA based machines (arm, 20011118) @@ -41,7 +41,6 @@ news68k: Sony's m68k based NET WORK STATION (m68k, 19991209) newsmips: Sony's MIPS based NET WORK STATION (mips, 19980218) next68k: NeXT Computer's cubes and slabs (m68k, 19980609) ofppc: Open Firmware based PowerPC machines (powerpc, 19980528) -pdp10: Digital PDP 10 emulators; a 9 bit byte, 36 bit word machine (pdp10, 20030831) pc532: "PC-532" kit computer, based on NS 32532 CPU (ns32k, 19930909) playstation2: Sony PlayStation 2 (mips, 20011016) pmax: Digital Equipment Corp. MIPS based machines (mips, 19931012) diff --git a/sys/arch/pdp10/compile/Makefile b/sys/arch/pdp10/compile/Makefile deleted file mode 100644 index 2469e4bfc5e..00000000000 --- a/sys/arch/pdp10/compile/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2005/12/11 12:18:34 christos Exp $ - -.include <bsd.prog.mk> diff --git a/sys/arch/pdp10/conf/GENERIC b/sys/arch/pdp10/conf/GENERIC deleted file mode 100644 index f556ec32b00..00000000000 --- a/sys/arch/pdp10/conf/GENERIC +++ /dev/null @@ -1,192 +0,0 @@ -# $NetBSD: GENERIC,v 1.29 2006/11/11 18:47:11 jmmv Exp $ -# -# GENERIC machine description file -# -# This machine description file is used to generate the default NetBSD -# kernel. The generic kernel does not include all options, subsystems -# and device drivers, but should be useful for most applications. -# -# The machine description file can be customised for your specific -# machine to reduce the kernel size and improve its performance. -# -# For further information on compiling NetBSD 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/pdp10/conf/std.pdp10" - -#options INCLUDE_CONFIG_FILE # embed config file in kernel binary - -#ident "GENERIC-$Revision: 1.29 $" - -# Here are all different supported CPU types listed. -options KL10 - -# Max users on system; this is just a hint -maxusers 8 - -# Kernel compiled-in symbolic debugger & system call tracer -#makeoptions DEBUG="-g" -options DDB -options DDB_HISTORY_SIZE=100 # enable history editing in DDB -#options KTRACE -#options DIAGNOSTIC -#options DEBUG -#options KMEMSTATS -options NO_KERNEL_RCSIDS - -# Networking options -#options GATEWAY # packet forwarding -#options NTP # NTP kernel support -#options INET # IP + ICMP + TCP + UDP -#options INET6 # IPV6 -#options IPSEC # IP security -#options IPSEC_ESP # IP security (encryption part; define w/IPSEC) -#options IPSEC_NAT_T # IPsec NAT traversal (NAT-T) -#options IPSEC_DEBUG # debug for IP security -#options MROUTING # IP multicast routing -#options PIM # Protocol Independent Multicast -#options NS # XNS -#options NSIP # XNS tunneling over IP -#options ISO,TPIP # OSI -#options EON # OSI tunneling over IP -#options NETATALK # AppleTalk networking protocols -#options PPP_BSDCOMP # BSD-Compress compression support for PPP -#options PPP_DEFLATE # Deflate compression support for PPP -#options PPP_FILTER # Active filter support for PPP (requires bpf) -#options PFIL_HOOKS # pfil(9) packet filter hooks -#options IPFILTER_LOG # ipmon(8) log support -#options IPFILTER_LOOKUP # ippool(8) support - -#options ALTQ # Manipulate network interfaces' output queues -#options ALTQ_BLUE # Stochastic Fair Blue -#options ALTQ_CBQ # Class-Based Queueing -#options ALTQ_CDNR # Diffserv Traffic Conditioner -#options ALTQ_FIFOQ # First-In First-Out Queue -#options ALTQ_FLOWVALVE # RED/flow-valve (red-penalty-box) -#options ALTQ_HFSC # Hierarchical Fair Service Curve -#options ALTQ_LOCALQ # Local queueing discipline -#options ALTQ_PRIQ # Priority Queueing -#options ALTQ_RED # Random Early Detection -#options ALTQ_RIO # RED with IN/OUT -#options ALTQ_WFQ # Weighted Fair Queueing - -# All supported filesystem types -file-system FFS -#file-system LFS -file-system MFS -#file-system NFS -#file-system FDESC -#file-system KERNFS -file-system NULLFS -#file-system OVERLAY # overlay file system -#file-system PROCFS -#file-system UMAPFS -#file-system UNION -#file-system CD9660 -file-system PTYFS # /dev/pts/N support -#file-system TMPFS # Efficient memory file-system -#file-system UDF # experimental - OSTA UDF CD/DVD file-system - -#options QUOTA -#options FFS_EI # FFS Endian Independant support -#options SOFTDEP # FFS soft updates support. -options FFS_NO_SNAPSHOT # No FFS snapshot support -#options UFS_DIRHASH # UFS Large Directory Hashing - Experimental -#options NFSSERVER -#options NFS_BOOT_BOOTP,NFS_BOOT_DHCP # Use bootp <> dhcp -#options NFS_BOOT_BOOTPARAM # Use the Sun way for netbooting. - -# System V shared memory & semaphores support. -#options SYSVMSG -#options SYSVSEM -#options SEMMNI=10 # number of semaphore identifiers -#options SEMMNS=60 # number of semaphores in system -#options SEMUME=10 # max number of undo entries per process -#options SEMMNU=30 # number of undo structures in system -#options SYSVSHM -#options P1003_1B_SEMAPHORE # p1003.1b semaphore support - -#options LKM - -#options USERCONF # userconf(4) support -options PIPE_SOCKETPAIR # smaller, but slower pipe(2) -#options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel - -# Kernel(s) to compile -config netbsd root on ? type ? - -mainbus0 at root - -ebus0 at mainbus0 - -#dte0 at ebus0 csr 0200 -#dte1 at ebus0 csr 0210 -#dte2 at ebus0 csr 0220 -#dte3 at ebus0 csr 0230 - -rh0 at ebus0 csr 0540 -#rh1 at ebus0 csr 0544 -#rh2 at ebus0 csr 0550 -#rh3 at ebus0 csr 0554 -#rh4 at ebus0 csr 0560 -#rh5 at ebus0 csr 0564 -#rh6 at ebus0 csr 0570 -#rh7 at ebus0 csr 0574 - -# Devices on Massbus adapters -hp* at rh? drive? # RM/RP disk drives - -#pseudo-device loop 1 -#pseudo-device pty # pseudo-terminals -#pseudo-device bpfilter # Not supported by de yet. -#pseudo-device carp # Common Address Redundancy Protocol -#pseudo-device ipfilter # IP filter (firewall) and NAT -#pseudo-device sl -#pseudo-device ppp -#pseudo-device pppoe # PPP over Ethernet (RFC 2516) -#pseudo-device tun -#pseudo-device tap # virtual Ethernet -#pseudo-device gre # generic L3 over IP tunnel -#pseudo-device gif # IPv[46] over IPv[46] tunnel (RFC1933) -#pseudo-device faith # IPv[46] tcp relay translation i/f -#pseudo-device stf # 6to4 IPv6 over IPv4 encapsulation -#pseudo-device vlan # IEEE 802.1q encapsulation -#pseudo-device bridge # simple inter-network bridging -#pseudo-device vnd -#options VND_COMPRESSION # compressed vnd(4) -#pseudo-device ccd 4 -#pseudo-device raid 8 # RAIDframe disk driver -#options RAID_AUTOCONFIG # auto-configuration of RAID components -# Options to enable various other RAIDframe RAID types. -# options RF_INCLUDE_EVENODD=1 -# options RF_INCLUDE_RAID5_RS=1 -# options RF_INCLUDE_PARITYLOGGING=1 -# options RF_INCLUDE_CHAINDECLUSTER=1 -# options RF_INCLUDE_INTERDECLUSTER=1 -# options RF_INCLUDE_PARITY_DECLUSTERING=1 -# options RF_INCLUDE_PARITY_DECLUSTERING_DS=1 -#pseudo-device fss 4 # file system snapshot device -#pseudo-device rnd # /dev/random and in-kernel generator -#pseudo-device leds # control the leds on vaxstations. - -# Veriexec -# -# a pseudo device needed for veriexec -#pseudo-device veriexec 1 -# -# Uncomment the fingerprint methods below that are desired. Note that -# removing fingerprint methods will have almost no impact on the kernel -# code size. -# -#options VERIFIED_EXEC_FP_RMD160 -#options VERIFIED_EXEC_FP_SHA256 -#options VERIFIED_EXEC_FP_SHA384 -#options VERIFIED_EXEC_FP_SHA512 -#options VERIFIED_EXEC_FP_SHA1 -#options VERIFIED_EXEC_FP_MD5 diff --git a/sys/arch/pdp10/conf/Makefile.pdp10 b/sys/arch/pdp10/conf/Makefile.pdp10 deleted file mode 100644 index 48c210ed381..00000000000 --- a/sys/arch/pdp10/conf/Makefile.pdp10 +++ /dev/null @@ -1,91 +0,0 @@ -# $NetBSD: Makefile.pdp10,v 1.5 2005/12/11 12:18:34 christos Exp $ - -# Makefile for NetBSD -# -# This makefile is constructed from a machine description: -# config machineid -# Most changes should be made in the machine description -# /sys/arch/pdp10/conf/``machineid'' -# after which you should do -# config machineid -# Machine generic makefile changes should be made in -# /sys/arch/pdp10/conf/Makefile.pdp10 -# after which config should be rerun for all machines of that type. -# -# To specify debugging, add the config line: makeoptions DEBUG="-g" -# A better way is to specify -g only for a few files. -# -# makeoptions DEBUGLIST="uvm* trap if_*" - -MACHINE_ARCH= pdp10 -USETOOLS?= no -NEED_OWN_INSTALL_TARGET?=no -.include <bsd.own.mk> - -## -## (1) port identification -## -PDP10= $S/arch/pdp10 -GENASSYM_CONF= ${PDP10}/pdp10/genassym.cf - -## -## (2) compile settings -## -AFLAGS+= -x assembler-with-cpp -traditional-cpp - -## -## (3) libkern and compat -## -KERN_AS= obj - -## -## (4) local objects, compile rules, and dependencies -## -MD_SFILES= ${PDP10}/pdp10/locore.S -MD_OBJS= locore.o -#XCFLAGS= ${DEBUG} ${CWARNFLAGS} -ffreestanding -#NOOPT_C?= ${CC} ${XCFLAGS} ${CPPFLAGS} ${PROF} -c $< - -locore.o: ${PDP10}/pdp10/locore.S - ${NORMAL_S} - -## -## (5) link settings -## -TEXTADDR?= 01001000 -LINKFORMAT= -LINKFLAGS_DEBUG= -X -LINKFLAGS_NORMAL= -S -y -E - -## -## (6) port specific target dependencies -## - -## -## (7) misc settings -## - -## -## (8) config(8) generated machinery -## -%INCLUDES - -%OBJS - -%CFILES - -%SFILES - -%LOAD - -%RULES - -## -## (9) port independent kernel machinery -## -.include "$S/conf/Makefile.kern.inc" - -## -## (10) Appending make options. -## -%MAKEOPTIONSAPPEND diff --git a/sys/arch/pdp10/conf/files.pdp10 b/sys/arch/pdp10/conf/files.pdp10 deleted file mode 100644 index 68510a82102..00000000000 --- a/sys/arch/pdp10/conf/files.pdp10 +++ /dev/null @@ -1,46 +0,0 @@ -# $NetBSD: files.pdp10,v 1.2 2005/12/11 12:18:34 christos Exp $ -# -# `files' file for pdp10 architecture -# - -# maxpartitions must be first item in files.${ARCH}.newconf -maxpartitions 16 - -maxusers 8 32 64 - -device mainbus { } -attach mainbus at root - -file dev/cons.c - -file arch/pdp10/pdp10/machdep.c -file arch/pdp10/pdp10/vm_machdep.c -file arch/pdp10/pdp10/autoconf.c -file arch/pdp10/pdp10/pmap.c -file arch/pdp10/pdp10/clock.c -file arch/pdp10/pdp10/trap.c -file arch/pdp10/pdp10/mem.c -file arch/pdp10/pdp10/console.c -file arch/pdp10/pdp10/disksubr.c disk | tape -file arch/pdp10/pdp10/kl10.c kl10 -file arch/pdp10/pdp10/db_machdep.c ddb -file arch/pdp10/pdp10/db_disasm.c ddb - -device ebus { csr } -attach ebus at mainbus -file arch/pdp10/dev/ebus.c ebus - -device rh { drive=-1 } -attach rh at ebus -file arch/pdp10/dev/rh.c rh - -device hp: disk -attach hp at rh -file arch/pdp10/dev/hp.c hp needs-flag -major {hp = 0} - - -file netinet/in4_cksum.c inet -file netinet/in_cksum.c inet - -include "arch/pdp10/conf/majors.pdp10" diff --git a/sys/arch/pdp10/conf/majors.pdp10 b/sys/arch/pdp10/conf/majors.pdp10 deleted file mode 100644 index a26b16912ff..00000000000 --- a/sys/arch/pdp10/conf/majors.pdp10 +++ /dev/null @@ -1,17 +0,0 @@ -# $NetBSD: majors.pdp10,v 1.10 2006/11/24 22:04:24 wiz Exp $ -# -# Device majors for pdp10 -# -device-major cons char 0 -device-major ctty char 1 -device-major mem char 2 -device-major hp char 3 block 0 hp -device-major ht char 4 block 1 ht -device-major swap char 5 block 3 vmswap -device-major log char 6 -device-major filedesc char 7 -device-major ksyms char 8 - -# Majors up to 143 are reserved for machine-dependant drivers. -# New machine-independent driver majors are assigned in -# sys/conf/majors. diff --git a/sys/arch/pdp10/conf/std.pdp10 b/sys/arch/pdp10/conf/std.pdp10 deleted file mode 100644 index 4e46ba400d9..00000000000 --- a/sys/arch/pdp10/conf/std.pdp10 +++ /dev/null @@ -1,9 +0,0 @@ -# $NetBSD: std.pdp10,v 1.3 2005/12/11 12:18:34 christos Exp $ -# -# Std pdp10files -# -machine pdp10 -include "conf/std" # MI standard options - -options EXEC_SCRIPT # execve(2) support for scripts -options EXEC_ELF36 # execve(2) support for ELF36 binaries diff --git a/sys/arch/pdp10/dev/ebus.c b/sys/arch/pdp10/dev/ebus.c deleted file mode 100644 index 865729a11f2..00000000000 --- a/sys/arch/pdp10/dev/ebus.c +++ /dev/null @@ -1,82 +0,0 @@ -/* $NetBSD: ebus.c,v 1.5 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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> -#include <sys/device.h> -#include <sys/systm.h> - -#include <machine/bus.h> - -#include <pdp10/dev/ebus.h> - -static int -ebus_print(void *aux, const char *n) -{ - struct ebus_attach_args *ea = aux; - - printf(" csr %o", ea->ea_ioh); - return UNCONF; -} - -static int -ebus_match(struct device *parent, struct cfdata *cf, void *aux) -{ -#ifdef notyet - if (cputype != TYPE_KL) - return 0; -#endif - return 1; -} - -static int -ebus_search(struct device *parent, struct cfdata *cf, - const int *ldesc, void *aux) -{ - struct ebus_attach_args ea; - int rv; - - ea.ea_iot = 0; - ea.ea_ioh = cf->cf_loc[EBUSCF_CSR]; - rv = config_match(parent, cf, &ea); - if (rv == 0) - return 0; - config_attach(parent, cf, &ea, ebus_print); - return 1; -} - -static void -ebus_attach(struct device *parent, struct device *self, void *aux) -{ - printf("\n"); - - config_search_ia(ebus_search, self, "ebus", NULL); -} - -struct cfattach ebus_ca = { - sizeof(struct device), ebus_match, ebus_attach, -}; diff --git a/sys/arch/pdp10/dev/ebus.h b/sys/arch/pdp10/dev/ebus.h deleted file mode 100644 index e80d2582fc3..00000000000 --- a/sys/arch/pdp10/dev/ebus.h +++ /dev/null @@ -1,32 +0,0 @@ -/* $NetBSD: ebus.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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. - */ - -struct ebus_attach_args { - bus_space_tag_t ea_iot; - bus_space_handle_t ea_ioh; -}; diff --git a/sys/arch/pdp10/dev/hp.c b/sys/arch/pdp10/dev/hp.c deleted file mode 100644 index 3f86e3adb7f..00000000000 --- a/sys/arch/pdp10/dev/hp.c +++ /dev/null @@ -1,506 +0,0 @@ -/* $NetBSD: hp.c,v 1.7 2007/03/04 06:00:30 christos Exp $ */ -/* - * Copyright (c) 1996 Ludd, University of Lule}, Sweden. - * 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 at Ludd, University of - * Lule}, Sweden and its contributors. - * 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. - */ - -/* - * Simple device driver routine for massbuss disks. - * TODO: - * Fix support for Standard DEC BAD144 bad block forwarding. - * Be able to to handle soft/hard transfer errors. - * Handle non-data transfer interrupts. - * Autoconfiguration of disk drives 'on the fly'. - * Handle disk media changes. - * Dual-port operations should be supported. - */ -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/device.h> -#include <sys/disklabel.h> -#include <sys/disk.h> -#include <sys/dkio.h> -#include <sys/buf.h> -#include <sys/bufq.h> -#include <sys/stat.h> -#include <sys/ioccom.h> -#include <sys/fcntl.h> -#include <sys/syslog.h> -#include <sys/reboot.h> -#include <sys/conf.h> -#include <sys/event.h> - -#include <machine/bus.h> -#include <machine/io.h> - -#include <pdp10/dev/rhvar.h> -#include <pdp10/dev/rhreg.h> -#include <pdp10/dev/hpreg.h> - -#include "ioconf.h" -#include "locators.h" - -struct hp_softc { - struct device sc_dev; - struct disk sc_disk; - bus_space_tag_t sc_iot; - bus_space_handle_t sc_ioh; - int sc_unit; - struct rh_device sc_md; /* Common struct used by mbaqueue. */ - int sc_wlabel; /* Disklabel area is writable */ -}; - -int hpmatch(struct device *, struct cfdata *, void *); -void hpattach(struct device *, struct device *, void *); -void hpstart(struct rh_device *); -int hpattn(struct rh_device *); -int hpfinish(struct rh_device *, int, int *); - -CFATTACH_DECL(hp, sizeof(struct hp_softc), hpmatch, hpattach, NULL, NULL); - -dev_type_open(hpopen); -dev_type_close(hpclose); -dev_type_read(hpread); -dev_type_write(hpwrite); -dev_type_ioctl(hpioctl); -dev_type_strategy(hpstrategy); -dev_type_size(hpsize); - -const struct bdevsw hp_bdevsw = { - hpopen, hpclose, hpstrategy, hpioctl, nulldump, hpsize, D_DISK -}; - -const struct cdevsw hp_cdevsw = { - hpopen, hpclose, hpread, hpwrite, hpioctl, - nostop, notty, nopoll, nommap, nokqfilter, D_DISK -}; - - -#define HP_WCSR(reg, val) \ - DATAO(sc->sc_ioh, ((reg) << 30) | (sc->sc_unit << 18) | \ - RH20_DATAO_LR | (val)) -#define HP_RCSR(reg, val) \ - DATAO(sc->sc_ioh, ((reg) << 30) | (sc->sc_unit << 18)); \ - DATAI(sc->sc_ioh, (val)) - -static struct hpsizes { - int type, sectrk, trkcyl, cylunit; -} hpsizes[] = { - { RH_DT_RP04, 20, 19, 400, }, - { RH_DT_RP05, 20, 19, 400, }, - { RH_DT_RP06, 20, 19, 800, }, - { RH_DT_RP07, 43, 32, 629, }, - { RH_DT_RM03, 30, 5, 820, }, - { RH_DT_RM05, 30, 19, 400, }, - { 0, }, -}; - -static void -hpfakelabel(int type, char *name, struct disklabel *dl) -{ - int i; - - for (i = 0; hpsizes[i].type; i++) - if (hpsizes[i].type == type) - break; - if (hpsizes[i].type == 0) - return; - dl->d_magic2 = dl->d_magic = DISKMAGIC; - dl->d_type = DTYPE_SMD; - strcpy(dl->d_typename, name); - dl->d_secsize = DEV_BSIZE; - dl->d_nsectors = hpsizes[i].sectrk; - dl->d_ntracks = hpsizes[i].trkcyl; - dl->d_ncylinders = hpsizes[i].cylunit; - dl->d_secpercyl = hpsizes[i].sectrk * hpsizes[i].trkcyl; - dl->d_secperunit = hpsizes[i].sectrk * hpsizes[i].trkcyl * - hpsizes[i].cylunit; - dl->d_rpm = 3600; - dl->d_interleave = 1; - dl->d_partitions[2].p_offset = 0; - dl->d_partitions[2].p_size = dl->d_secperunit; - dl->d_npartitions = 3; -} - -/* - * Check if this is a disk drive; done by checking type from mbaattach. - */ -int -hpmatch(struct device *parent, struct cfdata *cf, void *aux) -{ - struct rh_attach_args *ma = aux; - - if (cf->cf_loc[RHCF_DRIVE] != RHCF_DRIVE_DEFAULT && - cf->cf_loc[RHCF_DRIVE] != ma->ma_unit) - return 0; - - if (ma->ma_devtyp != MB_RP) - return 0; - - return 1; -} - -/* - * Disk drive found; fake a disklabel and try to read the real one. - * If the on-disk label can't be read; we lose. - */ -void -hpattach(struct device *parent, struct device *self, void *aux) -{ - struct hp_softc *sc = (void *)self; - struct rh_softc *ms = (void *)parent; - struct disklabel *dl; - struct rh_attach_args *ma = aux; - char *msg; - - sc->sc_iot = ma->ma_iot; - sc->sc_ioh = ma->ma_ioh; - /* - * Init the common struct for both the adapter and its slaves. - */ - bufq_alloc(&sc->sc_md.md_q, "disksort", BUFQ_SORT_CYLINDER); - sc->sc_md.md_softc = (void *)sc; /* Pointer to this softc */ - sc->sc_md.md_rh = (void *)parent; /* Pointer to parent softc */ - sc->sc_md.md_start = hpstart; /* Disk start routine */ - sc->sc_md.md_attn = hpattn; /* Disk attention routine */ - sc->sc_md.md_finish = hpfinish; /* Disk xfer finish routine */ - sc->sc_unit = ma->ma_unit; - ms->sc_md[ma->ma_unit] = &sc->sc_md; /* Per-unit backpointer */ - - /* - * Init and attach the disk structure. - */ - sc->sc_disk.dk_name = sc->sc_dev.dv_xname; - disk_attach(&sc->sc_disk); - - /* - * Fake a disklabel to be able to read in the real label. - */ - dl = sc->sc_disk.dk_label; - hpfakelabel(ma->ma_type, ma->ma_name, dl); - - /* - * Read in label. - */ - if ((msg = readdisklabel(makedev(0, device_unit(self) * 8), hpstrategy, - dl, NULL)) != NULL) - printf(": %s", msg); - printf(": %s, size = %d sectors\n", dl->d_typename, dl->d_secperunit); -} - - -void -hpstrategy(struct buf *bp) -{ - struct hp_softc *sc; - struct buf *gp; - int unit, s, err; - struct disklabel *lp; - - unit = DISKUNIT(bp->b_dev); - sc = hp_cd.cd_devs[unit]; - lp = sc->sc_disk.dk_label; - - err = bounds_check_with_label(&sc->sc_disk, bp, sc->sc_wlabel); - if (err < 0) - goto done; - - bp->b_rawblkno = - bp->b_blkno + lp->d_partitions[DISKPART(bp->b_dev)].p_offset; - bp->b_cylinder = bp->b_rawblkno / lp->d_secpercyl; - - s = splbio(); - - gp = BUFQ_PEEK(sc->sc_md.md_q); - BUFQ_PUT(sc->sc_md.md_q, bp); - if (gp == 0) - rhqueue(&sc->sc_md); - - splx(s); - return; - -done: - bp->b_resid = bp->b_bcount; - biodone(bp); -} - -/* - * Start transfer on given disk. Called from mbastart(). - */ -void -hpstart(struct rh_device *md) -{ - struct hp_softc *sc = md->md_softc; - struct disklabel *lp = sc->sc_disk.dk_label; - struct buf *bp = BUFQ_PEEK(md->md_q); - unsigned bn, cn, sn, tn; - - /* - * Collect statistics. - */ - disk_busy(&sc->sc_disk); - iostat_seek(sc->sc_disk.dk_stats); - - bn = bp->b_rawblkno; - if (bn) { - cn = bn / lp->d_secpercyl; - sn = bn % lp->d_secpercyl; - tn = sn / lp->d_nsectors; - sn = sn % lp->d_nsectors; - } else - cn = sn = tn = 0; - - HP_WCSR(HP_DC, cn); -#ifdef __pdp10__ - md->md_da = (tn << 8) | sn | (sc->sc_unit << 18); - md->md_csr = (bp->b_flags & B_READ ? HPCS_READ : HPCS_WRITE) | - (sc->sc_unit << 18); -#else - HP_WCSR(HP_DA, (tn << 8) | sn); - if (bp->b_flags & B_READ) - HP_WCSR(HP_CS1, HPCS_READ); - else - HP_WCSR(HP_CS1, HPCS_WRITE); -#endif -} - -int -hpopen(dev_t dev, int flag, int fmt, struct lwp *l) -{ - struct hp_softc *sc; - int unit, part; - - unit = DISKUNIT(dev); - if (unit >= hp_cd.cd_ndevs) - return ENXIO; - sc = hp_cd.cd_devs[unit]; - if (sc == 0) - return ENXIO; - - part = DISKPART(dev); - - if (part >= sc->sc_disk.dk_label->d_npartitions) - return ENXIO; - - switch (fmt) { - case S_IFCHR: - sc->sc_disk.dk_copenmask |= (1 << part); - break; - - case S_IFBLK: - sc->sc_disk.dk_bopenmask |= (1 << part); - break; - } - sc->sc_disk.dk_openmask = - sc->sc_disk.dk_copenmask | sc->sc_disk.dk_bopenmask; - - return 0; -} - -int -hpclose(dev_t dev, int flag, int fmt, struct lwp *l) -{ - struct hp_softc *sc; - int unit, part; - - unit = DISKUNIT(dev); - sc = hp_cd.cd_devs[unit]; - - part = DISKPART(dev); - - switch (fmt) { - case S_IFCHR: - sc->sc_disk.dk_copenmask &= ~(1 << part); - break; - - case S_IFBLK: - sc->sc_disk.dk_bopenmask &= ~(1 << part); - break; - } - sc->sc_disk.dk_openmask = - sc->sc_disk.dk_copenmask | sc->sc_disk.dk_bopenmask; - - return 0; -} - -int -hpioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) -{ - struct hp_softc *sc = hp_cd.cd_devs[DISKUNIT(dev)]; - struct disklabel *lp = sc->sc_disk.dk_label; - int error; - - switch (cmd) { - case DIOCGDINFO: - bcopy(lp, addr, sizeof (struct disklabel)); - return 0; - - case DIOCGPART: - ((struct partinfo *)addr)->disklab = lp; - ((struct partinfo *)addr)->part = - &lp->d_partitions[DISKPART(dev)]; - break; - - case DIOCSDINFO: - if ((flag & FWRITE) == 0) - return EBADF; - - return setdisklabel(lp, (struct disklabel *)addr, 0, 0); - - case DIOCWDINFO: - if ((flag & FWRITE) == 0) - error = EBADF; - else { - sc->sc_wlabel = 1; - error = writedisklabel(dev, hpstrategy, lp, 0); - sc->sc_wlabel = 0; - } - return error; - case DIOCWLABEL: - if ((flag & FWRITE) == 0) - return EBADF; - sc->sc_wlabel = 1; - break; - - default: - return ENOTTY; - } - return 0; -} - -/* - * Called when a transfer is finished. Check if transfer went OK, - * Return info about what-to-do-now. - */ -int -hpfinish(struct rh_device *md, int mbasr, int *attn) -{ - struct hp_softc *sc = md->md_softc; - struct buf *bp = BUFQ_PEEK(md->md_q); - int er1, er2; - - HP_RCSR(HP_ER1, er1); - er1 &= 0177777; - HP_RCSR(HP_ER2, er2); - er2 &= 0177777; - HP_WCSR(HP_ER1, 0); - HP_WCSR(HP_ER2, 0); - -hper1: - switch (ffs(er1) - 1) { - case -1: - HP_WCSR(HP_ER1, 0); - goto hper2; - - case HPER1_DCK: /* Corrected? data read. Just notice. */ -panic("hpfinish"); -#if 0 - bc = bus_space_read_4(md->md_mba->sc_iot, - md->md_mba->sc_ioh, MBA_BC); - byte = ~(bc >> 16); - diskerr(buf, hp_cd.cd_name, "soft ecc", LOG_PRINTF, - btodb(bp->b_bcount - byte), sc->sc_disk.dk_label); - er1 &= ~(1<<HPER1_DCK); - break; -#endif - - default: - printf("drive error :%s er1 %x er2 %x\n", - sc->sc_dev.dv_xname, er1, er2); - HP_WCSR(HP_ER1, 0); - HP_WCSR(HP_ER2, 0); - goto hper2; - } - goto hper1; - -hper2: - - mbasr &= ~(RH20_CONI_MBH|RH20_CONI_MEN|RH20_CONI_ATE| - RH20_CONI_DON|RH20_CONO_IMSK); - if (mbasr) - printf("massbuss error :%s %x\n", - sc->sc_dev.dv_xname, mbasr); - - BUFQ_PEEK(md->md_q)->b_resid = 0; - disk_unbusy(&sc->sc_disk, BUFQ_PEEK(md->md_q)->b_bcount, - (bp->b_flags & B_READ)); - return XFER_FINISH; -} - -/* - * Non-data transfer interrupt; like volume change. - */ -int -hpattn(struct rh_device *md) -{ - struct hp_softc *sc = md->md_softc; - int er1, er2; - - HP_RCSR(HP_ER1, er1); - HP_RCSR(HP_ER2, er2); - - printf("%s: Attention! er1 %x er2 %x\n", - sc->sc_dev.dv_xname, er1, er2); - return 0; -} - - -int -hpsize(dev_t dev) -{ - int size, unit = DISKUNIT(dev); - struct hp_softc *sc; - - if (unit >= hp_cd.cd_ndevs || hp_cd.cd_devs[unit] == 0) - return -1; - - sc = hp_cd.cd_devs[unit]; - size = sc->sc_disk.dk_label->d_partitions[DISKPART(dev)].p_size * - (sc->sc_disk.dk_label->d_secsize / DEV_BSIZE); - - return size; -} - -int -hpdump(dev_t dev, daddr_t blkno, void *va, size_t size) -{ - return 0; -} - -int -hpread(dev_t dev, struct uio *uio, int ioflag) -{ - return (physio(hpstrategy, NULL, dev, B_READ, minphys, uio)); -} - -int -hpwrite(dev_t dev, struct uio *uio, int ioflag) -{ - return (physio(hpstrategy, NULL, dev, B_WRITE, minphys, uio)); -} diff --git a/sys/arch/pdp10/dev/hpreg.h b/sys/arch/pdp10/dev/hpreg.h deleted file mode 100644 index f454404a0d8..00000000000 --- a/sys/arch/pdp10/dev/hpreg.h +++ /dev/null @@ -1,125 +0,0 @@ -/* $NetBSD: hpreg.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 1994 Ludd, University of Lule}, Sweden. - * 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 at Ludd, University of Lule}. - * 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. - */ - -#ifdef notdef -struct hp_regs { - int hp_cs1; - int hp_ds; - int hp_er1; - int hp_mr1; - int hp_as; - int hp_da; - int hp_dt; - int hp_la; - int hp_sn; - int hp_of; - int hp_dc; - int hp_hr; - int hp_mr2; - int hp_er2; - int hp_ec1; - int hp_ec2; - int utrymme[16]; -}; -#endif - -#define HP_CS1 0 -#define HP_DS 1 -#define HP_ER1 2 -#define HP_MR1 3 -#define HP_AS 4 -#define HP_DA 5 -#define HP_DT 6 -#define HP_LA 7 -#define HP_SN 8 -#define HP_OF 9 -#define HP_DC 10 -#define HP_HR 11 -#define HP_MR2 12 -#define HP_ER2 13 -#define HP_EC1 14 -#define HP_EC2 15 - -#define HPCS_DVA 4000 /* Drive avail, in dual-port config */ -#define HPCS_WRITE 061 /* Write data */ -#define HPCS_WCHECK 051 /* Write check data */ -#define HPCS_WHEAD 063 /* Write header and data */ -#define HPCS_WCHEAD 053 /* Write check header and data */ -#define HPCS_READ 071 /* Read data */ -#define HPCS_RHEAD 073 /* Read header and data */ -#define HPCS_SEEK 005 /* Just seek */ -#define HPCS_RECAL 007 /* Recalibrate */ -#define HPCS_RTC 017 /* Return to centerline */ -#define HPCS_OFFSET 015 /* Offset */ -#define HPCS_SEARCH 031 /* Search */ -#define HPCS_UNLOAD 003 /* Unload pack (removable) */ -#define HPCS_RELEASE 013 /* Release massbuss port */ -#define HPCS_RPS 021 /* Read-in preset */ -#define HPCS_PA 023 /* Pack acknowledge */ -#define HPCS_DC 011 /* Drive clear */ - - -#define HPDS_VV 0x40 /* Volume valid, not changed */ -#define HPDS_DRY 0x80 /* Drive ready to accept commands */ -#define HPDS_DPR 0x100 /* Drive present */ -#define HPDS_PGM 0x200 /* Programmable in dual-port config */ -#define HPDS_LBT 0x400 /* Last block transferred */ -#define HPDS_WRL 0x800 /* Write locked media */ -#define HPDS_MOL 0x1000 /* Medium on-line */ -#define HPDS_PIP 0x2000 /* Positioning in progress */ -#define HPDS_ERR 0x4000 /* ORed error bit, something wrong */ -#define HPDS_ATA 0x8000 /* Attention drive */ - -#define HPDT_DRQ 0x800 /* Dual-port disk */ - -#define HPOF_FMT 0x1000 /* 16/18 bit data */ - -/* - * Error registers. The defines are the corresponding bit number - * in the error register, instead of a bit mask. - * Use (1<<HPER1_FOO) when touching registers. - */ -#define HPER1_ILF 0 /* Illegal function */ -#define HPER1_ILR 1 /* Illegal register */ -#define HPER1_RMR 2 /* Register modification refused */ -#define HPER1_PAR 3 /* Parity error */ -#define HPER1_FER 4 /* Format error */ -#define HPER1_WCF 5 /* Write clock failed */ -#define HPER1_ECH 6 /* ECC hard error */ -#define HPER1_HCE 7 /* Header compare error */ -#define HPER1_HCRC 8 /* Header CRC error */ -#define HPER1_AOE 9 /* Address overflow error */ -#define HPER1_IAE 10 /* Invalid address error */ -#define HPER1_WLE 11 /* Write lock error */ -#define HPER1_DTE 12 /* Drive timing error */ -#define HPER1_OPI 13 /* Operation incomplete */ -#define HPER1_UNS 14 /* Unsafe drive */ -#define HPER1_DCK 15 /* Data check error */ diff --git a/sys/arch/pdp10/dev/rh.c b/sys/arch/pdp10/dev/rh.c deleted file mode 100644 index e4ec61e1acd..00000000000 --- a/sys/arch/pdp10/dev/rh.c +++ /dev/null @@ -1,306 +0,0 @@ -/* $NetBSD: rh.c,v 1.4 2007/02/22 17:03:19 thorpej Exp $ */ -/* - * Copyright (c) 1994, 1996 Ludd, University of Lule}, Sweden. - * 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 at Ludd, University of - * Lule}, Sweden and its contributors. - * 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. - */ - -/* - * Simple massbus drive routine. - * TODO: - * Autoconfig new devices 'on the fly'. - * More intelligent way to handle different interrupts. - */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/device.h> -#include <sys/queue.h> -#include <sys/buf.h> -#include <sys/proc.h> - -#include <uvm/uvm_extern.h> - -#include <machine/bus.h> -#include <machine/io.h> -#include <machine/pcb.h> - -#include <pdp10/dev/ebus.h> -#include <pdp10/dev/rhreg.h> -#include <pdp10/dev/rhvar.h> - -#include "ioconf.h" -#include "locators.h" - -struct rhunit rhunit[] = { - {RH_DT_RP04, "rp04", MB_RP}, - {RH_DT_RP05, "rp05", MB_RP}, - {RH_DT_RP06, "rp06", MB_RP}, - {RH_DT_RP07, "rp07", MB_RP}, - {RH_DT_RM02, "rm02", MB_RP}, - {RH_DT_RM03, "rm03", MB_RP}, - {RH_DT_RM05, "rm05", MB_RP}, - {RH_DT_RM80, "rm80", MB_RP}, - {RH_DT_TU45, "tu45", MB_TU}, - {0, 0, 0} -}; - -int rhmatch(struct device *, struct cfdata *, void *); -void rhattach(struct device *, struct device *, void *); -void rhintr(void *); -int rhprint(void *, const char *); -void rhqueue(struct rh_device *); -void rhstart(struct rh_softc *); -void rhmapregs(struct rh_softc *); - -struct cfattach rh_ca = { - sizeof(struct rh_softc), rhmatch, rhattach -}; - -#define MBA_WCSR(reg, val) \ - DATAO(sc->sc_ioh | (reg << 30), val) -#define MBA_RCSR(reg) \ - ({ int rv; DATAI(sc->sc_ioh | (reg << 30), rv); rv; }) - -#define RH_READREG(disk, reg, val) \ - DATAO(sc->sc_ioh, ((reg) << 30) | ((disk) << 18)); \ - DATAI(sc->sc_ioh, val) -#define RH_WRITEREG(disk, reg, val) \ - DATAO(sc->sc_ioh, ((reg) << 30) | ((disk) << 18) | 04000000000 | (val)) - -/* - * Look if this is a massbuss adapter. - */ -int -rhmatch(struct device *parent, struct cfdata *cf, void *aux) -{ - struct ebus_attach_args *ea = aux; - int rv; - - /* Try a reset */ - CONO(ea->ea_ioh, RH20_CONO_RST|RH20_CONO_RCL); - /* DELAY(1000); */ - /* Check presence by toggling the ATE bit */ - CONI(ea->ea_ioh, rv); - if (rv & RH20_CONI_ATE) - return 0; - CONO(ea->ea_ioh, RH20_CONO_ATE); - CONI(ea->ea_ioh, rv); - if (rv & RH20_CONI_ATE) - return 1; - - return 0; -} - -/* - * Attach the found massbuss adapter. Setup its interrupt vectors, - * reset it and go searching for drives on it. - */ -void -rhattach(struct device *parent, struct device *self, void *aux) -{ - struct rh_softc *sc = (void *)self; - struct ebus_attach_args *ea = aux; - struct rh_attach_args ma; - int i, j, rv; - - printf(": RH20\n"); - sc->sc_iot = ea->ea_iot; - sc->sc_ioh = ea->ea_ioh; - - CONO(ea->ea_ioh, RH20_CONO_MEN|RH20_CONO_ATE|IPL_BIO); - - sc->sc_first = 0; - sc->sc_last = (void *)&sc->sc_first; - - RH_WRITEREG(0, RH_IVIR, MAKEIV(IPL_BIO)); - - for (i = 0; i < MAXMBADEV; i++) { - sc->sc_state = SC_AUTOCONF; - RH_READREG(i, RH_DS, rv); - if ((rv & RH_DS_DPR) == 0) { - CONO(sc->sc_ioh, RH20_CONO_RAE|RH20_CONO_ATE|IPL_BIO); - continue; - } - /* We have a drive, ok. */ - ma.ma_unit = i; - RH_READREG(i, RH_DT, rv); - ma.ma_type = rv & 0777; - j = 0; - while (rhunit[j++].nr) - if (rhunit[j].nr == ma.ma_type) - break; - ma.ma_devtyp = rhunit[j].devtyp; - ma.ma_name = rhunit[j].name; - ma.ma_iot = sc->sc_iot; - ma.ma_ioh = sc->sc_ioh; - config_found(&sc->sc_dev, (void *)&ma, rhprint); - } -} - -/* - * We got an interrupt. Check type of interrupt and call the specific - * device interrupt handling routine. - */ -void -rhintr(void *rh) -{ - struct rh_softc *sc = rh; - struct rh_device *md; - struct buf *bp; - int itype, attn, anr; - - sc = rh_cd.cd_devs[0]; - - CONI(sc->sc_ioh, itype); - CONO(sc->sc_ioh, itype & - (RH20_CONO_DON|RH20_CONO_ATE|RH20_CONO_MEN)); - RH_READREG(0, RH_AS, attn); - attn &= 0377; - RH_WRITEREG(0, RH_AS, attn); - - if (sc->sc_state == SC_AUTOCONF) - return; /* During autoconfig */ - - md = sc->sc_first; - bp = BUFQ_PEEK(md->md_q); - /* - * A data-transfer interrupt. Current operation is finished, - * call that device's finish routine to see what to do next. - */ - if (sc->sc_state == SC_ACTIVE) { - - sc->sc_state = SC_IDLE; - switch ((*md->md_finish)(md, itype, &attn)) { - - case XFER_FINISH: - /* - * Transfer is finished. Take buffer of drive - * queue, and take drive of adapter queue. - * If more to transfer, start the adapter again - * by calling rhstart(). - */ - (void)BUFQ_GET(md->md_q); - sc->sc_first = md->md_back; - md->md_back = 0; - if (sc->sc_first == 0) - sc->sc_last = (void *)&sc->sc_first; - - if (BUFQ_PEEK(md->md_q) != NULL) { - sc->sc_last->md_back = md; - sc->sc_last = md; - } - - bp->b_resid = 0; - biodone(bp); - if (sc->sc_first) - rhstart(sc); - break; - - case XFER_RESTART: - /* - * Something went wrong with the transfer. Try again. - */ - rhstart(sc); - break; - } - } - - while (attn) { - anr = ffs(attn) - 1; - attn &= ~(1 << anr); - if (sc->sc_md[anr]->md_attn == 0) - panic("Should check for new MBA device %d", anr); - (*sc->sc_md[anr]->md_attn)(sc->sc_md[anr]); - } -} - -int -rhprint(void *aux, const char *rhname) -{ - struct rh_attach_args *ma = aux; - - if (rhname) { - if (ma->ma_name) - printf("%s", ma->ma_name); - else - printf("device type %o", ma->ma_type); - printf(" at %s", rhname); - } - printf(" drive %d", ma->ma_unit); - return (ma->ma_name ? UNCONF : UNSUPP); -} - -/* - * A device calls rhqueue() when it wants to get on the adapter queue. - * Called at splbio(). If the adapter is inactive, start it. - */ -void -rhqueue(struct rh_device *md) -{ - struct rh_softc *sc = md->md_rh; - int i = (int)sc->sc_first; - - sc->sc_last->md_back = md; - sc->sc_last = md; - - if (i == 0) - rhstart(sc); -} - -/* - * Start activity on (idling) adapter. Calls rhmapregs() to setup - * for dma transfer, then the unit-specific start routine. - */ -void -rhstart(struct rh_softc *sc) -{ - struct rh_device *md = sc->sc_first; - struct buf *bp = BUFQ_PEEK(md->md_q); - int ncnt = bp->b_bcount/4; - int blkcnt = ncnt/128; - paddr_t pap; - - if (pmap_extract(pmap_kernel(), (vaddr_t)bp->b_data, &pap) == false) - panic("rhstart"); - - if (pap & 03777) - panic("rhstart: bad align"); - - pap >>= 2; - - ept->ept_channel[0][DCH_CCL_OFF] = - DCH_CCW_XFR|DCH_CCW_XHLT| pap | (ncnt << DCH_CCW_CNTSH); - - sc->sc_state = SC_ACTIVE; - (*md->md_start)(md); /* machine-dependent start */ - RH_WRITEREG(0, RH_SBAR, md->md_da); - RH_WRITEREG(0, RH_STCR, - md->md_csr | RH_TCR_RCLP|RH_TCR_SES | - (((-blkcnt) << RH_TCR_NBCSH) & RH_TCR_NBC)); -} diff --git a/sys/arch/pdp10/dev/rhreg.h b/sys/arch/pdp10/dev/rhreg.h deleted file mode 100644 index f14a8bed58a..00000000000 --- a/sys/arch/pdp10/dev/rhreg.h +++ /dev/null @@ -1,135 +0,0 @@ -/* $NetBSD: rhreg.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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. - */ - -/* - * RH20 register definitions. - */ - -/* - * Different device codes. - */ -#define RH_DT_RP04 0x10 -#define RH_DT_RP05 0x11 -#define RH_DT_RP06 0x12 -#define RH_DT_RP07 0x22 -#define RH_DT_RM02 0x15 -#define RH_DT_RM03 0x14 -#define RH_DT_RM05 0x17 -#define RH_DT_RM80 0x16 -#define RH_DT_TU45 052 -#define RH_DT_DRQ 0x800 /* Dual ported */ -#define RH_DT_MOH 0x2000 /* Moving head device */ - -/* - * Some common registers used in the rh device driver. - */ -#define RH_DS 1 /* unit status */ -#define RH_AS 4 /* attention summary */ -#define RH_DT 6 /* drive type */ -#define RH_SBAR 070 /* Bus address register */ -#define RH_STCR 071 /* Transfer control register */ -#define RH_IVIR 074 /* Interrupt vector register */ - -#define RH_DS_DPR 0x100 /* Unit present */ -/* - * Internal register bits. - */ -#define RH_BAR_ADRMSK 0177777 /* Disk/tape address mask */ -#define RH_TCR_RCLP 0002000000000 /* Reset channel when starting */ -#define RH_TCR_SES 0000200000000 /* Store status after transfer */ -#define RH_TCR_DTES 0000000200000 /* Don't stop if errors */ -#define RH_TCR_NBC 0000000177700 /* Negative block count */ -#define RH_TCR_NBCSH 6 /* Block count shift */ - -/* - * RH20 register definitions. - */ -#define RH20_CONI_BPE 0400000 /* Data bus parity error */ -#define RH20_CONI_EXC 0200000 /* Exception */ -#define RH20_CONI_LWE 0100000 /* Long word count error */ -#define RH20_CONI_SWE 0040000 /* Short word count error */ -#define RH20_CONI_MBE 0020000 /* MBOX error */ -#define RH20_CONI_DRE 0010000 /* Drive response error */ -#define RH20_CONI_RAE 0004000 /* Register access error */ -#define RH20_CONI_MBH 0002000 /* MBOX halted */ -#define RH20_CONI_OVR 0001000 /* Data overrun */ -#define RH20_CONI_MEN 0000400 /* Massbus enable */ -#define RH20_CONI_ATN 0000200 /* Drive attention */ -#define RH20_CONI_2RF 0000100 /* Secondary command register full */ -#define RH20_CONI_ATE 0000040 /* Attention enable */ -#define RH20_CONI_1RF 0000020 /* Primary command register full */ -#define RH20_CONI_DON 0000010 /* Channel done */ - -#define RH20_CONO_RAE 0004000 /* Clear RAE */ -#define RH20_CONO_RST 0002000 /* Controller reset */ -#define RH20_CONO_XFR 0001000 /* Clear transfer error */ -#define RH20_CONO_MEN 0000400 /* Massbus enable */ -#define RH20_CONO_RCL 0000200 /* Reset MBOX command list pointer */ -#define RH20_CONO_DEL 0000100 /* Delete secondary command */ -#define RH20_CONO_ATE 0000040 /* Enable attention interrupts */ -#define RH20_CONO_STP 0000020 /* Stop current command */ -#define RH20_CONO_DON 0000010 /* Clear done */ -#define RH20_CONO_IMSK 0000007 /* Mask for interrupt level */ - -#define RH20_DATAI_CBPE 0001000000000 /* Control bus parity error */ -#define RH20_DATAI_TRA 0000200000000 /* Transfer received */ -#define RH20_DATAI_CPA 0000000200000 /* Massbus parity bit */ -#define RH20_DATAO_RS 0770000000000 /* Register select */ -#define RH20_DATAO_LR 0004000000000 /* Load register */ -#define RH20_DATAO_RAES 0000400000000 /* RAE Suppress */ - -/* - * Data channel defines. - */ -#define DCH_CCL_OFF 0 /* Channel Command List opcode */ -#define DCH_CST_OFF 1 /* Channel Status Word */ -#define DCH_CCW_OFF 2 /* Current Channel Command Word */ -#define DCH_CIV_OFF 3 /* Unused, free for software to use */ - -#define DCH_CCW_HLT 0000000000000 /* HALT opcode */ -#define DCH_CCW_JMP 0200000000000 /* JUMP opcode */ -#define DCH_CCW_XFR 0400000000000 /* XFER opcode, plus next 2 bits: */ -#define DCH_CCW_XHLT 0200000000000 /* Xfer cmd: "Halt after xfer" */ -#define DCH_CCW_XREV 0100000000000 /* Xfer cmd: "Reverse xfer" */ -#define DCH_CCW_CNTMSK 0077760000000 /* Word Count (positive) */ -#define DCH_CCW_CNTSH 22 /* Word Count shift */ -#define DCH_CCW_ADRMSK 0000017777777 /* 22-bit address */ - -/* Channel Status Word -*/ -#define DCH_CSW_SET 0400000000000 /* Always set 1 */ -#define DCH_CSW_MPAR 0200000000000 /* Mem Par Err during CCW fetch */ -#define DCH_CSW_NOAPE 0100000000000 /* Set if NO mem addr par err */ -#define DCH_CSW_NOWC0 0040000000000 /* CCW count NOT 0 when CSW set */ -#define DCH_CSW_NXM 0020000000000 /* Chan referenced NXM */ -#define DCH_CSW_LXFE 0000400000000 /* Last Transfer Error */ -#define DCH_CSW_RH20E 0000200000000 /* RH20 tried to start not-ready chn */ -#define DCH_CSW_LWCE 0000100000000 /* Long Word Count Error */ -#define DCH_CSW_SWCE 0000040000000 /* Short Word Count Error */ -#define DCH_CSW_OVN 0000020000000 /* Overrun */ -#define DCH_CSW_ADRMSK 0000017777777 /* 22-bit CCW addr+1 */ diff --git a/sys/arch/pdp10/dev/rhvar.h b/sys/arch/pdp10/dev/rhvar.h deleted file mode 100644 index 32118da76dc..00000000000 --- a/sys/arch/pdp10/dev/rhvar.h +++ /dev/null @@ -1,117 +0,0 @@ -/* $NetBSD: rhvar.h,v 1.3 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 1994 Ludd, University of Lule}, Sweden - * 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 at Ludd, University of Lule}. - * 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. - */ - -#define MBCR_INIT 1 -#define MBCR_IE (1<<2) -#define MBDS_DPR (1<<8) -#define MBSR_NED (1<<18) -#define MBDT_MOH (1<<13) -#define MBDT_TYPE 511 -#define MBDT_TAP (1<<14) - -#define CLOSED 0 -#define WANTOPEN 1 -#define RDLABEL 2 -#define OPEN 3 -#define OPENRAW 4 - -#define MAXMBADEV 8 /* Max units per MBA */ - -/* - * Devices that have different device drivers. - */ -#define MB_RP 1 -#define MB_TU 2 -#define MB_MT 3 - -/* - * Current state of the adapter. - */ -#define SC_AUTOCONF 1 -#define SC_ACTIVE 2 -#define SC_IDLE 3 - -/* - * Return value after a finished data transfer, from device driver. - */ -#define XFER_RESTART 1 -#define XFER_FINISH 2 - -/* - * Info passed do unit device driver during autoconfig. - */ -struct rh_attach_args { - int ma_unit; - int ma_type; - int ma_devtyp; - bus_space_tag_t ma_iot; - bus_space_handle_t ma_ioh; - char *ma_name; -}; - -/* - * Common struct used to communicate between the rh device driver - * and the unit device driver. - */ -struct rh_device { - struct rh_device *md_back; /* linked list of runnable devices */ - /* Start routine to be called by rhstart. */ - void (*md_start)(struct rh_device *); - /* Routine to be called after attn intr */ - int (*md_attn)(struct rh_device *); - /* Call after xfer finish */ - int (*md_finish)(struct rh_device *, int, int *); - void *md_softc; /* Backpointer to this units softc. */ - struct rh_softc *md_rh; - struct bufq_state *md_q; /* queue of I/O requests */ - int md_csr; /* Drive command given to RH20 */ - int md_da; /* Disk address given to RH20 */ -}; - -struct rh_softc { - struct device sc_dev; - bus_space_tag_t sc_iot; - bus_space_handle_t sc_ioh; - struct evcnt sc_intrcnt; - struct rh_device *sc_first, *sc_last; - int sc_state; - struct rh_device *sc_md[MAXMBADEV]; -}; - -struct rhunit { - int nr; - char *name; - int devtyp; -}; - -/* Common prototypes */ -void rhqueue(struct rh_device *); - diff --git a/sys/arch/pdp10/include/ansi.h b/sys/arch/pdp10/include/ansi.h deleted file mode 100644 index 3a68d6bb98a..00000000000 --- a/sys/arch/pdp10/include/ansi.h +++ /dev/null @@ -1,110 +0,0 @@ -/* $NetBSD: ansi.h,v 1.3 2006/10/04 13:52:00 tnozaki Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)ansi.h 7.1 (Berkeley) 3/9/91 - */ - -#ifndef _ANSI_H_ -#define _ANSI_H_ - -#include <sys/cdefs.h> -#include <machine/int_types.h> - -/* - * Types which are fundamental to the implementation and may appear in - * more than one standard header are defined here. Standard headers - * then use: - * #ifdef _SIZE_T_ - * typedef _SIZE_T_ size_t; - * #undef _SIZE_T_ - * #endif - * - * Thanks, ANSI! - */ -#ifdef __ELF__ -#define _BSD_CLOCK_T_ unsigned int /* clock() */ -#define _BSD_PTRDIFF_T_ long int /* ptr1 - ptr2 */ -#define _BSD_SIZE_T_ unsigned long int /* sizeof() */ -#define _BSD_SSIZE_T_ long int /* byte count or error */ -#define _BSD_TIME_T_ int /* time() */ -#else -#define _BSD_CLOCK_T_ unsigned long int /* clock() */ -#define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */ -#define _BSD_SIZE_T_ unsigned int /* sizeof() */ -#define _BSD_SSIZE_T_ int /* byte count or error */ -#define _BSD_TIME_T_ long /* time() */ -#endif -#if __GNUC_PREREQ__(2,96) -#define _BSD_VA_LIST_ __builtin_va_list /* va_list */ -#else -#define _BSD_VA_LIST_ int * /* va_list */ -#endif -#define _BSD_WINT_T_ int /* wint_t */ -#define _BSD_CLOCKID_T_ int /* clockid_t */ -#define _BSD_TIMER_T_ int /* timer_t */ -#define _BSD_SUSECONDS_T_ int /* suseconds_t */ -#define _BSD_USECONDS_T_ unsigned int /* useconds_t */ - -/* - * NOTE: rune_t is not covered by ANSI nor other standards, and should not - * be instantiated outside of lib/libc/locale. use wchar_t. - * - * Runes (wchar_t) is declared to be an ``int'' instead of the more natural - * ``unsigned long'' or ``long''. Two things are happening here. It is not - * unsigned so that EOF (-1) can be naturally assigned to it and used. Also, - * it looks like 10646 will be a 31 bit standard. This means that if your - * ints cannot hold 32 bits, you will be in trouble. The reason an int was - * chosen over a long is that the is*() and to*() routines take ints (says - * ANSI C), but they use _RUNE_T_ instead of int. By changing it here, you - * lose a bit of ANSI conformance, but your programs will still work. - * - * Note that _WCHAR_T_ and _RUNE_T_ must be of the same type. When wchar_t - * and rune_t are typedef'd, _WCHAR_T_ will be undef'd, but _RUNE_T remains - * defined for ctype.h. - */ -#define _BSD_WCHAR_T_ int /* wchar_t */ -#define _BSD_WINT_T_ int /* wint_t */ -#define _BSD_RUNE_T_ int /* rune_t */ - -/* - * mbstate_t is an opaque object to keep conversion state, during multibyte - * stream conversions. The content must not be referenced by user programs. - */ -typedef union { - __int64_t __mbstateL; /* for alignment */ - char __mbstate8[128]; -} __mbstate_t; -#define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */ - -#endif /* _ANSI_H_ */ diff --git a/sys/arch/pdp10/include/aout_machdep.h b/sys/arch/pdp10/include/aout_machdep.h deleted file mode 100644 index a6644b5fdc3..00000000000 --- a/sys/arch/pdp10/include/aout_machdep.h +++ /dev/null @@ -1,39 +0,0 @@ -/* $NetBSD: aout_machdep.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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. - */ -/* - * This file shouldn't be needed! - */ - -#ifndef _PDP10_AOUT_MACHDEP_H_ -#define _PDP10_AOUT_MACHDEP_H_ - -#define cpu_exec_aout_makecmds(p, epp) ENOEXEC - -#define AOUT_LDPGSZ 2048 - -#endif /* _PDP10_EXEC_H_ */ diff --git a/sys/arch/pdp10/include/asm.h b/sys/arch/pdp10/include/asm.h deleted file mode 100644 index 7ee312e917a..00000000000 --- a/sys/arch/pdp10/include/asm.h +++ /dev/null @@ -1,103 +0,0 @@ -/* $NetBSD: asm.h,v 1.3 2006/01/20 22:02:40 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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 _PDP10_ASM_H_ -#define _PDP10_ASM_H_ - -#ifdef __ELF__ -# define _C_LABEL(x) x -#else -# ifdef __STDC__ -# define _C_LABEL(x) _ ## x -# else -# define _C_LABEL(x) _/**/x -# endif -#endif - -#define _ASM_LABEL(x) x - -#ifdef __STDC__ -# define __CONCAT(x,y) x ## y -# define __STRING(x) #x -#else -# define __CONCAT(x,y) x/**/y -# define __STRING(x) "x" -#endif - -/* let kernels and others override entrypoint alignment */ -#ifndef _ALIGN_TEXT -# ifdef __ELF__ -# define _ALIGN_TEXT .align 4 -# else -# define _ALIGN_TEXT .align 2 -# endif -#endif - -#define _ENTRY(x) \ - .text ; .globl x ; __CONCAT(x,:) - -#ifdef GPROF -# ifdef __ELF__ -# define _PROF_PROLOGUE \ - .data; 1:; .long 0; .text; moval 1b,r0; jsb _ASM_LABEL(__mcount) -# else -# define _PROF_PROLOGUE \ - .data; 1:; .long 0; .text; moval 1b,r0; jsb _ASM_LABEL(mcount) -# endif -#else -# define _PROF_PROLOGUE -#endif - -#define ENTRY(x) _ENTRY(_C_LABEL(x)); _PROF_PROLOGUE -#define NENTRY(x, regs) _ENTRY(_C_LABEL(x)) -#define ASENTRY(x, regs) _ENTRY(_ASM_LABEL(x)); _PROF_PROLOGUE - -#define ALTENTRY(x) .globl _C_LABEL(x) ; _C_LABEL(x): -#define RCSID(x) .text ; .asciz x - -#ifdef __ELF__ -#define WEAK_ALIAS(alias,sym) .weak alias ; alias = sym -#endif -/* - * STRONG_ALIAS: create a strong alias. - */ -#define STRONG_ALIAS(alias,sym) \ - .globl alias; \ - alias = sym - -#ifdef __STDC__ -#define WARN_REFERENCES(sym,msg) \ - .stabs msg ## ,30,0,0,0 ; \ - .stabs __STRING(_C_LABEL(sym)) ## ,1,0,0,0 -#else -#define WARN_REFERENCES(sym,msg) \ - .stabs msg,30,0,0,0 ; \ - .stabs __STRING(_C_LABEL(sym)),1,0,0,0 -#endif /* __STDC__ */ - -#endif /* !_PDP10_ASM_H_ */ diff --git a/sys/arch/pdp10/include/bswap.h b/sys/arch/pdp10/include/bswap.h deleted file mode 100644 index 090ecab2d7b..00000000000 --- a/sys/arch/pdp10/include/bswap.h +++ /dev/null @@ -1,9 +0,0 @@ -/* $NetBSD: bswap.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ - -#ifndef _MACHINE_BSWAP_H_ -#define _MACHINE_BSWAP_H_ - -#define __BSWAP_RENAME -#include <sys/bswap.h> - -#endif /* !_MACHINE_BSWAP_H_ */ diff --git a/sys/arch/pdp10/include/bus.h b/sys/arch/pdp10/include/bus.h deleted file mode 100644 index f6a02b66ddc..00000000000 --- a/sys/arch/pdp10/include/bus.h +++ /dev/null @@ -1,35 +0,0 @@ -/* $NetBSD: bus.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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. - */ - - -typedef u_long bus_addr_t; -typedef u_long bus_size_t; - -typedef u_long bus_space_tag_t; -typedef u_long bus_space_handle_t; - diff --git a/sys/arch/pdp10/include/cdefs.h b/sys/arch/pdp10/include/cdefs.h deleted file mode 100644 index 102b71d3d5f..00000000000 --- a/sys/arch/pdp10/include/cdefs.h +++ /dev/null @@ -1,8 +0,0 @@ -/* $NetBSD: cdefs.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ - -#ifndef _MACHINE_CDEFS_H_ -#define _MACHINE_CDEFS_H_ - -/* No arch-specific cdefs. */ - -#endif /* !_MACHINE_CDEFS_H_ */ diff --git a/sys/arch/pdp10/include/cpu.h b/sys/arch/pdp10/include/cpu.h deleted file mode 100644 index 8b73d75d420..00000000000 --- a/sys/arch/pdp10/include/cpu.h +++ /dev/null @@ -1,96 +0,0 @@ -/* $NetBSD: cpu.h,v 1.4 2007/02/16 02:53:50 ad Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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 _PDP10_CPU_H_ -#define _PDP10_CPU_H_ - -#if defined(_KERNEL_OPT) -#include "opt_lockdebug.h" -#endif - -#ifdef _KERNEL - -#include <sys/cdefs.h> -#include <sys/device.h> -#include <sys/lock.h> -#include <sys/cpu_data.h> - -struct cpu_info { - /* - * Public members. - */ - struct cpu_data ci_data; /* MI per-cpu data */ - struct proc *ci_curproc; /* current owner of the processor */ - -}; - -extern struct cpu_info cpu_info_store; -#define curcpu() (&cpu_info_store) - -volatile int want_resched, astpending; -#define need_resched(ci) (want_resched = 1, astpending = 1) -#define cpu_proc_fork(x, y) -void signotify(struct proc *); -void need_proftick(struct proc *); - -#define cpu_number() 0 - -/* - * Info given to hardclock; current ac block (DATAI PAG). - * If current ac block is user block, CLKF_USERMODE. - * If current ac block is interrupt block, CLKF_INTR. - */ -struct clockframe { - int dataiw; -}; -#define CAC(y) (((y)->dataiw >> 27) & 7) - -#define CLKF_USERMODE(x) (CAC(x) == 1) -#define CLKF_PC(x) (panic("CLKF_PC"), 0) -#define CLKF_INTR(x) (CAC(x) == 2) - -void kl10_conf(void); - -/* Type conversion without pointer conversion */ -#ifdef __GNUC__ -#define TCONV(rtype, inval) \ - ({ union { typeof(inval) p; rtype i; } f; f.p = inval; f.i; }) -#endif -typedef union { - int *intp; - char *cp; - int intop; -} TUNION; -#define TPTOINT(b) (uu.intp = (int *)b, uu.intop) -#define TINTTOP(b) (uu.intop = (int)b, uu.intp) -#define TINTTOCP(b) (uu.intop = (int)b, uu.cp) - - -#endif /* _KERNEL */ - -#endif /* _PDP10_CPU_H_ */ diff --git a/sys/arch/pdp10/include/db_machdep.h b/sys/arch/pdp10/include/db_machdep.h deleted file mode 100644 index 5a8eacf01df..00000000000 --- a/sys/arch/pdp10/include/db_machdep.h +++ /dev/null @@ -1,84 +0,0 @@ -/* $NetBSD: db_machdep.h,v 1.5 2007/02/21 22:59:49 thorpej Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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 _PDP10_DB_MACHDEP_H_ -#define _PDP10_DB_MACHDEP_H_ - -/* - * Machine-dependent debugger defines for PDP10. - */ - -#include <sys/param.h> -#include <uvm/uvm_param.h> -#include <machine/trap.h> - - -typedef vaddr_t db_addr_t; -typedef long db_expr_t; - -typedef struct trapframe db_regs_t; -extern db_regs_t ddb_regs; - -#define DDB_REGS (&ddb_regs) - -#define PC_REGS(regs) (regs->pc) - -#define BKPT_INST 0041000000000 /* MUUO */ -#define BKPT_SIZE 4 /* bytes */ -#define BKPT_SET(inst, addr) (BKPT_INST) -#define BKPT_ADDR(addr) (addr) /* breakpoint address */ - -#define IS_BREAKPOINT_TRAP(type, code) (1) /* XXX */ -#define IS_WATCHPOINT_TRAP(type, code) (0) /* XXX */ - -#define PUSHJ 0260000000000 -#define POPJ 0263000000000 -#define XJEN 0254300000000 - -#define inst_trap_return(ins) (((ins)&0777740000000) == XJEN) -#define inst_return(ins) (((ins)&0777000000000) == POPJ) -#define inst_call(ins) (((ins)&0777000000000) == PUSHJ) -#define next_instr_address(v, b) ((db_addr_t) ((b) ? (v) : ((v) + 4))) - -#define SOFTWARE_SSTEP - -#define inst_load(ins) 0 -#define inst_store(ins) 0 - -/* - * Functions needed for software single-stepping. - */ - -bool inst_branch(int inst); -db_addr_t branch_taken(int inst, db_addr_t pc, db_regs_t *regs); -bool inst_unconditional_flow_transfer(int inst); - -#define DB_ELF_SYMBOLS -#define DB_ELFSIZE 36 - -#endif /* _PDP10_DB_MACHDEP_H_ */ diff --git a/sys/arch/pdp10/include/disklabel.h b/sys/arch/pdp10/include/disklabel.h deleted file mode 100644 index e98d975c5c5..00000000000 --- a/sys/arch/pdp10/include/disklabel.h +++ /dev/null @@ -1,47 +0,0 @@ -/* $NetBSD: disklabel.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ - -/* - * Copyright (c) 1994 Christopher G. Demetriou - * 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 Christopher G. Demetriou. - * 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. - */ - -#ifndef _MACHINE_DISKLABEL_H_ -#define _MACHINE_DISKLABEL_H_ - -#define LABELSECTOR 0 /* sector containing label */ -#define LABELOFFSET 64 /* offset of label in sector */ -#define MAXPARTITIONS 16 /* number of partitions */ -#define RAW_PART 2 /* raw partition: xx?c */ - -/* Just a dummy */ -#ifndef _LOCORE -struct cpu_disklabel { - int cd_dummy; /* must have one element. */ -}; -#endif -#endif /* _MACHINE_DISKLABEL_H_ */ diff --git a/sys/arch/pdp10/include/elf_machdep.h b/sys/arch/pdp10/include/elf_machdep.h deleted file mode 100644 index 26ed6543cd0..00000000000 --- a/sys/arch/pdp10/include/elf_machdep.h +++ /dev/null @@ -1,18 +0,0 @@ -/* $NetBSD: elf_machdep.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ - -#define ELF36_MACHDEP_ENDIANNESS ELFDATA2MSB -#define ELF36_MACHDEP_ID_CASES \ - case EM_PDP10: \ - break; - -#define ELF32_MACHDEP_ENDIANNESS XXX /* break compilation */ -#define ELF32_MACHDEP_ID_CASES \ - /* no 32-bit ELF machine types supported */ - -#define ELF64_MACHDEP_ENDIANNESS XXX /* break compilation */ -#define ELF64_MACHDEP_ID_CASES \ - /* no 64-bit ELF machine types supported */ - -#define ELF36_MACHDEP_ID EM_PDP10 - -#define ARCH_ELFSIZE 36 /* MD native binary size XXX */ diff --git a/sys/arch/pdp10/include/endian.h b/sys/arch/pdp10/include/endian.h deleted file mode 100644 index 1af53fbcfee..00000000000 --- a/sys/arch/pdp10/include/endian.h +++ /dev/null @@ -1,3 +0,0 @@ -/* $NetBSD: endian.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ - -#include <sys/endian.h> diff --git a/sys/arch/pdp10/include/endian_machdep.h b/sys/arch/pdp10/include/endian_machdep.h deleted file mode 100644 index 694179598c4..00000000000 --- a/sys/arch/pdp10/include/endian_machdep.h +++ /dev/null @@ -1,3 +0,0 @@ -/* $NetBSD: endian_machdep.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ - -#define _BYTE_ORDER _BIG_ENDIAN diff --git a/sys/arch/pdp10/include/int_const.h b/sys/arch/pdp10/include/int_const.h deleted file mode 100644 index 2ebff31f4c1..00000000000 --- a/sys/arch/pdp10/include/int_const.h +++ /dev/null @@ -1,63 +0,0 @@ -/* $NetBSD: int_const.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ - -/*- - * Copyright (c) 2001 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Klaus Klein. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 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. - */ - -#ifndef _PDP10_INT_CONST_H_ -#define _PDP10_INT_CONST_H_ - -/* - * 7.18.4 Macros for integer constants - */ - -/* 7.18.4.1 Macros for minimum-width integer constants */ - -#define INT8_C(c) c -#define INT16_C(c) c -#define INT32_C(c) c -#define INT64_C(c) c ## LL - -#define UINT8_C(c) c ## U -#define UINT16_C(c) c ## U -#define UINT32_C(c) c ## U -#define UINT64_C(c) c ## ULL - -/* 7.18.4.2 Macros for greatest-width integer constants */ - -#define INTMAX_C(c) c ## LL -#define UINTMAX_C(c) c ## ULL - -#endif /* !_PDP10_INT_CONST_H_ */ diff --git a/sys/arch/pdp10/include/int_fmtio.h b/sys/arch/pdp10/include/int_fmtio.h deleted file mode 100644 index 46b84f02aa6..00000000000 --- a/sys/arch/pdp10/include/int_fmtio.h +++ /dev/null @@ -1,263 +0,0 @@ -/* $NetBSD: int_fmtio.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ - -/*- - * Copyright (c) 2001 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Klaus Klein. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 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. - */ - -#ifndef _PDP10_INT_FMTIO_H_ -#define _PDP10_INT_FMTIO_H_ - -/* - * 7.8.1 Macros for format specifiers - */ - -/* fprintf macros for signed integers */ - -#define PRId8 "d" /* int8_t */ -#define PRId16 "d" /* int16_t */ -#define PRId32 "d" /* int32_t */ -#define PRId64 "lld" /* int64_t */ -#define PRIdLEAST8 "d" /* int_least8_t */ -#define PRIdLEAST16 "d" /* int_least16_t */ -#define PRIdLEAST32 "d" /* int_least32_t */ -#define PRIdLEAST64 "lld" /* int_least64_t */ -#define PRIdFAST8 "d" /* int_fast8_t */ -#define PRIdFAST16 "d" /* int_fast16_t */ -#define PRIdFAST32 "d" /* int_fast32_t */ -#define PRIdFAST64 "lld" /* int_fast64_t */ -#define PRIdMAX "lld" /* intmax_t */ -#ifdef __ELF__ -#define PRIdPTR "ld" /* intptr_t */ -#else -#define PRIdPTR "d" /* intptr_t */ -#endif - -#define PRIi8 "i" /* int8_t */ -#define PRIi16 "i" /* int16_t */ -#define PRIi32 "i" /* int32_t */ -#define PRIi64 "lli" /* int64_t */ -#define PRIiLEAST8 "i" /* int_least8_t */ -#define PRIiLEAST16 "i" /* int_least16_t */ -#define PRIiLEAST32 "i" /* int_least32_t */ -#define PRIiLEAST64 "lli" /* int_least64_t */ -#define PRIiFAST8 "i" /* int_fast8_t */ -#define PRIiFAST16 "i" /* int_fast16_t */ -#define PRIiFAST32 "i" /* int_fast32_t */ -#define PRIiFAST64 "lli" /* int_fast64_t */ -#define PRIiMAX "lli" /* intmax_t */ -#ifdef __ELF__ -#define PRIiPTR "li" /* intptr_t */ -#else -#define PRIiPTR "i" /* intptr_t */ -#endif - -/* fprintf macros for unsigned integers */ - -#define PRIo8 "o" /* uint8_t */ -#define PRIo16 "o" /* uint16_t */ -#define PRIo32 "o" /* uint32_t */ -#define PRIo64 "llo" /* uint64_t */ -#define PRIoLEAST8 "o" /* uint_least8_t */ -#define PRIoLEAST16 "o" /* uint_least16_t */ -#define PRIoLEAST32 "o" /* uint_least32_t */ -#define PRIoLEAST64 "llo" /* uint_least64_t */ -#define PRIoFAST8 "o" /* uint_fast8_t */ -#define PRIoFAST16 "o" /* uint_fast16_t */ -#define PRIoFAST32 "o" /* uint_fast32_t */ -#define PRIoFAST64 "llo" /* uint_fast64_t */ -#define PRIoMAX "llo" /* uintmax_t */ -#ifdef __ELF__ -#define PRIoPTR "lo" /* uintptr_t */ -#else -#define PRIoPTR "o" /* uintptr_t */ -#endif - -#define PRIu8 "u" /* uint8_t */ -#define PRIu16 "u" /* uint16_t */ -#define PRIu32 "u" /* uint32_t */ -#define PRIu64 "llu" /* uint64_t */ -#define PRIuLEAST8 "u" /* uint_least8_t */ -#define PRIuLEAST16 "u" /* uint_least16_t */ -#define PRIuLEAST32 "u" /* uint_least32_t */ -#define PRIuLEAST64 "llu" /* uint_least64_t */ -#define PRIuFAST8 "u" /* uint_fast8_t */ -#define PRIuFAST16 "u" /* uint_fast16_t */ -#define PRIuFAST32 "u" /* uint_fast32_t */ -#define PRIuFAST64 "llu" /* uint_fast64_t */ -#define PRIuMAX "llu" /* uintmax_t */ -#ifdef __ELF__ -#define PRIuPTR "lu" /* uintptr_t */ -#else -#define PRIuPTR "u" /* uintptr_t */ -#endif - -#define PRIx8 "x" /* uint8_t */ -#define PRIx16 "x" /* uint16_t */ -#define PRIx32 "x" /* uint32_t */ -#define PRIx64 "llx" /* uint64_t */ -#define PRIxLEAST8 "x" /* uint_least8_t */ -#define PRIxLEAST16 "x" /* uint_least16_t */ -#define PRIxLEAST32 "x" /* uint_least32_t */ -#define PRIxLEAST64 "llx" /* uint_least64_t */ -#define PRIxFAST8 "x" /* uint_fast8_t */ -#define PRIxFAST16 "x" /* uint_fast16_t */ -#define PRIxFAST32 "x" /* uint_fast32_t */ -#define PRIxFAST64 "llx" /* uint_fast64_t */ -#define PRIxMAX "llx" /* uintmax_t */ -#ifdef __ELF__ -#define PRIxPTR "lx" /* uintptr_t */ -#else -#define PRIxPTR "x" /* uintptr_t */ -#endif - -#define PRIX8 "X" /* uint8_t */ -#define PRIX16 "X" /* uint16_t */ -#define PRIX32 "X" /* uint32_t */ -#define PRIX64 "llX" /* uint64_t */ -#define PRIXLEAST8 "X" /* uint_least8_t */ -#define PRIXLEAST16 "X" /* uint_least16_t */ -#define PRIXLEAST32 "X" /* uint_least32_t */ -#define PRIXLEAST64 "llX" /* uint_least64_t */ -#define PRIXFAST8 "X" /* uint_fast8_t */ -#define PRIXFAST16 "X" /* uint_fast16_t */ -#define PRIXFAST32 "X" /* uint_fast32_t */ -#define PRIXFAST64 "llX" /* uint_fast64_t */ -#define PRIXMAX "llX" /* uintmax_t */ -#ifdef __ELF__ -#define PRIXPTR "lX" /* uintptr_t */ -#else -#define PRIXPTR "X" /* uintptr_t */ -#endif - -/* fscanf macros for signed integers */ - -#define SCNd8 "hhd" /* int8_t */ -#define SCNd16 "hd" /* int16_t */ -#define SCNd32 "d" /* int32_t */ -#define SCNd64 "lld" /* int64_t */ -#define SCNdLEAST8 "hhd" /* int_least8_t */ -#define SCNdLEAST16 "hd" /* int_least16_t */ -#define SCNdLEAST32 "d" /* int_least32_t */ -#define SCNdLEAST64 "lld" /* int_least64_t */ -#define SCNdFAST8 "hhd" /* int_fast8_t */ -#define SCNdFAST16 "hd" /* int_fast16_t */ -#define SCNdFAST32 "d" /* int_fast32_t */ -#define SCNdFAST64 "lld" /* int_fast64_t */ -#define SCNdMAX "lld" /* intmax_t */ -#ifdef __ELF__ -#define SCNdPTR "ld" /* intptr_t */ -#else -#define SCNdPTR "d" /* intptr_t */ -#endif - -#define SCNi8 "hhi" /* int8_t */ -#define SCNi16 "hi" /* int16_t */ -#define SCNi32 "i" /* int32_t */ -#define SCNi64 "lli" /* int64_t */ -#define SCNiLEAST8 "hhi" /* int_least8_t */ -#define SCNiLEAST16 "hi" /* int_least16_t */ -#define SCNiLEAST32 "i" /* int_least32_t */ -#define SCNiLEAST64 "lli" /* int_least64_t */ -#define SCNiFAST8 "hhi" /* int_fast8_t */ -#define SCNiFAST16 "hi" /* int_fast16_t */ -#define SCNiFAST32 "i" /* int_fast32_t */ -#define SCNiFAST64 "lli" /* int_fast64_t */ -#define SCNiMAX "lli" /* intmax_t */ -#ifdef __ELF__ -#define SCNiPTR "li" /* intptr_t */ -#else -#define SCNiPTR "i" /* intptr_t */ -#endif - -/* fscanf macros for unsigned integers */ - -#define SCNo8 "hho" /* uint8_t */ -#define SCNo16 "ho" /* uint16_t */ -#define SCNo32 "o" /* uint32_t */ -#define SCNo64 "llo" /* uint64_t */ -#define SCNoLEAST8 "hho" /* uint_least8_t */ -#define SCNoLEAST16 "ho" /* uint_least16_t */ -#define SCNoLEAST32 "o" /* uint_least32_t */ -#define SCNoLEAST64 "llo" /* uint_least64_t */ -#define SCNoFAST8 "hho" /* uint_fast8_t */ -#define SCNoFAST16 "ho" /* uint_fast16_t */ -#define SCNoFAST32 "o" /* uint_fast32_t */ -#define SCNoFAST64 "llo" /* uint_fast64_t */ -#define SCNoMAX "llo" /* uintmax_t */ -#ifdef __ELF__ -#define SCNoPTR "lo" /* uintptr_t */ -#else -#define SCNoPTR "o" /* uintptr_t */ -#endif - -#define SCNu8 "hhu" /* uint8_t */ -#define SCNu16 "hu" /* uint16_t */ -#define SCNu32 "u" /* uint32_t */ -#define SCNu64 "llu" /* uint64_t */ -#define SCNuLEAST8 "hhu" /* uint_least8_t */ -#define SCNuLEAST16 "hu" /* uint_least16_t */ -#define SCNuLEAST32 "u" /* uint_least32_t */ -#define SCNuLEAST64 "llu" /* uint_least64_t */ -#define SCNuFAST8 "hhu" /* uint_fast8_t */ -#define SCNuFAST16 "hu" /* uint_fast16_t */ -#define SCNuFAST32 "u" /* uint_fast32_t */ -#define SCNuFAST64 "llu" /* uint_fast64_t */ -#define SCNuMAX "llu" /* uintmax_t */ -#ifdef __ELF__ -#define SCNuPTR "lu" /* uintptr_t */ -#else -#define SCNuPTR "u" /* uintptr_t */ -#endif - -#define SCNx8 "hhx" /* uint8_t */ -#define SCNx16 "hx" /* uint16_t */ -#define SCNx32 "x" /* uint32_t */ -#define SCNx64 "llx" /* uint64_t */ -#define SCNxLEAST8 "hhx" /* uint_least8_t */ -#define SCNxLEAST16 "hx" /* uint_least16_t */ -#define SCNxLEAST32 "x" /* uint_least32_t */ -#define SCNxLEAST64 "llx" /* uint_least64_t */ -#define SCNxFAST8 "hhx" /* uint_fast8_t */ -#define SCNxFAST16 "hx" /* uint_fast16_t */ -#define SCNxFAST32 "x" /* uint_fast32_t */ -#define SCNxFAST64 "llx" /* uint_fast64_t */ -#define SCNxMAX "llx" /* uintmax_t */ -#ifdef __ELF__ -#define SCNxPTR "lx" /* uintptr_t */ -#else -#define SCNxPTR "x" /* uintptr_t */ -#endif - -#endif /* !_PDP10_INT_FMTIO_H_ */ diff --git a/sys/arch/pdp10/include/int_limits.h b/sys/arch/pdp10/include/int_limits.h deleted file mode 100644 index 1109e8e0915..00000000000 --- a/sys/arch/pdp10/include/int_limits.h +++ /dev/null @@ -1,143 +0,0 @@ -/* $NetBSD: int_limits.h,v 1.3 2005/12/11 12:18:34 christos Exp $ */ - -/*- - * Copyright (c) 2001 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Klaus Klein. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 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. - */ - -#ifndef _PDP10_INT_LIMITS_H_ -#define _PDP10_INT_LIMITS_H_ - -/* - * 7.18.2 Limits of specified-width integer types - */ - -/* 7.18.2.1 Limits of exact-width integer types */ - -/* minimum values of exact-width signed integer types */ -#define INT8_MIN (-0x7f-1) /* int8_t */ -#define INT16_MIN (-0x7fff-1) /* int16_t */ -#define INT32_MIN (-0x7fffffff-1) /* int32_t */ -#define INT64_MIN (-0x7fffffffffffffffLL-1) /* int64_t XXX */ - -/* maximum values of exact-width signed integer types */ -#define INT8_MAX 0x7f /* int8_t */ -#define INT16_MAX 0x7fff /* int16_t */ -#define INT32_MAX 0x7fffffff /* int32_t */ -#define INT64_MAX 0x7fffffffffffffffLL /* int64_t XXX */ - -/* maximum values of exact-width unsigned integer types */ -#define UINT8_MAX 0xffU /* uint8_t */ -#define UINT16_MAX 0xffffU /* uint16_t */ -#define UINT32_MAX 0xffffffffU /* uint32_t */ -#define UINT64_MAX 0xffffffffffffffffULL /* uint64_t XXX */ - -/* 7.18.2.2 Limits of minimum-width integer types */ - -/* minimum values of minimum-width signed integer types */ -#define INT_LEAST8_MIN (-0xff-1) /* int_least8_t */ -#define INT_LEAST16_MIN (-0x1ffff-1) /* int_least16_t */ -#define INT_LEAST32_MIN (-0x7ffffffff-1) /* int_least32_t */ -#define INT_LEAST64_MIN (-0x7fffffffffffffffffLL-1) /* int_least64_t */ - -/* maximum values of minimum-width signed integer types */ -#define INT_LEAST8_MAX 0xff /* int_least8_t */ -#define INT_LEAST16_MAX 0x1ffff /* int_least16_t */ -#define INT_LEAST32_MAX 0x7ffffffff /* int_least32_t */ -#define INT_LEAST64_MAX 0x7fffffffffffffffffLL /* int_least64_t */ - -/* maximum values of minimum-width unsigned integer types */ -#define UINT_LEAST8_MAX 0x1ffU /* uint_least8_t */ -#define UINT_LEAST16_MAX 0x3ffffU /* uint_least16_t */ -#define UINT_LEAST32_MAX 0xfffffffffU /* uint_least32_t */ -#define UINT_LEAST64_MAX 0xffffffffffffffffffULL /* uint_least64_t */ - -/* 7.18.2.3 Limits of fastest minimum-width integer types */ - -/* minimum values of fastest minimum-width signed integer types */ -#define INT_FAST8_MIN (-0xff-1) /* int_fast8_t */ -#define INT_FAST16_MIN (-0x1ffff-1) /* int_fast16_t */ -#define INT_FAST32_MIN (-0x7ffffffff-1) /* int_fast32_t */ -#define INT_FAST64_MIN (-0x7fffffffffffffffffLL-1) /* int_fast64_t */ - -/* maximum values of fastest minimum-width signed integer types */ -#define INT_FAST8_MAX 0xff /* int_fast8_t */ -#define INT_FAST16_MAX 0x1ffff /* int_fast16_t */ -#define INT_FAST32_MAX 0x7ffffffff /* int_fast32_t */ -#define INT_FAST64_MAX 0x7fffffffffffffffffLL /* int_fast64_t */ - -/* maximum values of fastest minimum-width unsigned integer types */ -#define UINT_FAST8_MAX 0x1ffU /* uint_fast8_t */ -#define UINT_FAST16_MAX 0x3ffffU /* uint_fast16_t */ -#define UINT_FAST32_MAX 0xfffffffffU /* uint_fast32_t */ -#define UINT_FAST64_MAX 0xffffffffffffffffffULL /* uint_fast64_t */ - -/* 7.18.2.4 Limits of integer types capable of holding object pointers */ - -#define INTPTR_MIN (-0x7ffffffff-1) /* intptr_t */ -#define INTPTR_MAX 0x7ffffffff /* intptr_t */ -#define UINTPTR_MAX 0xfffffffffU /* uintptr_t */ - -/* 7.18.2.5 Limits of greatest-width integer types */ - -#define INTMAX_MIN (-0x7fffffffffffffffffLL-1) /* intmax_t */ -#define INTMAX_MAX 0x7fffffffffffffffffLL /* intmax_t */ -#define UINTMAX_MAX 0xffffffffffffffffffULL /* uintmax_t */ - - -/* - * 7.18.3 Limits of other integer types - */ - -/* limits of ptrdiff_t */ -#ifdef __ELF__ -#define PTRDIFF_MIN (-0x7ffffffffL-1) /* ptrdiff_t */ -#define PTRDIFF_MAX 0x7ffffffffL /* ptrdiff_t */ -#else -#define PTRDIFF_MIN (-0x7ffffffff-1) /* ptrdiff_t */ -#define PTRDIFF_MAX 0x7ffffffff /* ptrdiff_t */ -#endif - -/* limits of sig_atomic_t */ -#define SIG_ATOMIC_MIN (-0x7ffffffff-1) /* sig_atomic_t */ -#define SIG_ATOMIC_MAX 0x7ffffffff /* sig_atomic_t */ - -/* limit of size_t */ -#ifdef __ELF__ -#define SIZE_MAX 0xfffffffffUL /* size_t */ -#else -#define SIZE_MAX 0xfffffffffU /* size_t */ -#endif - -#endif /* !_PDP10_INT_LIMITS_H_ */ diff --git a/sys/arch/pdp10/include/int_mwgwtypes.h b/sys/arch/pdp10/include/int_mwgwtypes.h deleted file mode 100644 index 3dd168ac245..00000000000 --- a/sys/arch/pdp10/include/int_mwgwtypes.h +++ /dev/null @@ -1,102 +0,0 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.3 2005/12/24 20:07:24 perry Exp $ */ - -/*- - * Copyright (c) 2001 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Klaus Klein. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 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. - */ - -#ifndef _PDP10_INT_MWGWTYPES_H_ -#define _PDP10_INT_MWGWTYPES_H_ - -/* - * 7.18.1 Integer types - */ - -/* 7.18.1.2 Minimum-width integer types */ - -#ifdef __GNUC__ -typedef signed char int_least8_t; -#else -typedef signed char int_least8_t; -#endif -typedef unsigned char uint_least8_t; -typedef short int int_least16_t; -typedef unsigned short int uint_least16_t; -typedef int int_least32_t; -typedef unsigned int uint_least32_t; -#ifdef __COMPILER_INT64__ -typedef __COMPILER_INT64__ int_least64_t; -typedef __COMPILER_UINT64__ uint_least64_t; -#else -/* LONGLONG */ -typedef long long int int_least64_t; -/* LONGLONG */ -typedef unsigned long long int uint_least64_t; -#endif - -/* 7.18.1.3 Fastest minimum-width integer types */ - -#ifdef __GNUC__ -typedef signed char int_fast8_t; -#else -typedef signed char int_fast8_t; -#endif -typedef unsigned char uint_fast8_t; -typedef short int int_fast16_t; -typedef unsigned short int uint_fast16_t; -typedef int int_fast32_t; -typedef unsigned int uint_fast32_t; -#ifdef __COMPILER_INT64__ -typedef __COMPILER_INT64__ int_fast64_t; -typedef __COMPILER_UINT64__ uint_fast64_t; -#else -/* LONGLONG */ -typedef long long int int_fast64_t; -/* LONGLONG */ -typedef unsigned long long int uint_fast64_t; -#endif - -/* 7.18.1.5 Greatest-width integer types */ - -#ifdef __COMPILER_INT64__ -typedef __COMPILER_INT64__ intmax_t; -typedef __COMPILER_UINT64__ uintmax_t; -#else -/* LONGLONG */ -typedef long long int intmax_t; -/* LONGLONG */ -typedef unsigned long long int uintmax_t; -#endif - -#endif /* !_PDP10_INT_MWGWTYPES_H_ */ diff --git a/sys/arch/pdp10/include/int_types.h b/sys/arch/pdp10/include/int_types.h deleted file mode 100644 index 097e0cf0c70..00000000000 --- a/sys/arch/pdp10/include/int_types.h +++ /dev/null @@ -1,88 +0,0 @@ -/* $NetBSD: int_types.h,v 1.4 2005/12/24 20:07:24 perry Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: @(#)types.h 7.5 (Berkeley) 3/9/91 - */ - -#ifndef _PDP10_INT_TYPES_H_ -#define _PDP10_INT_TYPES_H_ - -#include <sys/cdefs.h> - -/* - * 7.18.1 Integer types - */ - -/* 7.18.1.1 Exact-width integer types */ - -#ifdef __GNUC__ -typedef signed char __int8_t __attribute__ ((size (8))); -typedef unsigned char __uint8_t __attribute__ ((size (8))); -typedef short int __int16_t __attribute__ ((size (16))); -typedef unsigned short int __uint16_t __attribute__ ((size (16))); -typedef int __int32_t __attribute__ ((size (32))); -typedef unsigned int __uint32_t __attribute__ ((size (32))); -#elif defined(__PCC__) -typedef signed char __int8_t /* _Pragma ((size (8))) */; -typedef unsigned char __uint8_t /* _Pragma ((size (8))) */; -typedef short int __int16_t /* _Pragma ((size (16))) */; -typedef unsigned short int __uint16_t /* _Pragma ((size (16))) */; -typedef int __int32_t /* _Pragma ((size (32))) */; -typedef unsigned int __uint32_t /* _Pragma ((size (32))) */; -#else -#error Need special types for compiler -#endif -#ifdef __COMPILER_INT64__ -typedef __COMPILER_INT64__ __int64_t; -typedef __COMPILER_UINT64__ __uint64_t; -#else -/* LONGLONG */ -typedef long long int __int64_t; -/* LONGLONG */ -typedef unsigned long long int __uint64_t; -#endif - -#define __BIT_TYPES_DEFINED__ - -/* 7.18.1.4 Integer types capable of holding object pointers */ - -#ifdef __ELF__ -typedef long int __intptr_t; -typedef unsigned long int __uintptr_t; -#else -typedef int __intptr_t; -typedef unsigned int __uintptr_t; -#endif - -#endif /* !_VAX_INT_TYPES_H_ */ diff --git a/sys/arch/pdp10/include/intr.h b/sys/arch/pdp10/include/intr.h deleted file mode 100644 index d4b9ff2e8a3..00000000000 --- a/sys/arch/pdp10/include/intr.h +++ /dev/null @@ -1,105 +0,0 @@ -/* $NetBSD: intr.h,v 1.4 2007/02/16 02:53:50 ad Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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 _PDP10_INTR_H_ -#define _PDP10_INTR_H_ - -/* - * A KL10 has 8 interrupt levels, numbered from 0 (highest) to 7. - * All devices get their interrupt level assigned by software. - * The levels here are given as those numbers. - * The hardware vectors used are 40-57 in EPT. - */ -#define IPL_HIGH 0 /* In reality cannot be blocked */ -#define IPL_DDB 1 /* Enter DDB here */ -#define IPL_CLOCK 2 /* Interrupt timer */ -#define IPL_VM 3 /* Blocks everything except hardclock */ -#define IPL_NET 3 /* NIA20 */ -#define IPL_BIO 4 /* RH20 */ -#define IPL_TTY 5 /* Actually all frontend devices */ -#define IPL_AUDIO 5 /* Not likely... */ -#define IPL_SOFTSERIAL 6 -#define IPL_SOFTNET 6 -#define IPL_SOFTCLOCK 7 /* Process scheduling */ - -#define MAKEIV(ipl) (040 + (ipl)*2) - -/* - * Constants used for altering the interrupt system. - */ -#define PI_ON 0000200 /* Turn on PI system */ -#define PI_OFF 0000400 /* Turn off PI system */ -#define PI_LVLOFF 0001000 /* Turn off PI level */ -#define PI_LVLON 0002000 /* Turn on PI level */ -#define PI_INIT 0004000 /* Initiate interrupt on level */ -#define PI_CLEAR 0010000 /* Clear interrupt system */ -#define PI_DROP 0020000 /* Drop initiated interrupt on level */ - -/* - * IPLs converted to PI bits - */ -#define IPL2PI(x) (1 << (7 - (x))) -#define PI_CLOCK IPL2PI(IPL_CLOCK) -#define PI_BIO IPL2PI(IPL_BIO) -#define PI_NET IPL2PI(IPL_NET) -#define PI_TTY IPL2PI(IPL_TTY) -#define PI_SOFTNET IPL2PI(IPL_SOFTNET) -#define PI_SOFTCLOCK IPL2PI(IPL_SOFTCLOCK) -#define PI_ALL 0177 - -#ifndef _LOCORE -int splvm(void); -int splnet(void); -int splsched(void); -int splclock(void); -int splbio(void); -int splstatclock(void); -int splhigh(void); -int splstatclock(void); -int splsoftnet(void); -int spltty(void); -int spl0(void); -int spllock(void); -int splx(int); - -typedef int ipl_t; -typedef struct { - _pi; -} ipl_cookie_t; -int splraiseipl(ipl_cookie_t); -ipl_cookie_t makeiplcookie(ipl_t); - -#if 0 -extern void *softintr_establish(int, void (*)(void *), void *); -void softintr_schedule(void *arg); -#endif -void setsoftclock(void); -void setsoftnet(void); -#endif /* _LOCORE */ - -#endif /* _PDP10_INTR_H */ diff --git a/sys/arch/pdp10/include/io.h b/sys/arch/pdp10/include/io.h deleted file mode 100644 index 2a85104010d..00000000000 --- a/sys/arch/pdp10/include/io.h +++ /dev/null @@ -1,93 +0,0 @@ -/* $NetBSD: io.h,v 1.3 2005/12/24 20:07:24 perry Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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. - */ - -/* - * I/O defines for KA/KI/KL-type CPUs. - */ - -#ifndef _LOCORE -#ifdef __GNUC__ -#define CONO(dev,val) \ - asm volatile("xct %0" :: "r"(0700200000000 | ((dev) << 24) | (val))) -#define CONI(dev,val) \ - asm volatile("xct %1 \n move %0,6 " \ - : "=r"(val) : "r"(0700240000006 | ((dev) << 24)) : "6") -#define DATAO(dev,val) \ - asm volatile("move 6,%1 \n xct %0" \ - : : "r"(0700140000006 | ((dev) << 24)), "r"(val) : "6") -#define DATAI(dev,val) \ - asm volatile("xct %1 \n move %0,6 " \ - : "=r"(val) : "r"(0700040000006 | ((dev) << 24)) : "6") -#define BLKI(dev,val) \ - asm volatile("xct %1 \n move %0,6 " \ - : "=r"(val) : "r"(0700000000006 | ((dev) << 24)) : "6") -#define BLKO(dev,val) \ - asm volatile("move 6,%1 \n xct %0" \ - : : "r"(0700100000006 | ((dev) << 24)), "r"(val) : "6") -#endif /* __GNUC__ */ - -#ifdef __PCC__ -#define CONO(dev,val) cono(dev,val) -#define CONI(dev,val) val = coni(dev) -#define DATAO(dev,val) datao(dev,val) -#define DATAI(dev,val) val = datai(dev) -#define BLKO(dev,val) blko(dev,val) -#define BLKI(dev,val) val = blki(dev) - -void cono(int, int); -void datao(int, int); -void blko(int, int); -int coni(int); -int datai(int); -int blki(int); -#endif /* __PCC__ */ - -#endif /* _LOCORE */ - -/* Paging control, device 010 */ -#define PAG 010 -#define PAG_CON_T20 0040000 -#define PAG_CON_ENABLE 0020000 -#define PAG_DATA_LUBA 0100000000000 /* Load user base address */ -#define PAG_DATA_DNUA 0000000400000 /* Do not update accounts */ - -#define DTE 0200 /* DTE20 */ - -/* Timer control, device 020 */ -#define TIM 020 -#define TIM_CON_CLIC 0400000 /* Clear interval counter */ -#define TIM_CON_ICON 0040000 /* Turn interval counter on */ -#define TIM_CON_CLIF 0020000 /* Clear interval flags */ - -/* Meter control, device 024 */ -#define MTR 024 -#define MTR_CONO_TBOFF 0004000 /* Time base off */ -#define MTR_CONO_TBON 0002000 /* Time base on */ -#define MTR_CONO_TBCLR 0001000 /* Time base clear */ - -#define PI 004 /* Interrupt system */ diff --git a/sys/arch/pdp10/include/limits.h b/sys/arch/pdp10/include/limits.h deleted file mode 100644 index 2bac41e92b3..00000000000 --- a/sys/arch/pdp10/include/limits.h +++ /dev/null @@ -1,106 +0,0 @@ -/* $NetBSD: limits.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ - -/* - * Copyright (c) 1988 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)limits.h 7.2 (Berkeley) 6/28/90 - */ - -#ifndef _MACHINE_LIMITS_H_ -#define _MACHINE_LIMITS_H_ - -#define CHAR_BIT 9 /* number of bits in a char */ -#define MB_LEN_MAX 36 /* no multibyte characters */ - -#define SCHAR_MAX 0xff /* max value for a signed char */ -#define SCHAR_MIN (-0xff-1) /* min value for a signed char */ - -#define UCHAR_MAX 0x1ffU /* max value for an unsigned char */ -#define CHAR_MAX 0xff /* max value for a char */ -#define CHAR_MIN (-0xff-1) /* min value for a char */ - -#define USHRT_MAX 0x3ffffU /* max value for an unsigned short */ -#define SHRT_MAX 0x1ffff /* max value for a short */ -#define SHRT_MIN (-0x1ffff-1) /* min value for a short */ - -#define UINT_MAX 0xfffffffffU /* max value for an unsigned int */ -#define INT_MAX 0x7ffffffff /* max value for an int */ -#define INT_MIN (-0x7ffffffff-1) /* min value for an int */ - -#define ULONG_MAX 0xfffffffffUL /* max value for an unsigned long */ -#define LONG_MAX 0x7ffffffffL /* max value for a long */ -#define LONG_MIN (-0x7ffffffffL-1) /* min value for a long */ - -#if !defined(_ANSI_SOURCE) -#ifdef __ELF__ -#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */ -#else -#define SSIZE_MAX INT_MAX /* max value for a ssize_t */ -#endif - -#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \ - defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L -#define ULLONG_MAX 0xffffffffffffffffffULL /* max unsigned long long */ -#define LLONG_MAX 0x7fffffffffffffffffLL /* max signed long long */ -#define LLONG_MIN (-0x7fffffffffffffffffLL-1) /* min signed long long */ -#endif - -#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) -#ifdef __ELF__ -#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */ -#else -#define SIZE_T_MAX UINT_MAX /* max value for a size_t */ -#endif - -#define UQUAD_MAX 0xffffffffffffffffffULL /* max unsigned quad */ -#define QUAD_MAX 0x7fffffffffffffffffLL /* max signed quad */ -#define QUAD_MIN (-0x7fffffffffffffffffLL-1) /* min signed quad */ - -#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */ -#endif /* !_ANSI_SOURCE */ - -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \ - defined(_XOPEN_SOURCE) -#define LONG_BIT 36 -#define WORD_BIT 36 - -/* XXX - floating point numbers not entirely correct */ -#define DBL_DIG 16 -#define DBL_MAX 1.701411834604692294E+38 -#define DBL_MIN 2.938735877055718770E-39 - -#define FLT_DIG 6 -#define FLT_MAX 1.70141173E+38F -#define FLT_MIN 2.93873588E-39F -#endif - -#endif /* _MACHINE_LIMITS_H_ */ diff --git a/sys/arch/pdp10/include/lock.h b/sys/arch/pdp10/include/lock.h deleted file mode 100644 index ba17b5be2c6..00000000000 --- a/sys/arch/pdp10/include/lock.h +++ /dev/null @@ -1,37 +0,0 @@ -/* $NetBSD: lock.h,v 1.3 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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 _PDP10_LOCK_H_ -#define _PDP10_LOCK_H_ - -void __cpu_simple_lock_init(__cpu_simple_lock_t *alp); -void __cpu_simple_lock(__cpu_simple_lock_t *alp); -void __cpu_simple_unlock(__cpu_simple_lock_t *alp); -int __cpu_simple_lock_try(__cpu_simple_lock_t *alp); - -#endif /* _PDP10_LOCK_H_ */ diff --git a/sys/arch/pdp10/include/mcontext.h b/sys/arch/pdp10/include/mcontext.h deleted file mode 100644 index 9b8688a7de2..00000000000 --- a/sys/arch/pdp10/include/mcontext.h +++ /dev/null @@ -1,82 +0,0 @@ -/* $NetBSD: mcontext.h,v 1.4 2005/12/11 12:18:34 christos Exp $ */ - -/*- - * Copyright (c) 2001 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Klaus Klein. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 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. - */ - -#ifndef _PDP10_MCONTEXT_H_ -#define _PDP10_MCONTEXT_H_ - -/* - * Layout of mcontext_t. - * As on Alpha, this maps directly to `struct reg'. - */ - -#define _NGREG 17 /* 0-17, PC */ - -typedef int __greg_t; -typedef __greg_t __gregset_t[_NGREG]; - -#define _REG_0 0 -#define _REG_1 1 -#define _REG_2 2 -#define _REG_3 3 -#define _REG_4 4 -#define _REG_5 5 -#define _REG_6 6 -#define _REG_7 7 -#define _REG_10 8 -#define _REG_11 9 -#define _REG_12 10 -#define _REG_13 11 -#define _REG_14 12 -#define _REG_15 13 -#define _REG_16 14 -#define _REG_FP _REG_16 -#define _REG_17 15 -#define _REG_SP _REG_17 -#define _REG_PC 16 - -typedef struct { - __gregset_t __gregs; /* General Purpose Register set */ -} mcontext_t; - -#define _UC_MACHINE_SP(uc) ((uc)->uc_mcontext.__gregs[_REG_SP]) -#define _UC_MACHINE_PC(uc) ((uc)->uc_mcontext.__gregs[_REG_PC]) -#define _UC_MACHINE_INTRV(uc) ((uc)->uc_mcontext.__gregs[_REG_1]) - -#define _UC_MACHINE_SET_PC(uc, pc) _UC_MACHINE_PC(uc) = (pc) - -#endif /* !_PDP10_MCONTEXT_H_ */ diff --git a/sys/arch/pdp10/include/param.h b/sys/arch/pdp10/include/param.h deleted file mode 100644 index 1eff400ab26..00000000000 --- a/sys/arch/pdp10/include/param.h +++ /dev/null @@ -1,153 +0,0 @@ -/* $NetBSD: param.h,v 1.4 2006/08/28 13:43:35 yamt Exp $ */ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)param.h 5.8 (Berkeley) 6/28/91 - */ - -#ifndef _PDP10_PARAM_H_ -#define _PDP10_PARAM_H_ - -/* - * Machine dependent constants for PDP10. - */ - -#define _MACHINE pdp10 -#define MACHINE "pdp10" -#define _MACHINE_ARCH pdp10 -#define MACHINE_ARCH "pdp10" -#define MID_MACHINE MID_PDP10 - -/* - * Round p (pointer or byte index) up to a correctly-aligned value - * for all data types (int, long, ...). The result is u_int and - * must be cast to any desired pointer type. - * - * ALIGNED_POINTER is a boolean macro that checks whether an address - * is valid to fetch data elements of type t from on this architecture. - * This does not reflect the optimal alignment, just the possibility - * (within reasonable limits). - * - */ - -/* XXX - how should this macro look like??? */ -#define ALIGNBYTES (sizeof(int) - 1) -#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) -#define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0) - -#define PGSHIFT 11 /* LOG2(NBPG) */ -#define NBPG (1 << PGSHIFT) /* (1 << PGSHIFT) bytes/page */ -#define PGOFSET (NBPG - 1) /* byte offset into page */ - -#define KERNBASE 01000000 /* start of kernel virtual */ - -#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ -#define DEV_BSIZE (1 << DEV_BSHIFT) - -#define BLKDEV_IOSIZE 2048 -#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */ -#define MAXBSIZE 0x4000 /* max FS block size - XXX */ - -#define UPAGES 2 /* pages of u-area */ -#define USPACE (NBPG*UPAGES) - -#ifndef MSGBUFSIZE -#define MSGBUFSIZE NBPG /* default message buffer size */ -#endif - -/* - * KVA is very tight on pdp10, reduce the amount of KVA used by pipe - * "direct" write code to reasonably low value. - */ -#ifndef PIPE_DIRECT_CHUNK -#define PIPE_DIRECT_CHUNK 65536 -#endif - -/* - * Constants related to network buffer management. - * MCLBYTES must be no larger than NBPG (the software page size), and, - * on machines that exchange pages of input or output buffers with mbuf - * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple - * of the hardware page size. - */ -#define MSIZE 256 /* size of an mbuf */ - -#ifndef MCLSHIFT -#define MCLSHIFT 11 /* convert bytes to m_buf clusters */ - /* 2K cluster can hold Ether frame */ -#endif /* MCLSHIFT */ - -#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */ - -#ifndef NMBCLUSTERS -#if defined(_KERNEL_OPT) -#include "opt_gateway.h" -#endif - -#ifdef GATEWAY -#define NMBCLUSTERS 512 /* map size, max cluster allocation */ -#else -#define NMBCLUSTERS 256 /* map size, max cluster allocation */ -#endif -#endif - -/* - * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized - * logical pages. - */ -#define NKMEMPAGES_MIN_DEFAULT ((4 * 1024 * 1024) >> PAGE_SHIFT) -#define NKMEMPAGES_MAX_DEFAULT ((4 * 1024 * 1024) >> PAGE_SHIFT) - -#define PAGER_MAP_SIZE (4 * 1024 * 1024) - -/* - * Some macros for units conversion - */ - -#define btop(x) (((unsigned)(x)) >> PGSHIFT) - -#ifdef _KERNEL -#include <machine/intr.h> - -/* Prototype needed for delay() */ -#ifndef _LOCORE -void delay __P((int)); -void * alloca(size_t); /* XXX should be somewhere else */ -#endif - -#define DELAY(x) delay(x) -#endif /* _KERNEL */ - -#endif /* _PDP10_PARAM_H_ */ diff --git a/sys/arch/pdp10/include/pcb.h b/sys/arch/pdp10/include/pcb.h deleted file mode 100644 index 60094abacca..00000000000 --- a/sys/arch/pdp10/include/pcb.h +++ /dev/null @@ -1,103 +0,0 @@ -/* $NetBSD: pcb.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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 _PDP10_PCB_H_ -#define _PDP10_PCB_H_ - -/* - * The "user process table" for extended TOPS-20. - */ -struct pcb { - int pcb_pad1[0420]; /* Page mapping in TOPS-10 */ - int pcb_luuo; /* Address of LUUO block */ - int pcb_ovtrap; /* Arithmetic overflow trap insn */ - int pcb_ovstack; /* Stack overflow trap insn */ - int pcb_trap3; /* User trap 3 instruction */ - int pcb_muuo_flop; /* MUUO flags/opcode */ - int pcb_muuo_oldpc; /* MUUO old PC */ - int pcb_muuo_e; /* MUUO E address */ - int pcb_muuo_pcw; /* MUUO Process Context Word */ - int pcb_knotrap; /* Kernel no trap MUUO new PC */ - int pcb_ktrap; /* Kernel trap MUUO new PC */ - int pcb_snotrap; /* Supervisor no trap MUUO new PC */ - int pcb_strap; /* Supervisor trap MUUO new PC */ - int pcb_cnotrap; /* Concealed no trap MUUO new PC */ - int pcb_ctrap; /* Concealed trap MUUO new PC */ - int pcb_pnotrap; /* Public no trap MUUO new PC */ - int pcb_ptrap; /* Public trap MUUO new PC */ - int pcb_pad2[040]; /* Reserved */ - int pcb_pfw; /* Page fail word */ - int pcb_pff; /* Page fail flags */ - int pcb_pfopc; /* Page fail old pc */ - int pcb_pfnpc; /* Page fail new pc */ - int pcb_upet[2]; /* User Process Execution Time */ - int pcb_umrc[2]; /* User Memory Reference Count */ - int pcb_pad3[030]; /* Reserved */ - int pcb_section[040]; /* Section pointers */ - int pcb_pad4[0200]; /* Reserved */ -}; - -/* - * The "executive process table" for extended TOPS-20. - */ -struct ept { - int ept_channel[8][4]; /* Channel logout areas */ - int ept_pad1[2]; /* Reserved */ - int ept_spii[016]; /* Standard Priority Interrupt Instructions */ - int ept_fcbfw[4]; /* Four channel block fill word */ - int ept_pad2[054]; /* Reserved */ - int ept_dte20[040]; /* Four DTE20 control blocks */ - int ept_pad3[0221]; /* Reserved */ - int ept_earov; /* Executive Arithmetic Overflow Trap Insn */ - int ept_esov; /* Executive Stack Overflow Trap Insn */ - int ept_etrap3; /* Executive Trap 3 Trap Insn */ - int ept_pad4[064]; /* Reserved */ - int ept_tb[2]; /* Time Base */ - int ept_pac[2]; /* Performance Analysis Count */ - int ept_icii; /* Interval Counter Interrupt Instruction */ - int ept_pad5[023]; /* Reserved */ - int ept_section[040]; /* Section pointers */ - int ept_pad6[0200]; /* Reserved */ -}; - -#define PG_IMM 0100000000000 /* Immediate access */ -#define PG_SH 0200000000000 /* Shared access */ -#define PG_IND 0300000000000 /* Indirect access */ -#define PG_PUBLIC 0040000000000 /* Public access */ -#define PG_WRITE 0020000000000 /* Write access */ -#define PG_CACHE 0004000000000 /* Cachable access */ - -struct md_coredump { - int dummy; -}; - -#ifdef _KERNEL -extern struct ept *ept; -#endif -#endif /* _PDP10_PCB_H_ */ - diff --git a/sys/arch/pdp10/include/pmap.h b/sys/arch/pdp10/include/pmap.h deleted file mode 100644 index 6c1dc924302..00000000000 --- a/sys/arch/pdp10/include/pmap.h +++ /dev/null @@ -1,49 +0,0 @@ -/* $NetBSD: pmap.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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 _PDP10_PMAP_H -#define _PDP10_PMAP_H - -/* - * pmap structure - */ - -typedef struct pmap { - int pad; -} *pmap_t; - - -#ifdef _KERNEL - -extern struct pmap kernel_pmap_store; - -#define pmap_kernel() (&kernel_pmap_store) - -#endif /* _KERNEL */ - -#endif /* _PDP10_PMAP_H */ diff --git a/sys/arch/pdp10/include/proc.h b/sys/arch/pdp10/include/proc.h deleted file mode 100644 index a99636a2062..00000000000 --- a/sys/arch/pdp10/include/proc.h +++ /dev/null @@ -1,45 +0,0 @@ -/* $NetBSD: proc.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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 _PDP10_PROC_H_ -#define _PDP10_PROC_H_ - -/* - * Machine-dependent lwp struct for pdp10. - */ -struct mdlwp { - int md_dummy; /* Must be at least one field */ -}; - -/* - * Machine-dependent part of the proc structure for pdp10. - */ -struct mdproc { - int md_flags; /* machine-dependent flags */ -}; -#endif /* _PDP10_PROC_H_ */ diff --git a/sys/arch/pdp10/include/ptrace.h b/sys/arch/pdp10/include/ptrace.h deleted file mode 100644 index 9a79fc5fba3..00000000000 --- a/sys/arch/pdp10/include/ptrace.h +++ /dev/null @@ -1,32 +0,0 @@ -/* $NetBSD: ptrace.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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. - */ - -#define PT_STEP (PT_FIRSTMACH + 0) -#define PT_GETREGS (PT_FIRSTMACH + 1) -#define PT_SETREGS (PT_FIRSTMACH + 2) - diff --git a/sys/arch/pdp10/include/reg.h b/sys/arch/pdp10/include/reg.h deleted file mode 100644 index c73f12bbb56..00000000000 --- a/sys/arch/pdp10/include/reg.h +++ /dev/null @@ -1,70 +0,0 @@ -/* $NetBSD: reg.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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 _PDP10_REG_H_ -#define _PDP10_REG_H_ - -#ifndef _LOCORE -/* - * Registers only saved for special purposes. - * Normally the register contents are accessed directly from the - * previous register block. - */ -struct reg { - int r0; - int r1; - int r2; - int r3; - int r4; - int r5; - int r6; - int r7; - int r10; - int r11; - int r12; - int r13; - int r14; - int r15; - int r16; - int r17; - int pc; -}; -#endif /* _LOCORE */ - -/* - * The KL10 has 8 register blocks, but the last blocks are partly used - * for internal states. NetBSD uses them as follows: - * 0 - Kernel - * 1 - User - * 3 - Interrupts - */ -#define KERNELREG 0 -#define USERREG 1 -#define INTREG 2 - -#endif /* _PDP10_REG_H_ */ diff --git a/sys/arch/pdp10/include/setjmp.h b/sys/arch/pdp10/include/setjmp.h deleted file mode 100644 index 657184d2adb..00000000000 --- a/sys/arch/pdp10/include/setjmp.h +++ /dev/null @@ -1,4 +0,0 @@ -/* $NetBSD: setjmp.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ - -#define _JBLEN (8 + 6 + 8) /* size, in ints, of a jmp_buf */ - /* 8 for sigcontext + 6 for reg 10-15 + 8 extra */ diff --git a/sys/arch/pdp10/include/signal.h b/sys/arch/pdp10/include/signal.h deleted file mode 100644 index 3c5c0a7e5f6..00000000000 --- a/sys/arch/pdp10/include/signal.h +++ /dev/null @@ -1,52 +0,0 @@ -/* $NetBSD: signal.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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 _PDP10_SIGNAL_H_ -#define _PDP10_SIGNAL_H_ - -typedef int sig_atomic_t; - -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ - !defined(_XOPEN_SOURCE) -/* - * Information pushed on stack when a signal is delivered. - * This is used by the kernel to restore state following - * execution of the signal handler. It is also made available - * to the handler to allow it to restore state properly if - * a non-standard exit is performed. - */ -struct sigcontext { - int sc_onstack; /* sigstack state to restore */ - int sc_pc; /* pc to restore */ - int sc_sp; /* sp to restore */ - int sc_fp; /* fp to restore */ - sigset_t sc_mask; /* signal mask to restore */ -}; - -#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */ -#endif /* !_PDP10_SIGNAL_H_ */ diff --git a/sys/arch/pdp10/include/stdarg.h b/sys/arch/pdp10/include/stdarg.h deleted file mode 100644 index 0e3db5a8328..00000000000 --- a/sys/arch/pdp10/include/stdarg.h +++ /dev/null @@ -1,85 +0,0 @@ -/* $NetBSD: stdarg.h,v 1.3 2005/12/11 12:18:34 christos 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)stdarg.h 7.2 (Berkeley) 5/4/91 - */ - -#ifndef _PDP10_STDARG_H_ -#define _PDP10_STDARG_H_ - -#include <machine/ansi.h> -#include <sys/featuretest.h> - -typedef _BSD_VA_LIST_ va_list; - -#ifdef __lint__ -#define __builtin_next_arg(t) ((t) ? 0 : 0) -#endif - -#ifdef __GNUC__ -#if __GNUC_PREREQ__(2, 96) -#define va_start(ap, last) __builtin_stdarg_start((ap), (last)) -#define va_arg __builtin_va_arg -#define va_end __builtin_va_end -#define __va_copy(dest, src) __builtin_va_copy((dest), (src)) -#else -#define __va_size(type) \ - (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) - -#define va_start(ap, last) \ - ((ap) = (va_list)__builtin_next_arg(last)) - -#define va_arg(ap, type) \ - (*(type *)(void *)((ap) += __va_size(type), (ap) - __va_size(type))) - -#define va_end(ap) - -#define __va_copy(dest, src) ((dest) = (src)) -#endif -#endif /* __GNUC__ */ - -#ifdef __PCC__ -#define va_start(ap, last) ap = (va_list)&last -#define va_arg(ap, type) (*(type *)((ap) -= (sizeof(type)+3)/4, (ap))) -#define va_end(ap) -#define __va_copy(dest, src) ((dest) = (src)) -#endif /* __PCC__ */ - -#if !defined(_ANSI_SOURCE) && \ - (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \ - defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L) -#define va_copy(dest, src) __va_copy(dest, src) -#endif - -#endif /* !_PDP10_STDARG_H_ */ diff --git a/sys/arch/pdp10/include/trap.h b/sys/arch/pdp10/include/trap.h deleted file mode 100644 index e92af2c6391..00000000000 --- a/sys/arch/pdp10/include/trap.h +++ /dev/null @@ -1,43 +0,0 @@ -/* $NetBSD: trap.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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 _PDP10_TRAP_H_ -#define _PDP10_TRAP_H_ - -#define T_DDB 1 /* DDB called via Debugger() */ - -/* - * The first 17 longwords can be mapped directly on struct reg. - */ -struct trapframe { - int regs[16]; /* all saved registers */ - int pc; /* pc at trap */ - int trap; /* type of trap */ - int code; /* trap-specific info */ -}; -#endif diff --git a/sys/arch/pdp10/include/types.h b/sys/arch/pdp10/include/types.h deleted file mode 100644 index c1bee45bfe2..00000000000 --- a/sys/arch/pdp10/include/types.h +++ /dev/null @@ -1,73 +0,0 @@ -/* $NetBSD: types.h,v 1.5 2006/09/06 04:51:34 gdamore Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)types.h 7.5 (Berkeley) 3/9/91 - */ - -#ifndef _MACHTYPES_H_ -#define _MACHTYPES_H_ - -#include <sys/cdefs.h> -#include <machine/int_types.h> - -#if defined(_KERNEL) -typedef struct label_t { - int val[22]; -} label_t; -#endif - -/* NB: This should probably be if defined(_KERNEL) */ -#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) -typedef unsigned long paddr_t; -typedef unsigned long psize_t; -typedef unsigned long vaddr_t; -typedef unsigned long vsize_t; -#endif - -typedef int register_t; - -/* MI types defined here instead */ -typedef int pid_t; -#define pid_t int - -typedef volatile int __cpu_simple_lock_t; - -#define __SIMPLELOCK_LOCKED 1 -#define __SIMPLELOCK_UNLOCKED 0 - -/* #define __HAVE_GENERIC_SOFT_INTERRUPTS */ -#define __HAVE_TIMECOUNTER 1 -#define __HAVE_GENERIC_TODR 1 - -#endif /* _MACHTYPES_H_ */ diff --git a/sys/arch/pdp10/include/vmparam.h b/sys/arch/pdp10/include/vmparam.h deleted file mode 100644 index e59abb76c63..00000000000 --- a/sys/arch/pdp10/include/vmparam.h +++ /dev/null @@ -1,109 +0,0 @@ -/* $NetBSD: vmparam.h,v 1.2 2005/12/11 12:18:34 christos Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)vmparam.h 5.9 (Berkeley) 5/12/91 - */ -#ifndef _VMPARAM_H_ -#define _VMPARAM_H_ - -/* - * Machine dependent constants for PDP10. - */ - -/* - * We use 512 word VM pages on the PDP10. - * Override the PAGE_* definitions to be compile-time constants. - * Should really use all this in words instead, fake it as bytes for now. - */ -#define PAGE_SHIFT PGSHIFT -#define PAGE_SIZE (1 << PAGE_SHIFT) -#define PAGE_MASK (PAGE_SIZE - 1) - -/* - * USRTEXT is the start of the user text/data space, while USRSTACK - * is the top (end) of the user stack. - */ -#define USRTEXT NBPG -#define USRSTACK (32*1024*1024) - -/* - * Virtual memory related constants, all in bytes - */ - -#ifndef MAXTSIZ -#define MAXTSIZ (1*1024*1024) /* max text size */ -#endif -#ifndef DFLDSIZ -#define DFLDSIZ (8*1024*1024) /* initial data size limit */ -#endif -#ifndef MAXDSIZ -#define MAXDSIZ (24*1024*1024) /* max data size */ -#endif -#ifndef DFLSSIZ -#define DFLSSIZ (512*1024) /* initial stack size limit */ -#endif -#ifndef MAXSSIZ -#define MAXSSIZ (1024*1024) /* max stack size */ -#endif - -/* - * Size of shared memory map - */ - -#ifndef SHMMAXPGS -#define SHMMAXPGS 1024 -#endif - -#define VM_PHYSSEG_MAX 1 -#define VM_PHYSSEG_NOADD -#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH /* XXX */ - -#define VM_NFREELIST 2 -#define VM_FREELIST_DEFAULT 0 - -/* - * Mach derived constants - */ - -/* user/kernel map constants */ -#define VM_MIN_ADDRESS ((vaddr_t)0) -#define VM_MAXUSER_ADDRESS ((vaddr_t)USRSTACK) -#define VM_MAX_ADDRESS ((vaddr_t)USRSTACK) -#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0) -#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)(USRSTACK)) - -#endif diff --git a/sys/arch/pdp10/include/wchar_limits.h b/sys/arch/pdp10/include/wchar_limits.h deleted file mode 100644 index df99b61d848..00000000000 --- a/sys/arch/pdp10/include/wchar_limits.h +++ /dev/null @@ -1,54 +0,0 @@ -/* $NetBSD: wchar_limits.h,v 1.4 2005/12/11 12:18:34 christos Exp $ */ - -/*- - * Copyright (c) 2004 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Klaus Klein. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 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. - */ - -#ifndef _PDP10_WCHAR_LIMITS_H_ -#define _PDP10_WCHAR_LIMITS_H_ - -/* - * 7.18.3 Limits of other integer types - */ - -/* limits of wchar_t */ -#define WCHAR_MIN (-0x7ffffffff-1) /* wchar_t */ -#define WCHAR_MAX 0x7ffffffff /* wchar_t */ - -/* limits of wint_t */ -#define WINT_MIN (-0x7ffffffff-1) /* wint_t */ -#define WINT_MAX 0x7ffffffff /* wint_t */ - -#endif /* !_PDP10_WCHAR_LIMITS_H_ */ diff --git a/sys/arch/pdp10/pdp10/autoconf.c b/sys/arch/pdp10/pdp10/autoconf.c deleted file mode 100644 index 88b429edc07..00000000000 --- a/sys/arch/pdp10/pdp10/autoconf.c +++ /dev/null @@ -1,72 +0,0 @@ -/* $NetBSD: autoconf.c,v 1.3 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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> -#include <sys/device.h> -#include <sys/systm.h> -#include <sys/conf.h> - -void -cpu_rootconf(void) -{ - printf("boot device: %s\n", - booted_device ? booted_device->dv_xname : "<unknown>"); - - setroot(booted_device, booted_partition); -} - -void -cpu_configure(void) -{ - - if (config_rootfound("mainbus", NULL) == NULL) - panic("mainbus not configured"); -} - -static int -mainbus_print(void *aux, const char *name) -{ - return (UNCONF); -} - -static int -mainbus_match(struct device *parent, struct cfdata *cf, void *aux) -{ - return 1; -} - -static void -mainbus_attach(struct device *parent, struct device *self, void *aux) -{ - printf("\n"); - config_found(self, NULL, mainbus_print); -} - -struct cfattach mainbus_ca = { - sizeof(struct device), mainbus_match, mainbus_attach -}; diff --git a/sys/arch/pdp10/pdp10/clock.c b/sys/arch/pdp10/pdp10/clock.c deleted file mode 100644 index a91bf84c500..00000000000 --- a/sys/arch/pdp10/pdp10/clock.c +++ /dev/null @@ -1,63 +0,0 @@ -/* $NetBSD: clock.c,v 1.2 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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> -#include <sys/systm.h> - -#include <machine/intr.h> -#include <machine/io.h> - -/* - * The clock counts up each 10 us. - */ -#define TBASE 1000 /* Interrupt each 10 ms */ - -void -cpu_initclocks() -{ - CONO(MTR, IPL_CLOCK); /* Interrupt level */ - CONO(TIM, TIM_CON_CLIC|TIM_CON_ICON|TIM_CON_CLIF|TBASE); -} - -void -microtime(struct timeval *tvp) -{ - panic("microtime"); -} - -void -resettodr() -{ - panic("resettodr"); -} - -void -inittodr(time_t base) -{ - panic("inittodr"); -} diff --git a/sys/arch/pdp10/pdp10/console.c b/sys/arch/pdp10/pdp10/console.c deleted file mode 100644 index 00170d86440..00000000000 --- a/sys/arch/pdp10/pdp10/console.c +++ /dev/null @@ -1,103 +0,0 @@ -/* $NetBSD: console.c,v 1.2 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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> -#include <sys/systm.h> -#include <sys/conf.h> - -#include <dev/cons.h> - -#include <machine/pcb.h> -#include <machine/io.h> - -cons_decl(dte); - -struct consdev dtetab = cons_init(dte); - -static volatile struct dte { - int flg; /* Operation complete flag. */ - int clk; /* Clock interrupt flag. */ - int ci; /* Clock interrupt instruction. */ - int t11; /* 10 to 11 argument. */ - int f11; /* 10 from 11 argument. */ - int cmd; /* To 11 command word. */ - int seq; /* Operation sequence number. */ - int opr; /* Operational DTE #. */ - int chr; /* Last typed character. */ - int mtd; /* Monitor TTY output complete flag. */ - int mti; /* Monitor TTY input flag. */ - int swr; /* 10 switch register. */ -} *dte; - -static int isinited; - -void -dtecninit(struct consdev *cn) -{ - extern struct ept *ept; - if (isinited) - return; - - dte = (struct dte *)((int *)ept + 0444); - cn_tab = &dtetab; - dte->flg = dte->clk = dte->ci = 0; - isinited++; -} - -void -dtecnpollc(dev_t dev, int onoff) -{ -} - -void -dtecnputc(dev_t dev, int ch) -{ - dte->cmd = ch & 0177; - dte->seq++; - CONO(DTE,020000); - while (dte->flg == 0) - ; - dte->flg = 0; -} - -int -dtecngetc(dev_t dev) -{ - int rch; - - while (dte->mti == 0) - ; - rch = dte->f11 & 0177; - dte->mti = 0; - return rch; -} - -void -dtecnprobe(struct consdev *cn) -{ -} diff --git a/sys/arch/pdp10/pdp10/db_disasm.c b/sys/arch/pdp10/pdp10/db_disasm.c deleted file mode 100644 index 1a54a0d550f..00000000000 --- a/sys/arch/pdp10/pdp10/db_disasm.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $NetBSD: db_disasm.c,v 1.3 2007/02/21 22:59:49 thorpej Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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> - -#include <machine/db_machdep.h> -#include <ddb/db_sym.h> - -#include <ddb/db_variables.h> -#include <ddb/db_interface.h> -#include <ddb/db_output.h> - -db_addr_t -db_disasm(db_addr_t loc, bool altfmt) -{ - int foo = *(int *)loc; - db_printf("addr 0%o: 0%012o\n", loc, foo); - return loc+4; -} diff --git a/sys/arch/pdp10/pdp10/db_machdep.c b/sys/arch/pdp10/pdp10/db_machdep.c deleted file mode 100644 index 0f4afa91abf..00000000000 --- a/sys/arch/pdp10/pdp10/db_machdep.c +++ /dev/null @@ -1,122 +0,0 @@ -/* $NetBSD: db_machdep.c,v 1.5 2007/02/22 17:03:19 thorpej Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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 "opt_ddb.h" - -#include <sys/param.h> - -#include <machine/db_machdep.h> - -#include <ddb/db_extern.h> -#include <ddb/db_interface.h> -#include <ddb/db_variables.h> - -db_regs_t ddb_regs; - - -void -ddbintr() -{ - db_trap(0, 0); -} -/* - * Read bytes from kernel address space for debugger. - */ -void -db_read_bytes(vaddr_t addr, size_t size, char *data) -{ - char *faddr = (char *)addr; - - while (size--) - *data++ = *faddr++; -} - -/* - * Write bytes to kernel address space for debugger. - */ -void -db_write_bytes(vaddr_t addr, size_t size, char *data) -{ - char *faddr = (char *)addr; - - while (size--) - *faddr++ = *data++; -} - -/* - * Machine register set. - */ -const struct db_variable db_regs[] = { - {"0", &ddb_regs.regs[0], FCN_NULL}, - {"1", &ddb_regs.regs[1], FCN_NULL}, - {"2", &ddb_regs.regs[2], FCN_NULL}, - {"3", &ddb_regs.regs[3], FCN_NULL}, - {"4", &ddb_regs.regs[4], FCN_NULL}, - {"5", &ddb_regs.regs[5], FCN_NULL}, - {"6", &ddb_regs.regs[6], FCN_NULL}, - {"7", &ddb_regs.regs[7], FCN_NULL}, - {"10", &ddb_regs.regs[8], FCN_NULL}, - {"11", &ddb_regs.regs[9], FCN_NULL}, - {"12", &ddb_regs.regs[10], FCN_NULL}, - {"13", &ddb_regs.regs[11], FCN_NULL}, - {"14", &ddb_regs.regs[12], FCN_NULL}, - {"15", &ddb_regs.regs[13], FCN_NULL}, - {"16", &ddb_regs.regs[14], FCN_NULL}, - {"17", &ddb_regs.regs[15], FCN_NULL}, - {"pc", &ddb_regs.pc, FCN_NULL}, -}; -const struct db_variable * const db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]); - -void -db_stack_trace_print(db_expr_t addr, bool have_addr, db_expr_t count, - char *modif, void (*pr)(const char *, ...)) -{ - (*pr)("db_stack_trace_print\n"); -} - -/* - * XXX - must fix the sstep functions. - */ - -bool -inst_branch(int inst) -{ - return true; -} - -bool -inst_unconditional_flow_transfer(int inst) -{ - return true; -} - -db_addr_t -branch_taken(int inst, db_addr_t pc, db_regs_t *regs) -{ - return pc + 4; -} diff --git a/sys/arch/pdp10/pdp10/disksubr.c b/sys/arch/pdp10/pdp10/disksubr.c deleted file mode 100644 index 44eb8f7648b..00000000000 --- a/sys/arch/pdp10/pdp10/disksubr.c +++ /dev/null @@ -1,167 +0,0 @@ -/* $NetBSD: disksubr.c,v 1.3 2006/11/25 11:59:58 scw Exp $ */ - -/* - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91 - */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/buf.h> -#include <sys/dkbad.h> -#include <sys/disklabel.h> -#include <sys/disk.h> -#include <sys/syslog.h> -#include <sys/proc.h> -#include <sys/user.h> - -#include <uvm/uvm_extern.h> - -/* - * Attempt to read a disk label from a device - * using the indicated strategy routine. - * The label must be partly set up before this: - * secpercyl and anything required in the strategy routine - * (e.g., sector size) must be filled in before calling us. - * Returns null on success and an error string on failure. - */ -char * -readdisklabel(dev_t dev, void (*strat)(struct buf *), - struct disklabel *lp, struct cpu_disklabel *osdep) -{ - struct buf *bp; - struct disklabel *dlp; - char *msg = NULL; - - if (lp->d_npartitions == 0) { /* Assume no label */ - lp->d_secperunit = 0x1fffffff; - lp->d_npartitions = 3; - lp->d_partitions[2].p_size = 0x1fffffff; - lp->d_partitions[2].p_offset = 0; - } - - bp = geteblk((int)lp->d_secsize); - bp->b_dev = dev; - bp->b_blkno = LABELSECTOR; - bp->b_bcount = lp->d_secsize; - bp->b_flags |= B_READ; - bp->b_cylinder = LABELSECTOR / lp->d_secpercyl; - (*strat)(bp); - if (biowait(bp)) { - msg = "I/O error"; - } else { - dlp = (struct disklabel *)(bp->b_data + LABELOFFSET); - if (dlp->d_magic != DISKMAGIC || dlp->d_magic2 != DISKMAGIC) { - msg = "no disk label"; - } else if (dlp->d_npartitions > MAXPARTITIONS || - dkcksum(dlp) != 0) - msg = "disk label corrupted"; - else { - *lp = *dlp; - } - } - brelse(bp); - return (msg); -} - -/* - * Check new disk label for sensibility - * before setting it. - */ -int -setdisklabel(struct disklabel *olp, struct disklabel *nlp, - u_long openmask, struct cpu_disklabel *osdep) -{ - int i; - struct partition *opp, *npp; - - if (nlp->d_magic != DISKMAGIC || nlp->d_magic2 != DISKMAGIC || - dkcksum(nlp) != 0) - return (EINVAL); - while ((i = ffs(openmask)) != 0) { - i--; - openmask &= ~(1 << i); - if (nlp->d_npartitions <= i) - return (EBUSY); - opp = &olp->d_partitions[i]; - npp = &nlp->d_partitions[i]; - if (npp->p_offset != opp->p_offset || npp->p_size < opp->p_size) - return (EBUSY); - /* - * Copy internally-set partition information - * if new label doesn't include it. XXX - */ - if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) { - npp->p_fstype = opp->p_fstype; - npp->p_fsize = opp->p_fsize; - npp->p_frag = opp->p_frag; - npp->p_cpg = opp->p_cpg; - } - } - nlp->d_checksum = 0; - nlp->d_checksum = dkcksum(nlp); - *olp = *nlp; - return (0); -} - -/* - * Write disk label back to device after modification. - * Always allow writing of disk label; even if the disk is unlabeled. - */ -int -writedisklabel(dev_t dev, void (*strat)(struct buf *), - struct disklabel *lp, struct cpu_disklabel *osdep) -{ - struct buf *bp; - struct disklabel *dlp; - int error = 0; - - bp = geteblk((int)lp->d_secsize); - bp->b_dev = MAKEDISKDEV(major(dev), DISKUNIT(dev), RAW_PART); - bp->b_blkno = LABELSECTOR; - bp->b_bcount = lp->d_secsize; - bp->b_flags |= B_READ; - (*strat)(bp); - if ((error = biowait(bp))) - goto done; - dlp = (struct disklabel *)(bp->b_data + LABELOFFSET); - bcopy(lp, dlp, sizeof(struct disklabel)); - bp->b_flags &= ~(B_READ|B_DONE); - bp->b_flags |= B_WRITE; - (*strat)(bp); - error = biowait(bp); - -done: - brelse(bp); - return (error); -} diff --git a/sys/arch/pdp10/pdp10/kl10.c b/sys/arch/pdp10/pdp10/kl10.c deleted file mode 100644 index d1515fc5e54..00000000000 --- a/sys/arch/pdp10/pdp10/kl10.c +++ /dev/null @@ -1,61 +0,0 @@ -/* $NetBSD: kl10.c,v 1.2 2005/12/11 12:18:34 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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> -#include <sys/systm.h> - -#include <machine/io.h> -#include <machine/cpu.h> - - -#define OPTSTR "\177\10b\43T20PAG\0b\42EXADDR\0b\41EXOTIC\0" \ - "b\21C50HZ\0b\20CACHE\0b\17CHANNEL\0b\16EXTCPU\0b\15MASTEROSC\0\0" - -void -kl10_conf() -{ - char buf[100]; - unsigned int cpup; - - /* - * Identify CPU type. - */ - BLKI(0, cpup); - strcpy(cpu_model, "KL10-"); - cpu_model[5] = (cpup & 040000 ? 'E' : 'A'); - printf("\ncpu: %s, serial number 0%o, microcode version 0%o\n", - cpu_model, cpup & 07777, (cpup >> 18) & 0777); - bitmask_snprintf((unsigned long long)cpup, OPTSTR, buf, sizeof(buf)); - printf("cpu options: %s\n", buf); - -#ifdef notyet - /* - * Turn on cache system. - */ -#endif -} diff --git a/sys/arch/pdp10/pdp10/locore.S b/sys/arch/pdp10/pdp10/locore.S deleted file mode 100644 index 3f711014cb3..00000000000 --- a/sys/arch/pdp10/pdp10/locore.S +++ /dev/null @@ -1,529 +0,0 @@ -/* $NetBSD: locore.S,v 1.4 2007/02/16 02:53:50 ad Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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 "opt_ddb.h" - -#include <machine/asm.h> -#include <machine/io.h> -#include <machine/intr.h> - -#define HALT(x) jrst %4,x - -#define PGSZ 01000 /* In words */ -#define PGMSK (PGSZ-1) -#define NPGMSK 0777000 /* (~PGMSK) */ -#define SP %17 -#define FP %16 - -#define PTOFF(off,arg) skipa %2,.+1 ; arg ; movem %2,off(%1) - -#define INTRDEF(eptoff, p0off, dst) \ - PTOFF(eptoff,xpcw p0off) ; xmovei %3,dst ; movem %3,@[.long p0off+3] -/* - * A bunch of instructions. These should be recognized by the assembler. - */ -#define xpcw jrst %7, -#define xjen jrst %6, - -/* - * Usage of page 0 for interrupt dispatchers. - */ -#define HIGHPOS 020 -#define DDBPOS 024 -#define CLKPOS 030 -#define NETPOS 034 -#define BIOPOS 040 -#define TTYPOS 044 -#define SNETPOS 050 -#define SCLKPOS 054 - - .data - .globl avail_start /* Physical memory availability */ - .globl avail_end - .globl proc0paddr,ept -avail_start: .long 0 -avail_end: .long 0 -proc0paddr: .long 0 -istack: .long 0 -ept: .long 0 -#ifdef DDB -ddbstack: .long 0 -#endif - -/* Longwords to switch between register blocks quick */ -moniw: .long 0400100000000 /* Current block 0, previous user */ -useriw: .long 0401100000000 /* Current user, previous user */ -intiw: .long 0402000000000 /* Current int, previous monitor */ -ddbiw: .long 0403000000000 /* Current ddb, previous monitor */ - -ENTRY(start) - - /* - * Set interrupt stack directly after end, - * and at least one page in size. - */ - xmovei %10,end - movem %10,istack - addi %10,2*PGSZ - trz %10,PGMSK # trunc to page boundary - datao %PAG,intiw # switch to interrupt block - move %17,istack # set interrupt stack - datao %PAG,moniw # back to monitor block - - /* - * Setup Executive Process Table as next. - */ - movem %10,ept - move %1,010 - skipa %2,.+1 - pushj %17,earov - movem %2,0421(%1) - PTOFF(0422,jrst esov) - PTOFF(0423,jrst etrap3) - - /* - * Interrupt setup. This is somewhat hairy, the interrupt protocol - * on KL10 is not simple. Page 0 in memory is used for xpcw. - */ - INTRDEF(0514,CLKPOS,_hardclock) - INTRDEF(040,HIGHPOS,panic) /* Yech! */ - INTRDEF(042,DDBPOS,_ddbintr) -/* INTRDEF(044,CLKPOS,_hardclock) separate vector */ - INTRDEF(046,NETPOS,_netintr) - INTRDEF(050,BIOPOS,_biointr) - INTRDEF(052,TTYPOS,_ttyintr) - INTRDEF(054,SNETPOS,_softnet) - INTRDEF(056,SCLKPOS,_softclock) - - addi %10,PGSZ - /* - * Process 0 user area (proc0paddr) located directly thereafter. - * Guard pages? - */ - movem %10,proc0paddr - addi %10,PGSZ /* Skip UPT */ - move %17,%10 /* Process 0 stackpointer XXX uarea */ - addi %10,PGSZ /* The rest of USPACE */ - move %1,proc0paddr - pushj %17,setup_upt /* Set trap addresses */ - -#ifdef DDB - movem %10,ddbstack # ddb has a private stack - addi %10,PGSZ # make it one page in size - movsi %1,0403000 # set ac block, current == 3 - datao %PAG,1 # doit! - move %17,ddbstack # put stack address in stack pointer - datao %PAG,moniw # back to monitor ac block, -#endif - - movem %10,avail_start /* available memory */ - - /* - * Setup memory management. - */ - pushj %17,pmap_bootstrap - - /* - * Done here, jump to main now. - */ - pushj %17,main - HALT(1) - -/* - * Check if this address is nonexisting. - */ -ENTRY(badaddr) - move %3,proc0paddr+0503 # save old trap pc - xmovei %4,bad1 # address if trapping - movem %4,proc0paddr+0503 # set new address - move %2,020(%1) # skip register block - movem %3,proc0paddr+0503 # restore trap handler - movei %1,0 # not a bad address - popj %17, - -bad1: movem %3,proc0paddr+0503 # restore trap handler - movei %1,1 # was bad address - popj %17, - -/* - * Copy routines. - */ - .data -reta: .long 0 # return address after fault -retv: .long 0 # return value - -ENTRY(copyin) HALT(017) -ENTRY(copyout) HALT(022) -ENTRY(copyinstr) HALT(023) -ENTRY(copyoutstr) HALT(024) - -/* - * Copy string in-kernel. - * Check for fault in trap routine, not here. - * XXX - *done length is wrong if it faults, is this OK? - */ -ENTRY(copystr) -jrst %4,0567 - xmovei %6,L_cps3 # r6 = &L_cps3; - movem %6,reta # reta = r6 - setzm retv # retv = 0; - move %6,%3 # olen = len - -L_cps2: subi %3,1 # len-- - camn %3,[.long -1] # if (len == -1) - jrst L_cps1 # goto L_cps1 - ldb %7,%1 # r7 = *from - dpb %7,%2 # *to = r7 - ibp %1 # from++; - ibp %2 # to++; - jumpn %7,L_cps2 # if (r7 != 0) goto L_cps2 - -L_cps1: jumpe %4,L_cps3 # if (done == 0) goto L_cps3 - sub %6,%3 # olen -= len; - addi %6,1 # olen++; - movem %6,(%4) # *done = olen; - -L_cps3: move %1,retv # r1 = retv - popj %17, # return r1; - - - -ENTRY(kcopy) HALT(026) - -ENTRY(suword) HALT(027) -ENTRY(subyte) HALT(030) -ENTRY(suswintr) HALT(031) -ENTRY(fuswintr) HALT(032) - -/* - * spl routines should be macron in the future. - */ -#define SVPRI coni PI,%1 ; andi %1,PI_ALL -#define ALTERSPL(val) SVPRI ; cono PI,(PI_LVLOFF|val) ; popj SP, - -ENTRY(splhigh) - ALTERSPL(PI_ALL) # Block all levels - -ENTRY(splclock) - ALTERSPL(PI_CLOCK) # Block hardclock - -ENTRY(splnet) - ALTERSPL(PI_NET) # Block network adapters - -ENTRY(splsched) - ALTERSPL(PI_ALL) # Block all levels XXX - -ENTRY(splvm) - ALTERSPL(PI_BIO|PI_TTY|PI_NET) # Block disks, ttys and network adapters - -ENTRY(spllock) - ALTERSPL(PI_ALL) # Block all levels XXX - -ENTRY(splbio) - ALTERSPL(PI_BIO) # Block disks - -ENTRY(splstatclock) - ALTERSPL(PI_CLOCK) # Block hardclock - -ENTRY(splsoftnet) - ALTERSPL(PI_SOFTCLOCK) # Block soft network protocols - -ENTRY(spltty) - ALTERSPL(PI_TTY) # Block ttys - -ENTRY(spl0) # Unblock everything - cono PI,PI_LVLON|PI_ON|PI_ALL - popj SP, - -ENTRY(splraiseipl) - SVPRI - move %2,-1(SP) - cono PI,%2 - popj SP, - -/* - * Lower the current interrupt level. If softclock was blocked but is - * now unblocked, call for an interrupt. - */ -ENTRY(splx) - move %1,-1(SP) - iori %1,PI_LVLON - cono PI,(%1) - skipn %1,L_want_soft # Skip if any softbit is set - popj SP, - trne %1,PI_SOFTCLOCK # Skip if softclock not set. - pushj SP,setsoftclock # Try to send another - trne %1,PI_SOFTNET # Skip if softnet not set. - pushj SP,setsoftnet # Try to send another setsoftnet - popj SP, - - .data -L_want_soft: - .long 0 - -/* - * Ask for a softclock interrupt. If softclock is blocked, set a flag that - * posts a softclock interrupt when it is unblocked. - */ -ENTRY(setsoftclock) - coni PI,%1 # get current interrupt mask - trne %1,PI_SOFTCLOCK # skip if masked - cono PI,PI_INIT|PI_SOFTCLOCK # send interrupt request - movei %1,PI_SOFTCLOCK - iorm %1,L_want_soft # request soft intr - popj SP, - -ENTRY(setsoftnet) - coni PI,%1 # get current interrupt mask - trne %1,PI_SOFTNET # skip if masked - cono PI,PI_INIT|PI_SOFTNET # send interrupt request - movei %1,PI_SOFTNET - iorm %1,L_want_soft # request soft intr - popj SP, - -ENTRY(sigcode) - HALT(0) -ENTRY(esigcode) - -ENTRY(signotify) - popj %17, - -ENTRY(need_proftick) HALT(066) - -earov: - - HALT(067) -esov: HALT(070) -etrap3: HALT(071) - -/* - * Interrupt handling stuff - */ -#define INTR_SAVE(myword) \ - datai PAG,myword ; datao PAG,intiw ; \ - xmovei SP,011(SP) ; dmovem %0,-010(SP) ; dmovem %2,-6(SP) ; \ - dmovem %4,-4(SP) ; dmovem %6,-2(SP) ; move %1,myword ; movem %1,(SP) -#define INTR_RESTORE(myword) \ - move %1,(SP) ; tlz %1,0100000 ; movem %1,myword ; dmove %6,-2(SP) ; \ - dmove %4,-4(SP) ; dmove %2,-6(SP) ; dmove %0,-010(SP) ; \ - xmovei %17,-011(SP) ; datao %PAG,myword ; - - .data -L_hcpw: .long 0 /* Saved pager word at hardclock */ -L_scpw: .long 0 /* Saved pager word at softclock */ -L_biow: .long 0 /* Saved pager word at diskintr */ -L_ddbw: .long 0 /* Saved pager word at ddb */ - - .text - -#ifdef DDB -# Workaround for buggy assembler -xct1: blt %1,ddb_regs+15 -xct2: blt %1,015 -#endif - -/* - * Save a trapframe onto the interrupt stack with the current - * register contents. First set the previous context correct. - */ -_ddbintr: -#ifdef DDB - datai %PAG,L_ddbw ; datao %PAG,ddbiw - hllz %1,L_ddbw # fetch only left-half of pager word - tlz %1,0770777 # clear everything except "current" AC block - lsh %1,-3 # put ac block in previous position - ior %1,ddbiw # create pager word - datao %PAG,01 # set correct previous context - - movei %1,ddb_regs # only lower 18 bits please - xct %1,xct1 # pxct, fetch regs - move %2,@[ .long DDBPOS+1 ] # get pc - xmovei %1,ddb_regs - movem %2,020(%1) # store pc - - pushj %17,ddbintr - - movsi %1,ddb_regs - xct %4,xct2 # restore regs - xmovei %1,ddb_regs - move %2,020(%1) - movem %2,@[ .long DDBPOS+1 ] - -#endif - cono PI,020100 # clear ddb interrupt - xjen @[.long DDBPOS] - -_hardclock: - cono TIM,061750 # Clear timer interrupt - INTR_SAVE(L_hcpw) - xmovei %1,(SP) # Clock frame - pushj SP,hardclock - INTR_RESTORE(L_hcpw) - xjen @[.long CLKPOS] - -_netintr: - HALT(072) - -_biointr: -#if 1 - INTR_SAVE(L_biow) - pushj SP,rhintr - INTR_RESTORE(L_biow) - xjen @[.long BIOPOS] -#else - HALT(073) -#endif - -_ttyintr: - HALT(074) - -_softnet: - HALT(075) - -_softclock: - INTR_SAVE(L_scpw) - pushj SP,softclock - INTR_RESTORE(L_scpw) - cono PI,PI_DROP|PI_SOFTCLOCK # clear softclock interrupt - movei %1,2 - andi %1,L_want_soft # clear request word - xjen @[.long SCLKPOS] - - -ENTRY(pcb_ovtrap) HALT(0421) -ENTRY(pcb_ovstack) HALT(0422) -ENTRY(pcb_trap3) HALT(0423) -ENTRY(pcb_knotrap) HALT(0430) -ENTRY(pcb_ktrap) HALT(0431) -ENTRY(pcb_snotrap) HALT(0432) -ENTRY(pcb_strap) HALT(0433) -ENTRY(pcb_cnotrap) HALT(0434) -ENTRY(pcb_ctrap) HALT(0435) -ENTRY(pcb_pnotrap) HALT(0436) -ENTRY(pcb_ptrap) HALT(0437) - -ENTRY(pcb_pfnpc) - push SP,proc0paddr - pushj SP,pagefail - HALT(0503); - -/* - * Write the needed trap addresses into a new User Process Table. - * The UPT page must be zeroed before call. Pointer to it in reg 1. - */ -ENTRY(setup_upt) - PTOFF(0421, jrst pcb_ovtrap) - PTOFF(0422, jrst pcb_ovstack) - PTOFF(0423, jrst pcb_trap3) - PTOFF(0430, .long pcb_knotrap) - PTOFF(0431, .long pcb_ktrap) - PTOFF(0432, .long pcb_snotrap) - PTOFF(0433, .long pcb_strap) - PTOFF(0434, .long pcb_cnotrap) - PTOFF(0435, .long pcb_ctrap) - PTOFF(0436, .long pcb_pnotrap) - PTOFF(0437, .long pcb_ptrap) - PTOFF(0503, .long pcb_pfnpc) - popj SP, - -#ifdef __PCC__ -ENTRY(datao) - move %1,-1(%17) # get device - lsh %1,030 # shift left 24 step - ior %1,[.long 0700140000002 ] # create instruction - move %2,-2(%17) # get value - xct %1 # doit! - popj %17, - -ENTRY(datai) - move %1,-1(%17) # get device - lsh %1,030 # shift left 24 step - ior %1,[.long 0700040000001 ] # create instruction - xct %1 # doit! - popj %17, - -ENTRY(cono) - move %1,-1(%17) # get device - lsh %1,030 # shift left 24 step - tlo %1,0700200 # create instruction - hrr %1,-2(%17) # get value - xct %1 # doit! - popj %17, - -ENTRY(coni) - move %1,-1(%17) # get device - lsh %1,030 # shift left 24 step - ior %1,[.long 0700240000001 ] # create instruction - xct %1 # doit! - popj %17, - -ENTRY(blko) - HALT(0604); - -ENTRY(blki) - move %1,-1(%17) # get device - lsh %1,030 # shift left 24 step - ior %1,[.long 0700000000001 ] # create instruction - xct %1 - popj %17, - -ENTRY(clrpt) - HALT(0606); -#endif - -#ifdef DDB -ENTRY(setjmp) - move %1,-1(%17) # Get jmp_buf pointer - move %2,(%17) # Get return PC - movem %2,1(%1) # Save PC - move %2,%17 # Get SP - movem %2,2(%1) # Save SP - movem %16,3(%1) # Save FP - dmovem %10,010(%1) # Save reg 10+11 - dmovem %12,012(%1) # Save reg 12+13 - dmovem %14,014(%1) # Save reg 14+15 - setz %1, # Return 0 - popj %17, - -ENTRY(longjmp) - move %3,-1(%17) # Get jmp_buf pointer - move %1,-2(%17) # Get return value - dmove %14,014(%3) # Restore reg 14+15 - dmove %12,012(%3) # Restore reg 12+13 - dmove %10,010(%3) # Restore reg 10+11 - move %16,3(%3) # Restore FP - move %17,2(%3) # Restore SP - move %2,1(%3) # Get return PC - movem %2,(%17) # Save PC - popj %17, - -ENTRY(cpu_Debugger) - cono PI,06300 # debugger runs on IPL 1 -jrst %4,.+1 - popj %17, -#endif diff --git a/sys/arch/pdp10/pdp10/machdep.c b/sys/arch/pdp10/pdp10/machdep.c deleted file mode 100644 index 21ce0dc6f81..00000000000 --- a/sys/arch/pdp10/pdp10/machdep.c +++ /dev/null @@ -1,212 +0,0 @@ -/* $NetBSD: machdep.c,v 1.12 2007/03/04 06:00:30 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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> -#include <sys/signal.h> -#include <sys/proc.h> -#include <sys/ptrace.h> -#include <sys/systm.h> -#include <sys/mount.h> -#include <sys/syscallargs.h> -#include <sys/reboot.h> -#include <sys/sysctl.h> -#include <sys/msgbuf.h> -#include <sys/mbuf.h> -#include <sys/buf.h> -#include <sys/conf.h> - -#include <machine/intr.h> - -#include <dev/cons.h> - -int physmem; -struct cpu_info cpu_info_store; -struct vm_map *exec_map, *mb_map; -char machine[] = MACHINE; /* from <machine/param.h> */ -char machine_arch[] = MACHINE_ARCH; /* from <machine/param.h> */ -char cpu_model[100]; -void *msgbufaddr; - -void -cpu_startup() -{ - extern int avail_end; - vaddr_t minaddr, maxaddr; - char pbuf[9]; - - spl0(); /* Enable interrupts */ - - /* - * Initialize error message buffer. - */ - initmsgbuf(msgbufaddr, round_page(MSGBUFSIZE)); - - /* - * Good {morning,afternoon,evening,night}. - */ - printf("%s%s", copyright, version); - format_bytes(pbuf, sizeof(pbuf), avail_end); - pbuf[strlen(pbuf)-1] = 0; /* Remove 'B' */ - printf("total memory = %sW\n", pbuf); - - minaddr = 0; - /* - * Allocate a submap for exec arguments. This map effectively limits - * the number of processes exec'ing at any time. - * At most one process with the full length is allowed. - */ - exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, - NCARGS/4, VM_MAP_PAGEABLE, false, NULL); - - /* - * allocate mbuf cluster submap. - */ - mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, - nmbclusters * mclbytes, VM_MAP_INTRSAFE, false, NULL); - - format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free)/4); - pbuf[strlen(pbuf)-1] = 0; /* Remove 'B' */ - printf("avail memory = %sW\n", pbuf); - -#ifdef DDB - if (boothowto & RB_KDB) - Debugger(); -#endif - - kl10_conf(); -} - -void -consinit() -{ - void dtecninit(struct consdev *); - dtecninit(NULL); -} - -int -process_read_regs(struct lwp *p, struct reg *regs) -{ - panic("process_read_regs"); - return 0; -} - -void -cpu_dumpconf() -{ - panic("cpu_dumpconf"); -} - -void -setstatclockrate(int hzrate) -{ -} - -int -sys___sigreturn14(struct lwp *p, void *v, register_t *retval) -{ - panic("sys___sigreturn14"); - return 0; -} - -void -sendsig(int sig, const sigset_t *mask, u_long code) -{ - panic("sendsig"); -} - -void -cpu_lwp_free(struct lwp *l, int proc) -{ - panic("cpu_lwp_free"); -} - -void -cpu_exit(struct lwp *l) -{ - panic("cpu_exit"); -} - -void -cpu_reboot(int howto, char *b) -{ - printf("cpu_reboot\n"); - asm("jrst 4,0765432"); - panic("foo"); -} - -int -process_set_pc(struct lwp *p, void *addr) -{ - panic("process_set_pc"); -} - -int -process_sstep(struct lwp *p, int sstep) -{ - panic("process_sstep"); -} - -int -process_write_regs(struct lwp *p, const struct reg *regs) -{ - panic("process_write_regs"); -} - -void -cpu_getmcontext(struct lwp *l, mcontext_t *mcp, unsigned int *flags) -{ - panic("cpu_getmcontext"); -} - -int -cpu_setmcontext(struct lwp *l, const mcontext_t *mcp, unsigned int flags) -{ - panic("cpu_setmcontext"); - return 0; -} - -int -cpu_switch (struct lwp *p, struct lwp *op) -{ - panic("cpu_switch"); -} - -void -cpu_switchto (struct lwp *p, struct lwp *op) -{ - panic("cpu_switchto"); -} - -ipl_cookie_t -makeiplcookie(ipl_t ipl) -{ - ipl_cookie_t icookie; - - icookie._pi = PI_LVLOFF | IPL2PI(ipl); - return icookie; -} diff --git a/sys/arch/pdp10/pdp10/mem.c b/sys/arch/pdp10/pdp10/mem.c deleted file mode 100644 index e97ff2c4222..00000000000 --- a/sys/arch/pdp10/pdp10/mem.c +++ /dev/null @@ -1,162 +0,0 @@ -/* $NetBSD: mem.c,v 1.3 2007/03/04 06:00:30 christos Exp $ */ - -/* - * Copyright (c) 1988 University of Utah. - * Copyright (c) 1982, 1986, 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * the Systems Programming Group of the University of Utah Computer - * Science Department. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)mem.c 8.3 (Berkeley) 1/12/94 - */ - -/* - * Memory special file - */ - -#include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.3 2007/03/04 06:00:30 christos Exp $"); - -#include "opt_compat_netbsd.h" - -#include <sys/param.h> -#include <sys/buf.h> -#include <sys/systm.h> -#include <sys/uio.h> -#include <sys/malloc.h> -#include <sys/proc.h> -#include <sys/fcntl.h> -#include <sys/conf.h> - -#include <uvm/uvm_extern.h> - -extern char *vmmap; /* poor name! */ -void *zeropage; - -dev_type_read(mmrw); -dev_type_ioctl(mmioctl); - -const struct cdevsw mem_cdevsw = { - nullopen, nullclose, mmrw, mmrw, mmioctl, - nostop, notty, nopoll, nommap, nokqfilter, -}; - -/*ARGSUSED*/ -int -mmrw(dev, uio, flags) - dev_t dev; - struct uio *uio; - int flags; -{ - register vaddr_t o, v; - register int c; - register struct iovec *iov; - int error = 0; - static int physlock; - vm_prot_t prot; - - if (minor(dev) == DEV_MEM) { - /* lock against other uses of shared vmmap */ - while (physlock > 0) { - physlock++; - error = tsleep((void *)&physlock, PZERO | PCATCH, - "mmrw", 0); - if (error) - return (error); - } - physlock = 1; - } - while (uio->uio_resid > 0 && !error) { - iov = uio->uio_iov; - if (iov->iov_len == 0) { - uio->uio_iov++; - uio->uio_iovcnt--; - if (uio->uio_iovcnt < 0) - panic("mmrw"); - continue; - } - switch (minor(dev)) { - case DEV_MEM: - v = uio->uio_offset; - prot = uio->uio_rw == UIO_READ ? VM_PROT_READ : - VM_PROT_WRITE; - pmap_enter(pmap_kernel(), (vaddr_t)vmmap, - trunc_page(v), prot, PMAP_WIRED|prot); - pmap_update(pmap_kernel()); - o = uio->uio_offset & PGOFSET; - c = min(uio->uio_resid, (int)(PAGE_SIZE - o)); - error = uiomove((void *)vmmap + o, c, uio); - pmap_remove(pmap_kernel(), (vaddr_t)vmmap, - (vaddr_t)vmmap + PAGE_SIZE); - pmap_update(pmap_kernel()); - break; - - case DEV_KMEM: - v = uio->uio_offset; - c = min(iov->iov_len, MAXPHYS); - if (!uvm_kernacc((void *)v, c, - uio->uio_rw == UIO_READ ? B_READ : B_WRITE)) - return (EFAULT); - error = uiomove((void *)v, c, uio); - break; - - case DEV_NULL: - if (uio->uio_rw == UIO_WRITE) - uio->uio_resid = 0; - return (0); - - case DEV_ZERO: - if (uio->uio_rw == UIO_WRITE) { - uio->uio_resid = 0; - return (0); - } - if (zeropage == NULL) { - zeropage = (void *) - malloc(PAGE_SIZE, M_TEMP, M_WAITOK); - memset(zeropage, 0, PAGE_SIZE); - } - c = min(iov->iov_len, PAGE_SIZE); - error = uiomove(zeropage, c, uio); - break; - - default: - return (ENXIO); - } - } - if (minor(dev) == DEV_MEM) { - if (physlock > 1) - wakeup((void *)&physlock); - physlock = 0; - } - return (error); -} diff --git a/sys/arch/pdp10/pdp10/pmap.c b/sys/arch/pdp10/pdp10/pmap.c deleted file mode 100644 index c9e3cb93850..00000000000 --- a/sys/arch/pdp10/pdp10/pmap.c +++ /dev/null @@ -1,393 +0,0 @@ -/* $NetBSD: pmap.c,v 1.5 2007/03/04 06:00:30 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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> -#include <sys/systm.h> -#include <sys/malloc.h> - -#include <uvm/uvm_extern.h> -#include <uvm/uvm.h> - -#include <dev/cons.h> - -#include <machine/pcb.h> -#include <machine/io.h> - -#define PGSH 9 /* Page shift in words */ -#define PGSZ (1 << PGSH) /* Page size in words */ -#define SECTSZ (PGSZ << PGSH) /* Size of a section */ -#define NSECT 32 /* 32 sections */ -#define PTOV_COMP 2 /* Shift to compensate for word addresses */ - -#define SEGNO(addr) ((addr) >> 18) /* Get segment */ -#define PGINSEG(page) (((page) & 0777000) >> PGSH) -#define PGNO(page) ((page) >> PGSH) - -#define mk2word(x) ((x) /= 4) -#define word2byte(x) ((x) * 4) - -#define PMAPDEBUG -#ifdef PMAPDEBUG -int startpmapdebug = 0; -#define PMDEBUG(x) if (startpmapdebug)printf x -#else -#define PMDEBUG(x) -#endif - -#ifdef __GNUC__ -#define CLRPT(x) \ - asm("move 6,%0 \n .long 0701106000000" : : "r"(x) : "6"); -#endif -#ifdef __PCC__ -#define CLRPT(x) clrpt(x) -void clrpt(int); -#endif - -void pmap_bootstrap(void); -int badaddr(int addr); - -struct pmap kernel_pmap_store; -char *vmmap; -static int *mapaddr, *mappte; /* Used for pmap_{copy,zero}_page */ -extern int avail_start, avail_end; /* These are in words, not bytes */ -extern struct ept *ept; -extern int proc0paddr; - -void -pmap_bootstrap() -{ - int i, guardpage; - extern void *msgbufaddr; - TUNION uu; - - /* - * Setup executive and user process table but do not enable paging. - */ - DATAO(PAG,proc0paddr >> PGSH | PAG_DATA_LUBA | PAG_DATA_DNUA); - CONO(PAG, TPTOINT(ept) >> PGSH); - -#ifdef notyet - /* Count up memory */ - for (i = 1*1024*1024; ; i += PGSZ) - if (badaddr(i)) - break; -#else - i = 4*1024*1024; -#endif - avail_end = i; - -#ifdef DEBUG - { - extern int end[]; - consinit(); - printf("Kernel end %o kstack end %o\n", end, avail_start); - printf("EPT %o UPT %o\n", ept, proc0paddr); - } -#endif - - /* - * Enter the following 32 pages as kernel page table pages. - * Skip section 0 page, and let it act as a guard page. - */ - guardpage = avail_start; - for (i = 0; i < NSECT; i++) { - ept->ept_section[i] = PG_IMM|PG_WRITE | PGNO(avail_start); - avail_start += PGSZ; - } - /* Map kernel memory 1:1 */ - for (i = KERNBASE; i < avail_start; i += PGSZ) - pmap_kenter_pa(i*4, i*4, VM_PROT_READ|VM_PROT_WRITE); - - /* Map in page 0 at page 0. It is used for interrupts */ - pmap_kenter_pa(0, 0, VM_PROT_READ|VM_PROT_WRITE); - - /* Remove section page for section 0. Used as a guard page */ - { /* XXX - use pmap_kremove */ - int *ptep = TINTTOP((ept->ept_section[1] & 07777777) << PGSH); - mappte = &ptep[PGINSEG(guardpage)]; - mapaddr = TINTTOP(guardpage); - ptep[PGINSEG(guardpage)] = 0; - } - - /* Set logical page size */ - uvmexp.pagesize = NBPG; - uvm_setpagesize(); - physmem = avail_end/PGSZ; - - /* Kernel message buffer */ - avail_end -= MSGBUFSIZE/4; - msgbufaddr = TINTTOCP(avail_start | 0700000000000); - for (i = 0; i < MSGBUFSIZE/4; i += PGSZ) - pmap_kenter_pa(word2byte(avail_start+i), - word2byte(avail_end+i), VM_PROT_READ|VM_PROT_WRITE); - avail_start += MSGBUFSIZE/4; - - /* - * Give away memory to UVM. - */ - uvm_page_physload(avail_start >> PGSH, avail_end >> PGSH, - avail_start >> PGSH, avail_end >> PGSH, VM_FREELIST_DEFAULT); -#ifdef notyet - /* Lost section zero pages */ - uvm_page_physload(0, PGSZ. 0, PGSZ, VM_FREELIST_DEFAULT); -#endif -#if 0 - kernel_pmap_store.pm_count = 1; - simple_lock_init(&kernel_pmap_store.pm_lock); -#endif - - /* - * Ready! Turn on paging. - */ - CONO(PAG,TPTOINT(ept) >> PGSH | PAG_CON_ENABLE | PAG_CON_T20); - DATAO(PAG,proc0paddr >> PGSH | PAG_DATA_LUBA | PAG_DATA_DNUA); - -#ifdef DEBUG - printf("section pages at %o\n", guardpage); - printf("\n"); -#endif -} - -void -pmap_virtual_space(vaddr_t *v1, vaddr_t *v2) -{ - *v1 = avail_start * sizeof(int); - *v2 = 0200000000; /* Max virtual memory address in bytes */ -} - -long -pmap_resident_count(pmap_t pmap) -{ - panic("pmap_resident_count"); -} - -void -pmap_update(pmap_t pmap) -{ -} - -void -pmap_kenter_pa(vaddr_t v, paddr_t p, vm_prot_t prot) -{ - int seg, off, pte, *ptep; - TUNION uu; - - seg = (v >> 20) & 0777; - off = (v >> 11) & 0777; - - PMDEBUG(("pmap_kenter_pa: va: %lo, pa %lo, prot %o\n", v/4, p/4, prot)); - - if (ept->ept_section[seg] == 0) - panic("pmap_kenter_pa: need to add section, va %o", v); - ptep = TINTTOP(((ept->ept_section[seg] & 07777777) << PGSH)); - pte = PG_IMM | (p >> 11); - if (prot & VM_PROT_WRITE) - pte |= PG_WRITE; - ptep[off] = pte; -} - -void -pmap_kremove(vaddr_t v, vsize_t size) -{ - panic("pmap_kremove"); -} - -bool -pmap_clear_modify(struct vm_page *vm) -{ - panic("pmap_clear_modify"); -} - -void -pmap_page_protect(struct vm_page *vm, vm_prot_t prot) -{ - panic("pmap_page_protect"); -} - -bool -pmap_clear_reference(struct vm_page *vm) -{ - panic("pmap_clear_reference"); -} - -void -pmap_remove(pmap_t pmap, vaddr_t v1, vaddr_t v2) -{ - panic("pmap_remove"); -} - -/* - * Get the physical page address for the virtual address v. - * Return false if no mapping exists. - */ -bool -pmap_extract(pmap_t pmap, vaddr_t v, paddr_t *pp) -{ - int nv = v >> PTOV_COMP; - int seg, pga, pg, *pgp, paddr; - - if (pmap != pmap_kernel()) - panic("pmap_extract"); - seg = SEGNO(nv); - if (((pga = ept->ept_section[seg]) & PG_IMM) == 0) - return false; - pg = PGINSEG(nv); - pgp = (int *)(((pga << PGSH) & 017777777) << PTOV_COMP); - if (((paddr = pgp[pg]) & PG_IMM) == 0) - return false; - *pp = (paddr << PGSH) & 037777777; - *pp <<= PTOV_COMP; - return true; -} - -int -pmap_enter(pmap_t pmap, vaddr_t v, paddr_t p, vm_prot_t prot, int flags) -{ - PMDEBUG(("pmap_enter: pmap %o v %o p %o prot %o access %o\n", - pmap, v/4, p/4, prot, flags & VM_PROT_ALL)); - - if (pmap != pmap_kernel()) - panic("user mapping"); - pmap_kenter_pa(v, p, prot); /* XXX */ - return 0; -} - -paddr_t -pmap_phys_address(int a) -{ - panic("pmap_phys_address"); -} - -void -pmap_unwire(pmap_t pmap, vaddr_t v) -{ - panic("pmap_unwire"); -} - -void -pmap_collect(pmap_t pmap) -{ - panic("pmap_collect"); -} - -void -cpu_swapout(struct lwp *p) -{ - panic("cpu_swapout"); -} - -void -cpu_swapin(struct lwp *p) -{ - panic("cpu_swapin"); -} - -/* - * Increment the reference count. - */ -void -pmap_reference(pmap_t pmap) -{ -#ifdef notyet - pmap->pm_count++; -#endif -} - -void -pmap_protect(pmap_t pmap, vaddr_t v1, vaddr_t v2, vm_prot_t prot) -{ - panic("pmap_protect"); -} - -void -pmap_destroy(pmap_t pmap) -{ - panic("pmap_destroy"); -} - -void -pmap_activate(struct lwp *p) -{ - panic("pmap_activate"); -} - -void -pmap_deactivate(struct lwp *p) -{ - panic("pmap_deactivate"); -} - -struct pmap * -pmap_create() -{ - struct pmap *pmap; - - MALLOC(pmap, struct pmap *, sizeof(*pmap), M_VMPMAP, M_WAITOK); - memset(pmap, 0, sizeof(struct pmap)); - return (pmap); -} - -void -pmap_copy(pmap_t pm1, pmap_t pm2, vaddr_t v1, vsize_t ax, vaddr_t v2) -{ - panic("pmap_copy"); -} - -void -pmap_zero_page(paddr_t p) -{ - PMDEBUG(("pmap_zero_page: paddr %o\n", p >> 2)); - mk2word(p); - - *mappte = PG_IMM | PG_WRITE | PGNO(p); - memset(mapaddr, 0, PGSZ); - *mappte = 0; - CLRPT((int)mapaddr); -} - -void -pmap_copy_page(paddr_t p1, paddr_t p2) -{ - panic("pmap_copy_page"); -} - -/* - * Init VM pmap system. Nothing special to do. - */ -void -pmap_init() -{ -} - -/* - * Remove all mappings. - */ -void -pmap_remove_all(struct pmap *p) -{ -} diff --git a/sys/arch/pdp10/pdp10/trap.c b/sys/arch/pdp10/pdp10/trap.c deleted file mode 100644 index 6ab5e34586b..00000000000 --- a/sys/arch/pdp10/pdp10/trap.c +++ /dev/null @@ -1,66 +0,0 @@ -/* $NetBSD: trap.c,v 1.3 2007/02/09 21:55:09 ad Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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> -#include <sys/systm.h> -#include <sys/exec.h> -#include <sys/proc.h> - -#include <machine/pcb.h> - -void syscall(void); -void pagefail(struct pcb *pcb); - -void -pagefail(struct pcb *pcb) -{ - printf("pagefail at %o word %012o flags %012o\n", pcb->pcb_pfopc, - pcb->pcb_pfw, pcb->pcb_pff); - - panic("pagefail"); -} - - - -void -syscall(void) -{ - panic("syscall"); -} - -void -setregs(struct lwp *p, struct exec_package *epp, u_long stack) -{ - panic("setregs"); -} - -void -child_return(void *arg) -{ - panic("child_return"); -} diff --git a/sys/arch/pdp10/pdp10/vm_machdep.c b/sys/arch/pdp10/pdp10/vm_machdep.c deleted file mode 100644 index 4c62701afba..00000000000 --- a/sys/arch/pdp10/pdp10/vm_machdep.c +++ /dev/null @@ -1,81 +0,0 @@ -/* $NetBSD: vm_machdep.c,v 1.5 2007/02/09 21:55:09 ad Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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> -#include <sys/signalvar.h> -#include <sys/proc.h> -#include <sys/mount.h> -#include <sys/syscallargs.h> - -#include <uvm/uvm_extern.h> - -int -cpu_coredump(struct lwp *p, void *iocookie, struct core *chdr) -{ - return 0; -} - -int -sys_sysarch(struct lwp *p, void *v, register_t *retval) -{ - return (ENOSYS); -} - -void -vmapbuf(struct buf *bp, vsize_t len) -{ - panic("vmapbuf"); -} - -void -vunmapbuf(struct buf *bp, vsize_t len) -{ - panic("vunmapbuf"); -} - -void -cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize, - void (*func)(void *), void *arg) -{ - panic("cpu_lwp_fork"); -} - -void -cpu_setfunc(struct lwp *l, void (*func)(void *), void *arg) -{ - panic("cpu_setfunc"); -} - -/* - * Start a new LWP - */ -void -startlwp(void *arg) -{ - panic("startlwp"); -} diff --git a/sys/lib/libkern/arch/pdp10/Makefile.inc b/sys/lib/libkern/arch/pdp10/Makefile.inc deleted file mode 100644 index e1bd33434c7..00000000000 --- a/sys/lib/libkern/arch/pdp10/Makefile.inc +++ /dev/null @@ -1,8 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.2 2005/12/11 12:24:44 christos Exp $ -# -# The rest of the lib routines are in machine/macros.h -# -SRCS+= __assert.c __main.c memset.c skpc.c scanc.c random.c \ - strcasecmp.c strncasecmp.c strncmp.c strtoul.c ffs.c \ - strncpy.c memcmp.c strcat.c strcpy.c strcmp.c strlen.c \ - memchr.c structcpy.c alloca.S diff --git a/sys/lib/libkern/arch/pdp10/alloca.S b/sys/lib/libkern/arch/pdp10/alloca.S deleted file mode 100644 index cce1df84dd5..00000000000 --- a/sys/lib/libkern/arch/pdp10/alloca.S +++ /dev/null @@ -1,39 +0,0 @@ -/* $NetBSD: alloca.S,v 1.2 2005/12/11 12:24:44 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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 <machine/asm.h> - -/* - * Simple alloca implementation for pdp10. - */ -ENTRY(alloca) - move %1,%17 # stackpointer == return value - move %2,-1(%17) # get number of bytes - lsh %2,-2 # divide by four to get words - add %17,%2 # increase stackpointer - jrst (%1) # jump back diff --git a/sys/lib/libkern/arch/pdp10/structcpy.c b/sys/lib/libkern/arch/pdp10/structcpy.c deleted file mode 100644 index 51ab86a2128..00000000000 --- a/sys/lib/libkern/arch/pdp10/structcpy.c +++ /dev/null @@ -1,38 +0,0 @@ -/* $NetBSD: structcpy.c,v 1.2 2005/12/11 12:24:44 christos Exp $ */ -/* - * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). - * 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. - */ - -/* - * Function called from compiler to do structure copies. - */ -void -__structcpy(int *from, int *to, int len) -{ - len /= 4; - while (len--) - *to++ = *from++; -} |
