xref: /titanic_52/usr/src/uts/intel/sys/machsig.h (revision 82d33c01b078ed404a986a369750cdb4743773fb)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*	Copyright (c) 1988 AT&T	*/
28 /*	  All Rights Reserved  	*/
29 
30 
31 #ifndef	_SYS_MACHSIG_H
32 #define	_SYS_MACHSIG_H
33 
34 #pragma ident	"%Z%%M%	%I%	%E% SMI"
35 
36 #include <sys/feature_tests.h>
37 
38 #ifdef	__cplusplus
39 extern "C" {
40 #endif
41 
42 /*
43  * machsig.h is the machine dependent portion of siginfo.h (and is
44  * included by siginfo.h). A version of machsig.h should exist for
45  * each architecture. The codes for SIGILL, SIGFPU, SIGSEGV and SIGBUS
46  * are in this file. The codes for SIGTRAP, SIGCLD(SIGCHLD), and
47  * SIGPOLL are architecture independent and may be found in siginfo.h.
48  */
49 
50 #if !defined(_POSIX_C_SOURCE) || defined(_XPG4_2) || defined(__EXTENSIONS__)
51 
52 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
53 #include <vm/faultcode.h>
54 #endif
55 
56 /*
57  * SIGILL signal codes
58  */
59 #define	ILL_ILLOPC	1	/* illegal opcode */
60 #define	ILL_ILLOPN	2	/* illegal operand */
61 #define	ILL_ILLADR	3	/* illegal addressing mode */
62 #define	ILL_ILLTRP	4	/* illegal trap */
63 #define	ILL_PRVOPC	5	/* privileged opcode */
64 #define	ILL_PRVREG	6	/* privileged register */
65 #define	ILL_COPROC	7	/* co-processor */
66 #define	ILL_BADSTK	8	/* bad stack */
67 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
68 #define	NSIGILL		8
69 #endif
70 
71 /*
72  * SIGEMT signal codes
73  */
74 
75 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
76 #define	EMT_CPCOVF	1	/* CPU performance counter overflow */
77 #define	NSIGEMT		1
78 #endif
79 
80 /*
81  * SIGFPE signal codes
82  */
83 
84 #define	FPE_INTDIV	1	/* integer divide by zero */
85 #define	FPE_INTOVF	2	/* integer overflow */
86 #define	FPE_FLTDIV	3	/* floating point divide by zero */
87 #define	FPE_FLTOVF	4	/* floating point overflow */
88 #define	FPE_FLTUND	5	/* floating point underflow */
89 #define	FPE_FLTRES	6	/* floating point inexact result */
90 #define	FPE_FLTINV	7	/* invalid floating point operation */
91 #define	FPE_FLTSUB	8	/* subscript out of range */
92 #define	FPE_FLTDEN	9	/* floating point denormalize */
93 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
94 #define	NSIGFPE		9
95 #endif
96 
97 /*
98  * SIGSEGV signal codes
99  */
100 
101 #define	SEGV_MAPERR	1	/* address not mapped to object */
102 #define	SEGV_ACCERR	2	/* invalid permissions */
103 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
104 #define	NSIGSEGV	2
105 #endif
106 
107 /*
108  * SIGBUS signal codes
109  */
110 
111 #define	BUS_ADRALN	1	/* invalid address alignment */
112 #define	BUS_ADRERR	2	/* non-existent physical address */
113 #ifndef	BUS_OBJERR		/* also defined in ucbinclude/sys/signal.h */
114 #define	BUS_OBJERR	3	/* object specific hardware error */
115 #endif
116 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
117 #define	NSIGBUS		3
118 #endif
119 
120 #endif	/* !defined(_POSIX_C_SOURCE) || defined(_XPG4_2) ...  */
121 
122 #ifdef	__cplusplus
123 }
124 #endif
125 
126 #endif	/* _SYS_MACHSIG_H */
127