Chameleon

Chameleon Svn Source Tree

Root/branches/JrCs/i386/include/architecture/i386/tss.h

1/*
2 * Copyright (c) 1999 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:Task State Segment.
27 *
28 * HISTORY
29 *
30 * 29 March 1992 ? at NeXT
31 *Created.
32 */
33
34#ifndef _ARCH_I386_TSS_H_
35#define _ARCH_I386_TSS_H_
36
37#include <architecture/i386/sel.h>
38
39/*
40 * Task State segment.
41 */
42
43typedef struct tss {
44 sel_toldtss;
45 unsigned int:0;
46 unsigned intesp0;
47 sel_tss0;
48 unsigned int:0;
49 unsigned intesp1;
50 sel_tss1;
51 unsigned int:0;
52 unsigned intesp2;
53 sel_tss2;
54 unsigned int:0;
55 unsigned intcr3;
56 unsigned inteip;
57 unsigned inteflags;
58 unsigned inteax;
59 unsigned intecx;
60 unsigned intedx;
61 unsigned intebx;
62 unsigned intesp;
63 unsigned intebp;
64 unsigned intesi;
65 unsigned intedi;
66 sel_tes;
67 unsigned int:0;
68 sel_tcs;
69 unsigned int:0;
70 sel_tss;
71 unsigned int:0;
72 sel_tds;
73 unsigned int:0;
74 sel_tfs;
75 unsigned int:0;
76 sel_tgs;
77 unsigned int:0;
78 sel_tldt;
79 unsigned int:0;
80 unsigned intt:1,
81 :15,
82io_bmap:16;
83} tss_t;
84
85#define TSS_SIZE(n)(sizeof (struct tss) + (n))
86
87/*
88 * Task State segment descriptor.
89 */
90
91typedef struct tss_desc {
92 unsigned shortlimit00;
93 unsigned shortbase00;
94 unsigned charbase16;
95 unsigned chartype:5,
96#define DESC_TSS0x09
97dpl:2,
98present:1;
99 unsigned charlimit16:4,
100:3,
101granular:1;
102 unsigned charbase24;
103} tss_desc_t;
104
105/*
106 * Task gate descriptor.
107 */
108
109typedef struct task_gate {
110 unsigned short:16;
111 sel_ttss;
112 unsigned int:8,
113 type:5,
114#define DESC_TASK_GATE0x05
115dpl:2,
116present:1,
117:0;
118} task_gate_t;
119
120#endif/* _ARCH_I386_TSS_H_ */
121

Archive Download this file

Revision: 1466