]> git.saurik.com Git - apple/xnu.git/blame - osfmk/mach/i386/exception.h
xnu-792.6.22.tar.gz
[apple/xnu.git] / osfmk / mach / i386 / exception.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
e5568f75
A
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.
1c79356b 11 *
e5568f75
A
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
1c79356b
A
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
e5568f75
A
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.
1c79356b
A
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22/*
23 * @OSF_COPYRIGHT@
24 */
1c79356b
A
25/*
26 * Mach Operating System
27 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
28 * All Rights Reserved.
29 *
30 * Permission to use, copy, modify and distribute this software and its
31 * documentation is hereby granted, provided that both the copyright
32 * notice and this permission notice appear in all copies of the
33 * software, derivative works or modified versions, and any portions
34 * thereof, and that both notices appear in supporting documentation.
35 *
36 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
37 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
38 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
39 *
40 * Carnegie Mellon requests users of this software to return to
41 *
42 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
43 * School of Computer Science
44 * Carnegie Mellon University
45 * Pittsburgh PA 15213-3890
46 *
47 * any improvements or extensions that they make and grant Carnegie Mellon
48 * the rights to redistribute these changes.
49 */
50/*
51 */
52
53#ifndef _MACH_I386_EXCEPTION_H_
54#define _MACH_I386_EXCEPTION_H_
55
56/*
57 * No machine dependent types for the 80386
58 */
59
60#define EXC_TYPES_COUNT 10 /* incl. illegal exception 0 */
61
62/*
63 * Codes and subcodes for 80386 exceptions.
64 */
65
66#define EXCEPTION_CODE_MAX 2 /* currently code and subcode */
67
68/*
69 * EXC_BAD_INSTRUCTION
70 */
71
72#define EXC_I386_INVOP 1
73
74/*
75 * EXC_ARITHMETIC
76 */
77
78#define EXC_I386_DIV 1
79#define EXC_I386_INTO 2
80#define EXC_I386_NOEXT 3
81#define EXC_I386_EXTOVR 4
82#define EXC_I386_EXTERR 5
83#define EXC_I386_EMERR 6
84#define EXC_I386_BOUND 7
85
86/*
87 * EXC_SOFTWARE
9bccf70c 88 * Note: 0x10000-0x10003 in use for unix signal
1c79356b
A
89 */
90
91/*
92 * EXC_BAD_ACCESS
93 */
94
95/*
96 * EXC_BREAKPOINT
97 */
98
99#define EXC_I386_SGL 1
100#define EXC_I386_BPT 2
101
102#define EXC_I386_DIVERR 0 /* divide by 0 eprror */
103#define EXC_I386_SGLSTP 1 /* single step */
104#define EXC_I386_NMIFLT 2 /* NMI */
105#define EXC_I386_BPTFLT 3 /* breakpoint fault */
106#define EXC_I386_INTOFLT 4 /* INTO overflow fault */
107#define EXC_I386_BOUNDFLT 5 /* BOUND instruction fault */
108#define EXC_I386_INVOPFLT 6 /* invalid opcode fault */
109#define EXC_I386_NOEXTFLT 7 /* extension not available fault*/
110#define EXC_I386_DBLFLT 8 /* double fault */
111#define EXC_I386_EXTOVRFLT 9 /* extension overrun fault */
112#define EXC_I386_INVTSSFLT 10 /* invalid TSS fault */
113#define EXC_I386_SEGNPFLT 11 /* segment not present fault */
114#define EXC_I386_STKFLT 12 /* stack fault */
115#define EXC_I386_GPFLT 13 /* general protection fault */
116#define EXC_I386_PGFLT 14 /* page fault */
117#define EXC_I386_EXTERRFLT 16 /* extension error fault */
118#define EXC_I386_ALIGNFLT 17 /* Alignment fault */
119#define EXC_I386_ENDPERR 33 /* emulated extension error flt */
120#define EXC_I386_ENOEXTFLT 32 /* emulated ext not present */
121
122
123/*
124 * machine dependent exception masks
125 */
126#define EXC_MASK_MACHINE 0
127
1c79356b 128#endif /* _MACH_I386_EXCEPTION_H_ */