summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2016-02-28 15:46:20 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2016-02-28 15:46:20 +0000
commitffdc3ff08fbee7eeb56a09b29ba888ea96f4e922 (patch)
tree32eef336395aa1caacdb6ce87cc2c33ae4353cd5 /sys/arch/i386
parent7cd4bc9208e74e6a0813ae69b0170d9176b6c164 (diff)
Support for running Linux binaries under emulation is going away.
Remove "option COMPAT_LINUX" and everything directly tied to it from the kernel and the corresponding man page documentation. ok visa@ guenther@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/conf/GENERIC4
-rw-r--r--sys/arch/i386/conf/files.i3866
-rw-r--r--sys/arch/i386/i386/genassym.cf14
-rw-r--r--sys/arch/i386/i386/locore.s26
-rw-r--r--sys/arch/i386/i386/trap.c41
5 files changed, 5 insertions, 86 deletions
diff --git a/sys/arch/i386/conf/GENERIC b/sys/arch/i386/conf/GENERIC
index 212e08f3a65..7eb8672183c 100644
--- a/sys/arch/i386/conf/GENERIC
+++ b/sys/arch/i386/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.811 2016/01/11 22:00:16 kettenis Exp $
+# $OpenBSD: GENERIC,v 1.812 2016/02/28 15:46:18 naddy Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -24,8 +24,6 @@ option MTRR # CPU memory range attributes control
#option KGDB # Remote debugger support; exclusive of DDB
#option "KGDB_DEVNAME=\"com\"",KGDBADDR=0x2f8,KGDBRATE=9600
-option COMPAT_LINUX # binary compatibility with Linux
-
option NTFS # NTFS support
option HIBERNATE # Hibernate support
diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386
index 1e7b20d63bc..7f1ef1eb725 100644
--- a/sys/arch/i386/conf/files.i386
+++ b/sys/arch/i386/conf/files.i386
@@ -1,4 +1,4 @@
-# $OpenBSD: files.i386,v 1.228 2016/01/08 15:54:13 jcs Exp $
+# $OpenBSD: files.i386,v 1.229 2016/02/28 15:46:18 naddy Exp $
#
# new style config file for i386 architecture
#
@@ -258,10 +258,6 @@ file arch/i386/i386/vm86.c vm86
file arch/i386/i386/kvm86.c kvm86
file arch/i386/i386/kvm86call.S kvm86
-# Linux binary compatibility (COMPAT_LINUX)
-include "compat/linux/files.linux"
-file arch/i386/i386/linux_machdep.c compat_linux
-
device bios {}
attach bios at mainbus
file arch/i386/i386/bios.c bios needs-count
diff --git a/sys/arch/i386/i386/genassym.cf b/sys/arch/i386/i386/genassym.cf
index ddb355b24df..37c302bf06a 100644
--- a/sys/arch/i386/i386/genassym.cf
+++ b/sys/arch/i386/i386/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.37 2015/04/12 18:37:53 mlarkin Exp $
+# $OpenBSD: genassym.cf,v 1.38 2016/02/28 15:46:18 naddy Exp $
#
# Copyright (c) 1982, 1990 The Regents of the University of California.
# All rights reserved.
@@ -48,10 +48,6 @@ include <machine/pmap.h>
include <machine/vmparam.h>
include <machine/mutex.h>
-if COMPAT_LINUX > 0
-include <machine/linux_machdep.h>
-endif
-
if MULTIPROCESSOR
include <machine/cpu.h>
endif
@@ -132,14 +128,6 @@ member m_next
member m_data
member m_len
-# Linux frame offsets
-ifdef COMPAT_LINUX
-struct linux_sigframe LINUX_SIGF_
-member HANDLER sf_handler
-member SC sf_sc
-struct linux_sigcontext LINUX_
-endif
-
# Interrupt metering
if NISA > 0
struct intrhand
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s
index 47afb36c0c6..72ae76230a2 100644
--- a/sys/arch/i386/i386/locore.s
+++ b/sys/arch/i386/i386/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.163 2016/02/26 02:25:09 mlarkin Exp $ */
+/* $OpenBSD: locore.s,v 1.164 2016/02/28 15:46:18 naddy Exp $ */
/* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */
/*-
@@ -46,9 +46,6 @@
#include <sys/errno.h>
#include <sys/syscall.h>
-#ifdef COMPAT_LINUX
-#include <compat/linux/linux_syscall.h>
-#endif
#include <machine/codepatch.h>
#include <machine/cputypes.h>
@@ -707,27 +704,6 @@ _C_LABEL(esigcode):
/*****************************************************************************/
-/*****************************************************************************/
-
-#ifdef COMPAT_LINUX
-/*
- * Signal trampoline; copied to top of user stack.
- */
-NENTRY(linux_sigcode)
- call *LINUX_SIGF_HANDLER(%esp)
- leal LINUX_SIGF_SC(%esp),%ebx # scp (the call may have clobbered the
- # copy at SIGF_SCP(%esp))
- pushl %eax # junk to fake return address
- movl $LINUX_SYS_sigreturn,%eax
- int $0x80 # enter kernel with args on stack
- movl $LINUX_SYS_exit,%eax
- int $0x80 # exit if sigreturn fails
- .globl _C_LABEL(linux_esigcode)
-_C_LABEL(linux_esigcode):
-#endif
-
-/*****************************************************************************/
-
/*
* The following primitives are used to fill and copy regions of memory.
*/
diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c
index cae218755eb..a7015d51d55 100644
--- a/sys/arch/i386/i386/trap.c
+++ b/sys/arch/i386/i386/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.124 2016/02/27 13:08:07 mpi Exp $ */
+/* $OpenBSD: trap.c,v 1.125 2016/02/28 15:46:18 naddy Exp $ */
/* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */
/*-
@@ -67,10 +67,6 @@
#endif
#include <sys/exec.h>
-#ifdef COMPAT_LINUX
-#include <compat/linux/linux_syscall.h>
-extern struct emul emul_linux_elf;
-#endif
#ifdef KVM86
#include <machine/kvm86.h>
#define KVM86MODE (kvm86_incall)
@@ -582,11 +578,6 @@ syscall(struct trapframe *frame)
switch (code) {
case SYS_syscall:
-#ifdef COMPAT_LINUX
- /* Linux has a special system setup call as number 0 */
- if (p->p_p->ps_emul == &emul_linux_elf)
- break;
-#endif
/*
* Code is first argument, followed by actual args.
*/
@@ -611,36 +602,6 @@ syscall(struct trapframe *frame)
else
callp += code;
argsize = callp->sy_argsize;
-#ifdef COMPAT_LINUX
- /* XXX extra if() for every emul type.. */
- if (p->p_p->ps_emul == &emul_linux_elf) {
- /*
- * Linux passes the args in ebx, ecx, edx, esi, edi, ebp, in
- * increasing order.
- */
- switch (argsize) {
- case 24:
- args[5] = frame->tf_ebp;
- case 20:
- args[4] = frame->tf_edi;
- case 16:
- args[3] = frame->tf_esi;
- case 12:
- args[2] = frame->tf_edx;
- case 8:
- args[1] = frame->tf_ecx;
- case 4:
- args[0] = frame->tf_ebx;
- case 0:
- break;
- default:
- panic("linux syscall with weird argument size %d",
- argsize);
- break;
- }
- }
- else
-#endif
if (argsize && (error = copyin(params, args, argsize)))
goto bad;