]> git.saurik.com Git - apple/xnu.git/blob - osfmk/mach/i386/exception.h
xnu-344.21.73.tar.gz
[apple/xnu.git] / osfmk / mach / i386 / exception.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25 /*
26 * @OSF_COPYRIGHT@
27 */
28 /*
29 * HISTORY
30 *
31 * Revision 1.1.1.1 1998/09/22 21:05:31 wsanchez
32 * Import of Mac OS X kernel (~semeria)
33 *
34 * Revision 1.1.1.1 1998/03/07 02:25:47 wsanchez
35 * Import of OSF Mach kernel (~mburg)
36 *
37 * Revision 1.2.8.5 1995/04/07 19:05:14 barbou
38 * Backed out previous submission.
39 * [95/03/29 barbou]
40 *
41 * Revision 1.2.8.4 1995/03/15 17:19:29 bruel
42 * EXC_TYPES_COUNT is machine independant.
43 * (the machine exception type is given in the code argument).
44 * [95/03/06 bruel]
45 *
46 * Revision 1.2.8.3 1995/01/10 05:16:18 devrcs
47 * mk6 CR801 - merge up from nmk18b4 to nmk18b7
48 * * Rev 1.2.6.3 1994/11/08 21:53:17 rkc
49 * Incremented the number of exception types to reflect the addition
50 * of the alert exception.
51 * [1994/12/09 21:11:21 dwm]
52 *
53 * Revision 1.2.8.1 1994/09/23 02:36:53 ezf
54 * change marker to not FREE
55 * [1994/09/22 21:39:53 ezf]
56 *
57 * Revision 1.2.2.2 1993/06/09 02:40:25 gm
58 * Added to OSF/1 R1.3 from NMK15.0.
59 * [1993/06/02 21:16:07 jeffc]
60 *
61 * Revision 1.2 1993/04/19 16:33:44 devrcs
62 * changes for EXC_MACH_SYSCALL
63 * [1993/04/05 12:06:25 david]
64 *
65 * make endif tags ansi compliant/include files
66 * [1993/02/20 21:44:18 david]
67 *
68 * Updated to new exception interface.
69 * [1992/12/23 13:05:21 david]
70 *
71 * Revision 1.1 1992/09/30 02:30:41 robert
72 * Initial revision
73 *
74 * $EndLog$
75 */
76 /* CMU_HIST */
77 /*
78 * Revision 2.4 91/05/14 16:52:05 mrt
79 * Correcting copyright
80 *
81 * Revision 2.3 91/02/05 17:32:08 mrt
82 * Changed to new Mach copyright
83 * [91/02/01 17:09:45 mrt]
84 *
85 * Revision 2.2 90/05/03 15:47:38 dbg
86 * First checkin.
87 *
88 * Revision 1.3 89/03/09 20:19:42 rpd
89 * More cleanup.
90 *
91 * Revision 1.2 89/02/26 13:00:47 gm0w
92 * Changes for cleanup.
93 *
94 * 31-Dec-88 Robert Baron (rvb) at Carnegie-Mellon University
95 * Derived from MACH2.0 vax release.
96 *
97 * 2-Nov-87 David Golub (dbg) at Carnegie-Mellon University
98 * Created.
99 *
100 */
101 /* CMU_ENDHIST */
102 /*
103 * Mach Operating System
104 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
105 * All Rights Reserved.
106 *
107 * Permission to use, copy, modify and distribute this software and its
108 * documentation is hereby granted, provided that both the copyright
109 * notice and this permission notice appear in all copies of the
110 * software, derivative works or modified versions, and any portions
111 * thereof, and that both notices appear in supporting documentation.
112 *
113 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
114 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
115 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
116 *
117 * Carnegie Mellon requests users of this software to return to
118 *
119 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
120 * School of Computer Science
121 * Carnegie Mellon University
122 * Pittsburgh PA 15213-3890
123 *
124 * any improvements or extensions that they make and grant Carnegie Mellon
125 * the rights to redistribute these changes.
126 */
127 /*
128 */
129
130 #ifndef _MACH_I386_EXCEPTION_H_
131 #define _MACH_I386_EXCEPTION_H_
132
133 /*
134 * No machine dependent types for the 80386
135 */
136
137 #define EXC_TYPES_COUNT 10 /* incl. illegal exception 0 */
138
139 /*
140 * Codes and subcodes for 80386 exceptions.
141 */
142
143 #define EXCEPTION_CODE_MAX 2 /* currently code and subcode */
144
145 /*
146 * EXC_BAD_INSTRUCTION
147 */
148
149 #define EXC_I386_INVOP 1
150
151 /*
152 * EXC_ARITHMETIC
153 */
154
155 #define EXC_I386_DIV 1
156 #define EXC_I386_INTO 2
157 #define EXC_I386_NOEXT 3
158 #define EXC_I386_EXTOVR 4
159 #define EXC_I386_EXTERR 5
160 #define EXC_I386_EMERR 6
161 #define EXC_I386_BOUND 7
162
163 /*
164 * EXC_SOFTWARE
165 * Note: 0x10000-0x10003 in use for unix signal
166 */
167
168 /*
169 * EXC_BAD_ACCESS
170 */
171
172 /*
173 * EXC_BREAKPOINT
174 */
175
176 #define EXC_I386_SGL 1
177 #define EXC_I386_BPT 2
178
179 #define EXC_I386_DIVERR 0 /* divide by 0 eprror */
180 #define EXC_I386_SGLSTP 1 /* single step */
181 #define EXC_I386_NMIFLT 2 /* NMI */
182 #define EXC_I386_BPTFLT 3 /* breakpoint fault */
183 #define EXC_I386_INTOFLT 4 /* INTO overflow fault */
184 #define EXC_I386_BOUNDFLT 5 /* BOUND instruction fault */
185 #define EXC_I386_INVOPFLT 6 /* invalid opcode fault */
186 #define EXC_I386_NOEXTFLT 7 /* extension not available fault*/
187 #define EXC_I386_DBLFLT 8 /* double fault */
188 #define EXC_I386_EXTOVRFLT 9 /* extension overrun fault */
189 #define EXC_I386_INVTSSFLT 10 /* invalid TSS fault */
190 #define EXC_I386_SEGNPFLT 11 /* segment not present fault */
191 #define EXC_I386_STKFLT 12 /* stack fault */
192 #define EXC_I386_GPFLT 13 /* general protection fault */
193 #define EXC_I386_PGFLT 14 /* page fault */
194 #define EXC_I386_EXTERRFLT 16 /* extension error fault */
195 #define EXC_I386_ALIGNFLT 17 /* Alignment fault */
196 #define EXC_I386_ENDPERR 33 /* emulated extension error flt */
197 #define EXC_I386_ENOEXTFLT 32 /* emulated ext not present */
198
199
200 /*
201 * machine dependent exception masks
202 */
203 #define EXC_MASK_MACHINE 0
204
205
206 #endif /* _MACH_I386_EXCEPTION_H_ */