diff options
34 files changed, 47 insertions, 490 deletions
diff --git a/sys/arch/hp300/conf/GENERIC b/sys/arch/hp300/conf/GENERIC index 31d29068872..f25ca470492 100644 --- a/sys/arch/hp300/conf/GENERIC +++ b/sys/arch/hp300/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.48 2010/06/29 20:30:32 guenther Exp $ +# $OpenBSD: GENERIC,v 1.49 2010/07/02 19:57:14 tedu Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -35,9 +35,6 @@ option USELEDS # make the lights twinkle option WSDISPLAY_COMPAT_RAWKBD # provide raw scancodes; needed for X11 -option COMPAT_M68K4K # compat. with NetBSD/m68k4k binaries -option COMPAT_SUNOS # SunOS/sun3 binaries - # Verbose descriptions of unconfigured DIO devices # (Warning: this compiles in a large string table) option DIOVERBOSE # recognize "unknown" DIO devices diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c index eb953f37bfb..6995e1ab882 100644 --- a/sys/arch/hp300/hp300/machdep.c +++ b/sys/arch/hp300/hp300/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.128 2010/06/29 20:30:31 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.129 2010/07/02 19:57:14 tedu Exp $ */ /* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */ /* @@ -127,10 +127,6 @@ int safepri = PSL_LOWIPL; extern u_int lowram; extern short exframesize[]; -#ifdef COMPAT_SUNOS -extern struct emul emul_sunos; -#endif - /* * Some storage space must be allocated statically because of the * early console initialization. @@ -1050,51 +1046,3 @@ done: splx(s); return(found); } - -/* - * cpu_exec_aout_makecmds(): - * cpu-dependent a.out format hook for execve(). - * - * Determine of the given exec package refers to something which we - * understand and, if so, set up the vmcmds for it. - */ -int -cpu_exec_aout_makecmds(p, epp) - struct proc *p; - struct exec_package *epp; -{ -#if defined(COMPAT_44) || defined(COMPAT_SUNOS) - u_long midmag, magic; - u_short mid; - int error; - struct exec *execp = epp->ep_hdr; -#ifdef COMPAT_SUNOS - extern int sunos_exec_aout_makecmds(struct proc *, struct exec_package *); -#endif - - midmag = ntohl(execp->a_midmag); - mid = (midmag >> 16) & 0xffff; - magic = midmag & 0xffff; - - midmag = mid << 16 | magic; - - switch (midmag) { -#ifdef COMPAT_44 - case (MID_HP300 << 16) | ZMAGIC: - error = exec_aout_prep_oldzmagic(p, epp); - break; -#endif - default: -#ifdef COMPAT_SUNOS - /* Hand it over to the SunOS emulation package. */ - error = sunos_exec_aout_makecmds(p, epp); -#else - error = ENOEXEC; -#endif - } - - return error; -#else /* !(defined(COMPAT_44) || defined(COMPAT_SUNOS)) */ - return ENOEXEC; -#endif -} diff --git a/sys/arch/hp300/hp300/trap.c b/sys/arch/hp300/hp300/trap.c index b516a8e580e..203b2df2bff 100644 --- a/sys/arch/hp300/hp300/trap.c +++ b/sys/arch/hp300/hp300/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.55 2010/06/29 20:30:31 guenther Exp $ */ +/* $OpenBSD: trap.c,v 1.56 2010/07/02 19:57:14 tedu Exp $ */ /* $NetBSD: trap.c,v 1.57 1998/02/16 20:58:31 thorpej Exp $ */ /* @@ -93,11 +93,6 @@ #include <dev/cons.h> -#ifdef COMPAT_SUNOS -#include <compat/sunos/sunos_syscall.h> -extern struct emul emul_sunos; -#endif - int writeback(struct frame *); void trap(int type, u_int code, u_int v, struct frame frame); void syscall(register_t code, struct frame frame); @@ -459,18 +454,6 @@ dopanic: return; case T_TRACE|T_USER: /* user trace trap */ -#ifdef COMPAT_SUNOS - /* - * SunOS uses Trap #2 for a "CPU cache flush". - * Just flush the on-chip caches and return. - */ - if (p->p_emul == &emul_sunos) { - ICIA(); - DCIU(); - return; - } -#endif - /* FALLTHROUGH */ case T_TRACE: /* tracing a trap instruction */ case T_TRAP15|T_USER: /* SUN user trace trap */ frame.f_sr &= ~PSL_T; @@ -983,38 +966,6 @@ syscall(code, frame) nsys = p->p_emul->e_nsysent; callp = p->p_emul->e_sysent; -#ifdef COMPAT_SUNOS - if (p->p_emul == &emul_sunos) { - /* - * SunOS passes the syscall-number on the stack, whereas - * BSD passes it in D0. So, we have to get the real "code" - * from the stack, and clean up the stack, as SunOS glue - * code assumes the kernel pops the syscall argument the - * glue pushed on the stack. Sigh... - */ - if (copyin((caddr_t)frame.f_regs[SP], &code, - sizeof(register_t)) != 0) - code = -1; - - /* - * XXX - * Don't do this for sunos_sigreturn, as there's no stored pc - * on the stack to skip, the argument follows the syscall - * number without a gap. - */ - if (code != SUNOS_SYS_sigreturn) { - frame.f_regs[SP] += sizeof (int); - /* - * remember that we adjusted the SP, - * might have to undo this if the system call - * returns ERESTART. - */ - p->p_md.md_flags |= MDP_STACKADJ; - } else - p->p_md.md_flags &= ~MDP_STACKADJ; - } -#endif - params = (caddr_t)frame.f_regs[SP] + sizeof(int); switch (code) { @@ -1102,11 +1053,6 @@ bad: #ifdef SYSCALL_DEBUG scdebug_ret(p, code, error, rval); #endif -#ifdef COMPAT_SUNOS - /* need new p-value for this */ - if (error == ERESTART && (p->p_md.md_flags & MDP_STACKADJ)) - frame.f_regs[SP] -= sizeof (int); -#endif userret(p); #ifdef KTRACE if (KTRPOINT(p, KTR_SYSRET)) diff --git a/sys/arch/m68k/conf/files.m68k b/sys/arch/m68k/conf/files.m68k index 6d974de94f1..755747f2c79 100644 --- a/sys/arch/m68k/conf/files.m68k +++ b/sys/arch/m68k/conf/files.m68k @@ -1,4 +1,4 @@ -# $OpenBSD: files.m68k,v 1.20 2009/03/15 20:40:25 miod Exp $ +# $OpenBSD: files.m68k,v 1.21 2010/07/02 19:57:14 tedu Exp $ # $NetBSD: files.m68k,v 1.18 1997/06/06 23:15:28 veego Exp $ # file arch/m68k/m68k/bcopy.s @@ -19,17 +19,6 @@ file arch/m68k/m68k/regdump.c file arch/m68k/m68k/sig_machdep.c file arch/m68k/m68k/softintr.c -# -# Older m68k4k executables binary compatibility -# -include "compat/m68k4k/files.m68k4k" - -# -# SunOS binary compatibility -# -include "compat/sunos/files.sunos" -file arch/m68k/m68k/sunos_machdep.c compat_sunos - # quad support is necessary for 32 bit architectures file lib/libkern/adddi3.c file lib/libkern/anddi3.c diff --git a/sys/arch/m68k/include/exec.h b/sys/arch/m68k/include/exec.h index 9838de6d92a..91334b673f6 100644 --- a/sys/arch/m68k/include/exec.h +++ b/sys/arch/m68k/include/exec.h @@ -1,4 +1,4 @@ -/* $OpenBSD: exec.h,v 1.3 2003/10/09 21:48:47 miod Exp $ */ +/* $OpenBSD: exec.h,v 1.4 2010/07/02 19:57:14 tedu Exp $ */ /* $NetBSD: exec.h,v 1.8 1994/11/21 21:33:39 gwr Exp $ */ /* @@ -57,8 +57,7 @@ struct relocation_info_m68k { #define _NLIST_DO_ELF #define _KERN_DO_AOUT -#if defined(COMPAT_LINUX) || defined(COMPAT_SVR4) -#define _KERN_DO_ELF -#endif + +#define cpu_exec_aout_makecmds(p, epp) (ENOEXEC) #endif /* _M68K_EXEC_H_ */ diff --git a/sys/arch/m68k/m68k/m68k_machdep.c b/sys/arch/m68k/m68k/m68k_machdep.c index d66adba3f9f..1bede2cdeb0 100644 --- a/sys/arch/m68k/m68k/m68k_machdep.c +++ b/sys/arch/m68k/m68k/m68k_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m68k_machdep.c,v 1.13 2008/06/26 05:42:11 ray Exp $ */ +/* $OpenBSD: m68k_machdep.c,v 1.14 2010/07/02 19:57:14 tedu Exp $ */ /* $NetBSD: m68k_machdep.c,v 1.3 1997/06/12 09:57:04 veego Exp $ */ /*- @@ -54,9 +54,6 @@ setregs(p, pack, stack, retval) u_long stack; register_t *retval; { -#ifdef COMPAT_SUNOS - extern struct emul emul_sunos; -#endif struct frame *frame = (struct frame *)p->p_md.md_regs; frame->f_sr = PSL_USERSET; @@ -71,18 +68,6 @@ setregs(p, pack, stack, retval) m68881_restore(&p->p_addr->u_pcb.pcb_fpregs); } -#ifdef COMPAT_SUNOS - /* - * SunOS' ld.so does self-modifying code without knowing - * about the 040's cache purging needs. So we need to uncache - * writeable executable pages. - */ - if (p->p_emul == &emul_sunos) - p->p_md.md_flags |= MDP_UNCACHE_WX; - else - p->p_md.md_flags &= ~MDP_UNCACHE_WX; -#endif - retval[1] = 0; } diff --git a/sys/arch/mac68k/conf/GENERIC b/sys/arch/mac68k/conf/GENERIC index 6a5cede310c..b61603b92ec 100644 --- a/sys/arch/mac68k/conf/GENERIC +++ b/sys/arch/mac68k/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.48 2006/02/14 18:11:03 miod Exp $ +# $OpenBSD: GENERIC,v 1.49 2010/07/02 19:57:14 tedu Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -19,7 +19,6 @@ option M68030 option M68020 # Must have 68851 PMMU option FPSP option FPU_EMULATE -option COMPAT_SUNOS # SunOS m68k binary compatibility option ADBVERBOSE option WSDISPLAY_COMPAT_RAWKBD # provide raw scancodes; needed for X11 diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c index 22622ab2289..e9516dc9df8 100644 --- a/sys/arch/mac68k/mac68k/machdep.c +++ b/sys/arch/mac68k/mac68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.154 2010/06/27 03:03:48 thib Exp $ */ +/* $OpenBSD: machdep.c,v 1.155 2010/07/02 19:57:14 tedu Exp $ */ /* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */ /* @@ -892,24 +892,6 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) /* NOTREACHED */ } -int -cpu_exec_aout_makecmds(p, epp) - struct proc *p; - struct exec_package *epp; -{ - int error = ENOEXEC; - -#ifdef COMPAT_SUNOS - { - extern int sunos_exec_aout_makecmds(struct proc *, - struct exec_package *); - if ((error = sunos_exec_aout_makecmds(p, epp)) == 0) - return 0; - } -#endif - return error; -} - static char *envbuf = NULL; /* diff --git a/sys/arch/mac68k/mac68k/trap.c b/sys/arch/mac68k/mac68k/trap.c index ddcb73577df..b0ffcc19754 100644 --- a/sys/arch/mac68k/mac68k/trap.c +++ b/sys/arch/mac68k/mac68k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.56 2009/03/15 20:40:25 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.57 2010/07/02 19:57:14 tedu Exp $ */ /* $NetBSD: trap.c,v 1.68 1998/12/22 08:47:07 scottr Exp $ */ /* @@ -73,11 +73,6 @@ #include <uvm/uvm_extern.h> #include <uvm/uvm_pmap.h> -#ifdef COMPAT_SUNOS -#include <compat/sunos/sunos_syscall.h> -extern struct emul emul_sunos; -#endif - int astpending; char *trap_type[] = { @@ -437,20 +432,6 @@ copyfault: return; case T_TRACE|T_USER: /* user trace trap */ -#ifdef COMPAT_SUNOS - /* - * SunOS uses Trap #2 for a "CPU cache flush" - * Just flush the on-chip caches and return. - * XXX - Too bad OpenBSD uses trap 2... - */ - if (p->p_emul == &emul_sunos) { - ICIA(); - DCIU(); - /* get out fast */ - return; - } -#endif - /* FALLTHROUGH */ case T_TRACE: /* Kernel trace trap */ case T_TRAP15|T_USER: /* Sun user trace trap */ frame.f_sr &= ~PSL_T; @@ -962,38 +943,6 @@ syscall(code, frame) nsys = p->p_emul->e_nsysent; callp = p->p_emul->e_sysent; -#ifdef COMPAT_SUNOS - if (p->p_emul == &emul_sunos) { - /* - * SunOS passes the syscall-number on the stack, whereas - * BSD passes it in D0. So, we have to get the real "code" - * from the stack, and clean up the stack, as SunOS glue - * code assumes the kernel pops the syscall argument the - * glue pushed on the stack. Sigh... - */ - if (copyin((caddr_t)frame.f_regs[SP], &code, - sizeof(register_t)) != 0) - code = -1; - - /* - * XXX - * Don't do this for sunos_sigreturn, as there's no stored pc - * on the stack to skip, the argument follows the syscall - * number without a gap. - */ - if (code != SUNOS_SYS_sigreturn) { - frame.f_regs[SP] += sizeof (int); - /* - * remember that we adjusted the SP, - * might have to undo this if the system call - * returns ERESTART. - */ - p->p_md.md_flags |= MDP_STACKADJ; - } else - p->p_md.md_flags &= ~MDP_STACKADJ; - } -#endif - params = (caddr_t)frame.f_regs[SP] + sizeof(int); switch (code) { @@ -1081,11 +1030,6 @@ bad: #ifdef SYSCALL_DEBUG scdebug_ret(p, code, error, rval); #endif -#ifdef COMPAT_SUNOS - /* need new p-value for this */ - if (error == ERESTART && (p->p_md.md_flags & MDP_STACKADJ)) - frame.f_regs[SP] -= sizeof (int); -#endif userret(p); #ifdef KTRACE if (KTRPOINT(p, KTR_SYSRET)) diff --git a/sys/arch/mvme68k/conf/GENERIC b/sys/arch/mvme68k/conf/GENERIC index 7edadf1cd98..7d1cc702355 100644 --- a/sys/arch/mvme68k/conf/GENERIC +++ b/sys/arch/mvme68k/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.33 2010/06/29 20:30:33 guenther Exp $ +# $OpenBSD: GENERIC,v 1.34 2010/07/02 19:57:14 tedu Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -27,8 +27,6 @@ option MVME167 # includes 166 (requires M68040, FPSP) option MVME172 # (requires M68060, 060SP, FPSP) option MVME177 # includes 176 (requires M68060, 060SP, FPSP) -option COMPAT_SUNOS -option COMPAT_M68K4K config bsd swap generic diff --git a/sys/arch/mvme68k/conf/MVME147 b/sys/arch/mvme68k/conf/MVME147 index 1652288e748..96ae96188cc 100644 --- a/sys/arch/mvme68k/conf/MVME147 +++ b/sys/arch/mvme68k/conf/MVME147 @@ -1,4 +1,4 @@ -# $OpenBSD: MVME147,v 1.23 2010/06/29 20:30:33 guenther Exp $ +# $OpenBSD: MVME147,v 1.24 2010/07/02 19:57:14 tedu Exp $ machine mvme68k m68k @@ -8,8 +8,6 @@ option M68030 # support for 030 option MVME147 # (requires M68030) -option COMPAT_SUNOS -option COMPAT_M68K4K maxusers 16 diff --git a/sys/arch/mvme68k/conf/MVME162 b/sys/arch/mvme68k/conf/MVME162 index 9bfd149cdb9..eb17009e5b1 100644 --- a/sys/arch/mvme68k/conf/MVME162 +++ b/sys/arch/mvme68k/conf/MVME162 @@ -1,4 +1,4 @@ -# $OpenBSD: MVME162,v 1.26 2010/06/29 20:30:33 guenther Exp $ +# $OpenBSD: MVME162,v 1.27 2010/07/02 19:57:14 tedu Exp $ machine mvme68k m68k @@ -9,8 +9,6 @@ option FPSP # MC68040 floating point support option MVME162 # (requires M68040, FPSP) -option COMPAT_SUNOS -option COMPAT_M68K4K maxusers 32 diff --git a/sys/arch/mvme68k/conf/MVME167 b/sys/arch/mvme68k/conf/MVME167 index aeb7f9ead41..78c0f30796a 100644 --- a/sys/arch/mvme68k/conf/MVME167 +++ b/sys/arch/mvme68k/conf/MVME167 @@ -1,4 +1,4 @@ -# $OpenBSD: MVME167,v 1.26 2010/06/29 20:30:33 guenther Exp $ +# $OpenBSD: MVME167,v 1.27 2010/07/02 19:57:14 tedu Exp $ machine mvme68k m68k @@ -9,8 +9,6 @@ option FPSP # MC68040 floating point support option MVME167 # includes 166 (requires M68040, FPSP) -option COMPAT_SUNOS -option COMPAT_M68K4K maxusers 32 diff --git a/sys/arch/mvme68k/conf/MVME177 b/sys/arch/mvme68k/conf/MVME177 index 536578aaac0..8f335d86ba5 100644 --- a/sys/arch/mvme68k/conf/MVME177 +++ b/sys/arch/mvme68k/conf/MVME177 @@ -1,4 +1,4 @@ -# $OpenBSD: MVME177,v 1.15 2010/06/29 20:30:33 guenther Exp $ +# $OpenBSD: MVME177,v 1.16 2010/07/02 19:57:14 tedu Exp $ machine mvme68k m68k @@ -9,9 +9,6 @@ option M060SP # ...and MC68060 support package option MVME177 # (requires M68060, 060SP, FPSP) -option COMPAT_SUNOS -option COMPAT_M68K4K - maxusers 32 config bsd swap generic diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c index 7467be7d2c7..802efa82ef1 100644 --- a/sys/arch/mvme68k/mvme68k/machdep.c +++ b/sys/arch/mvme68k/mvme68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.122 2010/06/27 12:41:23 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.123 2010/07/02 19:57:14 tedu Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -150,10 +150,6 @@ struct uvm_constraint_range *uvm_md_constraints[] = { NULL }; */ int safepri = PSL_LOWIPL; -#ifdef COMPAT_SUNOS -extern struct emul emul_sunos; -#endif - void dumpsys(void); void initvectors(void); void mvme68k_init(void); @@ -832,30 +828,6 @@ nmihand(frame) #endif } -/* - * cpu_exec_aout_makecmds(): - * cpu-dependent a.out format hook for execve(). - * - * Determine of the given exec package refers to something which we - * understand and, if so, set up the vmcmds for it. - */ -int -cpu_exec_aout_makecmds(p, epp) - struct proc *p; - struct exec_package *epp; -{ - int error = ENOEXEC; - -#ifdef COMPAT_SUNOS - { - extern int sunos_exec_aout_makecmds(struct proc *, struct exec_package *); - if ((error = sunos_exec_aout_makecmds(p, epp)) == 0) - return (0); - } -#endif - return (error); -} - u_char myea[6] = { 0x08, 0x00, 0x3e, 0xff, 0xff, 0xff}; void diff --git a/sys/arch/mvme68k/mvme68k/trap.c b/sys/arch/mvme68k/mvme68k/trap.c index 1dc734f4804..7801d574e3b 100644 --- a/sys/arch/mvme68k/mvme68k/trap.c +++ b/sys/arch/mvme68k/mvme68k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.69 2010/06/29 20:30:32 guenther Exp $ */ +/* $OpenBSD: trap.c,v 1.70 2010/07/02 19:57:14 tedu Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -82,11 +82,6 @@ #include <machine/reg.h> #include <machine/trap.h> -#ifdef COMPAT_SUNOS -#include <compat/sunos/sunos_syscall.h> -extern struct emul emul_sunos; -#endif - #include "systrace.h" #include <dev/systrace.h> @@ -230,9 +225,6 @@ trap(type, code, v, frame) register int i; u_int ucode; int typ = 0; -#ifdef COMPAT_SUNOS - extern struct emul emul_sunos; -#endif register union sigval sv; uvmexp.traps++; @@ -389,19 +381,6 @@ copyfault: return; case T_TRACE|T_USER: /* user trace trap */ -#ifdef COMPAT_SUNOS - /* - * SunOS uses Trap #2 for a "CPU cache flush" - * Just flush the on-chip caches and return. - */ - if (p->p_emul == &emul_sunos) { - ICIA(); - DCIU(); - return; - } -#endif - /* FALLTHROUGH */ - case T_TRACE: case T_TRAP15|T_USER: /* SUN user trace trap */ frame.f_sr &= ~PSL_T; @@ -902,9 +881,6 @@ syscall(code, frame) int error, opc, nsys; size_t argsize; register_t args[8], rval[2]; -#ifdef COMPAT_SUNOS - extern struct emul emul_sunos; -#endif uvmexp.syscalls++; if (!USERMODE(frame.f_sr)) @@ -916,38 +892,6 @@ syscall(code, frame) nsys = p->p_emul->e_nsysent; callp = p->p_emul->e_sysent; -#ifdef COMPAT_SUNOS - if (p->p_emul == &emul_sunos) { - /* - * SunOS passes the syscall-number on the stack, whereas - * BSD passes it in D0. So, we have to get the real "code" - * from the stack, and clean up the stack, as SunOS glue - * code assumes the kernel pops the syscall argument the - * glue pushed on the stack. Sigh... - */ - if (copyin((caddr_t)frame.f_regs[SP], &code, - sizeof(register_t)) != 0) - code = -1; - - /* - * XXX - * Don't do this for sunos_sigreturn, as there's no stored pc - * on the stack to skip, the argument follows the syscall - * number without a gap. - */ - if (code != SUNOS_SYS_sigreturn) { - frame.f_regs[SP] += sizeof (int); - /* - * remember that we adjusted the SP, - * might have to undo this if the system call - * returns ERESTART. - */ - p->p_md.md_flags |= MDP_STACKADJ; - } else - p->p_md.md_flags &= ~MDP_STACKADJ; - } -#endif - params = (caddr_t)frame.f_regs[SP] + sizeof(int); switch (code) { @@ -1035,11 +979,6 @@ bad: #ifdef SYSCALL_DEBUG scdebug_ret(p, code, error, rval); #endif -#ifdef COMPAT_SUNOS - /* need new p-value for this */ - if (error == ERESTART && (p->p_md.md_flags & MDP_STACKADJ)) - frame.f_regs[SP] -= sizeof (int); -#endif userret(p); #ifdef KTRACE if (KTRPOINT(p, KTR_SYSRET)) diff --git a/sys/arch/solbourne/solbourne/machdep.c b/sys/arch/solbourne/solbourne/machdep.c index f3bc2efa62b..07d7372962a 100644 --- a/sys/arch/solbourne/solbourne/machdep.c +++ b/sys/arch/solbourne/solbourne/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.15 2010/06/27 13:28:47 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.16 2010/07/02 19:57:14 tedu Exp $ */ /* OpenBSD: machdep.c,v 1.105 2005/04/11 15:13:01 deraadt Exp */ /* @@ -296,11 +296,7 @@ int sigpid = 0; struct sigframe { int sf_signo; /* signal number */ siginfo_t *sf_sip; /* points to siginfo_t */ -#ifdef COMPAT_SUNOS - struct sigcontext *sf_scp; /* points to user addr of sigcontext */ -#else int sf_xxx; /* placeholder */ -#endif caddr_t sf_addr; /* SunOS compat */ struct sigcontext sf_sc; /* actual sigcontext */ siginfo_t sf_si; @@ -383,9 +379,6 @@ sendsig(catcher, sig, mask, code, type, val) struct trapframe *tf; int caddr, oonstack, oldsp, newsp; struct sigframe sf; -#ifdef COMPAT_SUNOS - extern struct emul emul_sunos; -#endif tf = p->p_md.md_tf; oldsp = tf->tf_out[6]; @@ -415,13 +408,6 @@ sendsig(catcher, sig, mask, code, type, val) */ sf.sf_signo = sig; sf.sf_sip = NULL; -#ifdef COMPAT_SUNOS - if (p->p_emul == &emul_sunos) { - sf.sf_sip = (void *)code; /* SunOS has "int code" */ - sf.sf_scp = &fp->sf_sc; - sf.sf_addr = val.sival_ptr; - } -#endif /* * Build the signal context to be used by sigreturn. @@ -475,15 +461,8 @@ sendsig(catcher, sig, mask, code, type, val) * Arrange to continue execution at the code copied out in exec(). * It needs the function to call in %g1, and a new stack pointer. */ -#ifdef COMPAT_SUNOS - if (psp->ps_usertramp & sigmask(sig)) { - caddr = (int)catcher; /* user does his own trampolining */ - } else -#endif - { - caddr = p->p_sigcode; - tf->tf_global[1] = (int)catcher; - } + caddr = p->p_sigcode; + tf->tf_global[1] = (int)catcher; tf->tf_pc = caddr; tf->tf_npc = caddr + 4; tf->tf_out[6] = newsp; @@ -686,21 +665,6 @@ mapdev(phys, virt, offset, size) return (ret); } -#ifdef COMPAT_SUNOS -int -cpu_exec_aout_makecmds(p, epp) - struct proc *p; - struct exec_package *epp; -{ - int error = ENOEXEC; - - extern int sunos_exec_aout_makecmds(struct proc *, struct exec_package *); - if ((error = sunos_exec_aout_makecmds(p, epp)) == 0) - return 0; - return error; -} -#endif - /* * Soft interrupt handling */ diff --git a/sys/arch/sparc/conf/GENERIC b/sys/arch/sparc/conf/GENERIC index ede231f7010..101281389fc 100644 --- a/sys/arch/sparc/conf/GENERIC +++ b/sys/arch/sparc/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.95 2010/06/07 19:54:32 miod Exp $ +# $OpenBSD: GENERIC,v 1.96 2010/07/02 19:57:14 tedu Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -25,8 +25,6 @@ option SUN4M # sun4m - SS10, SS20, Classic, etc. #option KGDBDEV=0xc01 # kgdb device number (dev_t) #option KGDBRATE=38400 # baud rate -# Options for SPARCstation hardware -option COMPAT_SUNOS # compatibility with SunOS binaries option COMPAT_SVR4 # compatibility with SVR4 binaries option PROCFS # /proc diff --git a/sys/arch/sparc/conf/RAMDISK b/sys/arch/sparc/conf/RAMDISK index cac3a844612..708c32f09cd 100644 --- a/sys/arch/sparc/conf/RAMDISK +++ b/sys/arch/sparc/conf/RAMDISK @@ -1,4 +1,4 @@ -# $OpenBSD: RAMDISK,v 1.68 2010/06/07 20:46:21 miod Exp $ +# $OpenBSD: RAMDISK,v 1.69 2010/07/02 19:57:15 tedu Exp $ # $NetBSD: GENERIC,v 1.28.2.1 1996/07/02 23:55:22 jtc Exp $ # Machine architecture; required by config(8) @@ -38,8 +38,6 @@ option SUN4M # sun4m - SS10, SS20, Classic, etc. #option KGDBDEV=0xc01 # kgdb device number (dev_t) #option KGDBRATE=38400 # baud rate -# Options for SPARCstation hardware -#option COMPAT_SUNOS # compatibility with SunOS binaries #option COMPAT_SVR4 # compatibility with SVR4 binaries option WSEMUL_SUN # provide sun terminal emulation; required diff --git a/sys/arch/sparc/conf/SUN4 b/sys/arch/sparc/conf/SUN4 index 38d94aa474d..9dad08c15dc 100644 --- a/sys/arch/sparc/conf/SUN4 +++ b/sys/arch/sparc/conf/SUN4 @@ -1,4 +1,4 @@ -# $OpenBSD: SUN4,v 1.37 2010/06/07 19:54:32 miod Exp $ +# $OpenBSD: SUN4,v 1.38 2010/07/02 19:57:15 tedu Exp $ # $NetBSD: GENERIC,v 1.28.2.1 1996/07/02 23:55:22 jtc Exp $ # Machine architecture; required by config(8) @@ -11,7 +11,6 @@ option SUN4 # sun4/100, sun4/200, sun4/300 #option MMU_3L # 3-level MMU on sun4/400 # Options for SPARCstation hardware -option COMPAT_SUNOS # compatibility with SunOS binaries option COMPAT_SVR4 # compatibility with SVR4 binaries option PROCFS # /proc diff --git a/sys/arch/sparc/conf/SUN4C b/sys/arch/sparc/conf/SUN4C index 52526975cfe..de472ba8d54 100644 --- a/sys/arch/sparc/conf/SUN4C +++ b/sys/arch/sparc/conf/SUN4C @@ -1,4 +1,4 @@ -# $OpenBSD: SUN4C,v 1.60 2009/06/24 11:38:40 deraadt Exp $ +# $OpenBSD: SUN4C,v 1.61 2010/07/02 19:57:15 tedu Exp $ # $NetBSD: GENERIC,v 1.48 1997/08/23 19:19:01 mjacob Exp $ # Machine architecture; required by config(8) @@ -14,7 +14,6 @@ option SUN4C # sun4c - SS1, 1+, 2, ELC, SLC, IPC, IPX, etc. #option KGDBRATE=38400 # baud rate # Options for SPARCstation hardware -option COMPAT_SUNOS # compatibility with SunOS binaries option COMPAT_SVR4 # compatibility with SVR4 binaries option PROCFS # /proc diff --git a/sys/arch/sparc/conf/SUN4M b/sys/arch/sparc/conf/SUN4M index 5e3de103eee..aab337b883e 100644 --- a/sys/arch/sparc/conf/SUN4M +++ b/sys/arch/sparc/conf/SUN4M @@ -1,4 +1,4 @@ -# $OpenBSD: SUN4M,v 1.76 2009/07/13 19:53:58 kettenis Exp $ +# $OpenBSD: SUN4M,v 1.77 2010/07/02 19:57:15 tedu Exp $ # $NetBSD: GENERIC,v 1.28.2.1 1996/07/02 23:55:22 jtc Exp $ # Machine architecture; required by config(8) @@ -16,7 +16,6 @@ option SUN4M # sun4m - SS10, SS20, Classic, etc. #option KGDBRATE=38400 # baud rate # Options for SPARCstation hardware -option COMPAT_SUNOS # compatibility with SunOS binaries option COMPAT_SVR4 # compatibility with SVR4 binaries option PROCFS # /proc diff --git a/sys/arch/sparc/conf/files.sparc b/sys/arch/sparc/conf/files.sparc index 272f90a4968..ccf59e46d6f 100644 --- a/sys/arch/sparc/conf/files.sparc +++ b/sys/arch/sparc/conf/files.sparc @@ -1,4 +1,4 @@ -# $OpenBSD: files.sparc,v 1.85 2009/08/29 21:30:48 kettenis Exp $ +# $OpenBSD: files.sparc,v 1.86 2010/07/02 19:57:15 tedu Exp $ # $NetBSD: files.sparc,v 1.44 1997/08/31 21:29:16 pk Exp $ # @(#)files.sparc 8.1 (Berkeley) 7/19/93 @@ -313,10 +313,6 @@ file arch/sparc/sparc/db_disasm.c ddb # SVR4 Binary Compatibility (COMPAT_SVR4) include "../../../compat/svr4/files.svr4" file arch/sparc/sparc/svr4_machdep.c compat_svr4 -file arch/sparc/sparc/sunos_machdep.c compat_sunos - -# SunOS Binary Compatibility (COMPAT_SUNOS) -include "../../../compat/sunos/files.sunos" # Magma Serial/Parallel boards device magma {} diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c index 6e3b8214e25..c90be332be7 100644 --- a/sys/arch/sparc/dev/fd.c +++ b/sys/arch/sparc/dev/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.70 2010/05/23 10:49:19 dlg Exp $ */ +/* $OpenBSD: fd.c,v 1.71 2010/07/02 19:57:15 tedu Exp $ */ /* $NetBSD: fd.c,v 1.51 1997/05/24 20:16:19 pk Exp $ */ /*- @@ -1795,9 +1795,6 @@ fdioctl(dev, cmd, addr, flag, p) if (((struct mtop *)addr)->mt_op != MTOFFL) return EIO; -#ifdef COMPAT_SUNOS - case SUNOS_FDIOCEJECT: -#endif case DIOCEJECT: fd_do_eject(fd); return (0); diff --git a/sys/arch/sparc/include/exec.h b/sys/arch/sparc/include/exec.h index 0bfa97b9a1c..a533892c5c7 100644 --- a/sys/arch/sparc/include/exec.h +++ b/sys/arch/sparc/include/exec.h @@ -1,4 +1,4 @@ -/* $OpenBSD: exec.h,v 1.12 2010/06/27 03:11:44 guenther Exp $ */ +/* $OpenBSD: exec.h,v 1.13 2010/07/02 19:57:15 tedu Exp $ */ /* $NetBSD: exec.h,v 1.7 1994/11/20 20:53:02 deraadt Exp $ */ /* @@ -126,9 +126,9 @@ struct relocation_info_sparc { #define _NLIST_DO_AOUT #define _NLIST_DO_ELF -#ifdef COMPAT_SUNOS -#define _KERN_DO_AOUT -#endif +#define cpu_exec_aout_makecmds(p, epp) (ENOEXEC) + + #define _KERN_DO_ELF #endif /* _SPARC_EXEC_H_ */ diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index 356e18ee2fa..dd9e3421c42 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.129 2010/07/02 04:14:19 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.130 2010/07/02 19:57:15 tedu Exp $ */ /* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */ /* @@ -312,11 +312,7 @@ int sigpid = 0; struct sigframe { int sf_signo; /* signal number */ siginfo_t *sf_sip; /* points to siginfo_t */ -#ifdef COMPAT_SUNOS - struct sigcontext *sf_scp; /* points to user addr of sigcontext */ -#else int sf_xxx; /* placeholder */ -#endif caddr_t sf_addr; /* SunOS compat */ struct sigcontext sf_sc; /* actual sigcontext */ siginfo_t sf_si; @@ -399,9 +395,6 @@ sendsig(catcher, sig, mask, code, type, val) struct trapframe *tf; int caddr, oonstack, oldsp, newsp; struct sigframe sf; -#ifdef COMPAT_SUNOS - extern struct emul emul_sunos; -#endif tf = p->p_md.md_tf; oldsp = tf->tf_out[6]; @@ -431,13 +424,6 @@ sendsig(catcher, sig, mask, code, type, val) */ sf.sf_signo = sig; sf.sf_sip = NULL; -#ifdef COMPAT_SUNOS - if (p->p_emul == &emul_sunos) { - sf.sf_sip = (void *)code; /* SunOS has "int code" */ - sf.sf_scp = &fp->sf_sc; - sf.sf_addr = val.sival_ptr; - } -#endif /* * Build the signal context to be used by sigreturn. @@ -491,15 +477,8 @@ sendsig(catcher, sig, mask, code, type, val) * Arrange to continue execution at the code copied out in exec(). * It needs the function to call in %g1, and a new stack pointer. */ -#ifdef COMPAT_SUNOS - if (psp->ps_usertramp & sigmask(sig)) { - caddr = (int)catcher; /* user does his own trampolining */ - } else -#endif - { - caddr = p->p_sigcode; - tf->tf_global[1] = (int)catcher; - } + caddr = p->p_sigcode; + tf->tf_global[1] = (int)catcher; tf->tf_pc = caddr; tf->tf_npc = caddr + 4; tf->tf_out[6] = newsp; @@ -888,21 +867,6 @@ mapdev(phys, virt, offset, size) return (ret); } -#ifdef COMPAT_SUNOS -int -cpu_exec_aout_makecmds(p, epp) - struct proc *p; - struct exec_package *epp; -{ - int error = ENOEXEC; - - extern int sunos_exec_aout_makecmds(struct proc *, struct exec_package *); - if ((error = sunos_exec_aout_makecmds(p, epp)) == 0) - return 0; - return error; -} -#endif - #ifdef SUN4 void oldmon_w_trace(va) diff --git a/sys/kern/exec_conf.c b/sys/kern/exec_conf.c index 81215d52e18..a25f1832285 100644 --- a/sys/kern/exec_conf.c +++ b/sys/kern/exec_conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_conf.c,v 1.23 2010/07/01 17:30:25 tedu Exp $ */ +/* $OpenBSD: exec_conf.c,v 1.24 2010/07/02 19:57:15 tedu Exp $ */ /* $NetBSD: exec_conf.c,v 1.16 1995/12/09 05:34:47 cgd Exp $ */ /* @@ -59,10 +59,6 @@ #include <compat/freebsd/freebsd_exec.h> #endif -#ifdef COMPAT_M68K4K -#include <compat/m68k4k/m68k4k_exec.h> -#endif - #ifdef COMPAT_VAX1K #include <compat/vax1k/vax1k_exec.h> #endif @@ -101,18 +97,12 @@ struct execsw execsw[] = { { FREEBSD_AOUT_HDR_SIZE, exec_freebsd_aout_makecmds, &emul_freebsd_aout }, /* freebsd */ { sizeof(Elf32_Ehdr), exec_freebsd_elf32_makecmds, &emul_freebsd_elf }, #endif -#ifdef COMPAT_M68K4K - { sizeof(struct exec), exec_m68k4k_makecmds, &emul_native }, /* m68k4k a.out */ -#endif #ifdef COMPAT_VAX1K { sizeof(struct exec), exec_vax1k_makecmds, &emul_native }, /* vax1k a.out */ #endif #ifdef COMPAT_SVR4 { sizeof(Elf32_Ehdr), exec_elf32_makecmds, &emul_svr4 }, /* elf binaries */ #endif -#ifdef COMPAT_SUNOS - { sizeof(struct exec), exec_aout_makecmds, &emul_sunos }, -#endif #ifdef LKM { 0, NULL, NULL }, /* entries for LKMs */ { 0, NULL, NULL }, diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 61750042796..eaff0b94351 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sig.c,v 1.114 2010/07/01 02:41:12 guenther Exp $ */ +/* $OpenBSD: kern_sig.c,v 1.115 2010/07/02 19:57:15 tedu Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* @@ -313,17 +313,6 @@ setsigvec(struct proc *p, int signum, struct sigaction *sa) ps->ps_sigonstack |= bit; else ps->ps_sigonstack &= ~bit; -#ifdef COMPAT_SUNOS - { - extern struct emul emul_sunos; - if (p->p_emul == &emul_sunos) { - if (sa->sa_flags & SA_USERTRAMP) - ps->ps_usertramp |= bit; - else - ps->ps_usertramp &= ~bit; - } - } -#endif /* * Set bit in p_sigignore for signals that are set to SIG_IGN, * and for signals set to SIG_DFL where the default is to ignore. diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 9e4d0135cd7..cbc7f32fed8 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_pty.c,v 1.47 2010/07/02 17:27:01 nicm Exp $ */ +/* $OpenBSD: tty_pty.c,v 1.48 2010/07/02 19:57:15 tedu Exp $ */ /* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */ /* @@ -801,21 +801,6 @@ ptyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) switch (cmd) { case TIOCGPGRP: -#ifdef COMPAT_SUNOS - { - /* - * I'm not sure about SunOS TIOCGPGRP semantics - * on PTYs, but it's something like this: - */ - extern struct emul emul_sunos; - if (p->p_emul == &emul_sunos) { - if (tp->t_pgrp == 0) - return (EIO); - *(int *)data = tp->t_pgrp->pg_id; - return (0); - } - } -#endif /* * We avoid calling ttioctl on the controller since, * in that case, tp must be the controlling terminal. diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 25ee1ea1495..1f8d93ec1d0 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.81 2010/07/01 18:47:45 deraadt Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.82 2010/07/02 19:57:15 tedu Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -125,13 +125,6 @@ socreate(int dom, struct socket **aso, int type, int proto) splx(s); return (error); } -#ifdef COMPAT_SUNOS - { - extern struct emul emul_sunos; - if (p->p_emul == &emul_sunos && type == SOCK_DGRAM) - so->so_options |= SO_BROADCAST; - } -#endif splx(s); *aso = so; return (0); diff --git a/sys/sys/ioctl.h b/sys/sys/ioctl.h index 2f62b834275..5e189774503 100644 --- a/sys/sys/ioctl.h +++ b/sys/sys/ioctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ioctl.h,v 1.10 2010/06/30 20:38:50 tedu Exp $ */ +/* $OpenBSD: ioctl.h,v 1.11 2010/07/02 19:57:15 tedu Exp $ */ /* $NetBSD: ioctl.h,v 1.20 1996/01/30 18:21:47 thorpej Exp $ */ /*- @@ -76,9 +76,9 @@ __END_DECLS * Compatibility with old terminal driver * * Source level -> #define USE_OLD_TTY - * Kernel level -> options COMPAT_43 or COMPAT_SUNOS or ... + * Kernel level -> options COMPAT_43 or ... */ -#if defined(USE_OLD_TTY) || defined(COMPAT_43) || defined(COMPAT_SUNOS) || \ +#if defined(USE_OLD_TTY) || defined(COMPAT_43) || \ defined(COMPAT_SVR4) || defined(COMPAT_FREEBSD) || \ defined(COMPAT_LINUX) #include <sys/ioctl_compat.h> diff --git a/sys/sys/signal.h b/sys/sys/signal.h index e2eeb1a4052..ff2cb8ffe63 100644 --- a/sys/sys/signal.h +++ b/sys/sys/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.20 2009/11/27 19:47:45 guenther Exp $ */ +/* $OpenBSD: signal.h,v 1.21 2010/07/02 19:57:15 tedu Exp $ */ /* $NetBSD: signal.h,v 1.21 1996/02/09 18:25:32 christos Exp $ */ /* @@ -126,9 +126,6 @@ struct sigaction { #define SA_RESETHAND 0x0004 /* reset to SIG_DFL when taking signal */ #define SA_NODEFER 0x0010 /* don't mask the signal we're delivering */ #define SA_NOCLDWAIT 0x0020 /* don't create zombies (assign to pid 1) */ -#ifdef COMPAT_SUNOS -#define SA_USERTRAMP 0x0100 /* do not bounce off kernel's sigtramp */ -#endif #endif /* __XPG_VISIBLE >= 500 */ #define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */ #if __POSIX_VISIBLE >= 199309 || __XPG_VISIBLE >= 500 diff --git a/sys/sys/socket.h b/sys/sys/socket.h index 28197b9c3f5..91ddae61c1b 100644 --- a/sys/sys/socket.h +++ b/sys/sys/socket.h @@ -1,4 +1,4 @@ -/* $OpenBSD: socket.h,v 1.67 2010/07/01 02:13:02 deraadt Exp $ */ +/* $OpenBSD: socket.h,v 1.68 2010/07/02 19:57:15 tedu Exp $ */ /* $NetBSD: socket.h,v 1.14 1996/02/09 18:25:36 christos Exp $ */ /* @@ -502,7 +502,7 @@ int getrdomain(void); int setrdomain(int); __END_DECLS #else -# if defined(COMPAT_43) || defined(COMPAT_SUNOS) || defined(COMPAT_LINUX) || \ +# if defined(COMPAT_43) || defined(COMPAT_LINUX) || \ defined(COMPAT_FREEBSD) || defined(COMPAT_BSDOS) # define COMPAT_OLDSOCK # define MSG_COMPAT 0x8000 diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 98d046311aa..d288a688b36 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.h,v 1.27 2010/07/02 17:27:01 nicm Exp $ */ +/* $OpenBSD: tty.h,v 1.28 2010/07/02 19:57:15 tedu Exp $ */ /* $NetBSD: tty.h,v 1.30.4.1 1996/06/02 09:08:13 mrg Exp $ */ /*- @@ -310,7 +310,7 @@ int cttypoll(dev_t, int, struct proc *); void clalloc(struct clist *, int, int); void clfree(struct clist *); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) || defined(COMPAT_SVR4) || \ +#if defined(COMPAT_43) || defined(COMPAT_SVR4) || \ defined(COMPAT_FREEBSD) # define COMPAT_OLDTTY int ttcompat(struct tty *, u_long, caddr_t, int, struct proc *); |