]>
git.saurik.com Git - apple/xnu.git/blob - EXTERNAL_HEADERS/architecture/i386/frame.h
35ba478de8cded90599f03476beaf01ccabb170e
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
31 * Copyright (c) 1992 NeXT Computer, Inc.
33 * Intel386 Family: Processor exception frame.
37 * 31 August 1992 ? at NeXT
38 * Added v86 mode stuff.
40 * 8 June 1992 ? at NeXT
41 * Changed name of write field in err_code_t
42 * which collided with write() in shlib.
44 * 30 March 1992 ? at NeXT
49 * Format of the error code
50 * generated by the hardware
51 * for certain exceptions.
54 typedef union err_code
{
55 struct err_code_normal
{
64 struct err_code_pgfault
{
72 #include <architecture/i386/sel.h>
75 * The actual hardware exception frame
76 * is variable in size. An error code is
77 * only pushed for certain exceptions.
78 * Previous stack information is only
79 * pushed for exceptions that cause a
80 * change in privilege level. The dpl
81 * field of the saved CS selector can be
82 * used to determine whether this is the
83 * case. If the interrupted task was
84 * executing in v86 mode, then the data
85 * segment registers are also present in
86 * the exception frame (in addition to
87 * previous stack information). This
88 * case can be determined by examining
92 typedef struct except_frame
{
115 #ifndef EFL_CF /* FIXME */
116 #define EFL_CF 0x00001
117 #define EFL_PF 0x00004
118 #define EFL_AF 0x00010
119 #define EFL_ZF 0x00040
120 #define EFL_SF 0x00080
121 #define EFL_TF 0x00100
122 #define EFL_IF 0x00200
123 #define EFL_DF 0x00400
124 #define EFL_OF 0x00800
125 #define EFL_IOPL 0x03000
126 #define EFL_NT 0x04000
127 #define EFL_RF 0x10000
128 #define EFL_VM 0x20000
129 #define EFL_AC 0x40000
132 #define EFL_CLR 0xfff88028
133 #define EFL_SET 0x00000002