2 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
13 /* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
14 /* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
15 /* All Rights Reserved */
18 * Copyright (c) 1990 The Regents of the University of California.
19 * All rights reserved.
21 * This code is derived from software contributed to Berkeley by
24 * Redistribution and use in source and binary forms, with or without
25 * modification, are permitted provided that the following conditions
27 * 1. Redistributions of source code must retain the above copyright
28 * notice, this list of conditions and the following disclaimer.
29 * 2. Redistributions in binary form must reproduce the above copyright
30 * notice, this list of conditions and the following disclaimer in the
31 * documentation and/or other materials provided with the distribution.
32 * 3. All advertising materials mentioning features or use of this software
33 * must display the following acknowledgement:
34 * This product includes software developed by the University of
35 * California, Berkeley and its contributors.
36 * 4. Neither the name of the University nor the names of its contributors
37 * may be used to endorse or promote products derived from this software
38 * without specific prior written permission.
40 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
41 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
43 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
44 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
45 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
46 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
48 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
49 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
52 * from: @(#)tss.h 5.4 (Berkeley) 1/18/91
53 * $FreeBSD: src/sys/i386/include/tss.h,v 1.13 2002/09/23 05:04:05 peter Exp $
56 * Copyright 2011 Joyent, Inc. All rights reserved.
60 * Maximum I/O address that will be in TSS bitmap
62 #define MAXTSSIOADDR 0x3ff /* XXX - needs to support 64K I/O space */
67 * Task state segment (tss). Holds the processor state assoicated with a task.
69 * Historically, this header only exposed a struct tss that was relevant to the
70 * specific Intel architecture that we were deploying on. However, the tss
71 * structures are defined by the Intel Architecture and other consumers would
72 * like to use them. Rather than requiring them to duplicate all of this
73 * information, we instead expose each version under different names but in a
74 * backwards compatible manner.
79 uint32_t tss_rsvd0
; /* reserved, ignored */
80 uint64_t tss_rsp0
; /* stack pointer CPL = 0 */
81 uint64_t tss_rsp1
; /* stack pointer CPL = 1 */
82 uint64_t tss_rsp2
; /* stack pointer CPL = 2 */
83 uint64_t tss_rsvd1
; /* reserved, ignored */
84 uint64_t tss_ist1
; /* Interrupt stack table 1 */
85 uint64_t tss_ist2
; /* Interrupt stack table 2 */
86 uint64_t tss_ist3
; /* Interrupt stack table 3 */
87 uint64_t tss_ist4
; /* Interrupt stack table 4 */
88 uint64_t tss_ist5
; /* Interrupt stack table 5 */
89 uint64_t tss_ist6
; /* Interrupt stack table 6 */
90 uint64_t tss_ist7
; /* Interrupt stack table 7 */
91 uint64_t tss_rsvd2
; /* reserved, ignored */
92 uint16_t tss_rsvd3
; /* reserved, ignored */
93 uint16_t tss_bitmapbase
; /* io permission bitmap base address */
98 uint16_t tss_link
; /* 16-bit prior TSS selector */
99 uint16_t tss_rsvd0
; /* reserved, ignored */
102 uint16_t tss_rsvd1
; /* reserved, ignored */
105 uint16_t tss_rsvd2
; /* reserved, ignored */
108 uint16_t tss_rsvd3
; /* reserved, ignored */
121 uint16_t tss_rsvd4
; /* reserved, ignored */
123 uint16_t tss_rsvd5
; /* reserved, ignored */
125 uint16_t tss_rsvd6
; /* reserved, ignored */
127 uint16_t tss_rsvd7
; /* reserved, ignored */
129 uint16_t tss_rsvd8
; /* reserved, ignored */
131 uint16_t tss_rsvd9
; /* reserved, ignored */
133 uint16_t tss_rsvd10
; /* reserved, ignored */
134 uint16_t tss_rsvd11
; /* reserved, ignored */
135 uint16_t tss_bitmapbase
; /* io permission bitmap base address */
165 typedef struct tss64 tss_t
;
167 #elif defined(__i386)
169 typedef struct tss32 tss_t
;
179 #endif /* _SYS_TSS_H */