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@
26 * Mach Operating System
27 * Copyright (c) 1991,1990 Carnegie Mellon University
28 * All Rights Reserved.
30 * Permission to use, copy, modify and distribute this software and its
31 * documentation is hereby granted, provided that both the copyright
32 * notice and this permission notice appear in all copies of the
33 * software, derivative works or modified versions, and any portions
34 * thereof, and that both notices appear in supporting documentation.
36 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
37 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
38 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
40 * Carnegie Mellon requests users of this software to return to
42 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
43 * School of Computer Science
44 * Carnegie Mellon University
45 * Pittsburgh PA 15213-3890
47 * any improvements or extensions that they make and grant Carnegie Mellon
48 * the rights to redistribute these changes.
54 * Kernel task state segment.
56 * We don't use the i386 task switch mechanism. We need a TSS
57 * only to hold the kernel stack pointer for the current thread.
64 struct i386_tss master_ktss
65 __attribute__ ((section ("__DESC, master_ktss")))
66 __attribute__ ((aligned (4096))) = {
93 0x0FFF /* IO bitmap offset -
94 beyond end of TSS segment,
99 * The transient stack for sysenter.
100 * At its top is a 32-bit link to the PCB in legacy mode, 64-bit otherwise.
101 * NB: it also must be large enough to contain a interrupt stack frame
102 * due to a single-step trace trap at system call entry.
104 struct sysenter_stack master_sstk
105 __attribute__ ((section ("__DESC, master_sstk")))
106 __attribute__ ((aligned (16))) = { {0}, 0 };
109 struct x86_64_tss master_ktss64
__attribute__ ((aligned (4096))) = {
110 .io_bit_map_offset
= 0x0FFF,
117 * Task structure for double-fault handler:
119 struct i386_tss master_dftss
120 __attribute__ ((section ("__DESC, master_dftss")))
121 __attribute__ ((aligned (4096))) = {
123 (int) &df_task_stack_end
- 4, /* esp0 */
130 (int) &df_task_start
, /* eip */
136 (int) &df_task_stack_end
- 4, /* esp */
145 CPU_DATA_GS
, /* gs */
146 KERNEL_LDT
, /* ldt */
148 0x0FFF /* IO bitmap offset -
149 beyond end of TSS segment,
155 * Task structure for machine_check handler:
157 struct i386_tss master_mctss
158 __attribute__ ((section ("__DESC, master_mctss")))
159 __attribute__ ((aligned (4096))) = {
161 (int) &mc_task_stack_end
- 4, /* esp0 */
168 (int) &mc_task_start
, /* eip */
174 (int) &mc_task_stack_end
- 4, /* esp */
183 CPU_DATA_GS
, /* gs */
184 KERNEL_LDT
, /* ldt */
186 0x0FFF /* IO bitmap offset -
187 beyond end of TSS segment,
193 struct i386_tss master_dbtss
194 __attribute__ ((section ("__DESC, master_dbtss")))
195 __attribute__ ((aligned (4096))) = {
220 KERNEL_LDT
, /* ldt */
222 0x0FFF /* IO bitmap offset -
223 beyond end of TSS segment,
227 #endif /* MACH_KDB */