15b81b6b3SRodney W. Grimes /*- 2*51369649SPedro F. Giffuni * SPDX-License-Identifier: BSD-3-Clause 3*51369649SPedro F. Giffuni * 45b81b6b3SRodney W. Grimes * Copyright (c) 1990 The Regents of the University of California. 55b81b6b3SRodney W. Grimes * All rights reserved. 65b81b6b3SRodney W. Grimes * 75b81b6b3SRodney W. Grimes * This code is derived from software contributed to Berkeley by 85b81b6b3SRodney W. Grimes * William Jolitz. 95b81b6b3SRodney W. Grimes * 105b81b6b3SRodney W. Grimes * Redistribution and use in source and binary forms, with or without 115b81b6b3SRodney W. Grimes * modification, are permitted provided that the following conditions 125b81b6b3SRodney W. Grimes * are met: 135b81b6b3SRodney W. Grimes * 1. Redistributions of source code must retain the above copyright 145b81b6b3SRodney W. Grimes * notice, this list of conditions and the following disclaimer. 155b81b6b3SRodney W. Grimes * 2. Redistributions in binary form must reproduce the above copyright 165b81b6b3SRodney W. Grimes * notice, this list of conditions and the following disclaimer in the 175b81b6b3SRodney W. Grimes * documentation and/or other materials provided with the distribution. 18fbbd9655SWarner Losh * 3. Neither the name of the University nor the names of its contributors 195b81b6b3SRodney W. Grimes * may be used to endorse or promote products derived from this software 205b81b6b3SRodney W. Grimes * without specific prior written permission. 215b81b6b3SRodney W. Grimes * 225b81b6b3SRodney W. Grimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 235b81b6b3SRodney W. Grimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 245b81b6b3SRodney W. Grimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 255b81b6b3SRodney W. Grimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 265b81b6b3SRodney W. Grimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 275b81b6b3SRodney W. Grimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 285b81b6b3SRodney W. Grimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 295b81b6b3SRodney W. Grimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 305b81b6b3SRodney W. Grimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 315b81b6b3SRodney W. Grimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 325b81b6b3SRodney W. Grimes * SUCH DAMAGE. 335b81b6b3SRodney W. Grimes */ 345b81b6b3SRodney W. Grimes 356e393973SGarrett Wollman #ifndef _MACHINE_TSS_H_ 366e393973SGarrett Wollman #define _MACHINE_TSS_H_ 1 376e393973SGarrett Wollman 385b81b6b3SRodney W. Grimes /* 39afa88623SPeter Wemm * amd64 Context Data Type 40afa88623SPeter Wemm * 41afa88623SPeter Wemm * The alignment is pretty messed up here due to reuse of the original 32 bit 42afa88623SPeter Wemm * fields. It might be worth trying to set the tss on a +4 byte offset to 43afa88623SPeter Wemm * make the 64 bit fields aligned in practice. 445b81b6b3SRodney W. Grimes */ 45afa88623SPeter Wemm struct amd64tss { 46afa88623SPeter Wemm u_int32_t tss_rsvd0; 47afa88623SPeter Wemm u_int64_t tss_rsp0 __packed; /* kernel stack pointer ring 0 */ 48afa88623SPeter Wemm u_int64_t tss_rsp1 __packed; /* kernel stack pointer ring 1 */ 49afa88623SPeter Wemm u_int64_t tss_rsp2 __packed; /* kernel stack pointer ring 2 */ 50afa88623SPeter Wemm u_int32_t tss_rsvd1; 51afa88623SPeter Wemm u_int32_t tss_rsvd2; 52afa88623SPeter Wemm u_int64_t tss_ist1 __packed; /* Interrupt stack table 1 */ 53afa88623SPeter Wemm u_int64_t tss_ist2 __packed; /* Interrupt stack table 2 */ 54afa88623SPeter Wemm u_int64_t tss_ist3 __packed; /* Interrupt stack table 3 */ 55afa88623SPeter Wemm u_int64_t tss_ist4 __packed; /* Interrupt stack table 4 */ 56afa88623SPeter Wemm u_int64_t tss_ist5 __packed; /* Interrupt stack table 5 */ 57afa88623SPeter Wemm u_int64_t tss_ist6 __packed; /* Interrupt stack table 6 */ 58afa88623SPeter Wemm u_int64_t tss_ist7 __packed; /* Interrupt stack table 7 */ 597234adbeSPeter Wemm u_int32_t tss_rsvd3; 60afa88623SPeter Wemm u_int32_t tss_rsvd4; 617234adbeSPeter Wemm u_int16_t tss_rsvd5; 62afa88623SPeter Wemm u_int16_t tss_iobase; /* io bitmap offset */ 635b81b6b3SRodney W. Grimes }; 645206bca1SLuoqi Chen 656e393973SGarrett Wollman #endif /* _MACHINE_TSS_H_ */ 66