xref: /openbsd-src/sys/arch/amd64/include/tss.h (revision 2fa72412907ae78c4787a4a8f888c5f0486e225c)
1*2fa72412Spirofti /*	$OpenBSD: tss.h,v 1.4 2011/03/23 16:54:34 pirofti Exp $	*/
2f5df1827Smickey /*	$NetBSD: tss.h,v 1.1 2003/04/26 18:39:49 fvdl Exp $	*/
3f5df1827Smickey 
4f5df1827Smickey /*
5f5df1827Smickey  * Copyright (c) 2001 Wasabi Systems, Inc.
6f5df1827Smickey  * All rights reserved.
7f5df1827Smickey  *
8f5df1827Smickey  * Written by Frank van der Linden for Wasabi Systems, Inc.
9f5df1827Smickey  *
10f5df1827Smickey  * Redistribution and use in source and binary forms, with or without
11f5df1827Smickey  * modification, are permitted provided that the following conditions
12f5df1827Smickey  * are met:
13f5df1827Smickey  * 1. Redistributions of source code must retain the above copyright
14f5df1827Smickey  *    notice, this list of conditions and the following disclaimer.
15f5df1827Smickey  * 2. Redistributions in binary form must reproduce the above copyright
16f5df1827Smickey  *    notice, this list of conditions and the following disclaimer in the
17f5df1827Smickey  *    documentation and/or other materials provided with the distribution.
18f5df1827Smickey  * 3. All advertising materials mentioning features or use of this software
19f5df1827Smickey  *    must display the following acknowledgement:
20f5df1827Smickey  *      This product includes software developed for the NetBSD Project by
21f5df1827Smickey  *      Wasabi Systems, Inc.
22f5df1827Smickey  * 4. The name of Wasabi Systems, Inc. may not be used to endorse
23f5df1827Smickey  *    or promote products derived from this software without specific prior
24f5df1827Smickey  *    written permission.
25f5df1827Smickey  *
26f5df1827Smickey  * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
27f5df1827Smickey  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28f5df1827Smickey  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29f5df1827Smickey  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
30f5df1827Smickey  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31f5df1827Smickey  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32f5df1827Smickey  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33f5df1827Smickey  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34f5df1827Smickey  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35f5df1827Smickey  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36f5df1827Smickey  * POSSIBILITY OF SUCH DAMAGE.
37f5df1827Smickey  */
38f5df1827Smickey 
39*2fa72412Spirofti #ifndef _MACHINE_TSS_H_
40*2fa72412Spirofti #define _MACHINE_TSS_H_
41f5df1827Smickey 
42f5df1827Smickey /*
43f5df1827Smickey  * TSS structure. Since TSS hw switching is not supported in long
44f5df1827Smickey  * mode, this is mainly there for the I/O permission map in
45f5df1827Smickey  * normal processes.
46f5df1827Smickey  */
47f5df1827Smickey 
48f5df1827Smickey struct x86_64_tss {
49f5df1827Smickey 	u_int32_t	tss_reserved1;
50f5df1827Smickey 	u_int64_t	tss_rsp0;
51f5df1827Smickey 	u_int64_t	tss_rsp1;
52fd94711fSguenther 	u_int64_t	tss_rsp2;
53f5df1827Smickey 	u_int32_t	tss_reserved2;
54f5df1827Smickey 	u_int32_t	tss_reserved3;
55f5df1827Smickey 	u_int64_t	tss_ist[7];
56f5df1827Smickey 	u_int32_t	tss_reserved4;
57f5df1827Smickey 	u_int32_t	tss_reserved5;
58f5df1827Smickey 	u_int16_t	tss_reserved6;
59f5df1827Smickey 	u_int16_t	tss_iobase;
607fdc08e5Smiod } __packed;
61f5df1827Smickey 
62*2fa72412Spirofti #endif /* _MACHINE_TSS_H_ */
63