]>
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 * 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.
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
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
23 * Copyright (c) 1992 NeXT Computer, Inc.
25 * Intel386 Family: Segment descriptors.
29 * 29 March 1992 ? at NeXT
34 * Code segment descriptor.
37 typedef struct code_desc
{
38 unsigned short limit00
;
39 unsigned short base00
;
41 unsigned char type
:5,
42 #define DESC_CODE_EXEC 0x18
43 #define DESC_CODE_READ 0x1a
46 unsigned char limit16
:4,
49 #define DESC_CODE_16B 0
50 #define DESC_CODE_32B 1
52 #define DESC_GRAN_BYTE 0
53 #define DESC_GRAN_PAGE 1
58 * Data segment descriptor.
61 typedef struct data_desc
{
62 unsigned short limit00
;
63 unsigned short base00
;
65 unsigned char type
:5,
66 #define DESC_DATA_RONLY 0x10
67 #define DESC_DATA_WRITE 0x12
70 unsigned char limit16
:4,
73 #define DESC_DATA_16B 0
74 #define DESC_DATA_32B 1
80 * LDT segment descriptor.
83 typedef struct ldt_desc
{
84 unsigned short limit00
;
85 unsigned short base00
;
87 unsigned char type
:5,
91 unsigned char limit16
:4,
97 #include <architecture/i386/sel.h>
100 * Call gate descriptor.
103 typedef struct call_gate
{
104 unsigned short offset00
;
106 unsigned int argcnt
:5,
109 #define DESC_CALL_GATE 0x0c
116 * Trap gate descriptor.
119 typedef struct trap_gate
{
120 unsigned short offset00
;
124 #define DESC_TRAP_GATE 0x0f
132 * Interrupt gate descriptor.
135 typedef struct intr_gate
{
136 unsigned short offset00
;
140 #define DESC_INTR_GATE 0x0e