]>
git.saurik.com Git - apple/xnu.git/blob - EXTERNAL_HEADERS/architecture/i386/desc.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@
26 * Copyright (c) 1992 NeXT Computer, Inc.
28 * Intel386 Family: Segment descriptors.
32 * 29 March 1992 ? at NeXT
37 * Code segment descriptor.
40 typedef struct code_desc
{
41 unsigned short limit00
;
42 unsigned short base00
;
44 unsigned char type
:5,
45 #define DESC_CODE_EXEC 0x18
46 #define DESC_CODE_READ 0x1a
49 unsigned char limit16
:4,
52 #define DESC_CODE_16B 0
53 #define DESC_CODE_32B 1
55 #define DESC_GRAN_BYTE 0
56 #define DESC_GRAN_PAGE 1
61 * Data segment descriptor.
64 typedef struct data_desc
{
65 unsigned short limit00
;
66 unsigned short base00
;
68 unsigned char type
:5,
69 #define DESC_DATA_RONLY 0x10
70 #define DESC_DATA_WRITE 0x12
73 unsigned char limit16
:4,
76 #define DESC_DATA_16B 0
77 #define DESC_DATA_32B 1
83 * LDT segment descriptor.
86 typedef struct ldt_desc
{
87 unsigned short limit00
;
88 unsigned short base00
;
90 unsigned char type
:5,
94 unsigned char limit16
:4,
100 #include <architecture/i386/sel.h>
103 * Call gate descriptor.
106 typedef struct call_gate
{
107 unsigned short offset00
;
109 unsigned int argcnt
:5,
112 #define DESC_CALL_GATE 0x0c
119 * Trap gate descriptor.
122 typedef struct trap_gate
{
123 unsigned short offset00
;
127 #define DESC_TRAP_GATE 0x0f
135 * Interrupt gate descriptor.
138 typedef struct intr_gate
{
139 unsigned short offset00
;
143 #define DESC_INTR_GATE 0x0e