summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/include/netbsd_machdep.h
diff options
context:
space:
mode:
authorkstailey <kstailey@cvs.openbsd.org>1999-09-14 01:05:26 +0000
committerkstailey <kstailey@cvs.openbsd.org>1999-09-14 01:05:26 +0000
commitf234ea2e1ab44ed800dc636a8a4e16aac89d3f4b (patch)
tree9a15430d28de19d79afbee41637dd621b0f1e9f3 /sys/arch/alpha/include/netbsd_machdep.h
parent34bfe0b0e61bf1ae13f4a08a270a72b4e26db92d (diff)
signals
Diffstat (limited to 'sys/arch/alpha/include/netbsd_machdep.h')
-rw-r--r--sys/arch/alpha/include/netbsd_machdep.h191
1 files changed, 40 insertions, 151 deletions
diff --git a/sys/arch/alpha/include/netbsd_machdep.h b/sys/arch/alpha/include/netbsd_machdep.h
index c338e2642d1..2ae9917ec8e 100644
--- a/sys/arch/alpha/include/netbsd_machdep.h
+++ b/sys/arch/alpha/include/netbsd_machdep.h
@@ -1,164 +1,53 @@
-/* $NetBSD: freebsd_machdep.h,v 1.1 1995/10/10 01:22:35 mycroft Exp $ */
+/* $OpenBSD: netbsd_machdep.h,v 1.2 1999/09/14 01:05:24 kstailey Exp $ */
/*
- * Copyright (c) 1986, 1989, 1991, 1993
- * The Regents of the University of California. All rights reserved.
+ * Copyright (c) 1994, 1995 Carnegie-Mellon University.
+ * All rights reserved.
*
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
+ * 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
*
- * 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 University of
- * California, Berkeley and its contributors.
- * 4. 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.
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
*
- * 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.
- *
- * from: @(#)signal.h 8.1 (Berkeley) 6/11/93
- * from: Id: signal.h,v 1.4 1994/08/21 04:55:30 paul Exp
- *
- * from: @(#)frame.h 5.2 (Berkeley) 1/18/91
- * from: Id: frame.h,v 1.10 1995/03/16 18:11:42 bde Exp
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
*/
-#ifndef _FREEBSD_MACHDEP_H
-#define _FREEBSD_MACHDEP_H
-/*
- * signal support
- */
-
-struct freebsd_sigcontext {
- int sc_onstack; /* sigstack state to restore */
- int sc_mask; /* signal mask to restore */
- int sc_esp; /* machine state */
- int sc_ebp;
- int sc_isp;
- int sc_eip;
- int sc_eflags;
- int sc_es;
- int sc_ds;
- int sc_cs;
- int sc_ss;
- int sc_edi;
- int sc_esi;
- int sc_ebx;
- int sc_edx;
- int sc_ecx;
- int sc_eax;
-};
-
-struct freebsd_sigframe {
- int sf_signum;
- int sf_code;
- struct freebsd_sigcontext *sf_scp;
- char *sf_addr;
- sig_t sf_handler;
- struct freebsd_sigcontext sf_sc;
-};
+#ifndef _NETBSD_MACHDEP_H
+#define _NETBSD_MACHDEP_H
/*
- * freebsd_ptrace(2) support
+ * signal support
*/
-#define FREEBSD_USRSTACK 0xefbfe000 /* USRSTACK */
-#define FREEBSD_U_AR0_OFFSET 0x0000045c /* offsetof(struct user, u_ar0) */
-#define FREEBSD_U_SAVEFP_OFFSET 0x00000070
- /* offsetof(struct user, u_pcb) + offsetof(struct pcb, pcb_savefpu) */
-
-/* Exception/Trap Stack Frame */
-struct freebsd_trapframe {
- int tf_es;
- int tf_ds;
- int tf_edi;
- int tf_esi;
- int tf_ebp;
- int tf_isp;
- int tf_ebx;
- int tf_edx;
- int tf_ecx;
- int tf_eax;
- int tf_trapno;
- /* below portion defined in 386 hardware */
- int tf_err;
- int tf_eip;
- int tf_cs;
- int tf_eflags;
- /* below only when transitting rings (e.g. user to kernel) */
- int tf_esp;
- int tf_ss;
+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) */
};
-/* Environment information of floating point unit */
-struct freebsd_env87 {
- long en_cw; /* control word (16bits) */
- long en_sw; /* status word (16bits) */
- long en_tw; /* tag word (16bits) */
- long en_fip; /* floating point instruction pointer */
- u_short en_fcs; /* floating code segment selector */
- u_short en_opcode; /* opcode last executed (11 bits ) */
- long en_foo; /* floating operand offset */
- long en_fos; /* floating operand segment selector */
-};
-
-/* Contents of each floating point accumulator */
-struct freebsd_fpacc87 {
-#ifdef dontdef /* too unportable */
- u_long fp_mantlo; /* mantissa low (31:0) */
- u_long fp_manthi; /* mantissa high (63:32) */
- int fp_exp:15; /* exponent */
- int fp_sgn:1; /* mantissa sign */
-#else
- u_char fp_bytes[10];
-#endif
-};
-
-/* Floating point context */
-struct freebsd_save87 {
- struct freebsd_env87 sv_env; /* floating point control/status */
- struct freebsd_fpacc87 sv_ac[8]; /* accumulator contents, 0-7 */
- u_long sv_ex_sw; /* status word for last exception */
- /*
- * Bogus padding for emulators. Emulators should use their own
- * struct and arrange to store into this struct (ending here)
- * before it is inspected for ptracing or for core dumps. Some
- * emulators overwrite the whole struct. We have no good way of
- * knowing how much padding to leave. Leave just enough for the
- * GPL emulator's i387_union (176 bytes total).
- */
- u_char sv_pad[64]; /* padding; used by emulators */
-};
-
-struct freebsd_ptrace_reg {
- struct freebsd_trapframe freebsd_ptrace_regs;
- struct freebsd_save87 freebsd_ptrace_fpregs;
-};
-
-/* sys/i386/include/exec.h */
-#define FREEBSD___LDPGSZ 4096
-
-#ifdef _KERNEL
-void freebsd_sendsig __P((sig_t, int, int, u_long, int, union sigval));
-#endif
-
-#endif /* _FREEBSD_MACHDEP_H */
+#endif /* _NETBSD_MACHDEP_H */