14Srgrimes/*- 24Srgrimes * Copyright (c) 1990 The Regents of the University of California. 34Srgrimes * All rights reserved. 44Srgrimes * 54Srgrimes * This code is derived from software contributed to Berkeley by 64Srgrimes * William Jolitz. 74Srgrimes * 84Srgrimes * Redistribution and use in source and binary forms, with or without 94Srgrimes * modification, are permitted provided that the following conditions 104Srgrimes * are met: 114Srgrimes * 1. Redistributions of source code must retain the above copyright 124Srgrimes * notice, this list of conditions and the following disclaimer. 134Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 144Srgrimes * notice, this list of conditions and the following disclaimer in the 154Srgrimes * documentation and/or other materials provided with the distribution. 164Srgrimes * 4. Neither the name of the University nor the names of its contributors 174Srgrimes * may be used to endorse or promote products derived from this software 184Srgrimes * without specific prior written permission. 194Srgrimes * 204Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 214Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 224Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 234Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 244Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 254Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 264Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 274Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 284Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 294Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 304Srgrimes * SUCH DAMAGE. 314Srgrimes * 32621Srgrimes * from: @(#)tss.h 5.4 (Berkeley) 1/18/91 3350477Speter * $FreeBSD: releng/10.3/sys/i386/include/tss.h 128019 2004-04-07 20:46:16Z imp $ 344Srgrimes */ 354Srgrimes 36719Swollman#ifndef _MACHINE_TSS_H_ 37719Swollman#define _MACHINE_TSS_H_ 1 38719Swollman 394Srgrimes/* 404Srgrimes * Intel 386 Context Data Type 414Srgrimes */ 424Srgrimes 434Srgrimesstruct i386tss { 444Srgrimes int tss_link; /* actually 16 bits: top 16 bits must be zero */ 4513765Smpp int tss_esp0; /* kernel stack pointer privilege level 0 */ 464Srgrimes int tss_ss0; /* actually 16 bits: top 16 bits must be zero */ 4713765Smpp int tss_esp1; /* kernel stack pointer privilege level 1 */ 484Srgrimes int tss_ss1; /* actually 16 bits: top 16 bits must be zero */ 4913765Smpp int tss_esp2; /* kernel stack pointer privilege level 2 */ 504Srgrimes int tss_ss2; /* actually 16 bits: top 16 bits must be zero */ 514Srgrimes int tss_cr3; /* page table directory */ 524Srgrimes int tss_eip; /* program counter */ 534Srgrimes int tss_eflags; /* program status longword */ 548876Srgrimes int tss_eax; 558876Srgrimes int tss_ecx; 568876Srgrimes int tss_edx; 578876Srgrimes int tss_ebx; 584Srgrimes int tss_esp; /* user stack pointer */ 594Srgrimes int tss_ebp; /* user frame pointer */ 608876Srgrimes int tss_esi; 618876Srgrimes int tss_edi; 624Srgrimes int tss_es; /* actually 16 bits: top 16 bits must be zero */ 634Srgrimes int tss_cs; /* actually 16 bits: top 16 bits must be zero */ 644Srgrimes int tss_ss; /* actually 16 bits: top 16 bits must be zero */ 654Srgrimes int tss_ds; /* actually 16 bits: top 16 bits must be zero */ 664Srgrimes int tss_fs; /* actually 16 bits: top 16 bits must be zero */ 674Srgrimes int tss_gs; /* actually 16 bits: top 16 bits must be zero */ 684Srgrimes int tss_ldt; /* actually 16 bits: top 16 bits must be zero */ 694Srgrimes int tss_ioopt; /* options & io offset bitmap: currently zero */ 704Srgrimes /* XXX unimplemented .. i/o permission bitmap */ 714Srgrimes}; 7246129Sluoqi 73719Swollman#endif /* _MACHINE_TSS_H_ */ 74