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