diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-05-08 17:34:54 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-05-08 17:34:54 +0000 |
commit | b7d211a2451c1f0906a61e2e2f40466cc4561b6c (patch) | |
tree | c56c85e6046582d46afcc90e4b8a090dd91ca78f /sys/arch/pmax/include | |
parent | bd45d489f1b3978942dd76a0a5026a2b7d663284 (diff) |
use what we can from mips/include
Diffstat (limited to 'sys/arch/pmax/include')
24 files changed, 52 insertions, 1804 deletions
diff --git a/sys/arch/pmax/include/README b/sys/arch/pmax/include/README new file mode 100644 index 00000000000..80e818ca54a --- /dev/null +++ b/sys/arch/pmax/include/README @@ -0,0 +1,6 @@ +The following could/should probably be shared too: + param.h + pmap.h + ptrace.h + varargs.h + vmparam.h diff --git a/sys/arch/pmax/include/cdefs.h b/sys/arch/pmax/include/cdefs.h index 6812d5fcc4a..7bf0c0ab67f 100644 --- a/sys/arch/pmax/include/cdefs.h +++ b/sys/arch/pmax/include/cdefs.h @@ -1,59 +1,3 @@ -/* $NetBSD: cdefs.h,v 1.4 1995/12/15 01:17:04 jonathan Exp $ */ +/* $OpenBSD: cdefs.h,v 1.7 1998/05/08 17:34:28 millert Exp $ */ -/* - * Copyright (c) 1995 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#ifndef _MACHINE_CDEFS_H_ -#define _MACHINE_CDEFS_H_ - -#define _C_LABEL(x) _STRING(x) - -#define __indr_references(sym,msg) /* nothing */ -#define __warn_references(sym,msg) /* nothing */ - -/* Kernel-only .sections for kernel copyright */ -#ifdef _KERNEL - -#ifdef __STDC__ -#define __KERNEL_SECTIONSTRING(_sec, _str) \ - __asm__(".section " #_sec " ; .asciz \"" _str "\" ; .text") -#else -#define __KERNEL_SECTIONSTRING(_sec, _str) \ - __asm__(".section _sec ; .asciz _str ; .text") -#endif - -#define __KERNEL_RCSID(_n, _s) __KERNEL_SECTIONSTRING(.ident, _s) -#define __KERNEL_COPYRIGHT(_n, _s) __KERNEL_SECTIONSTRING(.copyright, _s) - -#ifdef NO_KERNEL_RCSIDS -#undef __KERNEL_RCSID -#define __KERNEL_RCSID(_n, _s) /* nothing */ -#endif - -#endif /* _KERNEL */ - -#endif /* !_MACHINE_CDEFS_H_ */ +#include <mips/cdefs.h> diff --git a/sys/arch/pmax/include/cpu.h b/sys/arch/pmax/include/cpu.h index 5b56410257e..000309df766 100644 --- a/sys/arch/pmax/include/cpu.h +++ b/sys/arch/pmax/include/cpu.h @@ -1,206 +1,3 @@ -/* $NetBSD: cpu.h,v 1.15 1996/03/23 20:28:19 jonathan Exp $ */ +/* $OpenBSD: cpu.h,v 1.5 1998/05/08 17:34:29 millert Exp $ */ -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Ralph Campbell and Rick Macklem. - * - * 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. - * - * @(#)cpu.h 8.4 (Berkeley) 1/4/94 - */ - -#ifndef _CPU_H_ -#define _CPU_H_ - -#include <machine/machConst.h> - -/* - * Exported definitions unique to NetBSD/mips cpu support. - */ - -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#define cpu_wait(p) /* nothing */ -#define cpu_set_init_frame(p, fp) /* nothing */ -#define cpu_swapout(p) panic("cpu_swapout: can't get here"); - -/* - * Arguments to hardclock and gatherstats encapsulate the previous - * machine state in an opaque clockframe. - */ -struct clockframe { - int pc; /* program counter at time of interrupt */ - int sr; /* status register at time of interrupt */ -}; - -/* - * A port must provde CLKF_USERMODE() and CLKF_BASEPRI() for use - * in machine-independent code. These differ on r4000 and r3000 systems; - * provide them in the port-dependent file that includes this one, using - * the macros below. - */ - -/* r3000 versions */ -#define CLKF_USERMODE_R3K(framep) ((framep)->sr & MACH_SR_KU_PREV) -#define CLKF_BASEPRI_R3K(framep) \ - ((~(framep)->sr & (MACH_INT_MASK | MACH_SR_INT_ENA_PREV)) == 0) - -/* r4000 versions */ -#define CLKF_USERMODE_R4K(framep) ((framep)->sr & MACH_SR_KSU_USER) -#define CLKF_BASEPRI_R4K(framep) \ - ((~(framep)->sr & (MACH_INT_MASK | MACH_SR_INT_ENAB)) == 0) - -#define CLKF_PC(framep) ((framep)->pc) -#define CLKF_INTR(framep) (0) - -/* - * Preempt the current process if in interrupt from user mode, - * or after the current trap/syscall if in system mode. - */ -#define need_resched() { want_resched = 1; aston(); } - -/* - * Give a profiling tick to the current process when the user profiling - * buffer pages are invalid. On the MIPS, request an ast to send us - * through trap, marking the proc as needing a profiling tick. - */ -#define need_proftick(p) { (p)->p_flag |= P_OWEUPC; aston(); } - -/* - * Notify the current process (p) that it has a signal pending, - * process as soon as possible. - */ -#define signotify(p) aston() - -#define aston() (astpending = 1) - -int astpending; /* need to trap before returning to user mode */ -int want_resched; /* resched() was called */ - -/* - * CPU identification, from PRID register. - */ -union cpuprid { - int cpuprid; - struct { -#if BYTE_ORDER == BIG_ENDIAN - u_int pad1:16; /* reserved */ - u_int cp_imp:8; /* implementation identifier */ - u_int cp_majrev:4; /* major revision identifier */ - u_int cp_minrev:4; /* minor revision identifier */ -#else - u_int cp_minrev:4; /* minor revision identifier */ - u_int cp_majrev:4; /* major revision identifier */ - u_int cp_imp:8; /* implementation identifier */ - u_int pad1:16; /* reserved */ -#endif - } cpu; -}; - -/* - * CTL_MACHDEP definitions. - */ -#define CPU_CONSDEV 1 /* dev_t: console terminal device */ -#define CPU_MAXID 2 /* number of valid machdep ids */ - -#define CTL_MACHDEP_NAMES { \ - { 0, 0 }, \ - { "console_device", CTLTYPE_STRUCT }, \ -} - - -/* - * MIPS CPU types (cp_imp). - */ -#define MIPS_R2000 0x01 /* MIPS R2000 CPU ISA I */ -#define MIPS_R3000 0x02 /* MIPS R3000 CPU ISA I */ -#define MIPS_R6000 0x03 /* MIPS R6000 CPU ISA II */ -#define MIPS_R4000 0x04 /* MIPS R4000/4400 CPU ISA III */ -#define MIPS_R3LSI 0x05 /* LSI Logic R3000 derivate ISA I */ -#define MIPS_R6000A 0x06 /* MIPS R6000A CPU ISA II */ -#define MIPS_R3IDT 0x07 /* IDT R3000 derivate ISA I */ -#define MIPS_R10000 0x09 /* MIPS R10000/T5 CPU ISA IV */ -#define MIPS_R4200 0x0a /* MIPS R4200 CPU (ICE) ISA III */ -#define MIPS_UNKC1 0x0b /* unnanounced product cpu ISA III */ -#define MIPS_UNKC2 0x0c /* unnanounced product cpu ISA III */ -#define MIPS_R8000 0x10 /* MIPS R8000 Blackbird/TFP ISA IV */ -#define MIPS_R4600 0x20 /* QED R4600 Orion ISA III */ -#define MIPS_R3SONY 0x21 /* Sony R3000 based CPU ISA I */ -#define MIPS_R3TOSH 0x22 /* Toshiba R3000 based CPU ISA I */ -#define MIPS_R3NKK 0x23 /* NKK R3000 based CPU ISA I */ - - -/* - * MIPS FPU types - */ -#define MIPS_SOFT 0x00 /* Software emulation ISA I */ -#define MIPS_R2360 0x01 /* MIPS R2360 FPC ISA I */ -#define MIPS_R2010 0x02 /* MIPS R2010 FPC ISA I */ -#define MIPS_R3010 0x03 /* MIPS R3010 FPC ISA I */ -#define MIPS_R6010 0x04 /* MIPS R6010 FPC ISA II */ -#define MIPS_R4010 0x05 /* MIPS R4000/R4400 FPC ISA II */ -#define MIPS_R31LSI 0x06 /* LSI Logic derivate ISA I */ -#define MIPS_R10010 0x09 /* MIPS R10000/T5 FPU ISA IV */ -#define MIPS_R4210 0x0a /* MIPS R4200 FPC (ICE) ISA III */ -#define MIPS_UNKF1 0x0b /* unnanounced product cpu ISA III */ -#define MIPS_R8000 0x10 /* MIPS R8000 Blackbird/TFP ISA IV */ -#define MIPS_R4600 0x20 /* QED R4600 Orion ISA III */ -#define MIPS_R3SONY 0x21 /* Sony R3000 based FPU ISA I */ -#define MIPS_R3TOSH 0x22 /* Toshiba R3000 based FPU ISA I */ -#define MIPS_R3NKK 0x23 /* NKK R3000 based FPU ISA I */ - -/* - * XXX port-dependent code should define cpu_id and fpu_id variables - * and machine-dependent cache descriptor variables. - */ - -/* - * Enable realtime clock (always enabled). - */ -#define enablertclock() - -/* Stuff from the NetBSD mips tree TTTTT */ -#define CLKF_USERMODE(framep) CLKF_USERMODE_R3K(framep) -#define CLKF_BASEPRI(framep) CLKF_BASEPRI_R3K(framep) - -#ifdef _KERNEL -union cpuprid cpu_id; -union cpuprid fpu_id; -u_int machDataCacheSize; -u_int machInstCacheSize; -extern struct intr_tab intr_tab[]; -#endif -/* End of stuff from the NetBSD mips tree TTTTT */ - -#endif /* _CPU_H_ */ +#include <mips/cpu.h> diff --git a/sys/arch/pmax/include/disklabel.h b/sys/arch/pmax/include/disklabel.h index ea58519e94e..bdc085cae31 100644 --- a/sys/arch/pmax/include/disklabel.h +++ b/sys/arch/pmax/include/disklabel.h @@ -35,7 +35,7 @@ #define LABELSECTOR 0 /* sector containing label */ #define LABELOFFSET 64 /* offset of label in sector */ -#define MAXPARTITIONS 8 /* number of partitions */ +#define MAXPARTITIONS 16 /* number of partitions */ #define RAW_PART 2 /* raw partition: xx?c */ #define NUMBOOT 2 /* bootxx + xxboot... */ diff --git a/sys/arch/pmax/include/dlfcn.h b/sys/arch/pmax/include/dlfcn.h index 24d132c7e13..c8f3df6fed6 100644 --- a/sys/arch/pmax/include/dlfcn.h +++ b/sys/arch/pmax/include/dlfcn.h @@ -1,42 +1,3 @@ -/* $OpenBSD: dlfcn.h,v 1.1 1997/01/13 10:31:56 graichen Exp $ */ +/* $OpenBSD: dlfcn.h,v 1.2 1998/05/08 17:34:32 millert Exp $ */ -/* - * Copyright (c) 1996 Per Fogelstrom - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed under OpenBSD by - * Per Fogelstrom. - * 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 _DLFCN_H -#define _DLFCN_H 1 - -/* - * This is a dummy file. Empty until libdl has been done. - */ - -#endif /* _DLFCN_H */ +#include <mips/dlfcn.h> diff --git a/sys/arch/pmax/include/ecoff.h b/sys/arch/pmax/include/ecoff.h index 39658907035..e3b2fef60fd 100644 --- a/sys/arch/pmax/include/ecoff.h +++ b/sys/arch/pmax/include/ecoff.h @@ -1,94 +1,3 @@ -/* $OpenBSD: ecoff.h,v 1.5 1996/12/22 15:22:21 graichen Exp $ */ -/* $NetBSD: ecoff.h,v 1.4 1995/06/16 02:07:33 mellon Exp $ */ - -/* - * Copyright (c) 1994 Adam Glass - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Adam Glass. - * 4. The name of the Author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY Adam Glass ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL Adam Glass 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 ECOFF_LDPGSZ 4096 - -#define ECOFF_PAD - -#define ECOFF_MACHDEP \ - u_long ea_gprmask; \ - u_long ea_cprmask[4]; \ - u_long ea_gp_value - -#define ECOFF_MAGIC_MIPSEL 0x0162 -#define ECOFF_BADMAG(ex) ((ex)->f.f_magic != ECOFF_MAGIC_MIPSEL) - -#define ECOFF_SEGMENT_ALIGNMENT(ep) ((ep)->a.vstamp < 23 ? 8 : 16) - -struct ecoff_symhdr { - int16_t sh_magic; - int16_t sh_vstamp; - int32_t sh_linemax; - int32_t sh_densenummax; - int32_t sh_procmax; - int32_t sh_lsymmax; - int32_t sh_optsymmax; - int32_t sh_auxxymmax; - int32_t sh_lstrmax; - int32_t sh_estrmax; - int32_t sh_fdmax; - int32_t sh_rfdmax; - int32_t sh_esymmax; - long sh_linesize; - long sh_lineoff; - long sh_densenumoff; - long sh_procoff; - long sh_lsymoff; - long sh_optsymoff; - long sh_auxsymoff; - long sh_lstroff; - long sh_estroff; - long sh_fdoff; - long sh_rfdoff; - long sh_esymoff; -}; -/* Some day they will make up their minds.... */ -#define esymMax sh_esymmax -#define cbExtOffset sh_esymoff -#define cbSsExtOffset sh_estroff - -struct ecoff_extsym { - long es_value; - int es_strindex; - unsigned es_type:6; - unsigned es_class:5; - unsigned :1; - unsigned es_symauxindex:20; - unsigned es_jmptbl:1; - unsigned es_cmain:1; - unsigned es_weakext:1; - unsigned :29; - int es_indexfld; -}; +/* $OpenBSD: ecoff.h,v 1.6 1998/05/08 17:34:33 millert Exp $ */ +#include <mips/ecoff.h> diff --git a/sys/arch/pmax/include/elf_abi.h b/sys/arch/pmax/include/elf_abi.h index 8b95f12c6df..17ee24f2461 100644 --- a/sys/arch/pmax/include/elf_abi.h +++ b/sys/arch/pmax/include/elf_abi.h @@ -1,58 +1,3 @@ -/* $OpenBSD: elf_abi.h,v 1.1 1997/01/13 10:31:58 graichen Exp $ */ +/* $OpenBSD: elf_abi.h,v 1.2 1998/05/08 17:34:34 millert Exp $ */ -/* - * Copyright (c) 1996 Per Fogelstrom - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed under OpenBSD by - * Per Fogelstrom. - * 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. - * - */ - -/* From MIPS ABI supplemental */ - -/* Architecture dependent Segment types - p_type */ -#define PT_MIPS_REGINFO 0x70000000 /* Register usage information */ - -/* Architecture dependent d_tag field for Elf32_Dyn. */ -#define DT_MIPS_RLD_VERSION 0x70000001 /* Runtime Linker Interface ID */ -#define DT_MIPS_TIME_STAMP 0x70000002 /* Timestamp */ -#define DT_MIPS_ICHECKSUM 0x70000003 /* Cksum of ext. str. and com. sizes */ -#define DT_MIPS_IVERSION 0x70000004 /* Version string (string tbl index) */ -#define DT_MIPS_FLAGS 0x70000005 /* Flags */ -#define DT_MIPS_BASE_ADDRESS 0x70000006 /* Segment base address */ -#define DT_MIPS_CONFLICT 0x70000008 /* Adr of .conflict section */ -#define DT_MIPS_LIBLIST 0x70000009 /* Address of .liblist section */ -#define DT_MIPS_LOCAL_GOTNO 0x7000000a /* Number of local .GOT entries */ -#define DT_MIPS_CONFLICTNO 0x7000000b /* Number of .conflict entries */ -#define DT_MIPS_LIBLISTNO 0x70000010 /* Number of .liblist entries */ -#define DT_MIPS_SYMTABNO 0x70000011 /* Number of .dynsym entries */ -#define DT_MIPS_UNREFEXTNO 0x70000012 /* First external DYNSYM */ -#define DT_MIPS_GOTSYM 0x70000013 /* First GOT entry in .dynsym */ -#define DT_MIPS_HIPAGENO 0x70000014 /* Number of GOT page table entries */ -#define DT_MIPS_RLD_MAP 0x70000016 /* Address of debug map pointer */ - -#define DT_PROCNUM (DT_MIPS_HIPAGENO - DT_LOPROC + 1) +#include <mips/elf_abi.h> diff --git a/sys/arch/pmax/include/float.h b/sys/arch/pmax/include/float.h index de78ab571ba..5b63b76c493 100644 --- a/sys/arch/pmax/include/float.h +++ b/sys/arch/pmax/include/float.h @@ -1,80 +1,3 @@ -/* $NetBSD: float.h,v 1.8 1996/03/18 22:40:22 jonathan Exp $ */ +/* $OpenBSD: float.h,v 1.5 1998/05/08 17:34:35 millert Exp $ */ -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)float.h 8.1 (Berkeley) 6/10/93 - */ - -#ifndef _MIPS_FLOAT_H_ -#define _MIPS_FLOAT_H_ - -#include <sys/cdefs.h> - -__BEGIN_DECLS -int __flt_rounds __P((void)); -__END_DECLS - -#define FLT_RADIX 2 /* b */ -#define FLT_ROUNDS __flt_rounds() - -#define FLT_MANT_DIG 24 /* p */ -#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */ -#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */ -#define FLT_MIN_EXP -125 /* emin */ -#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */ -#define FLT_MIN_10_EXP -37 /* ceil(log10(b**(emin-1))) */ -#define FLT_MAX_EXP 128 /* emax */ -#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */ -#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */ - -#define DBL_MANT_DIG 53 -#define DBL_EPSILON 2.2204460492503131E-16 -#define DBL_DIG 15 -#define DBL_MIN_EXP -1021 -#define DBL_MIN 2.225073858507201E-308 -#define DBL_MIN_10_EXP -307 -#define DBL_MAX_EXP 1024 -#define DBL_MAX 1.797693134862316E+308 -#define DBL_MAX_10_EXP 308 - -#define LDBL_MANT_DIG DBL_MANT_DIG -#define LDBL_EPSILON DBL_EPSILON -#define LDBL_DIG DBL_DIG -#define LDBL_MIN_EXP DBL_MIN_EXP -#define LDBL_MIN DBL_MIN -#define LDBL_MIN_10_EXP DBL_MIN_10_EXP -#define LDBL_MAX_EXP DBL_MAX_EXP -#define LDBL_MAX DBL_MAX -#define LDBL_MAX_10_EXP DBL_MAX_10_EXP - -#endif /* _MIPS_FLOAT_H_ */ +#include <mips/float.h> diff --git a/sys/arch/pmax/include/frame.h b/sys/arch/pmax/include/frame.h index e69de29bb2d..902485d0c3f 100644 --- a/sys/arch/pmax/include/frame.h +++ b/sys/arch/pmax/include/frame.h @@ -0,0 +1,3 @@ +/* $OpenBSD: frame.h,v 1.2 1998/05/08 17:34:36 millert Exp $ */ + +#include <mips/frame.h> diff --git a/sys/arch/pmax/include/ieeefp.h b/sys/arch/pmax/include/ieeefp.h index 65ea3fed16c..80201932040 100644 --- a/sys/arch/pmax/include/ieeefp.h +++ b/sys/arch/pmax/include/ieeefp.h @@ -1,23 +1,3 @@ -/* - * Written by J.T. Conklin, Apr 11, 1995 - * Public domain. - */ +/* $OpenBSD: ieeefp.h,v 1.4 1998/05/08 17:34:37 millert Exp $ */ -#ifndef _MIPS_IEEEFP_H_ -#define _MIPS_IEEEFP_H_ - -typedef int fp_except; -#define FP_X_IMP 0x01 /* imprecise (loss of precision) */ -#define FP_X_UFL 0x02 /* underflow exception */ -#define FP_X_OFL 0x04 /* overflow exception */ -#define FP_X_DZ 0x08 /* divide-by-zero exception */ -#define FP_X_INV 0x10 /* invalid operation exception */ - -typedef enum { - FP_RN=0, /* round to nearest representable number */ - FP_RZ=1, /* round to zero (truncate) */ - FP_RP=2, /* round toward positive infinity */ - FP_RM=3 /* round toward negative infinity */ -} fp_rnd; - -#endif /* _MIPS_IEEEFP_H_ */ +#include <mips/ieeefp.h> diff --git a/sys/arch/pmax/include/limits.h b/sys/arch/pmax/include/limits.h index d6dcc71d231..96e911d0009 100644 --- a/sys/arch/pmax/include/limits.h +++ b/sys/arch/pmax/include/limits.h @@ -1,110 +1,3 @@ -/* $NetBSD: limits.h,v 1.9 1996/03/19 02:45:48 jonathan Exp $ */ +/* $OpenBSD: limits.h,v 1.7 1998/05/08 17:34:38 millert Exp $ */ -/* - * Copyright (c) 1988, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)limits.h 8.3 (Berkeley) 1/4/94 - */ - -#ifndef _MACHINE_LIMITS_H_ -#define _MACHINE_LIMITS_H_ - -#define CHAR_BIT 8 /* number of bits in a char */ -#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ - -/* - * According to ANSI (section 2.2.4.2), the values below must be usable by - * #if preprocessing directives. Additionally, the expression must have the - * same type as would an expression that is an object of the corresponding - * type converted according to the integral promotions. The subtraction for - * INT_MIN and LONG_MIN is so the value is not unsigned; 2147483648 is an - * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - * These numbers work for pcc as well. The UINT_MAX and ULONG_MAX values - * are written as hex so that GCC will be quiet about large integer constants. - */ -#define SCHAR_MAX 127 /* min value for a signed char */ -#define SCHAR_MIN (-128) /* max value for a signed char */ - -#define UCHAR_MAX 255 /* max value for an unsigned char */ -#define CHAR_MAX 127 /* max value for a char */ -#define CHAR_MIN (-128) /* min value for a char */ - -#define USHRT_MAX 65535 /* max value for an unsigned short */ -#define SHRT_MAX 32767 /* max value for a short */ -#define SHRT_MIN (-32768) /* min value for a short */ - -#define UINT_MAX 0xffffffff /* max value for an unsigned int */ -#define INT_MAX 2147483647 /* max value for an int */ -#define INT_MIN (-2147483647-1) /* min value for an int */ - -#define ULONG_MAX 0xffffffff /* max value for an unsigned long */ -#define LONG_MAX 2147483647 /* max value for a long */ -#define LONG_MIN (-2147483647-1) /* min value for a long */ - -#if !defined(_ANSI_SOURCE) -#define SSIZE_MAX INT_MAX /* max value for a ssize_t */ - -#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) -#define SIZE_T_MAX UINT_MAX /* max value for a size_t */ - -#define UID_MAX UINT_MAX /* max value for a uid_t */ -#define GID_MAX UINT_MAX /* max value for a gid_t */ - -/* GCC requires that quad constants be written as expressions. */ -#define UQUAD_MAX ((u_quad_t)0-1) /* max value for a uquad_t */ - /* max value for a quad_t */ -#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1)) -#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */ - -#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */ -#endif /* !_ANSI_SOURCE */ - -#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE) -#define LONG_BIT 32 -#define WORD_BIT 32 - -#define DBL_DIG 15 -#define DBL_MAX 1.797693134862316E+308 -#define DBL_MIN 2.225073858507201E-308 - -#define FLT_DIG 6 -#define FLT_MAX 3.40282347E+38F -#define FLT_MIN 1.17549435E-38F -#endif - -/* Stuff from the NetBSD mips tree TTTTT */ -#ifdef _KERNEL -#define CLK_TCK 60 /* ticks per second */ -#endif -/* End of stuff from the NetBSD mips tree TTTTT */ - -#endif /* _MACHINE_LIMITS_H_ */ +#include <mips/limits.h> diff --git a/sys/arch/pmax/include/link.h b/sys/arch/pmax/include/link.h index 4affb777e59..4f59e67dafb 100644 --- a/sys/arch/pmax/include/link.h +++ b/sys/arch/pmax/include/link.h @@ -1,125 +1,3 @@ -/* $OpenBSD: link.h,v 1.1 1997/01/13 10:31:59 graichen Exp $ */ +/* $OpenBSD: link.h,v 1.2 1998/05/08 17:34:40 millert Exp $ */ -/* - * Copyright (c) 1996 Per Fogelstrom - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed under OpenBSD by - * Per Fogelstrom. - * 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 _LINK_H -#define _LINK_H 1 - -#include <elf_abi.h> -#include <machine/elf_abi.h> - -/* - * Debug rendezvous struct. Pointer to this is set up in the - * target code pointed by the DT_MIPS_RLD_MAP tag. If it is - * defined. - */ - -struct r_debug { - int r_version; /* Protocol version. */ - struct link_map *r_map; /* Head of list of loaded objects. */ - - /* This is the address of a function internal to the run-time linker, - that will always be called when the linker begins to map in a - library or unmap it, and again when the mapping change is complete. - The debugger can set a breakpoint at this address if it wants to - notice shared object mapping changes. */ - Elf32_Addr r_brk; - enum { - /* This state value describes the mapping change taking place when - the `r_brk' address is called. */ - RT_CONSISTENT, /* Mapping change is complete. */ - RT_ADD, /* Adding a new object. */ - RT_DELETE, /* Removing an object mapping. */ - } r_state; - - Elf32_Addr r_ldbase; /* Base address the linker is loaded at. */ - }; - -/* This symbol refers to the "dynamic structure" in the `.dynamic' section - of whatever module refers to `_DYNAMIC'. So, to find its own - `struct r_debug', a program could do: - for (dyn = _DYNAMIC; dyn->d_tag != DT_NULL) - if (dyn->d_tag == DT_MIPS_RLD_MAP) r_debug = (struct r_debug) dyn->d_un.d_ptr; - */ - -extern Elf32_Dyn _DYNAMIC[]; - - -/* Structure describing a loaded shared object. The `l_next' and `l_prev' - members form a chain of all the shared objects loaded at startup. - - These data structures exist in space used by the run-time dynamic linker; - modifying them may have disastrous results. */ - -struct link_map - { - /* These first few members are part of the protocol with the debugger. - This is the same format used in SVR4. */ - - Elf32_Addr l_addr; /* Base address shared object is loaded at. */ - Elf32_Addr l_offs; /* Offset */ - char *l_name; /* Absolute file name object was found in. */ - Elf32_Dyn *l_ld; /* Dynamic section of the shared object. */ - struct link_map *l_next, *l_prev; /* Chain of loaded objects. */ - - /* All following members are internal to the dynamic linker. - They may change without notice. */ - - const char *l_libname; /* Name requested (before search). */ - - /* Indexed pointers to dynamic section. */ - Elf32_Dyn *l_info[DT_NUM + DT_PROCNUM]; - - const Elf32_Phdr *l_phdr; /* Pointer to program header table in core. */ - Elf32_Word l_phnum; /* Number of program header entries. */ - Elf32_Addr l_entry; /* Entry point location. */ - - /* Symbol hash table. */ - Elf32_Word l_nbuckets; - const Elf32_Word *l_buckets, *l_chain; - - unsigned int l_opencount; /* Reference count for dlopen/dlclose. */ - enum /* Where this object came from. */ - { - lt_executable, /* The main executable program. */ - lt_interpreter, /* The interpreter: the dynamic linker. */ - lt_library, /* Library needed by main executable. */ - lt_loaded, /* Extra run-time loaded shared object. */ - } l_type:2; - unsigned int l_deps_loaded:1; /* Nonzero if DT_NEEDED items loaded. */ - unsigned int l_relocated:1; /* Nonzero if object's relocations done. */ - unsigned int l_init_called:1; /* Nonzero if DT_INIT function called. */ - unsigned int l_init_running:1; /* Nonzero while DT_INIT function runs. */ - }; - -#endif /* _LINK_H */ +#include <mips/link.h> diff --git a/sys/arch/pmax/include/mips_opcode.h b/sys/arch/pmax/include/mips_opcode.h index 7234040770f..7953c1a6d63 100644 --- a/sys/arch/pmax/include/mips_opcode.h +++ b/sys/arch/pmax/include/mips_opcode.h @@ -1,261 +1,3 @@ -/* $NetBSD: mips_opcode.h,v 1.5 1996/03/23 18:49:29 jonathan Exp $ */ +/* $OpenBSD: mips_opcode.h,v 1.4 1998/05/08 17:34:41 millert Exp $ */ -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Ralph Campbell. - * - * 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. - * - * @(#)mips_opcode.h 8.1 (Berkeley) 6/10/93 - */ - -/* - * Define the instruction formats and opcode values for the - * MIPS instruction set. - */ - -/* - * Define the instruction formats. - */ -typedef union { - unsigned word; - -#if BYTE_ORDER == LITTLE_ENDIAN - struct { - unsigned imm: 16; - unsigned rt: 5; - unsigned rs: 5; - unsigned op: 6; - } IType; - - struct { - unsigned target: 26; - unsigned op: 6; - } JType; - - struct { - unsigned func: 6; - unsigned shamt: 5; - unsigned rd: 5; - unsigned rt: 5; - unsigned rs: 5; - unsigned op: 6; - } RType; - - struct { - unsigned func: 6; - unsigned fd: 5; - unsigned fs: 5; - unsigned ft: 5; - unsigned fmt: 4; - unsigned : 1; /* always '1' */ - unsigned op: 6; /* always '0x11' */ - } FRType; -#endif -} InstFmt; - -/* - * Values for the 'op' field. - */ -#define OP_SPECIAL 000 -#define OP_BCOND 001 -#define OP_J 002 -#define OP_JAL 003 -#define OP_BEQ 004 -#define OP_BNE 005 -#define OP_BLEZ 006 -#define OP_BGTZ 007 - -#define OP_ADDI 010 -#define OP_ADDIU 011 -#define OP_SLTI 012 -#define OP_SLTIU 013 -#define OP_ANDI 014 -#define OP_ORI 015 -#define OP_XORI 016 -#define OP_LUI 017 - -#define OP_COP0 020 -#define OP_COP1 021 -#define OP_COP2 022 -#define OP_COP3 023 -#define OP_BEQL 024 /* MIPS-II, for r4000 port */ -#define OP_BNEL 025 /* MIPS-II, for r4000 port */ -#define OP_BLEZL 026 /* MIPS-II, for r4000 port */ -#define OP_BGTZL 027 /* MIPS-II, for r4000 port */ - -#define OP_DADDI 030 /* MIPS-II, for r4000 port */ -#define OP_DADDIU 031 /* MIPS-II, for r4000 port */ -#define OP_LDL 032 /* MIPS-II, for r4000 port */ -#define OP_LDR 033 /* MIPS-II, for r4000 port */ - -#define OP_LB 040 -#define OP_LH 041 -#define OP_LWL 042 -#define OP_LW 043 -#define OP_LBU 044 -#define OP_LHU 045 -#define OP_LWR 046 -#define OP_LHU 045 -#define OP_LWR 046 -#define OP_LWU 047 /* MIPS-II, for r4000 port */ - -#define OP_SB 050 -#define OP_SH 051 -#define OP_SWL 052 -#define OP_SW 053 -#define OP_SDL 054 /* MIPS-II, for r4000 port */ -#define OP_SDR 055 /* MIPS-II, for r4000 port */ -#define OP_SWR 056 -#define OP_CACHE 057 /* MIPS-II, for r4000 port */ - -#define OP_LL 060 -#define OP_LWC0 OP_LL /* backwards source compatibility */ -#define OP_LWC1 061 -#define OP_LWC2 062 -#define OP_LWC3 063 -#define OP_LLD 064 /* MIPS-II, for r4000 port */ -#define OP_LD 067 /* MIPS-II, for r4000 port */ - -#define OP_SC 070 -#define OP_SWC0 OP_SC /* backwards source compatibility */ -#define OP_SWC1 071 -#define OP_SWC2 072 -#define OP_SWC3 073 -#define OP_SCD 074 /* MIPS-II, for r4000 port */ -#define OP_SD 077 /* MIPS-II, for r4000 port */ - -/* - * Values for the 'func' field when 'op' == OP_SPECIAL. - */ -#define OP_SLL 000 -#define OP_SRL 002 -#define OP_SRA 003 -#define OP_SLLV 004 -#define OP_SRLV 006 -#define OP_SRAV 007 - -#define OP_JR 010 -#define OP_JALR 011 -#define OP_SYSCALL 014 -#define OP_BREAK 015 -#define OP_SYNC 017 /* MIPS-II, for r4000 port */ - -#define OP_MFHI 020 -#define OP_MTHI 021 -#define OP_MFLO 022 -#define OP_MTLO 023 -#define OP_DSLLV 024 /* MIPS-II, for r4000 port */ -#define OP_DSRLV 026 /* MIPS-II, for r4000 port */ -#define OP_DSRAV 027 /* MIPS-II, for r4000 port */ - -#define OP_MULT 030 -#define OP_MULTU 031 -#define OP_DIV 032 -#define OP_DIVU 033 -#define OP_DMULT 034 /* MIPS-II, for r4000 port */ -#define OP_DMULTU 035 /* MIPS-II, for r4000 port */ -#define OP_DDIV 036 /* MIPS-II, for r4000 port */ -#define OP_DDIVU 037 /* MIPS-II, for r4000 port */ - -#define OP_ADD 040 -#define OP_ADDU 041 -#define OP_SUB 042 -#define OP_SUBU 043 -#define OP_AND 044 -#define OP_OR 045 -#define OP_XOR 046 -#define OP_NOR 047 - -#define OP_SLT 052 -#define OP_SLTU 053 -#define OP_DADD 054 /* MIPS-II, for r4000 port */ -#define OP_DADDU 055 /* MIPS-II, for r4000 port */ -#define OP_DSUB 056 /* MIPS-II, for r4000 port */ -#define OP_DSUBU 057 /* MIPS-II, for r4000 port */ - -#define OP_TGE 060 /* MIPS-II, for r4000 port */ -#define OP_TGEU 061 /* MIPS-II, for r4000 port */ -#define OP_TLT 062 /* MIPS-II, for r4000 port */ -#define OP_TLTU 063 /* MIPS-II, for r4000 port */ -#define OP_TEQ 064 /* MIPS-II, for r4000 port */ -#define OP_TNE 066 /* MIPS-II, for r4000 port */ - -#define OP_DSLL 070 /* MIPS-II, for r4000 port */ -#define OP_DSRL 072 /* MIPS-II, for r4000 port */ -#define OP_DSRA 073 /* MIPS-II, for r4000 port */ -#define OP_DSLL32 074 /* MIPS-II, for r4000 port */ -#define OP_DSRL32 076 /* MIPS-II, for r4000 port */ -#define OP_DSRA32 077 /* MIPS-II, for r4000 port */ - -/* - * Values for the 'func' field when 'op' == OP_BCOND. - */ -#define OP_BLTZ 000 -#define OP_BGEZ 001 -#define OP_BLTZL 002 /* MIPS-II, for r4000 port */ -#define OP_BGEZL 003 /* MIPS-II, for r4000 port */ - -#define OP_TGEI 010 /* MIPS-II, for r4000 port */ -#define OP_TGEIU 011 /* MIPS-II, for r4000 port */ -#define OP_TLTI 012 /* MIPS-II, for r4000 port */ -#define OP_TLTIU 013 /* MIPS-II, for r4000 port */ -#define OP_TEQI 014 /* MIPS-II, for r4000 port */ -#define OP_TNEI 016 /* MIPS-II, for r4000 port */ - -#define OP_BLTZAL 020 -#define OP_BLTZAL 020 /* MIPS-II, for r4000 port */ -#define OP_BGEZAL 021 -#define OP_BLTZALL 022 -#define OP_BGEZALL 023 - -/* - * Values for the 'rs' field when 'op' == OP_COPz. - */ -#define OP_MF 000 -#define OP_DMF 001 /* MIPS-II, for r4000 port */ -#define OP_MT 004 -#define OP_DMT 005 /* MIPS-II, for r4000 port */ -#define OP_BCx 010 -#define OP_BCy 014 -#define OP_CF 002 -#define OP_CT 006 - -/* - * Values for the 'rt' field when 'op' == OP_COPz. - */ -#define COPz_BC_TF_MASK 0x01 -#define COPz_BC_TRUE 0x01 -#define COPz_BC_FALSE 0x00 -#define COPz_BCL_TF_MASK 0x02 /* MIPS-II, for r4000 port */ -#define COPz_BCL_TRUE 0x02 /* MIPS-II, for r4000 port */ -#define COPz_BCL_FALSE 0x00 /* MIPS-II, for r4000 port */ +#include <mips/mips_opcode.h> diff --git a/sys/arch/pmax/include/pcb.h b/sys/arch/pmax/include/pcb.h index 2225ba81d83..3150c86547f 100644 --- a/sys/arch/pmax/include/pcb.h +++ b/sys/arch/pmax/include/pcb.h @@ -1,62 +1,3 @@ -/* $NetBSD: pcb.h,v 1.6 1996/03/19 02:12:05 jonathan Exp $ */ +/* $OpenBSD: pcb.h,v 1.4 1998/05/08 17:34:42 millert Exp $ */ -/* - * Copyright (c) 1988 University of Utah. - * Copyright (c) 1992, 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 and Ralph Campbell. - * - * 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: Utah Hdr: pcb.h 1.13 89/04/23 - * - * @(#)pcb.h 8.1 (Berkeley) 6/10/93 - */ - -/* - * MIPS process control block - */ -struct pcb -{ - int pcb_regs[71]; /* saved CPU and floating point registers */ - label_t pcb_context; /* kernel context for resume */ - int pcb_onfault; /* for copyin/copyout faults */ - void *pcb_segtab; /* copy of pmap pm_segtab */ -}; - -/* - * The pcb is augmented with machine-dependent additional data for - * core dumps. For the MIPS, there is nothing to add. - */ -struct md_coredump { - long md_pad[8]; -}; +#include <mips/pcb.h> diff --git a/sys/arch/pmax/include/proc.h b/sys/arch/pmax/include/proc.h index 72d5cc4811b..e5732102693 100644 --- a/sys/arch/pmax/include/proc.h +++ b/sys/arch/pmax/include/proc.h @@ -1,61 +1,3 @@ -/* $NetBSD: proc.h,v 1.4 1994/10/26 21:09:52 cgd Exp $ */ +/* $OpenBSD: proc.h,v 1.5 1998/05/08 17:34:43 millert Exp $ */ -/* - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Ralph Campbell. - * - * 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. - * - * @(#)proc.h 8.1 (Berkeley) 6/10/93 - */ - -/* - * Machine-dependent part of the proc structure for DEC Station. - */ -struct mdproc { - int *md_regs; /* registers on current frame */ - int md_flags; /* machine-dependent flags */ - int md_upte[UPAGES]; /* ptes for mapping u page */ - int md_ss_addr; /* single step address for ptrace */ - int md_ss_instr; /* single step instruction for ptrace */ -}; - -/* md_flags */ -#define MDP_FPUSED 0x0001 /* floating point coprocessor used */ - -/* TTTTT - stuff from NetBSD mips dir */ -#ifdef _KERNEL -/* kernel single-step emulation */ -struct proc; -extern int mips_singlestep __P((struct proc *p)); -#endif /* _KERNEL */ -/* TTTTT - end of stuff from NetBSD mips dir */ +#include <mips/proc.h> diff --git a/sys/arch/pmax/include/profile.h b/sys/arch/pmax/include/profile.h index 41598963f0b..61d60fa975d 100644 --- a/sys/arch/pmax/include/profile.h +++ b/sys/arch/pmax/include/profile.h @@ -1,81 +1,3 @@ -/* $OpenBSD: profile.h,v 1.5 1997/04/12 19:56:07 graichen Exp $ */ +/* $OpenBSD: profile.h,v 1.6 1998/05/08 17:34:44 millert Exp $ */ -/* - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Ralph Campbell. - * - * 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: @(#)profile.h 8.1 (Berkeley) 6/10/93 - */ - -#define _MCOUNT_DECL static void ___mcount - -#define MCOUNT \ - __asm(".globl _mcount;" \ - ".type _mcount,@function;" \ - "_mcount:;" \ - ".set noreorder;" \ - ".set noat;" \ - ".cpload $25;" \ - "sw $4,8($29);" \ - "sw $5,12($29);" \ - "sw $6,16($29);" \ - "sw $7,20($29);" \ - "sw $1,0($29);" \ - "sw $31,4($29);" \ - "move $5,$31;" \ - "jal ___mcount;" \ - "move $4,$1;" \ - "lw $4,8($29);" \ - "lw $5,12($29);" \ - "lw $6,16($29);" \ - "lw $7,20($29);" \ - "lw $31,4($29);" \ - "lw $1,0($29);" \ - "addu $29,$29,8;" \ - "j $31;" \ - "move $31,$1;" \ - ".set reorder;" \ - ".set at"); - -#ifdef _KERNEL -/* - * The following two macros do splhigh and splx respectively. - * They have to be defined this way because these are real - * functions on the MIPS, and we do not want to invoke mcount - * recursively. - */ -#define MCOUNT_ENTER s = _splhigh() - -#define MCOUNT_EXIT _splx(s) -#endif /* _KERNEL */ +#include <mips/profile.h> diff --git a/sys/arch/pmax/include/reg.h b/sys/arch/pmax/include/reg.h index f91820dc359..ab4755c46d0 100644 --- a/sys/arch/pmax/include/reg.h +++ b/sys/arch/pmax/include/reg.h @@ -1,62 +1,3 @@ -/* $NetBSD: reg.h,v 1.6 1995/12/20 02:00:27 jonathan Exp $ */ +/* $OpenBSD: reg.h,v 1.5 1998/05/08 17:34:45 millert Exp $ */ -/* - * Copyright (c) 1988 University of Utah. - * Copyright (c) 1992, 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 and Ralph Campbell. - * - * 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: Utah Hdr: reg.h 1.1 90/07/09 - * - * @(#)reg.h 8.2 (Berkeley) 1/11/94 - */ - -#ifndef _MACHINE_REG_H_ -#define _MACHINE_REG_H_ -/* - * Location of the users' stored - * registers relative to ZERO. - * Usage is p->p_regs[XX]. - * - * must be visible to assembly code. - */ -#include <machine/regnum.h> - -/* - * Register set accessible via /proc/$pid/reg - */ -struct reg { - int r_regs[71]; /* numbered as above */ -}; -#endif /*_MACHINE_REG_H_*/ +#include <mips/reg.h> diff --git a/sys/arch/pmax/include/regdef.h b/sys/arch/pmax/include/regdef.h index 46216b57d00..351083ca5d8 100644 --- a/sys/arch/pmax/include/regdef.h +++ b/sys/arch/pmax/include/regdef.h @@ -1,73 +1,3 @@ -/* $NetBSD: regdef.h,v 1.4 1994/10/26 21:09:58 cgd Exp $ */ +/* $OpenBSD: regdef.h,v 1.4 1998/05/08 17:34:46 millert Exp $ */ -/* - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Ralph Campbell. This file is derived from the MIPS RISC - * Architecture book by Gerry Kane. - * - * 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. - * - * @(#)regdef.h 8.1 (Berkeley) 6/10/93 - */ - -#define zero $0 /* always zero */ -#define AT $at /* assembler temp */ -#define v0 $2 /* return value */ -#define v1 $3 -#define a0 $4 /* argument registers */ -#define a1 $5 -#define a2 $6 -#define a3 $7 -#define t0 $8 /* temp registers (not saved across subroutine calls) */ -#define t1 $9 -#define t2 $10 -#define t3 $11 -#define t4 $12 -#define t5 $13 -#define t6 $14 -#define t7 $15 -#define s0 $16 /* saved across subroutine calls (callee saved) */ -#define s1 $17 -#define s2 $18 -#define s3 $19 -#define s4 $20 -#define s5 $21 -#define s6 $22 -#define s7 $23 -#define t8 $24 /* two more temp registers */ -#define t9 $25 -#define k0 $26 /* kernel temporary */ -#define k1 $27 -#define gp $28 /* global pointer */ -#define sp $29 /* stack pointer */ -#define s8 $30 /* one more callee saved */ -#define ra $31 /* return address */ +#include <mips/regdef.h> diff --git a/sys/arch/pmax/include/regnum.h b/sys/arch/pmax/include/regnum.h index d93043fe883..b6568019986 100644 --- a/sys/arch/pmax/include/regnum.h +++ b/sys/arch/pmax/include/regnum.h @@ -1,136 +1,3 @@ -/* $NetBSD: regnum.h,v 1.2 1996/03/19 15:20:39 jonathan Exp $ */ +/* $OpenBSD: regnum.h,v 1.4 1998/05/08 17:34:47 millert Exp $ */ -/* - * Copyright (c) 1988 University of Utah. - * Copyright (c) 1992, 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 and Ralph Campbell. - * - * 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: Utah Hdr: reg.h 1.1 90/07/09 - * - * @(#)reg.h 8.2 (Berkeley) 1/11/94 - */ - -/* - * Location of the users' stored - * registers relative to ZERO. - * Usage is p->p_regs[XX]. - */ -#define ZERO 0 -#define AST 1 -#define V0 2 -#define V1 3 -#define A0 4 -#define A1 5 -#define A2 6 -#define A3 7 -#define T0 8 -#define T1 9 -#define T2 10 -#define T3 11 -#define T4 12 -#define T5 13 -#define T6 14 -#define T7 15 -#define S0 16 -#define S1 17 -#define S2 18 -#define S3 19 -#define S4 20 -#define S5 21 -#define S6 22 -#define S7 23 -#define T8 24 -#define T9 25 -#define K0 26 -#define K1 27 -#define GP 28 -#define SP 29 -#define S8 30 -#define RA 31 -#define SR 32 -#define PS SR /* alias for SR */ -#define MULLO 33 -#define MULHI 34 -#define BADVADDR 35 -#define CAUSE 36 -#define PC 37 - -#define FPBASE 38 -#define F0 (FPBASE+0) -#define F1 (FPBASE+1) -#define F2 (FPBASE+2) -#define F3 (FPBASE+3) -#define F4 (FPBASE+4) -#define F5 (FPBASE+5) -#define F6 (FPBASE+6) -#define F7 (FPBASE+7) -#define F8 (FPBASE+8) -#define F9 (FPBASE+9) -#define F10 (FPBASE+10) -#define F11 (FPBASE+11) -#define F12 (FPBASE+12) -#define F13 (FPBASE+13) -#define F14 (FPBASE+14) -#define F15 (FPBASE+15) -#define F16 (FPBASE+16) -#define F17 (FPBASE+17) -#define F18 (FPBASE+18) -#define F19 (FPBASE+19) -#define F20 (FPBASE+20) -#define F21 (FPBASE+21) -#define F22 (FPBASE+22) -#define F23 (FPBASE+23) -#define F24 (FPBASE+24) -#define F25 (FPBASE+25) -#define F26 (FPBASE+26) -#define F27 (FPBASE+27) -#define F28 (FPBASE+28) -#define F29 (FPBASE+29) -#define F30 (FPBASE+30) -#define F31 (FPBASE+31) -#define FSR (FPBASE+32) - -#ifdef IPCREG -#define NIPCREG (FSR + 1) -int ipcreg[NIPCREG] = { - ZERO, AST, V0, V1, A0, A1, A2, A3, T0, T1, T2, T3, T4, T5, T6, T7, - S0, S1, S2, S3, S4, S5, S6, S7, T8, T9, K0, K1, GP, SP, S8, RA, - SR, MULLO, MULHI, BADVADDR, CAUSE, PC, - F0, F1, F2, F3, F4, F5, F6, F7, - F8, F9, F10, F11, F12, F13, F14, F15, - F16, F17, F18, F19, F20, F21, F22, F23, - F24, F25, F26, F27, F28, F29, F30, F31, FSR, -}; -#endif +#include <mips/regnum.h> diff --git a/sys/arch/pmax/include/setjmp.h b/sys/arch/pmax/include/setjmp.h index c50d15c79b5..91f84facb0d 100644 --- a/sys/arch/pmax/include/setjmp.h +++ b/sys/arch/pmax/include/setjmp.h @@ -1,7 +1,3 @@ -/* $NetBSD: setjmp.h,v 1.1 1994/12/20 10:37:05 cgd Exp $ */ +/* $OpenBSD: setjmp.h,v 1.4 1998/05/08 17:34:48 millert Exp $ */ -/* - * machine/setjmp.h: machine dependent setjmp-related information. - */ - -#define _JBLEN 83 /* size, in longs, of a jmp_buf */ +#include <mips/setjmp.h> diff --git a/sys/arch/pmax/include/signal.h b/sys/arch/pmax/include/signal.h index b17ab5b9c54..fe0c89276c7 100644 --- a/sys/arch/pmax/include/signal.h +++ b/sys/arch/pmax/include/signal.h @@ -1,67 +1,3 @@ -/* $NetBSD: signal.h,v 1.7 1996/03/19 04:22:04 jonathan Exp $ */ +/* $OpenBSD: signal.h,v 1.4 1998/05/08 17:34:50 millert Exp $ */ -/* - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Ralph Campbell. - * - * 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. - * - * @(#)signal.h 8.1 (Berkeley) 6/10/93 - */ - -/* - * Machine-dependent signal definitions - */ - -typedef int sig_atomic_t; - -#ifndef _ANSI_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_mask; /* signal mask to restore */ - int sc_pc; /* pc at time of signal */ - int sc_regs[32]; /* processor regs 0 to 31 */ - int mullo, mulhi; /* mullo and mulhi registers... */ - int sc_fpused; /* fp has been used */ - int sc_fpregs[33]; /* fp regs 0 to 31 and csr */ - int sc_fpc_eir; /* floating point exception instruction reg */ - int sc_xxx[8]; /* XXX reserved */ -}; - -#endif /* !_ANSI_SOURCE */ +#include <mips/signal.h> diff --git a/sys/arch/pmax/include/stdarg.h b/sys/arch/pmax/include/stdarg.h index 1049e7ba9ec..0f8605d27e0 100644 --- a/sys/arch/pmax/include/stdarg.h +++ b/sys/arch/pmax/include/stdarg.h @@ -1,64 +1,3 @@ -/* $NetBSD: stdarg.h,v 1.11 1996/02/26 23:29:08 jonathan Exp $ */ +/* $OpenBSD: stdarg.h,v 1.5 1998/05/08 17:34:51 millert Exp $ */ -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. 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 8.1 (Berkeley) 6/10/93 - */ - -#ifndef _PMAX_STDARG_H_ -#define _PMAX_STDARG_H_ - -#include <machine/ansi.h> - -typedef _BSD_VA_LIST_ va_list; - -#define __va_promote(type) \ - (((sizeof(type) + sizeof(int) - 1) / sizeof(int)) * sizeof(int)) - -#define va_start(ap, last) \ - (ap = ((char *)&(last) + __va_promote(last))) - -#ifdef _KERNEL -#define va_arg(ap, type) \ - ((type *)(ap += sizeof(type)))[-1] -#else -#define va_arg(ap, type) \ - ((type *)(ap += sizeof(type) == sizeof(int) ? sizeof(type) : \ - sizeof(type) > sizeof(int) ? \ - (-(int)(ap) & (sizeof(type) - 1)) + sizeof(type) : \ - (abort(), 0)))[-1] -#endif - -#define va_end(ap) ((void) 0) - -#endif /* !_PMAX_STDARG_H_ */ +#include <mips/stdarg.h> diff --git a/sys/arch/pmax/include/trap.h b/sys/arch/pmax/include/trap.h index 56deedb7b41..09776f31f1d 100644 --- a/sys/arch/pmax/include/trap.h +++ b/sys/arch/pmax/include/trap.h @@ -1,73 +1,3 @@ -/* $NetBSD: trap.h,v 1.6 1996/03/24 08:12:53 jonathan Exp $ */ +/* $OpenBSD: trap.h,v 1.4 1998/05/08 17:34:52 millert Exp $ */ -/* - * Copyright (c) 1988 University of Utah. - * Copyright (c) 1992, 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 and Ralph Campbell. - * - * 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: Utah Hdr: trap.h 1.1 90/07/09 - * - * @(#)trap.h 8.1 (Berkeley) 6/10/93 - */ - -/* - * Trap codes - * also known in trap.c for name strings - */ - -#define T_INT 0 /* Interrupt pending */ -#define T_TLB_MOD 1 /* TLB modified fault */ -#define T_TLB_LD_MISS 2 /* TLB miss on load or ifetch */ -#define T_TLB_ST_MISS 3 /* TLB miss on a store */ -#define T_ADDR_ERR_LD 4 /* Address error on a load or ifetch */ -#define T_ADDR_ERR_ST 5 /* Address error on a store */ -#define T_BUS_ERR_IFETCH 6 /* Bus error on an ifetch */ -#define T_BUS_ERR_LD_ST 7 /* Bus error on a load or store */ -#define T_SYSCALL 8 /* System call */ -#define T_BREAK 9 /* Breakpoint */ -#define T_RES_INST 10 /* Reserved instruction exception */ -#define T_COP_UNUSABLE 11 /* Coprocessor unusable */ -#define T_OVFLOW 12 /* Arithmetic overflow */ - -/* - * Trap definitions added for r4000 port. - */ -#define T_TRAP 13 /* Trap instruction */ -#define T_VCEI 14 /* Virtual coherency instruction */ -#define T_FPE 15 /* Floating point exception */ -#define T_WATCH 23 /* Watch address reference */ -#define T_VCED 31 /* Virtual coherency data */ - -#define T_USER 0x20 /* user-mode flag or'ed with type */ +#include <mips/trap.h> diff --git a/sys/arch/pmax/include/types.h b/sys/arch/pmax/include/types.h index 2d4ea03a2c4..cec54aef5c8 100644 --- a/sys/arch/pmax/include/types.h +++ b/sys/arch/pmax/include/types.h @@ -1,80 +1,3 @@ -/* $NetBSD: types.h,v 1.13 1996/12/05 00:13:56 cgd Exp $ */ +/* $OpenBSD: types.h,v 1.7 1998/05/08 17:34:53 millert Exp $ */ -/*- - -#define __BROKEN_INDIRECT_CONFIG - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Ralph Campbell. - * - * 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 8.3 (Berkeley) 1/5/94 - */ - -#ifndef _MACHTYPES_H_ -#define _MACHTYPES_H_ - -#include <sys/cdefs.h> - -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) -typedef struct _physadr { - int r[1]; -} *physadr; - -typedef struct label_t { - int val[12]; -} label_t; -#endif - -typedef unsigned long vm_offset_t; -typedef unsigned long vm_size_t; - -/* - * Basic integral types. Omit the typedef if - * not possible for a machine/compiler combination. - */ -#define __BIT_TYPES_DEFINED__ -typedef __signed char int8_t; -typedef unsigned char u_int8_t; -typedef short int16_t; -typedef unsigned short u_int16_t; -typedef int int32_t; -typedef unsigned int u_int32_t; -typedef long long int64_t; -typedef unsigned long long u_int64_t; - -typedef int32_t register_t; - -#define __SWAP_BROKEN -#define __FORK_BRAINDAMAGE - -#endif /* _MACHTYPES_H_ */ +#include <mips/types.h> |