summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2011-07-04 22:53:54 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2011-07-04 22:53:54 +0000
commit58db9026612e598768f5e9b089a1676f5f270bb2 (patch)
tree6129de5d38d2db3f49672917c91e9482036634f0 /sys
parent62cc8f8771932fdd7cfb2a979c68024716b24fba (diff)
remove compat_svr4 support. ok deraadt
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/conf.c6
-rw-r--r--sys/arch/i386/conf/GENERIC3
-rw-r--r--sys/arch/i386/conf/files.i3866
-rw-r--r--sys/arch/i386/i386/conf.c6
-rw-r--r--sys/arch/i386/i386/genassym.cf14
-rw-r--r--sys/arch/i386/i386/locore.s21
-rw-r--r--sys/arch/solbourne/solbourne/locore.s127
-rw-r--r--sys/arch/solbourne/solbourne/trap.c21
-rw-r--r--sys/arch/sparc/conf/GENERIC3
-rw-r--r--sys/arch/sparc/conf/RAMDISK4
-rw-r--r--sys/arch/sparc/conf/SUN43
-rw-r--r--sys/arch/sparc/conf/SUN4C3
-rw-r--r--sys/arch/sparc/conf/SUN4M3
-rw-r--r--sys/arch/sparc/conf/files.sparc6
-rw-r--r--sys/arch/sparc/sparc/conf.c4
-rw-r--r--sys/arch/sparc/sparc/locore.s127
-rw-r--r--sys/arch/sparc/sparc/trap.c21
-rw-r--r--sys/arch/sparc64/sparc64/conf.c4
-rw-r--r--sys/arch/sparc64/sparc64/trap.c30
-rw-r--r--sys/kern/Makefile4
-rw-r--r--sys/kern/exec_conf.c12
-rw-r--r--sys/kern/exec_elf.c9
-rw-r--r--sys/net/if.c8
-rw-r--r--sys/sys/conf.h15
-rw-r--r--sys/sys/ioctl.h5
-rw-r--r--sys/sys/socketvar.h3
-rw-r--r--sys/sys/tty.h4
27 files changed, 36 insertions, 436 deletions
diff --git a/sys/arch/amd64/amd64/conf.c b/sys/arch/amd64/amd64/conf.c
index b4f78ff319c..5fb1bb1ea89 100644
--- a/sys/arch/amd64/amd64/conf.c
+++ b/sys/arch/amd64/amd64/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.34 2011/06/26 23:19:11 tedu Exp $ */
+/* $OpenBSD: conf.c,v 1.35 2011/07/04 22:53:53 tedu Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
@@ -238,11 +238,7 @@ struct cdevsw cdevsw[] =
cdev_tun_init(NTUN,tun), /* 40: network tunnel */
cdev_disk_init(NVND,vnd), /* 41: vnode disk driver */
cdev_audio_init(NAUDIO,audio), /* 42: generic audio I/O */
-#ifdef COMPAT_SVR4
- cdev_svr4_net_init(1,svr4_net), /* 43: svr4 net pseudo-device */
-#else
cdev_notdef(), /* 43 */
-#endif
cdev_video_init(NVIDEO,video), /* 44: generic video I/O */
cdev_random_init(1,random), /* 45: random data source */
cdev_ocis_init(NPCTR,pctr), /* 46: performance counters */
diff --git a/sys/arch/i386/conf/GENERIC b/sys/arch/i386/conf/GENERIC
index b2daae2d5a5..f6159739312 100644
--- a/sys/arch/i386/conf/GENERIC
+++ b/sys/arch/i386/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.722 2011/07/03 21:40:24 kettenis Exp $
+# $OpenBSD: GENERIC,v 1.723 2011/07/04 22:53:53 tedu Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -23,7 +23,6 @@ option APERTURE # in-kernel aperture driver for XFree86
#option KGDB # Remote debugger support; exclusive of DDB
#option "KGDB_DEVNAME=\"com\"",KGDBADDR=0x2f8,KGDBRATE=9600
-option COMPAT_SVR4 # binary compatibility with SVR4
option COMPAT_LINUX # binary compatibility with Linux
option COMPAT_AOUT # a.out binaries are emulated
diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386
index d2d98845dce..bd2e8e96f05 100644
--- a/sys/arch/i386/conf/files.i386
+++ b/sys/arch/i386/conf/files.i386
@@ -1,4 +1,4 @@
-# $OpenBSD: files.i386,v 1.204 2011/06/26 23:19:10 tedu Exp $
+# $OpenBSD: files.i386,v 1.205 2011/07/04 22:53:53 tedu Exp $
#
# new style config file for i386 architecture
#
@@ -271,10 +271,6 @@ file arch/i386/i386/kvm86call.S kvm86
# a.out binary compatibility (COMPAT_AOUT)
include "compat/aout/files.aout"
-# SVR4 binary compatibility (COMPAT_SVR4)
-include "compat/svr4/files.svr4"
-file arch/i386/i386/svr4_machdep.c compat_svr4
-
# Linux binary compatibility (COMPAT_LINUX)
include "compat/linux/files.linux"
file arch/i386/i386/linux_machdep.c compat_linux
diff --git a/sys/arch/i386/i386/conf.c b/sys/arch/i386/i386/conf.c
index 59735e2e021..5bc677714c5 100644
--- a/sys/arch/i386/i386/conf.c
+++ b/sys/arch/i386/i386/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.137 2011/06/26 23:19:11 tedu Exp $ */
+/* $OpenBSD: conf.c,v 1.138 2011/07/04 22:53:53 tedu Exp $ */
/* $NetBSD: conf.c,v 1.75 1996/05/03 19:40:20 christos Exp $ */
/*
@@ -242,11 +242,7 @@ struct cdevsw cdevsw[] =
cdev_tun_init(NTUN,tun), /* 40: network tunnel */
cdev_disk_init(NVND,vnd), /* 41: vnode disk driver */
cdev_audio_init(NAUDIO,audio), /* 42: generic audio I/O */
-#ifdef COMPAT_SVR4
- cdev_svr4_net_init(1,svr4_net), /* 43: svr4 net pseudo-device */
-#else
cdev_notdef(), /* 43 */
-#endif
cdev_video_init(NVIDEO,video), /* 44: generic video I/O */
cdev_random_init(1,random), /* 45: random data source */
cdev_ocis_init(NPCTR,pctr), /* 46: pentium performance counters */
diff --git a/sys/arch/i386/i386/genassym.cf b/sys/arch/i386/i386/genassym.cf
index 1fa590045c4..2f1aaa61af1 100644
--- a/sys/arch/i386/i386/genassym.cf
+++ b/sys/arch/i386/i386/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.33 2011/04/05 12:50:15 guenther Exp $
+# $OpenBSD: genassym.cf,v 1.34 2011/07/04 22:53:53 tedu Exp $
#
# Copyright (c) 1982, 1990 The Regents of the University of California.
# All rights reserved.
@@ -51,10 +51,6 @@ include <machine/pmap.h>
include <machine/vmparam.h>
include <machine/mutex.h>
-if COMPAT_SVR4 > 0
-include <compat/svr4/svr4_ucontext.h>
-endif
-
if COMPAT_LINUX > 0
include <machine/linux_machdep.h>
endif
@@ -142,14 +138,6 @@ member m_data
member m_len
endif
-# SVR4 frame offsets
-ifdef COMPAT_SVR4
-struct svr4_sigframe SVR4_SIGF_
-member HANDLER sf_handler
-member UC sf_uc
-struct svr4_ucontext SVR4_UC_
-endif
-
# Linux frame offsets
ifdef COMPAT_LINUX
struct linux_sigframe LINUX_SIGF_
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s
index dfd962a6721..961a5a57606 100644
--- a/sys/arch/i386/i386/locore.s
+++ b/sys/arch/i386/i386/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.135 2011/05/10 11:11:56 kettenis Exp $ */
+/* $OpenBSD: locore.s,v 1.136 2011/07/04 22:53:53 tedu Exp $ */
/* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */
/*-
@@ -47,9 +47,6 @@
#include <sys/errno.h>
#include <sys/syscall.h>
-#ifdef COMPAT_SVR4
-#include <compat/svr4/svr4_syscall.h>
-#endif
#ifdef COMPAT_LINUX
#include <compat/linux/linux_syscall.h>
#endif
@@ -646,22 +643,6 @@ _C_LABEL(esigcode):
/*****************************************************************************/
-#ifdef COMPAT_SVR4
-NENTRY(svr4_sigcode)
- call *SVR4_SIGF_HANDLER(%esp)
- leal SVR4_SIGF_UC(%esp),%eax # ucp (the call may have clobbered the
- # copy at SIGF_UCP(%esp))
- pushl %eax
- pushl $1 # setcontext(p) == syscontext(1, p)
- pushl %eax # junk to fake return address
- movl $SVR4_SYS_context,%eax
- int $0x80 # enter kernel with args on stack
- movl $SVR4_SYS_exit,%eax
- int $0x80 # exit if sigreturn fails
- .globl _C_LABEL(svr4_esigcode)
-_C_LABEL(svr4_esigcode):
-#endif
-
/*****************************************************************************/
#ifdef COMPAT_LINUX
diff --git a/sys/arch/solbourne/solbourne/locore.s b/sys/arch/solbourne/solbourne/locore.s
index 3671bd8e5ce..01caf9b931d 100644
--- a/sys/arch/solbourne/solbourne/locore.s
+++ b/sys/arch/solbourne/solbourne/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.15 2010/11/27 18:04:20 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.16 2011/07/04 22:53:53 tedu Exp $ */
/* OpenBSD: locore.s,v 1.64 2005/04/17 18:47:50 miod Exp */
/*
@@ -90,9 +90,6 @@
#include <machine/pte.h>
#include <machine/signal.h>
#include <machine/trap.h>
-#ifdef COMPAT_SVR4
-#include <compat/svr4/svr4_syscall.h>
-#endif
#include <sparc/dev/z8530reg.h>
@@ -2843,128 +2840,6 @@ _C_LABEL(suicide):
#endif
_C_LABEL(esigcode):
-#ifdef COMPAT_SVR4
-/*
- * The following code is copied to the top of the user stack when each
- * process is exec'ed, and signals are `trampolined' off it.
- *
- * When this code is run, the stack looks like:
- * [%sp] 64 bytes to which registers can be dumped
- * [%sp + 64] signal number (goes in %o0)
- * [%sp + 64 + 4] pointer to saved siginfo
- * [%sp + 64 + 8] pointer to saved context
- * [%sp + 64 + 12] address of the user's handler
- * [%sp + 64 + 16] first word of saved state (context)
- * .
- * .
- * .
- * [%sp + NNN] last word of saved state (siginfo)
- * (followed by previous stack contents or top of signal stack).
- * The address of the function to call is in %g1; the old %g1 and %o0
- * have already been saved in the sigcontext. We are running in a clean
- * window, all previous windows now being saved to the stack.
- *
- * Note that [%sp + 64 + 8] == %sp + 64 + 16. The copy at %sp+64+8
- * will eventually be removed, with a hole left in its place, if things
- * work out.
- */
- .globl _C_LABEL(svr4_sigcode)
- .globl _C_LABEL(svr4_esigcode)
-_C_LABEL(svr4_sigcode):
- /*
- * XXX the `save' and `restore' below are unnecessary: should
- * replace with simple arithmetic on %sp
- *
- * Make room on the stack for 32 %f registers + %fsr. This comes
- * out to 33*4 or 132 bytes, but this must be aligned to a multiple
- * of 8, or 136 bytes.
- */
- save %sp, -CCFSZ - 136, %sp
- mov %g2, %l2 ! save globals in %l registers
- mov %g3, %l3
- mov %g4, %l4
- mov %g5, %l5
- mov %g6, %l6
- mov %g7, %l7
- /*
- * Saving the fpu registers is expensive, so do it iff the fsr
- * stored in the sigcontext shows that the fpu is enabled.
- */
- ld [%fp + 64 + 16 + SC_PSR_OFFSET], %l0
- sethi %hi(PSR_EF), %l1 ! FPU enable bit is too high for andcc
- andcc %l0, %l1, %l0 ! %l0 = fpu enable bit
- be 1f ! if not set, skip the saves
- rd %y, %l1 ! in any case, save %y
-
- ! fpu is enabled, oh well
- st %fsr, [%sp + CCFSZ + 0]
- std %f0, [%sp + CCFSZ + 8]
- std %f2, [%sp + CCFSZ + 16]
- std %f4, [%sp + CCFSZ + 24]
- std %f6, [%sp + CCFSZ + 32]
- std %f8, [%sp + CCFSZ + 40]
- std %f10, [%sp + CCFSZ + 48]
- std %f12, [%sp + CCFSZ + 56]
- std %f14, [%sp + CCFSZ + 64]
- std %f16, [%sp + CCFSZ + 72]
- std %f18, [%sp + CCFSZ + 80]
- std %f20, [%sp + CCFSZ + 88]
- std %f22, [%sp + CCFSZ + 96]
- std %f24, [%sp + CCFSZ + 104]
- std %f26, [%sp + CCFSZ + 112]
- std %f28, [%sp + CCFSZ + 120]
- std %f30, [%sp + CCFSZ + 128]
-
-1:
- ldd [%fp + 64], %o0 ! sig, siginfo
- ld [%fp + 72], %o2 ! uctx
- call %g1 ! (*sa->sa_handler)(sig,siginfo,uctx)
- nop
-
- /*
- * Now that the handler has returned, re-establish all the state
- * we just saved above, then do a sigreturn.
- */
- tst %l0 ! reload fpu registers?
- be 1f ! if not, skip the loads
- wr %l1, %g0, %y ! in any case, restore %y
-
- ld [%sp + CCFSZ + 0], %fsr
- ldd [%sp + CCFSZ + 8], %f0
- ldd [%sp + CCFSZ + 16], %f2
- ldd [%sp + CCFSZ + 24], %f4
- ldd [%sp + CCFSZ + 32], %f6
- ldd [%sp + CCFSZ + 40], %f8
- ldd [%sp + CCFSZ + 48], %f10
- ldd [%sp + CCFSZ + 56], %f12
- ldd [%sp + CCFSZ + 64], %f14
- ldd [%sp + CCFSZ + 72], %f16
- ldd [%sp + CCFSZ + 80], %f18
- ldd [%sp + CCFSZ + 88], %f20
- ldd [%sp + CCFSZ + 96], %f22
- ldd [%sp + CCFSZ + 104], %f24
- ldd [%sp + CCFSZ + 112], %f26
- ldd [%sp + CCFSZ + 120], %f28
- ldd [%sp + CCFSZ + 128], %f30
-
-1:
- mov %l2, %g2
- mov %l3, %g3
- mov %l4, %g4
- mov %l5, %g5
- mov %l6, %g6
- mov %l7, %g7
-
- restore %g0, SVR4_SYS_context, %g1 ! get registers & set syscall #
- mov 1, %o0
- add %sp, 64 + 16, %o1 ! compute ucontextp
- t ST_SYSCALL ! svr4_context(1, ucontextp)
- ! setcontext does not return unless it fails
- mov SYS_exit, %g1 ! exit(errno)
- t ST_SYSCALL
-_C_LABEL(svr4_esigcode):
-#endif
-
/*
* Primitives
*/
diff --git a/sys/arch/solbourne/solbourne/trap.c b/sys/arch/solbourne/solbourne/trap.c
index 254b2aae4e6..3ad5596e92f 100644
--- a/sys/arch/solbourne/solbourne/trap.c
+++ b/sys/arch/solbourne/solbourne/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.12 2011/04/03 14:56:28 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.13 2011/07/04 22:53:53 tedu Exp $ */
/* OpenBSD: trap.c,v 1.42 2004/12/06 20:12:25 miod Exp */
/*
@@ -85,9 +85,6 @@
#else
#include <machine/frame.h>
#endif
-#ifdef COMPAT_SVR4
-#include <machine/svr4_machdep.h>
-#endif
#include <sparc/fpu/fpu_extern.h>
#include <sparc/sparc/memreg.h>
@@ -322,9 +319,6 @@ trap(type, psr, pc, tf)
trapsignal(p, SIGILL, type, ILL_ILLOPC, sv);
break;
}
-#if defined(COMPAT_SVR4)
-badtrap:
-#endif
/* the following message is gratuitous */
/* ... but leave it in until we find anything */
printf("%s[%d]: unimplemented software trap 0x%x\n",
@@ -332,19 +326,6 @@ badtrap:
trapsignal(p, SIGILL, type, ILL_ILLOPC, sv);
break;
-#ifdef COMPAT_SVR4
- case T_SVR4_GETCC:
- case T_SVR4_SETCC:
- case T_SVR4_GETPSR:
- case T_SVR4_SETPSR:
- case T_SVR4_GETHRTIME:
- case T_SVR4_GETHRVTIME:
- case T_SVR4_GETHRESTIME:
- if (!svr4_trap(type, p))
- goto badtrap;
- break;
-#endif
-
case T_AST:
want_ast = 0;
if (p->p_flag & P_OWEUPC) {
diff --git a/sys/arch/sparc/conf/GENERIC b/sys/arch/sparc/conf/GENERIC
index 4802c13be7d..4265bf37f2c 100644
--- a/sys/arch/sparc/conf/GENERIC
+++ b/sys/arch/sparc/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.101 2011/06/29 20:52:09 matthew Exp $
+# $OpenBSD: GENERIC,v 1.102 2011/07/04 22:53:53 tedu Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -26,7 +26,6 @@ option SUN4M # sun4m - SS10, SS20, Classic, etc.
#option KGDBDEV=0xc01 # kgdb device number (dev_t)
#option KGDBRATE=38400 # baud rate
-#option COMPAT_SVR4 # compatibility with SVR4 binaries
#option PROCFS # /proc for SVR4
option WSEMUL_SUN # provide sun terminal emulation; required
diff --git a/sys/arch/sparc/conf/RAMDISK b/sys/arch/sparc/conf/RAMDISK
index 80b00eb29d0..457b60558d1 100644
--- a/sys/arch/sparc/conf/RAMDISK
+++ b/sys/arch/sparc/conf/RAMDISK
@@ -1,4 +1,4 @@
-# $OpenBSD: RAMDISK,v 1.72 2011/06/29 20:52:09 matthew Exp $
+# $OpenBSD: RAMDISK,v 1.73 2011/07/04 22:53:53 tedu Exp $
# $NetBSD: GENERIC,v 1.28.2.1 1996/07/02 23:55:22 jtc Exp $
# Machine architecture; required by config(8)
@@ -39,8 +39,6 @@ option SUN4M # sun4m - SS10, SS20, Classic, etc.
#option KGDBDEV=0xc01 # kgdb device number (dev_t)
#option KGDBRATE=38400 # baud rate
-#option COMPAT_SVR4 # compatibility with SVR4 binaries
-
option WSEMUL_SUN # provide sun terminal emulation; required
option WSEMUL_NO_VT100 # do not provide vt100 terminal emulation
diff --git a/sys/arch/sparc/conf/SUN4 b/sys/arch/sparc/conf/SUN4
index 4d062a42c45..c5e52fa96d1 100644
--- a/sys/arch/sparc/conf/SUN4
+++ b/sys/arch/sparc/conf/SUN4
@@ -1,4 +1,4 @@
-# $OpenBSD: SUN4,v 1.40 2011/06/29 20:52:09 matthew Exp $
+# $OpenBSD: SUN4,v 1.41 2011/07/04 22:53:53 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_SVR4 # compatibility with SVR4 binaries
option PROCFS # /proc
option WSEMUL_SUN # provide sun terminal emulation; required
diff --git a/sys/arch/sparc/conf/SUN4C b/sys/arch/sparc/conf/SUN4C
index 1a770ce6dd5..ffe7f2dce68 100644
--- a/sys/arch/sparc/conf/SUN4C
+++ b/sys/arch/sparc/conf/SUN4C
@@ -1,4 +1,4 @@
-# $OpenBSD: SUN4C,v 1.63 2011/06/29 20:52:09 matthew Exp $
+# $OpenBSD: SUN4C,v 1.64 2011/07/04 22:53:53 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_SVR4 # compatibility with SVR4 binaries
option PROCFS # /proc
option WSEMUL_SUN # provide sun terminal emulation; required
diff --git a/sys/arch/sparc/conf/SUN4M b/sys/arch/sparc/conf/SUN4M
index e174a4a0a18..9f57d832afa 100644
--- a/sys/arch/sparc/conf/SUN4M
+++ b/sys/arch/sparc/conf/SUN4M
@@ -1,4 +1,4 @@
-# $OpenBSD: SUN4M,v 1.79 2011/06/29 20:52:09 matthew Exp $
+# $OpenBSD: SUN4M,v 1.80 2011/07/04 22:53:53 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_SVR4 # compatibility with SVR4 binaries
option PROCFS # /proc
option WSEMUL_SUN # provide sun terminal emulation; required
diff --git a/sys/arch/sparc/conf/files.sparc b/sys/arch/sparc/conf/files.sparc
index 8092cffc8ba..b7d6af85003 100644
--- a/sys/arch/sparc/conf/files.sparc
+++ b/sys/arch/sparc/conf/files.sparc
@@ -1,4 +1,4 @@
-# $OpenBSD: files.sparc,v 1.88 2010/12/06 20:10:18 jasper Exp $
+# $OpenBSD: files.sparc,v 1.89 2011/07/04 22:53:53 tedu Exp $
# $NetBSD: files.sparc,v 1.44 1997/08/31 21:29:16 pk Exp $
# @(#)files.sparc 8.1 (Berkeley) 7/19/93
@@ -310,10 +310,6 @@ file arch/sparc/sparc/db_disasm.c ddb
# Compatibility modules
#
-# SVR4 Binary Compatibility (COMPAT_SVR4)
-include "compat/svr4/files.svr4"
-file arch/sparc/sparc/svr4_machdep.c compat_svr4
-
# Magma Serial/Parallel boards
device magma {}
attach magma at sbus
diff --git a/sys/arch/sparc/sparc/conf.c b/sys/arch/sparc/sparc/conf.c
index a52c7380a65..7c0096ac053 100644
--- a/sys/arch/sparc/sparc/conf.c
+++ b/sys/arch/sparc/sparc/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.57 2011/04/30 15:24:07 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.58 2011/07/04 22:53:53 tedu Exp $ */
/* $NetBSD: conf.c,v 1.40 1996/04/11 19:20:03 thorpej Exp $ */
/*
@@ -176,7 +176,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 40 */
cdev_notdef(), /* 41 */
cdev_disk_init(NXD,xd), /* 42: SMD disk */
- cdev_svr4_net_init(NSVR4_NET,svr4_net), /* 43: svr4 net pseudo-device */
+ cdev_notdef(), /* 43 */
cdev_notdef(), /* 44 */
cdev_notdef(), /* 45 */
cdev_notdef(), /* 46 */
diff --git a/sys/arch/sparc/sparc/locore.s b/sys/arch/sparc/sparc/locore.s
index 6de829ec45c..60d18dce690 100644
--- a/sys/arch/sparc/sparc/locore.s
+++ b/sys/arch/sparc/sparc/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.89 2010/11/27 18:04:21 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.90 2011/07/04 22:53:53 tedu Exp $ */
/* $NetBSD: locore.s,v 1.73 1997/09/13 20:36:48 pk Exp $ */
/*
@@ -65,9 +65,6 @@
#include <machine/psl.h>
#include <machine/signal.h>
#include <machine/trap.h>
-#ifdef COMPAT_SVR4
-#include <compat/svr4/svr4_syscall.h>
-#endif
/*
* GNU assembler does not understand `.empty' directive; Sun assembler
@@ -4018,128 +4015,6 @@ _C_LABEL(suicide):
#endif
_C_LABEL(esigcode):
-#ifdef COMPAT_SVR4
-/*
- * The following code is copied to the top of the user stack when each
- * process is exec'ed, and signals are `trampolined' off it.
- *
- * When this code is run, the stack looks like:
- * [%sp] 64 bytes to which registers can be dumped
- * [%sp + 64] signal number (goes in %o0)
- * [%sp + 64 + 4] pointer to saved siginfo
- * [%sp + 64 + 8] pointer to saved context
- * [%sp + 64 + 12] address of the user's handler
- * [%sp + 64 + 16] first word of saved state (context)
- * .
- * .
- * .
- * [%sp + NNN] last word of saved state (siginfo)
- * (followed by previous stack contents or top of signal stack).
- * The address of the function to call is in %g1; the old %g1 and %o0
- * have already been saved in the sigcontext. We are running in a clean
- * window, all previous windows now being saved to the stack.
- *
- * Note that [%sp + 64 + 8] == %sp + 64 + 16. The copy at %sp+64+8
- * will eventually be removed, with a hole left in its place, if things
- * work out.
- */
- .globl _C_LABEL(svr4_sigcode)
- .globl _C_LABEL(svr4_esigcode)
-_C_LABEL(svr4_sigcode):
- /*
- * XXX the `save' and `restore' below are unnecessary: should
- * replace with simple arithmetic on %sp
- *
- * Make room on the stack for 32 %f registers + %fsr. This comes
- * out to 33*4 or 132 bytes, but this must be aligned to a multiple
- * of 8, or 136 bytes.
- */
- save %sp, -CCFSZ - 136, %sp
- mov %g2, %l2 ! save globals in %l registers
- mov %g3, %l3
- mov %g4, %l4
- mov %g5, %l5
- mov %g6, %l6
- mov %g7, %l7
- /*
- * Saving the fpu registers is expensive, so do it iff the fsr
- * stored in the sigcontext shows that the fpu is enabled.
- */
- ld [%fp + 64 + 16 + SC_PSR_OFFSET], %l0
- sethi %hi(PSR_EF), %l1 ! FPU enable bit is too high for andcc
- andcc %l0, %l1, %l0 ! %l0 = fpu enable bit
- be 1f ! if not set, skip the saves
- rd %y, %l1 ! in any case, save %y
-
- ! fpu is enabled, oh well
- st %fsr, [%sp + CCFSZ + 0]
- std %f0, [%sp + CCFSZ + 8]
- std %f2, [%sp + CCFSZ + 16]
- std %f4, [%sp + CCFSZ + 24]
- std %f6, [%sp + CCFSZ + 32]
- std %f8, [%sp + CCFSZ + 40]
- std %f10, [%sp + CCFSZ + 48]
- std %f12, [%sp + CCFSZ + 56]
- std %f14, [%sp + CCFSZ + 64]
- std %f16, [%sp + CCFSZ + 72]
- std %f18, [%sp + CCFSZ + 80]
- std %f20, [%sp + CCFSZ + 88]
- std %f22, [%sp + CCFSZ + 96]
- std %f24, [%sp + CCFSZ + 104]
- std %f26, [%sp + CCFSZ + 112]
- std %f28, [%sp + CCFSZ + 120]
- std %f30, [%sp + CCFSZ + 128]
-
-1:
- ldd [%fp + 64], %o0 ! sig, siginfo
- ld [%fp + 72], %o2 ! uctx
- call %g1 ! (*sa->sa_handler)(sig,siginfo,uctx)
- nop
-
- /*
- * Now that the handler has returned, re-establish all the state
- * we just saved above, then do a sigreturn.
- */
- tst %l0 ! reload fpu registers?
- be 1f ! if not, skip the loads
- wr %l1, %g0, %y ! in any case, restore %y
-
- ld [%sp + CCFSZ + 0], %fsr
- ldd [%sp + CCFSZ + 8], %f0
- ldd [%sp + CCFSZ + 16], %f2
- ldd [%sp + CCFSZ + 24], %f4
- ldd [%sp + CCFSZ + 32], %f6
- ldd [%sp + CCFSZ + 40], %f8
- ldd [%sp + CCFSZ + 48], %f10
- ldd [%sp + CCFSZ + 56], %f12
- ldd [%sp + CCFSZ + 64], %f14
- ldd [%sp + CCFSZ + 72], %f16
- ldd [%sp + CCFSZ + 80], %f18
- ldd [%sp + CCFSZ + 88], %f20
- ldd [%sp + CCFSZ + 96], %f22
- ldd [%sp + CCFSZ + 104], %f24
- ldd [%sp + CCFSZ + 112], %f26
- ldd [%sp + CCFSZ + 120], %f28
- ldd [%sp + CCFSZ + 128], %f30
-
-1:
- mov %l2, %g2
- mov %l3, %g3
- mov %l4, %g4
- mov %l5, %g5
- mov %l6, %g6
- mov %l7, %g7
-
- restore %g0, SVR4_SYS_context, %g1 ! get registers & set syscall #
- mov 1, %o0
- add %sp, 64 + 16, %o1 ! compute ucontextp
- t ST_SYSCALL ! svr4_context(1, ucontextp)
- ! setcontext does not return unless it fails
- mov SYS_exit, %g1 ! exit(errno)
- t ST_SYSCALL
-_C_LABEL(svr4_esigcode):
-#endif
-
/*
* Primitives
*/
diff --git a/sys/arch/sparc/sparc/trap.c b/sys/arch/sparc/sparc/trap.c
index 05380967914..5bcb7a06399 100644
--- a/sys/arch/sparc/sparc/trap.c
+++ b/sys/arch/sparc/sparc/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.56 2011/04/03 14:56:28 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.57 2011/07/04 22:53:53 tedu Exp $ */
/* $NetBSD: trap.c,v 1.58 1997/09/12 08:55:01 pk Exp $ */
/*
@@ -82,9 +82,6 @@
#else
#include <machine/frame.h>
#endif
-#ifdef COMPAT_SVR4
-#include <machine/svr4_machdep.h>
-#endif
#include <sparc/fpu/fpu_extern.h>
#include <sparc/sparc/memreg.h>
@@ -315,9 +312,6 @@ trap(type, psr, pc, tf)
trapsignal(p, SIGILL, type, ILL_ILLOPC, sv);
break;
}
-#if defined(COMPAT_SVR4)
-badtrap:
-#endif
/* the following message is gratuitous */
/* ... but leave it in until we find anything */
printf("%s[%d]: unimplemented software trap 0x%x\n",
@@ -325,19 +319,6 @@ badtrap:
trapsignal(p, SIGILL, type, ILL_ILLOPC, sv);
break;
-#ifdef COMPAT_SVR4
- case T_SVR4_GETCC:
- case T_SVR4_SETCC:
- case T_SVR4_GETPSR:
- case T_SVR4_SETPSR:
- case T_SVR4_GETHRTIME:
- case T_SVR4_GETHRVTIME:
- case T_SVR4_GETHRESTIME:
- if (!svr4_trap(type, p))
- goto badtrap;
- break;
-#endif
-
case T_AST:
want_ast = 0;
if (p->p_flag & P_OWEUPC) {
diff --git a/sys/arch/sparc64/sparc64/conf.c b/sys/arch/sparc64/sparc64/conf.c
index e0c9bc52868..975fe74aecd 100644
--- a/sys/arch/sparc64/sparc64/conf.c
+++ b/sys/arch/sparc64/sparc64/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.59 2011/01/14 19:04:08 jasper Exp $ */
+/* $OpenBSD: conf.c,v 1.60 2011/07/04 22:53:53 tedu Exp $ */
/* $NetBSD: conf.c,v 1.17 2001/03/26 12:33:26 lukem Exp $ */
/*
@@ -199,7 +199,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 40 */
cdev_notdef(), /* 41 */
cdev_notdef(), /* 42: SMD disk */
- cdev_svr4_net_init(NSVR4_NET,svr4_net), /* 43: svr4 net pseudo-device */
+ cdev_notdef(), /* 43 */
cdev_video_init(NVIDEO,video), /* 44: generic video I/O */
cdev_notdef(), /* 45 */
cdev_notdef(), /* 46 */
diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c
index ed9dde460ef..ecb3a4f4e44 100644
--- a/sys/arch/sparc64/sparc64/trap.c
+++ b/sys/arch/sparc64/sparc64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.68 2011/06/06 13:19:29 kettenis Exp $ */
+/* $OpenBSD: trap.c,v 1.69 2011/07/04 22:53:53 tedu Exp $ */
/* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */
/*
@@ -81,12 +81,6 @@
#else
#include <machine/frame.h>
#endif
-#ifdef COMPAT_SVR4
-#include <machine/svr4_machdep.h>
-#endif
-#ifdef COMPAT_SVR4_32
-#include <machine/svr4_32_machdep.h>
-#endif
#include <sparc64/fpu/fpu_extern.h>
#include <sparc64/sparc64/cache.h>
@@ -472,33 +466,11 @@ dopanic:
pc, (long)tf->tf_npc, pstate, PSTATE_BITS);
/* NOTREACHED */
}
-#if defined(COMPAT_SVR4) || defined(COMPAT_SVR4_32)
-badtrap:
-#endif
KERNEL_PROC_LOCK(p);
trapsignal(p, SIGILL, type, ILL_ILLOPC, sv);
KERNEL_PROC_UNLOCK(p);
break;
-#if defined(COMPAT_SVR4) || defined(COMPAT_SVR4_32)
- case T_SVR4_GETCC:
- case T_SVR4_SETCC:
- case T_SVR4_GETPSR:
- case T_SVR4_SETPSR:
- case T_SVR4_GETHRTIME:
- case T_SVR4_GETHRVTIME:
- case T_SVR4_GETHRESTIME:
-#if defined(COMPAT_SVR4_32)
- if (svr4_32_trap(type, p))
- break;
-#endif
-#if defined(COMPAT_SVR4)
- if (svr4_trap(type, p))
- break;
-#endif
- goto badtrap;
-#endif
-
case T_AST:
p->p_md.md_astpending = 0;
if (p->p_flag & P_OWEUPC) {
diff --git a/sys/kern/Makefile b/sys/kern/Makefile
index 9c018ee3655..9f60e047f23 100644
--- a/sys/kern/Makefile
+++ b/sys/kern/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.30 2011/07/04 20:35:35 deraadt Exp $
+# $OpenBSD: Makefile,v 1.31 2011/07/04 22:53:53 tedu Exp $
# Makefile for kernel tags files, init_sysent, etc.
@@ -27,7 +27,7 @@ SYSDIR=/sys
# Directories in which to place tags links (other than machine-dependent)
DGEN= compat compat/common \
- compat/linux compat/svr4 \
+ compat/linux \
conf \
ddb \
dev dev/eisa dev/ic dev/isa dev/pci dev/pcmcia dev/cardbus \
diff --git a/sys/kern/exec_conf.c b/sys/kern/exec_conf.c
index edcd052aa15..eade785898b 100644
--- a/sys/kern/exec_conf.c
+++ b/sys/kern/exec_conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_conf.c,v 1.27 2011/06/27 03:27:07 tedu Exp $ */
+/* $OpenBSD: exec_conf.c,v 1.28 2011/07/04 22:53:53 tedu Exp $ */
/* $NetBSD: exec_conf.c,v 1.16 1995/12/09 05:34:47 cgd Exp $ */
/*
@@ -43,18 +43,13 @@
#include <sys/exec_elf.h>
#endif
-#ifdef COMPAT_SVR4
-#include <compat/svr4/svr4_exec.h>
-#endif
-
#ifdef COMPAT_LINUX
#include <compat/linux/linux_exec.h>
#endif
extern struct emul emul_native, emul_elf32, emul_elf64, emul_aout,
emul_freebsd_aout, emul_freebsd_elf,
- emul_linux_elf, emul_linux_aout, emul_netbsd_elf64,
- emul_sunos, emul_svr4;
+ emul_linux_elf, emul_linux_aout, emul_netbsd_elf64;
struct execsw execsw[] = {
{ EXEC_SCRIPT_HDRSZ, exec_script_makecmds, &emul_native, }, /* shell scripts */
@@ -78,9 +73,6 @@ struct execsw execsw[] = {
{ LINUX_AOUT_HDR_SIZE, exec_linux_aout_makecmds, &emul_linux_aout }, /* linux a.out */
{ sizeof(Elf32_Ehdr), exec_linux_elf32_makecmds, &emul_linux_elf },
#endif
-#ifdef COMPAT_SVR4
- { sizeof(Elf32_Ehdr), exec_elf32_makecmds, &emul_svr4 }, /* elf binaries */
-#endif
#ifdef LKM
{ 0, NULL, NULL }, /* entries for LKMs */
{ 0, NULL, NULL },
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c
index 542d9295839..0170dbdd40b 100644
--- a/sys/kern/exec_elf.c
+++ b/sys/kern/exec_elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_elf.c,v 1.83 2011/06/06 17:10:23 ariane Exp $ */
+/* $OpenBSD: exec_elf.c,v 1.84 2011/07/04 22:53:53 tedu Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
@@ -96,10 +96,6 @@
#include <compat/linux/linux_exec.h>
#endif
-#ifdef COMPAT_SVR4
-#include <compat/svr4/svr4_exec.h>
-#endif
-
struct ELFNAME(probe_entry) {
int (*func)(struct proc *, struct exec_package *, char *,
u_long *, u_int8_t *);
@@ -108,9 +104,6 @@ struct ELFNAME(probe_entry) {
#ifdef COMPAT_LINUX
{ linux_elf_probe },
#endif
-#ifdef COMPAT_SVR4
- { svr4_elf_probe },
-#endif
{ NULL }
};
diff --git a/sys/net/if.c b/sys/net/if.c
index 635371dca9d..07b3500611b 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.234 2011/03/13 15:31:41 stsp Exp $ */
+/* $OpenBSD: if.c,v 1.235 2011/07/04 22:53:53 tedu Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -1619,7 +1619,7 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p)
default:
if (so->so_proto == 0)
return (EOPNOTSUPP);
-#if !defined(COMPAT_43) && !defined(COMPAT_LINUX) && !defined(COMPAT_SVR4)
+#if !defined(COMPAT_43) && !defined(COMPAT_LINUX)
error = ((*so->so_proto->pr_usrreq)(so, PRU_CONTROL,
(struct mbuf *) cmd, (struct mbuf *) data,
(struct mbuf *) ifp, p));
@@ -1718,7 +1718,7 @@ ifconf(u_long cmd, caddr_t data)
TAILQ_FOREACH(ifa,
&ifp->if_addrlist, ifa_list) {
sa = ifa->ifa_addr;
-#if defined(COMPAT_43) || defined(COMPAT_LINUX) || defined(COMPAT_SVR4)
+#if defined(COMPAT_43) || defined(COMPAT_LINUX)
if (cmd != OSIOCGIFCONF)
#endif
if (sa->sa_len > sizeof(*sa))
@@ -1748,7 +1748,7 @@ ifconf(u_long cmd, caddr_t data)
ifa != TAILQ_END(&ifp->if_addrlist);
ifa = TAILQ_NEXT(ifa, ifa_list)) {
struct sockaddr *sa = ifa->ifa_addr;
-#if defined(COMPAT_43) || defined(COMPAT_LINUX) || defined(COMPAT_SVR4)
+#if defined(COMPAT_43) || defined(COMPAT_LINUX)
if (cmd == OSIOCGIFCONF) {
struct osockaddr *osa =
(struct osockaddr *)&ifr.ifr_addr;
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 60bd476a96a..e0e34f91342 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.h,v 1.113 2011/07/04 16:52:41 nicm Exp $ */
+/* $OpenBSD: conf.h,v 1.114 2011/07/04 22:53:53 tedu Exp $ */
/* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */
/*-
@@ -357,12 +357,6 @@ extern struct cdevsw cdevsw[];
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
(dev_type_mmap((*))) enodev, 0, 0, dev_init(c,n,kqfilter) }
-#define cdev_svr4_net_init(c,n) { \
- dev_init(c,n,open), (dev_type_close((*))) enodev, \
- (dev_type_read((*))) enodev, (dev_type_write((*))) enodev, \
- (dev_type_ioctl((*))) enodev, (dev_type_stop((*))) nullop, \
- 0, selfalse, (dev_type_mmap((*))) enodev }
-
/* open, close, read, write, ioctl, poll, nokqfilter */
#define cdev_nnpfs_init(c, n) { \
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
@@ -649,13 +643,6 @@ cdev_decl(wskbd);
cdev_decl(wsmouse);
cdev_decl(wsmux);
-#ifdef COMPAT_SVR4
-# define NSVR4_NET 1
-#else
-# define NSVR4_NET 0
-#endif
-cdev_decl(svr4_net);
-
cdev_decl(ksyms);
cdev_decl(crypto);
diff --git a/sys/sys/ioctl.h b/sys/sys/ioctl.h
index 1302388fcc3..757e9d59562 100644
--- a/sys/sys/ioctl.h
+++ b/sys/sys/ioctl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioctl.h,v 1.12 2011/04/05 12:50:15 guenther Exp $ */
+/* $OpenBSD: ioctl.h,v 1.13 2011/07/04 22:53:53 tedu Exp $ */
/* $NetBSD: ioctl.h,v 1.20 1996/01/30 18:21:47 thorpej Exp $ */
/*-
@@ -78,7 +78,6 @@ __END_DECLS
* Source level -> #define USE_OLD_TTY
* Kernel level -> options COMPAT_43 or ...
*/
-#if defined(USE_OLD_TTY) || defined(COMPAT_43) || \
- defined(COMPAT_SVR4) || defined(COMPAT_LINUX)
+#if defined(USE_OLD_TTY) || defined(COMPAT_43) || defined(COMPAT_LINUX)
#include <sys/ioctl_compat.h>
#endif
diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h
index d45ef1d698f..709a314d439 100644
--- a/sys/sys/socketvar.h
+++ b/sys/sys/socketvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: socketvar.h,v 1.49 2011/07/04 00:33:36 mikeb Exp $ */
+/* $OpenBSD: socketvar.h,v 1.50 2011/07/04 22:53:53 tedu Exp $ */
/* $NetBSD: socketvar.h,v 1.18 1996/02/09 18:25:38 christos Exp $ */
/*-
@@ -114,7 +114,6 @@ struct socket {
#define SB_KNOTE 0x80 /* kernel note attached */
#define SB_SPLICE 0x0100 /* buffer is splice source or drain */
- void *so_internal; /* Space for svr4 stream data */
void (*so_upcall)(struct socket *so, caddr_t arg, int waitf);
caddr_t so_upcallarg; /* Arg for above */
uid_t so_euid, so_ruid; /* who opened the socket */
diff --git a/sys/sys/tty.h b/sys/sys/tty.h
index 19c496d7e3b..5a5da3accf4 100644
--- a/sys/sys/tty.h
+++ b/sys/sys/tty.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.h,v 1.30 2011/04/05 12:50:15 guenther Exp $ */
+/* $OpenBSD: tty.h,v 1.31 2011/07/04 22:53:53 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_SVR4)
+#if defined(COMPAT_43)
# define COMPAT_OLDTTY
int ttcompat(struct tty *, u_long, caddr_t, int, struct proc *);
#endif