]> git.saurik.com Git - apple/xnu.git/blob - EXTERNAL_HEADERS/architecture/i386/table.h
xnu-792.6.56.tar.gz
[apple/xnu.git] / EXTERNAL_HEADERS / architecture / i386 / table.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
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. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23 /*
24 * Copyright (c) 1992 NeXT Computer, Inc.
25 *
26 * Intel386 Family: Descriptor tables.
27 *
28 * HISTORY
29 *
30 * 30 March 1992 ? at NeXT
31 * Created.
32 */
33
34 #include <architecture/i386/desc.h>
35 #include <architecture/i386/tss.h>
36
37 /*
38 * A totally generic descriptor
39 * table entry.
40 */
41
42 typedef union dt_entry {
43 code_desc_t code;
44 data_desc_t data;
45 ldt_desc_t ldt;
46 tss_desc_t task_state;
47 call_gate_t call_gate;
48 trap_gate_t trap_gate;
49 intr_gate_t intr_gate;
50 task_gate_t task_gate;
51 } dt_entry_t;
52
53 #define DESC_TBL_MAX 8192
54
55 /*
56 * Global descriptor table.
57 */
58
59 typedef union gdt_entry {
60 code_desc_t code;
61 data_desc_t data;
62 ldt_desc_t ldt;
63 call_gate_t call_gate;
64 task_gate_t task_gate;
65 tss_desc_t task_state;
66 } gdt_entry_t;
67
68 typedef gdt_entry_t gdt_t;
69
70 /*
71 * Interrupt descriptor table.
72 */
73
74 typedef union idt_entry {
75 trap_gate_t trap_gate;
76 intr_gate_t intr_gate;
77 task_gate_t task_gate;
78 } idt_entry_t;
79
80 typedef idt_entry_t idt_t;
81
82 /*
83 * Local descriptor table.
84 */
85
86 typedef union ldt_entry {
87 code_desc_t code;
88 data_desc_t data;
89 call_gate_t call_gate;
90 task_gate_t task_gate;
91 } ldt_entry_t;
92
93 typedef ldt_entry_t ldt_t;