]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/mach/i386/exception.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
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
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.
23 * @APPLE_LICENSE_HEADER_END@
31 * Revision 1.1.1.1 1998/09/22 21:05:31 wsanchez
32 * Import of Mac OS X kernel (~semeria)
34 * Revision 1.1.1.1 1998/03/07 02:25:47 wsanchez
35 * Import of OSF Mach kernel (~mburg)
37 * Revision 1.2.8.5 1995/04/07 19:05:14 barbou
38 * Backed out previous submission.
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).
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]
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]
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]
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]
65 * make endif tags ansi compliant/include files
66 * [1993/02/20 21:44:18 david]
68 * Updated to new exception interface.
69 * [1992/12/23 13:05:21 david]
71 * Revision 1.1 1992/09/30 02:30:41 robert
78 * Revision 2.4 91/05/14 16:52:05 mrt
79 * Correcting copyright
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]
85 * Revision 2.2 90/05/03 15:47:38 dbg
88 * Revision 1.3 89/03/09 20:19:42 rpd
91 * Revision 1.2 89/02/26 13:00:47 gm0w
92 * Changes for cleanup.
94 * 31-Dec-88 Robert Baron (rvb) at Carnegie-Mellon University
95 * Derived from MACH2.0 vax release.
97 * 2-Nov-87 David Golub (dbg) at Carnegie-Mellon University
103 * Mach Operating System
104 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
105 * All Rights Reserved.
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.
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.
117 * Carnegie Mellon requests users of this software to return to
119 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
120 * School of Computer Science
121 * Carnegie Mellon University
122 * Pittsburgh PA 15213-3890
124 * any improvements or extensions that they make and grant Carnegie Mellon
125 * the rights to redistribute these changes.
130 #ifndef _MACH_I386_EXCEPTION_H_
131 #define _MACH_I386_EXCEPTION_H_
134 * No machine dependent types for the 80386
137 #define EXC_TYPES_COUNT 10 /* incl. illegal exception 0 */
140 * Codes and subcodes for 80386 exceptions.
143 #define EXCEPTION_CODE_MAX 2 /* currently code and subcode */
146 * EXC_BAD_INSTRUCTION
149 #define EXC_I386_INVOP 1
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
165 * Note: 0x10000-0x10003 in use for unix signal
176 #define EXC_I386_SGL 1
177 #define EXC_I386_BPT 2
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 */
201 * machine dependent exception masks
203 #define EXC_MASK_MACHINE 0
206 #endif /* _MACH_I386_EXCEPTION_H_ */