summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2007-05-28 23:10:11 +0000
committerBob Beck <beck@cvs.openbsd.org>2007-05-28 23:10:11 +0000
commit0607194a881701170175f156fb947adff1da714f (patch)
tree851dcf0d128fa156f3439bd1b73d4744d74a87f2 /sys/arch
parent62e9e0c9395791a5babdc92d6bc74e79ae3a1348 (diff)
Maintaining a broken compatibility layer for a broken OS is not a productive
activity for anyone. Bye bye COMPAT_NETBSD. ok tedu@, deraadt@, and many others in the hackathon room.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/alpha/genassym.cf12
-rw-r--r--sys/arch/alpha/alpha/locore.s23
-rw-r--r--sys/arch/alpha/alpha/netbsd_machdep.c273
-rw-r--r--sys/arch/alpha/conf/GENERIC3
-rw-r--r--sys/arch/alpha/conf/files.alpha6
-rw-r--r--sys/arch/alpha/include/netbsd_machdep.h57
-rw-r--r--sys/arch/i386/conf/GENERIC6
-rw-r--r--sys/arch/sparc64/conf/files.sparc646
-rw-r--r--sys/arch/sparc64/include/netbsd_machdep.h22
-rw-r--r--sys/arch/sparc64/sparc64/genassym.cf11
-rw-r--r--sys/arch/sparc64/sparc64/locore.s6
-rw-r--r--sys/arch/sparc64/sparc64/netbsd_machdep.c274
12 files changed, 10 insertions, 689 deletions
diff --git a/sys/arch/alpha/alpha/genassym.cf b/sys/arch/alpha/alpha/genassym.cf
index 8045b0d8a33..cddc3760215 100644
--- a/sys/arch/alpha/alpha/genassym.cf
+++ b/sys/arch/alpha/alpha/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.9 2007/04/13 08:31:50 martin Exp $
+# $OpenBSD: genassym.cf,v 1.10 2007/05/28 23:10:10 beck Exp $
# Copyright (c) 1994, 1995 Gordon W. Ross
# Copyright (c) 1993 Adam Glass
@@ -43,10 +43,6 @@ include <machine/frame.h>
include <machine/rpb.h>
include <machine/vmparam.h>
-ifdef COMPAT_NETBSD
-include <compat/netbsd/netbsd_syscall.h>
-endif
-
include <uvm/uvm_extern.h>
# general constants
@@ -159,12 +155,6 @@ export EFAULT
export SYS_sigreturn
export SYS_exit
-ifdef COMPAT_NETBSD
-# XXX - these should probably use the magic macro from machine/asm.h
-export NETBSD_SYS___sigreturn14
-export NETBSD_SYS_exit
-endif
-
# CPU info
struct cpu_info CPU_INFO_
member CURPROC ci_curproc
diff --git a/sys/arch/alpha/alpha/locore.s b/sys/arch/alpha/alpha/locore.s
index 64b6ff8606e..6b9f238138f 100644
--- a/sys/arch/alpha/alpha/locore.s
+++ b/sys/arch/alpha/alpha/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.29 2006/05/25 01:33:43 brad Exp $ */
+/* $OpenBSD: locore.s,v 1.30 2007/05/28 23:10:10 beck Exp $ */
/* $NetBSD: locore.s,v 1.94 2001/04/26 03:10:44 ross Exp $ */
/*-
@@ -294,27 +294,6 @@ XNESTED(esigcode,0)
/**************************************************************************/
-#ifdef COMPAT_NETBSD
-/*
- * NetBSD signal trampoline code. Almost identical to the normal one.
- */
-
-NESTED(netbsd_sigcode,0,0,ra,0,0)
- lda sp, -16(sp) /* save the sigcontext pointer */
- stq a2, 0(sp)
- jsr ra, (t12) /* call the signal handler (t12==pv) */
- ldq a0, 0(sp) /* get the sigcontext pointer */
- lda sp, 16(sp)
- NETBSD_CALLSYS_NOERROR(__sigreturn14)/* and call sigreturn() with it. */
- mov v0, a0 /* if that failed, get error code */
- NETBSD_CALLSYS_NOERROR(exit) /* and call exit() with it. */
-XNESTED(netbsd_esigcode,0)
- END(netbsd_sigcode)
-
-#endif /* COMPAT_NETBSD */
-
-/**************************************************************************/
-
/*
* exception_return: return from trap, exception, or syscall
*/
diff --git a/sys/arch/alpha/alpha/netbsd_machdep.c b/sys/arch/alpha/alpha/netbsd_machdep.c
deleted file mode 100644
index bbbf4a5773a..00000000000
--- a/sys/arch/alpha/alpha/netbsd_machdep.c
+++ /dev/null
@@ -1,273 +0,0 @@
-/* $OpenBSD: netbsd_machdep.c,v 1.11 2005/08/06 12:10:25 miod Exp $ */
-
-/*
- * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Author: Chris G. Demetriou
- *
- * Permission to use, copy, modify and distribute this software and
- * its documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/signalvar.h>
-#include <sys/kernel.h>
-#include <sys/exec.h>
-#include <sys/proc.h>
-#include <sys/buf.h>
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-#include <sys/user.h>
-#include <machine/cpu.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <compat/netbsd/netbsd_types.h>
-#include <compat/netbsd/netbsd_signal.h>
-#include <compat/netbsd/netbsd_syscallargs.h>
-
-#include <machine/netbsd_machdep.h>
-#include <machine/signal.h>
-#include <machine/reg.h>
-
-#ifdef DEBUG
-extern int sigdebug;
-extern int sigpid;
-#define SDB_FOLLOW 0x01
-#define SDB_KSTACK 0x02
-#endif
-
-static void netbsd_to_openbsd_sigcontext(struct netbsd_sigcontext *,
- struct sigcontext *);
-
-static void openbsd_to_netbsd_sigcontext(struct sigcontext *,
- struct netbsd_sigcontext *);
-
-static void
-netbsd_to_openbsd_sigcontext(nbsc, obsc)
- struct netbsd_sigcontext *nbsc;
- struct sigcontext *obsc;
-{
- bzero(obsc, sizeof(obsc));
- obsc->sc_onstack = nbsc->sc_onstack;
- bcopy(&nbsc->sc_mask.__bits[0], &obsc->sc_mask, sizeof(sigset_t));
- obsc->sc_pc = nbsc->sc_pc;
- obsc->sc_ps = nbsc->sc_ps;
- bcopy(nbsc->sc_regs, obsc->sc_regs, sizeof(obsc->sc_regs));
- obsc->sc_ownedfp = nbsc->sc_ownedfp;
- bcopy(nbsc->sc_fpregs, obsc->sc_fpregs, sizeof(obsc->sc_fpregs));
- obsc->sc_fpcr = nbsc->sc_fpcr;
- obsc->sc_fp_control = nbsc->sc_fp_control;
-}
-
-static void
-openbsd_to_netbsd_sigcontext(obsc, nbsc)
- struct sigcontext *obsc;
- struct netbsd_sigcontext *nbsc;
-{
- bzero(nbsc, sizeof(nbsc));
- nbsc->sc_onstack = obsc->sc_onstack;
- nbsc->__sc_mask13 = obsc->sc_mask;
- bcopy(&obsc->sc_mask, &nbsc->sc_mask.__bits[0], sizeof(sigset_t));
- nbsc->sc_pc = obsc->sc_pc;
- nbsc->sc_ps = obsc->sc_ps;
- bcopy(obsc->sc_regs, nbsc->sc_regs, sizeof(obsc->sc_regs));
- nbsc->sc_ownedfp = obsc->sc_ownedfp;
- bcopy(obsc->sc_fpregs, nbsc->sc_fpregs, sizeof(obsc->sc_fpregs));
- nbsc->sc_fpcr = obsc->sc_fpcr;
- nbsc->sc_fp_control = obsc->sc_fp_control;
-}
-
-/*
- * Send an interrupt to process.
- */
-void
-netbsd_sendsig(catcher, sig, mask, code, type, val)
- sig_t catcher;
- int sig, mask;
- u_long code;
- int type;
- union sigval val;
-{
- struct proc *p = curproc;
- struct sigcontext *scp, ksc;
- struct trapframe *frame;
- struct sigacts *psp = p->p_sigacts;
- int oonstack, fsize, rndfsize;
- struct netbsd_sigcontext nbsc;
-
- frame = p->p_md.md_tf;
- oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
- fsize = sizeof(nbsc);
- rndfsize = ((fsize + 15) / 16) * 16;
- /*
- * Allocate and validate space for the signal handler
- * context. Note that if the stack is in P0 space, the
- * call to grow() is a nop, and the useracc() check
- * will fail if the process has not already allocated
- * the space with a `brk'.
- */
- if ((psp->ps_flags & SAS_ALTSTACK) && !oonstack &&
- (psp->ps_sigonstack & sigmask(sig))) {
- scp = (struct sigcontext *)(psp->ps_sigstk.ss_sp +
- psp->ps_sigstk.ss_size - rndfsize);
- psp->ps_sigstk.ss_flags |= SS_ONSTACK;
- } else
- scp = (struct sigcontext *)(alpha_pal_rdusp() - rndfsize);
- if ((u_long)scp <= USRSTACK - ctob(p->p_vmspace->vm_ssize))
- (void)uvm_grow(p, (u_long)scp);
-#ifdef DEBUG
- if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
- printf("netbsd_sendsig(%d): sig %d ssp %p usp %p scp %p\n",
- p->p_pid, sig, &oonstack, alpha_pal_rdusp(), scp);
-#endif
-
- /*
- * Build the signal context to be used by sigreturn.
- */
- ksc.sc_onstack = oonstack;
- ksc.sc_mask = mask;
- ksc.sc_pc = frame->tf_regs[FRAME_PC];
- ksc.sc_ps = frame->tf_regs[FRAME_PS];
-
- /* copy the registers. */
- frametoreg(frame, (struct reg *)ksc.sc_regs);
- ksc.sc_regs[R_ZERO] = 0xACEDBADE; /* magic number */
- ksc.sc_regs[R_SP] = alpha_pal_rdusp();
-
- /* save the floating-point state, if necessary, then copy it. */
- if (p == fpcurproc) {
- alpha_pal_wrfen(1);
- savefpstate(&p->p_addr->u_pcb.pcb_fp);
- alpha_pal_wrfen(0);
- fpcurproc = NULL;
- }
- ksc.sc_ownedfp = p->p_md.md_flags & MDP_FPUSED;
- bcopy(&p->p_addr->u_pcb.pcb_fp, (struct fpreg *)ksc.sc_fpregs,
- sizeof(struct fpreg));
- ksc.sc_fp_control = 0; /* XXX ? */
- bzero(ksc.sc_reserved, sizeof ksc.sc_reserved); /* XXX */
- bzero(ksc.sc_xxx, sizeof ksc.sc_xxx); /* XXX */
-
- /*
- * copy the frame out to userland.
- */
- openbsd_to_netbsd_sigcontext(&ksc, &nbsc);
- if (copyout((caddr_t)&nbsc, (caddr_t)scp, sizeof(nbsc)) != 0) {
-#ifdef DEBUG
- if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
- printf("netbsd_sendsig(%d): copyout failed on sig %d\n",
- p->p_pid, sig);
-#endif
- /*
- * Process has trashed its stack; give it an illegal
- * instruction to halt it in its tracks.
- */
- sigexit(p, SIGILL);
- /* NOTREACHED */
- }
-#ifdef DEBUG
- if (sigdebug & SDB_FOLLOW)
- printf("netbsd_sendsig(%d): sig %d scp %p code %lx\n",
- p->p_pid, sig, scp, code);
-#endif
-
- /*
- * Set up the registers to return to netbsd_sigcode.
- */
- frame->tf_regs[FRAME_PC] = p->p_sigcode;
- frame->tf_regs[FRAME_A0] = sig;
- frame->tf_regs[FRAME_A1] = code;
- frame->tf_regs[FRAME_A2] = (u_int64_t)scp;
- frame->tf_regs[FRAME_T12] = (u_int64_t)catcher; /* t12 is pv */
- alpha_pal_wrusp((unsigned long)scp);
-
-#ifdef DEBUG
- if (sigdebug & SDB_FOLLOW)
- printf("netbsd_sendsig(%d): pc %lx, catcher %lx\n", p->p_pid,
- frame->tf_regs[FRAME_PC], frame->tf_regs[FRAME_T12]);
- if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
- printf("netbsd_sendsig(%d): sig %d returns\n", p->p_pid, sig);
-#endif
-}
-
-/* ARGSUSED */
-int
-netbsd_sys___sigreturn14(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct netbsd_sys___sigreturn14_args /* {
- syscallarg(struct netbsd_sigcontext *) sigcntxp;
- } */ *uap = v;
- struct sigcontext ksc;
- struct netbsd_sigcontext *nbscp, nbsc;
-
- nbscp = SCARG(uap, sigcntxp);
-#ifdef DEBUG
- if (sigdebug & SDB_FOLLOW)
- printf("sigreturn: pid %d, nbscp %p\n", p->p_pid, nbscp);
-#endif
- if (ALIGN(nbscp) != (u_int64_t)nbscp)
- return (EINVAL);
-
- /*
- * Test and fetch the context structure.
- * We grab it all at once for speed.
- */
- if (copyin((caddr_t)nbscp, (caddr_t)&nbsc, sizeof (nbsc)))
- return (EFAULT);
-
- netbsd_to_openbsd_sigcontext(&nbsc, &ksc);
-
- if (ksc.sc_regs[R_ZERO] != 0xACEDBADE) /* magic number */
- return (EINVAL);
- /*
- * Restore the user-supplied information
- */
- if (ksc.sc_onstack)
- p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
- else
- p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
- p->p_sigmask = ksc.sc_mask &~ sigcantmask;
-
- p->p_md.md_tf->tf_regs[FRAME_PC] = ksc.sc_pc;
- p->p_md.md_tf->tf_regs[FRAME_PS] =
- (ksc.sc_ps | ALPHA_PSL_USERSET) & ~ALPHA_PSL_USERCLR;
-
- regtoframe((struct reg *)ksc.sc_regs, p->p_md.md_tf);
- alpha_pal_wrusp(ksc.sc_regs[R_SP]);
-
- /* XXX ksc.sc_ownedfp ? */
- if (p == fpcurproc)
- fpcurproc = NULL;
- bcopy((struct fpreg *)ksc.sc_fpregs, &p->p_addr->u_pcb.pcb_fp,
- sizeof(struct fpreg));
- /* XXX ksc.sc_fp_control ? */
-
-#ifdef DEBUG
- if (sigdebug & SDB_FOLLOW)
- printf("sigreturn(%d): returns\n", p->p_pid);
-#endif
- return (EJUSTRETURN);
-}
diff --git a/sys/arch/alpha/conf/GENERIC b/sys/arch/alpha/conf/GENERIC
index 41fdf63cce1..cedd196d635 100644
--- a/sys/arch/alpha/conf/GENERIC
+++ b/sys/arch/alpha/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.191 2007/04/19 04:52:22 dlg Exp $
+# $OpenBSD: GENERIC,v 1.192 2007/05/28 23:10:10 beck Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -30,7 +30,6 @@ option DEC_6600 # EV6: XP1000, 264DP OEM Board
option API_UP1000 # EV6: Alpha Processor UP1000
option COMPAT_OSF1 # OSF/1 binary compatibility
-option COMPAT_NETBSD # NetBSD compatibility
# Misc. options
option EISAVERBOSE # recognize "unknown" EISA devices
diff --git a/sys/arch/alpha/conf/files.alpha b/sys/arch/alpha/conf/files.alpha
index 8d381894645..e284b627b81 100644
--- a/sys/arch/alpha/conf/files.alpha
+++ b/sys/arch/alpha/conf/files.alpha
@@ -1,4 +1,4 @@
-# $OpenBSD: files.alpha,v 1.80 2007/05/05 21:05:43 martin Exp $
+# $OpenBSD: files.alpha,v 1.81 2007/05/28 23:10:10 beck Exp $
# $NetBSD: files.alpha,v 1.32 1996/11/25 04:03:21 cgd Exp $
#
# alpha-specific configuration info
@@ -336,10 +336,6 @@ file arch/alpha/alpha/api_up1000.c api_up1000 needs-flag
include "compat/osf1/files.osf1"
file arch/alpha/alpha/osf1_locore.s compat_osf1
-# NetBSD binary compatibility (COMPAT_NETBSD)
-include "../../../compat/netbsd/files.netbsd"
-file arch/alpha/alpha/netbsd_machdep.c compat_netbsd
-
#
# Machine-independent I2C drivers
#
diff --git a/sys/arch/alpha/include/netbsd_machdep.h b/sys/arch/alpha/include/netbsd_machdep.h
deleted file mode 100644
index cccaa2f7310..00000000000
--- a/sys/arch/alpha/include/netbsd_machdep.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $OpenBSD: netbsd_machdep.h,v 1.4 2002/03/14 01:26:27 millert Exp $ */
-
-/*
- * Copyright (c) 1994, 1995 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Author: Chris G. Demetriou
- *
- * Permission to use, copy, modify and distribute this software and
- * its documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-#ifndef _NETBSD_MACHDEP_H
-#define _NETBSD_MACHDEP_H
-
-/*
- * signal support
- */
-
-struct netbsd_sigcontext {
- long sc_onstack; /* sigstack state to restore */
- long __sc_mask13; /* signal mask to restore (old style) */
- long sc_pc; /* pc to restore */
- long sc_ps; /* ps to restore */
- unsigned long sc_regs[32]; /* integer register set (see above) */
-#define sc_sp sc_regs[R_SP]
- long sc_ownedfp; /* fp has been used */
- unsigned long sc_fpregs[32]; /* FP register set (see above) */
- unsigned long sc_fpcr; /* FP control register (see above) */
- unsigned long sc_fp_control; /* FP software control word */
- long sc_reserved[2]; /* XXX */
- long sc_xxx[8]; /* XXX */
- netbsd_sigset_t sc_mask; /* signal mask to restore (new style) */
-};
-
-#ifdef _KERNEL
-void netbsd_sendsig(sig_t, int, int, u_long, int, union sigval);
-#endif
-
-#endif /* _NETBSD_MACHDEP_H */
diff --git a/sys/arch/i386/conf/GENERIC b/sys/arch/i386/conf/GENERIC
index 7a7488dc145..d5b70397327 100644
--- a/sys/arch/i386/conf/GENERIC
+++ b/sys/arch/i386/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.560 2007/05/28 22:26:02 todd Exp $
+# $OpenBSD: GENERIC,v 1.561 2007/05/28 23:10:10 beck Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -61,7 +61,7 @@ pci* at mainbus0
#option ACPIVERBOSE
#option ACPI_ENABLE
-acpi0 at mainbus? disable
+acpi0 at mainbus?
#acpitimer* at acpi?
#acpihpet* at acpi?
#acpiac* at acpi?
@@ -69,7 +69,7 @@ acpi0 at mainbus? disable
#acpibtn* at acpi?
#acpicpu* at acpi?
#acpidock* at acpi?
-acpiec* at acpi? disable
+acpiec* at acpi?
acpiprt* at acpi?
#acpitz* at acpi?
diff --git a/sys/arch/sparc64/conf/files.sparc64 b/sys/arch/sparc64/conf/files.sparc64
index 6f39ece508e..a4d1c9ddef4 100644
--- a/sys/arch/sparc64/conf/files.sparc64
+++ b/sys/arch/sparc64/conf/files.sparc64
@@ -1,4 +1,4 @@
-# $OpenBSD: files.sparc64,v 1.82 2007/04/10 19:05:52 kettenis Exp $
+# $OpenBSD: files.sparc64,v 1.83 2007/05/28 23:10:10 beck Exp $
# $NetBSD: files.sparc64,v 1.50 2001/08/10 20:53:50 eeh Exp $
# maxpartitions must be first item in files.${ARCH}
@@ -60,10 +60,6 @@ include "dev/ata/files.ata"
include "dev/pckbc/files.pckbc"
include "dev/pcmcia/files.pcmcia"
-# COMPAT_NETBSD
-include "compat/netbsd/files.netbsd"
-file arch/sparc64/sparc64/netbsd_machdep.c compat_netbsd
-
# Sun specific files
include "../../../dev/sun/files.sun"
diff --git a/sys/arch/sparc64/include/netbsd_machdep.h b/sys/arch/sparc64/include/netbsd_machdep.h
deleted file mode 100644
index 234d2521062..00000000000
--- a/sys/arch/sparc64/include/netbsd_machdep.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* $OpenBSD: netbsd_machdep.h,v 1.2 2002/03/14 01:26:45 millert Exp $ */
-
-#ifndef _NETBSD_MACHDEP_H
-#define _NETBSD_MACHDEP_H
-
-struct netbsd_sigcontext {
- int sc_onstack;
- int __sc_mask13;
- long sc_sp;
- long sc_pc;
- long sc_npc;
- long sc_tstate;
- long sc_g1;
- long sc_o0;
- netbsd_sigset_t sc_mask;
-};
-
-#ifdef _KERNEL
-void netbsd_sendsig(sig_t, int, int, u_long, int, union sigval);
-#endif
-
-#endif /* _NETBSD_MACHDEP_H */
diff --git a/sys/arch/sparc64/sparc64/genassym.cf b/sys/arch/sparc64/sparc64/genassym.cf
index 683ead3ddb3..b86bf0a0f64 100644
--- a/sys/arch/sparc64/sparc64/genassym.cf
+++ b/sys/arch/sparc64/sparc64/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.15 2007/05/14 21:38:08 kettenis Exp $
+# $OpenBSD: genassym.cf,v 1.16 2007/05/28 23:10:10 beck Exp $
# $NetBSD: genassym.cf,v 1.23 2001/08/08 00:09:30 eeh Exp $
#
@@ -99,10 +99,6 @@ include <machine/reg.h>
#include <sparc64/sparc64/cpuvar.h>
-ifdef COMPAT_NETBSD
-include <compat/netbsd/netbsd_syscall.h>
-endif
-
ifdef notyet
include <sparc64/dev/zsreg.h>
include <sparc64/dev/zsvar.h>
@@ -267,11 +263,6 @@ member dbr_local
member dbr_in
endif
-ifdef COMPAT_NETBSD
-export NETBSD_SYS___sigreturn14
-export NETBSD_SYS_exit
-endif
-
export TLB_ACCESS
export TLB_MODIFY
export TLB_REAL_W
diff --git a/sys/arch/sparc64/sparc64/locore.s b/sys/arch/sparc64/sparc64/locore.s
index 7915aed73f5..d0e4342a3ec 100644
--- a/sys/arch/sparc64/sparc64/locore.s
+++ b/sys/arch/sparc64/sparc64/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.77 2007/05/15 21:00:05 kettenis Exp $ */
+/* $OpenBSD: locore.s,v 1.78 2007/05/28 23:10:10 beck Exp $ */
/* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */
/*
@@ -4938,10 +4938,6 @@ _C_LABEL(sigcode):
t ST_SYSCALL
_C_LABEL(esigcode):
-#ifdef COMPAT_NETBSD
-#include "sigcode_netbsd.s"
-#endif /* COMPAT_NETBSD */
-
/*
* Primitives
diff --git a/sys/arch/sparc64/sparc64/netbsd_machdep.c b/sys/arch/sparc64/sparc64/netbsd_machdep.c
deleted file mode 100644
index a3d87143e31..00000000000
--- a/sys/arch/sparc64/sparc64/netbsd_machdep.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/* $OpenBSD: netbsd_machdep.c,v 1.5 2003/06/02 23:27:56 millert Exp $ */
-
-/*-
- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
- * NASA Ames Research Center.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Lawrence Berkeley Laboratory.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)machdep.c 8.6 (Berkeley) 1/14/94
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/signalvar.h>
-#include <sys/kernel.h>
-#include <sys/exec.h>
-#include <sys/proc.h>
-#include <sys/buf.h>
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-#include <sys/user.h>
-#include <machine/cpu.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <compat/netbsd/netbsd_types.h>
-#include <compat/netbsd/netbsd_signal.h>
-#include <compat/netbsd/netbsd_syscallargs.h>
-
-#include <machine/netbsd_machdep.h>
-#include <machine/signal.h>
-#include <machine/frame.h>
-#include <machine/cpu.h>
-#include <machine/pmap.h>
-#include <machine/openfirm.h>
-#include <machine/sparc64.h>
-
-#include <sparc64/sparc64/cache.h>
-
-
-#ifdef DEBUG
-extern int sigdebug;
-extern int sigpid;
-#define SDB_FOLLOW 0x01
-#define SDB_KSTACK 0x02
-#endif
-
-struct netbsd_sigframe {
- int sf_signo; /* signal number */
- int sf_code; /* code */
- struct netbsd_sigcontext sf_sc; /* actual sigcontext */
-};
-
-#define STACK_OFFSET BIAS
-#define CPOUTREG(l,v) copyout(&(v), (l), sizeof(v))
-#undef CCFSZ
-#define CCFSZ CC64FSZ
-
-/*
- * Send an interrupt to process.
- */
-void
-netbsd_sendsig(catcher, sig, mask, code, type, val)
- sig_t catcher;
- int sig, mask;
- u_long code;
- int type;
- union sigval val;
-{
- struct proc *p = curproc;
- struct sigacts *psp = p->p_sigacts;
- struct trapframe64 *tf;
- vaddr_t addr;
- struct rwindow *oldsp, *newsp;
- struct netbsd_sigframe sf, *fp;
- int onstack;
-
- tf = p->p_md.md_tf;
- oldsp = (struct rwindow *)(u_long)(tf->tf_out[6] + STACK_OFFSET);
-
- /*
- * Compute new user stack addresses, subtract off
- * one signal frame, and align.
- */
- onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
-
- if ((psp->ps_flags & SAS_ALTSTACK) && !onstack &&
- (psp->ps_sigonstack & sigmask(sig))) {
- fp = (struct netbsd_sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
- psp->ps_sigstk.ss_size);
- psp->ps_sigstk.ss_flags = SS_ONSTACK;
- } else
- fp = (struct netbsd_sigframe *)oldsp;
- /* Allocate an aligned sigframe */
- fp = (struct netbsd_sigframe *)((long)(fp - 1) & ~0x0f);
-
- /*
- * Now set up the signal frame. We build it in kernel space
- * and then copy it out. We probably ought to just build it
- * directly in user space....
- */
- sf.sf_signo = sig;
- sf.sf_code = 0; /* XXX */
-
- /*
- * Build the signal context to be used by sigreturn.
- */
- sf.sf_sc.sc_onstack = onstack;
- sf.sf_sc.sc_mask.__bits[0] = mask;
- /* Save register context. */
- sf.sf_sc.sc_sp = (long)tf->tf_out[6];
- sf.sf_sc.sc_pc = tf->tf_pc;
- sf.sf_sc.sc_npc = tf->tf_npc;
- sf.sf_sc.sc_tstate = tf->tf_tstate; /* XXX */
- sf.sf_sc.sc_g1 = tf->tf_global[1];
- sf.sf_sc.sc_o0 = tf->tf_out[0];
-
- /*
- * Put the stack in a consistent state before we whack away
- * at it. Note that write_user_windows may just dump the
- * registers into the pcb; we need them in the process's memory.
- * We also need to make sure that when we start the signal handler,
- * its %i6 (%fp), which is loaded from the newly allocated stack area,
- * joins seamlessly with the frame it was in when the signal occurred,
- * so that the debugger and _longjmp code can back up through it.
- */
- newsp = (struct rwindow *)((vaddr_t)fp - sizeof(struct rwindow));
- write_user_windows();
- /* XXX do not copyout siginfo if not needed */
- if (rwindow_save(p) || copyout((caddr_t)&sf, (caddr_t)fp, sizeof sf) ||
- CPOUTREG(&(((struct rwindow *)newsp)->rw_in[6]), tf->tf_out[6])) {
- /*
- * Process has trashed its stack; give it an illegal
- * instruction to halt it in its tracks.
- */
- sigexit(p, SIGILL);
- /* NOTREACHED */
- }
-
- /*
- * Arrange to continue execution at the code copied out in exec().
- * It needs the function to call in %g1, and a new stack pointer.
- */
- addr = p->p_sigcode;
- tf->tf_global[1] = (vaddr_t)catcher;
- tf->tf_pc = addr;
- tf->tf_npc = addr + 4;
- tf->tf_out[6] = (vaddr_t)newsp - STACK_OFFSET;
-}
-
-/* ARGSUSED */
-int
-netbsd_sys___sigreturn14(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct netbsd_sys___sigreturn14_args /* {
- syscallarg(struct netbsd_sigcontext *) sigcntxp;
- } */ *uap = v;
- struct netbsd_sigcontext *scp, nbsc;
- struct trapframe64 *tf;
-
- write_user_windows();
-
- scp = SCARG(uap, sigcntxp);
-#ifdef DEBUG
- if (sigdebug & SDB_FOLLOW)
- printf("netbsd__sys___sigreturn: pid %d, scp %p\n",
- p->p_pid, scp);
-#endif
- if (ALIGN(scp) != (u_int64_t)scp)
- return (EINVAL);
-
- if (copyin((caddr_t)scp, (caddr_t)&nbsc, sizeof (nbsc)))
- return (EFAULT);
-
- tf = p->p_md.md_tf;
- /*
- * Only the icc bits in the psr are used, so it need not be
- * verified. pc and npc must be multiples of 4. This is all
- * that is required; if it holds, just do it.
- */
- if (((nbsc.sc_pc | nbsc.sc_npc) & 3) != 0 ||
- (nbsc.sc_pc == 0) || (nbsc.sc_npc == 0))
- return (EINVAL);
- /* take only psr ICC field */
- tf->tf_tstate = (u_int64_t)(tf->tf_tstate & ~TSTATE_CCR) |
- (scp->sc_tstate & TSTATE_CCR);
- tf->tf_pc = (u_int64_t)scp->sc_pc;
- tf->tf_npc = (u_int64_t)scp->sc_npc;
- tf->tf_global[1] = (u_int64_t)scp->sc_g1;
- tf->tf_out[0] = (u_int64_t)scp->sc_o0;
- tf->tf_out[6] = (u_int64_t)scp->sc_sp;
-
- /* Restore signal stack. */
- if (nbsc.sc_onstack & SS_ONSTACK)
- p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
- else
- p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
-
- /* Restore signal mask. */
- p->p_sigmask = scp->sc_mask.__bits[0] & ~sigcantmask;
-
- return (EJUSTRETURN);
-}