diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/conf.c | 6 | ||||
-rw-r--r-- | sys/arch/i386/conf/GENERIC | 3 | ||||
-rw-r--r-- | sys/arch/i386/conf/files.i386 | 6 | ||||
-rw-r--r-- | sys/arch/i386/i386/conf.c | 6 | ||||
-rw-r--r-- | sys/arch/i386/i386/genassym.cf | 14 | ||||
-rw-r--r-- | sys/arch/i386/i386/locore.s | 21 | ||||
-rw-r--r-- | sys/arch/solbourne/solbourne/locore.s | 127 | ||||
-rw-r--r-- | sys/arch/solbourne/solbourne/trap.c | 21 | ||||
-rw-r--r-- | sys/arch/sparc/conf/GENERIC | 3 | ||||
-rw-r--r-- | sys/arch/sparc/conf/RAMDISK | 4 | ||||
-rw-r--r-- | sys/arch/sparc/conf/SUN4 | 3 | ||||
-rw-r--r-- | sys/arch/sparc/conf/SUN4C | 3 | ||||
-rw-r--r-- | sys/arch/sparc/conf/SUN4M | 3 | ||||
-rw-r--r-- | sys/arch/sparc/conf/files.sparc | 6 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/conf.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/locore.s | 127 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/trap.c | 21 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/conf.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/trap.c | 30 |
19 files changed, 21 insertions, 391 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) { |