summaryrefslogtreecommitdiff
path: root/sys/arch/mac68k
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mac68k')
-rw-r--r--sys/arch/mac68k/conf/GENERIC3
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c20
-rw-r--r--sys/arch/mac68k/mac68k/trap.c58
3 files changed, 3 insertions, 78 deletions
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))