diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1997-03-31 00:24:18 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1997-03-31 00:24:18 +0000 |
commit | 26a1f41dab0b61fb8120a6bf4cae09749192dea9 (patch) | |
tree | 13f23e98cf9b8d97d96dd60e9a2519226bbaaf65 /sys/arch/mvme68k/include | |
parent | bf76ddcd26e8460a7049518ccb5bcd911759ddbc (diff) |
Modernize OpenBSD/mvme68k to match various changes in m68k and hp300 code.
Compiles, but untested for lack of hardware.
Diffstat (limited to 'sys/arch/mvme68k/include')
-rw-r--r-- | sys/arch/mvme68k/include/autoconf.h | 7 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/cdefs.h | 7 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/cpu.h | 6 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/disklabel.h | 8 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/exec.h | 8 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/float.h | 7 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/hpux_machdep.h | 80 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/nvram.h | 7 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/param.h | 16 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/pcb.h | 7 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/pmap.h | 8 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/proc.h | 8 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/pte.h | 8 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/reg.h | 7 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/types.h | 7 |
15 files changed, 145 insertions, 46 deletions
diff --git a/sys/arch/mvme68k/include/autoconf.h b/sys/arch/mvme68k/include/autoconf.h index c7c19ac876e..1249e5122b1 100644 --- a/sys/arch/mvme68k/include/autoconf.h +++ b/sys/arch/mvme68k/include/autoconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.h,v 1.5 1996/06/11 10:15:43 deraadt Exp $ */ +/* $OpenBSD: autoconf.h,v 1.6 1997/03/31 00:23:58 downsj Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -31,6 +31,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _MVME68K_AUTOCONF_H_ +#define _MVME68K_AUTOCONF_H_ + struct confargs { int ca_bustype; void *ca_vaddr; @@ -65,3 +68,5 @@ struct device *bootdv; /* boot device */ void *mapiodev __P((void *pa, int size)); void unmapiodev __P((void *kva, int size)); + +#endif diff --git a/sys/arch/mvme68k/include/cdefs.h b/sys/arch/mvme68k/include/cdefs.h index 8ab985b5069..7ff575c6da4 100644 --- a/sys/arch/mvme68k/include/cdefs.h +++ b/sys/arch/mvme68k/include/cdefs.h @@ -1,8 +1,3 @@ -/* $OpenBSD: cdefs.h,v 1.3 1996/04/28 10:56:05 deraadt Exp $ */ - -#ifndef _MACHINE_CDEFS_H_ -#define _MACHINE_CDEFS_H_ +/* $OpenBSD: cdefs.h,v 1.4 1997/03/31 00:23:58 downsj Exp $ */ #include <m68k/cdefs.h> - -#endif diff --git a/sys/arch/mvme68k/include/cpu.h b/sys/arch/mvme68k/include/cpu.h index 492e23dd052..ecb5325b953 100644 --- a/sys/arch/mvme68k/include/cpu.h +++ b/sys/arch/mvme68k/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.5 1997/02/10 17:49:09 deraadt Exp $ */ +/* $OpenBSD: cpu.h,v 1.6 1997/03/31 00:23:59 downsj Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -71,6 +71,9 @@ * @(#)cpu.h 8.4 (Berkeley) 1/5/94 */ +#ifndef _MVME68K_CPU_H_ +#define _MVME68K_CPU_H_ + /* * Exported definitions unique to mvme68k/68k cpu support. */ @@ -280,3 +283,4 @@ struct haltvec { void (*hv_fn) __P((void)); int hv_pri; }; +#endif diff --git a/sys/arch/mvme68k/include/disklabel.h b/sys/arch/mvme68k/include/disklabel.h index b3cc39689b6..f2b386c6a9b 100644 --- a/sys/arch/mvme68k/include/disklabel.h +++ b/sys/arch/mvme68k/include/disklabel.h @@ -1,3 +1,5 @@ +/* $OpenBSD: disklabel.h,v 1.5 1997/03/31 00:24:00 downsj Exp $ */ + /* * Copyright (c) 1996 Nivas Madhur * Copyright (c) 1995 Dale Rahn. @@ -29,8 +31,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MACHINE_DISKLABEL_H_ -#define _MACHINE_DISKLABEL_H_ +#ifndef _MVME68K_DISKLABEL_H_ +#define _MVME68K_DISKLABEL_H_ /* number of boot pieces , ie xxboot bootxx */ #define NUMBOOT 2 @@ -149,4 +151,4 @@ struct cpu_disklabel { u_long magic2; u_char cfg_4[192]; }; -#endif _MACHINE_DISKLABEL_H_ +#endif /* _MVME68K_DISKLABEL_H_ */ diff --git a/sys/arch/mvme68k/include/exec.h b/sys/arch/mvme68k/include/exec.h index ef5cfd8e3e2..9de9c813006 100644 --- a/sys/arch/mvme68k/include/exec.h +++ b/sys/arch/mvme68k/include/exec.h @@ -1,4 +1,4 @@ -/* $OpenBSD: exec.h,v 1.5 1996/12/23 02:42:31 deraadt Exp $ */ +/* $OpenBSD: exec.h,v 1.6 1997/03/31 00:24:01 downsj Exp $ */ /* * Copyright (c) 1993 Christopher G. Demetriou @@ -26,8 +26,8 @@ * (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_EXEC_H_ -#define _MACHINE_EXEC_H_ +#ifndef _MVME68K_EXEC_H_ +#define _MVME68K_EXEC_H_ #define __LDPGSZ 8192 @@ -57,4 +57,4 @@ struct relocation_info_m68k { #define _KERN_DO_ELF #endif -#endif /* _MACHINE_EXEC_H_ */ +#endif /* _MVME68K_EXEC_H_ */ diff --git a/sys/arch/mvme68k/include/float.h b/sys/arch/mvme68k/include/float.h index b171bd9dea8..6c9b3c0a9ac 100644 --- a/sys/arch/mvme68k/include/float.h +++ b/sys/arch/mvme68k/include/float.h @@ -1,8 +1,3 @@ -/* $OpenBSD: float.h,v 1.3 1996/04/28 10:56:18 deraadt Exp $ */ - -#ifndef _MACHINE_FLOAT_H_ -#define _MACHINE_FLOAT_H_ +/* $OpenBSD: float.h,v 1.4 1997/03/31 00:24:01 downsj Exp $ */ #include <m68k/float.h> - -#endif diff --git a/sys/arch/mvme68k/include/hpux_machdep.h b/sys/arch/mvme68k/include/hpux_machdep.h new file mode 100644 index 00000000000..e9133eb543f --- /dev/null +++ b/sys/arch/mvme68k/include/hpux_machdep.h @@ -0,0 +1,80 @@ +/* $OpenBSD: hpux_machdep.h,v 1.1 1997/03/31 00:24:02 downsj Exp $ */ +/* $NetBSD: hpux_machdep.h,v 1.6 1997/03/16 10:02:40 thorpej Exp $ */ + +/*- + * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Jason R. Thorpe. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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 REGENTS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _MVME68K_HPUX_MACHDEP_H_ +#define _MVME68K_HPUX_MACHDEP_H_ + +/* + * 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 hpuxsigcontext { + int hsc_syscall; /* ??? (syscall number?) */ + char hsc_action; /* ??? */ + char hsc_pad1; + char hsc_pad2; + char hsc_onstack; /* sigstack state to restore */ + int hsc_mask; /* signal mask to restore */ + int hsc_sp; /* sp to restore */ + short hsc_ps; /* psl to restore */ + int hsc_pc; /* pc to restore */ + + /* + * The following are not actually used by HP-UX. They exist + * for the convenience of the compatibility code. + */ + short _hsc_pad; + int _hsc_ap; /* pointer to hpuxsigstate */ +}; + +int hpux_cpu_makecmds __P((struct proc *, struct exec_package *)); +int hpux_cpu_vmcmd __P((struct proc *, struct exec_vmcmd *)); +void hpux_cpu_bsd_to_hpux_stat __P((struct stat *, struct hpux_stat *)); +void hpux_cpu_uname __P((struct hpux_utsname *)); +int hpux_cpu_sysconf_arch __P((void)); +int hpux_to_bsd_uoff __P((int *, int *, struct proc *)); + +void hpux_sendsig __P((sig_t, int, int, u_long, int, union sigval)); +void hpux_setregs __P((struct proc *, struct exec_package *, + u_long, register_t *)); + +#endif /* ! _MVME68K_HPUX_MACHDEP_H_ */ diff --git a/sys/arch/mvme68k/include/nvram.h b/sys/arch/mvme68k/include/nvram.h index 03ac2f50d4e..2325ef8cfbd 100644 --- a/sys/arch/mvme68k/include/nvram.h +++ b/sys/arch/mvme68k/include/nvram.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nvram.h,v 1.3 1996/04/28 10:56:23 deraadt Exp $ */ +/* $OpenBSD: nvram.h,v 1.4 1997/03/31 00:24:03 downsj Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -31,6 +31,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _MVME68K_NVRAM_H_ +#define _MVME68K_NVRAM_H_ + struct nvram_147 { u_char user[0x400]; u_char os[0x200]; @@ -77,3 +80,5 @@ struct nvram_16x { } conf; /*struct clockreg cl; */ }; + +#endif diff --git a/sys/arch/mvme68k/include/param.h b/sys/arch/mvme68k/include/param.h index 5b7219ccc5e..abc3e5e126c 100644 --- a/sys/arch/mvme68k/include/param.h +++ b/sys/arch/mvme68k/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.4 1996/04/28 10:55:42 deraadt Exp $ */ +/* $OpenBSD: param.h,v 1.5 1997/03/31 00:24:04 downsj Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -181,3 +181,17 @@ #ifdef _KERNEL #define DELAY(n) delay(n) #endif + +#ifdef COMPAT_HPUX +/* + * Constants/macros for HPUX multiple mapping of user address space. + * Pages in the first 256Mb are mapped in at every 256Mb segment. + */ +#define HPMMMASK 0xF0000000 +#define ISHPMMADDR(v) \ + ((curproc->p_md.md_flags & MDP_HPUXMMAP) && \ + ((unsigned)(v) & HPMMMASK) && \ + ((unsigned)(v) & HPMMMASK) != HPMMMASK) +#define HPMMBASEADDR(v) \ + ((unsigned)(v) & ~HPMMMASK) +#endif diff --git a/sys/arch/mvme68k/include/pcb.h b/sys/arch/mvme68k/include/pcb.h index 211ecc78c42..bbdee873ac5 100644 --- a/sys/arch/mvme68k/include/pcb.h +++ b/sys/arch/mvme68k/include/pcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcb.h,v 1.3 1996/04/28 10:56:24 deraadt Exp $ */ +/* $OpenBSD: pcb.h,v 1.4 1997/03/31 00:24:04 downsj Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -42,6 +42,9 @@ * @(#)pcb.h 8.1 (Berkeley) 6/10/93 */ +#ifndef _MVME68K_PCB_H_ +#define _MVME68K_PCB_H_ + #include <machine/frame.h> /* @@ -65,3 +68,5 @@ struct pcb { struct md_coredump { int md_exec[16]; /* exec structure for HP-UX core dumps */ }; + +#endif diff --git a/sys/arch/mvme68k/include/pmap.h b/sys/arch/mvme68k/include/pmap.h index ac1a785e455..905b3c577e8 100644 --- a/sys/arch/mvme68k/include/pmap.h +++ b/sys/arch/mvme68k/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.3 1996/04/28 10:56:25 deraadt Exp $ */ +/* $OpenBSD: pmap.h,v 1.4 1997/03/31 00:24:05 downsj Exp $ */ /* * Copyright (c) 1987 Carnegie-Mellon University @@ -40,8 +40,8 @@ * @(#)pmap.h 8.1 (Berkeley) 6/10/93 */ -#ifndef _MACHINE_PMAP_H_ -#define _MACHINE_PMAP_H_ +#ifndef _MVME68K_PMAP_H_ +#define _MVME68K_PMAP_H_ #include <machine/pte.h> @@ -155,4 +155,4 @@ extern pt_entry_t *Sysmap; extern char *vmmap; /* map for mem, dumps, etc. */ #endif /* _KERNEL */ -#endif /* !_MACHINE_PMAP_H_ */ +#endif /* !_MVME68K_PMAP_H_ */ diff --git a/sys/arch/mvme68k/include/proc.h b/sys/arch/mvme68k/include/proc.h index 1711d32893b..f55f547f83b 100644 --- a/sys/arch/mvme68k/include/proc.h +++ b/sys/arch/mvme68k/include/proc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.h,v 1.4 1996/04/28 10:56:25 deraadt Exp $ */ +/* $OpenBSD: proc.h,v 1.5 1997/03/31 00:24:06 downsj Exp $ */ /* * Copyright (c) 1991, 1993 @@ -35,6 +35,9 @@ * @(#)proc.h 8.1 (Berkeley) 6/10/93 */ +#ifndef _MVME68K_PROC_H_ +#define _MVME68K_PROC_H_ + /* * Machine-dependent part of the proc structure for mvme68k. */ @@ -45,9 +48,10 @@ struct mdproc { /* md_flags */ #define MDP_STACKADJ 0x0002 /* frame SP adjusted; undo when syscall does ERESTART */ -#define MDP_HPUXTRACE 0x0004 /* being traced by HP-UX process */ #define MDP_HPUXMMAP 0x0008 /* VA space is multiply mapped */ #define MDP_CCBDATA 0x0010 /* copyback caching of data (68040) */ #define MDP_CCBSTACK 0x0020 /* copyback caching of stack (68040) */ #define MDP_UNCACHE_WX 0x0040 /* The process might modify code, so don't cache writeable executable pages. */ + +#endif diff --git a/sys/arch/mvme68k/include/pte.h b/sys/arch/mvme68k/include/pte.h index 6aa1b56f792..b5c2e6f7630 100644 --- a/sys/arch/mvme68k/include/pte.h +++ b/sys/arch/mvme68k/include/pte.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pte.h,v 1.3 1996/04/28 10:56:29 deraadt Exp $ */ +/* $OpenBSD: pte.h,v 1.4 1997/03/31 00:24:07 downsj Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -42,8 +42,8 @@ * @(#)pte.h 8.1 (Berkeley) 6/10/93 */ -#ifndef _MACHINE_PTE_H_ -#define _MACHINE_PTE_H_ +#ifndef _MVME68K_PTE_H_ +#define _MVME68K_PTE_H_ /* * m68k hardware segment/page table entries @@ -149,4 +149,4 @@ typedef int pt_entry_t; /* Mach page table entry */ #define kvtophys(va) \ ((kvtopte(va)->pg_pfnum << PGSHIFT) | ((int)(va) & PGOFSET)) -#endif /* !_MACHINE_PTE_H_ */ +#endif /* !_MVME68K_PTE_H_ */ diff --git a/sys/arch/mvme68k/include/reg.h b/sys/arch/mvme68k/include/reg.h index adfeaea12df..ae0e25f7a31 100644 --- a/sys/arch/mvme68k/include/reg.h +++ b/sys/arch/mvme68k/include/reg.h @@ -1,8 +1,3 @@ -/* $OpenBSD: reg.h,v 1.3 1996/04/28 10:56:31 deraadt Exp $ */ - -#ifndef _MACHINE_REG_H_ -#define _MACHINE_REG_H_ +/* $OpenBSD: reg.h,v 1.4 1997/03/31 00:24:08 downsj Exp $ */ #include <m68k/reg.h> - -#endif /* _MACHINE_REG_H_ */ diff --git a/sys/arch/mvme68k/include/types.h b/sys/arch/mvme68k/include/types.h index 578b5148e95..f1474b87914 100644 --- a/sys/arch/mvme68k/include/types.h +++ b/sys/arch/mvme68k/include/types.h @@ -1,10 +1,5 @@ -/* $OpenBSD: types.h,v 1.3 1996/04/28 10:56:35 deraadt Exp $ */ - -#ifndef _MACHINE_TYPES_H_ -#define _MACHINE_TYPES_H_ +/* $OpenBSD: types.h,v 1.4 1997/03/31 00:24:08 downsj Exp $ */ #include <m68k/types.h> #define __BDEVSW_DUMP_OLD_TYPE - -#endif |