tss.h revision 8876
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 * 3. All advertising materials mentioning features or use of this software 174Srgrimes * must display the following acknowledgement: 184Srgrimes * This product includes software developed by the University of 194Srgrimes * California, Berkeley and its contributors. 204Srgrimes * 4. Neither the name of the University nor the names of its contributors 214Srgrimes * may be used to endorse or promote products derived from this software 224Srgrimes * without specific prior written permission. 234Srgrimes * 244Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 254Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 264Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 274Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 284Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 294Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 304Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 314Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 324Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 334Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 344Srgrimes * SUCH DAMAGE. 354Srgrimes * 36621Srgrimes * from: @(#)tss.h 5.4 (Berkeley) 1/18/91 378876Srgrimes * $Id: tss.h,v 1.4 1993/11/17 23:25:04 wollman Exp $ 384Srgrimes */ 394Srgrimes 40719Swollman#ifndef _MACHINE_TSS_H_ 41719Swollman#define _MACHINE_TSS_H_ 1 42719Swollman 434Srgrimes/* 444Srgrimes * Intel 386 Context Data Type 454Srgrimes */ 464Srgrimes 474Srgrimesstruct i386tss { 484Srgrimes int tss_link; /* actually 16 bits: top 16 bits must be zero */ 494Srgrimes int tss_esp0; /* kernel stack pointer priviledge level 0 */ 504Srgrimes#define tss_ksp tss_esp0 514Srgrimes int tss_ss0; /* actually 16 bits: top 16 bits must be zero */ 524Srgrimes int tss_esp1; /* kernel stack pointer priviledge level 1 */ 534Srgrimes int tss_ss1; /* actually 16 bits: top 16 bits must be zero */ 544Srgrimes int tss_esp2; /* kernel stack pointer priviledge level 2 */ 554Srgrimes int tss_ss2; /* actually 16 bits: top 16 bits must be zero */ 564Srgrimes int tss_cr3; /* page table directory */ 574Srgrimes#define tss_ptd tss_cr3 584Srgrimes int tss_eip; /* program counter */ 594Srgrimes#define tss_pc tss_eip 604Srgrimes int tss_eflags; /* program status longword */ 614Srgrimes#define tss_psl tss_eflags 628876Srgrimes int tss_eax; 638876Srgrimes int tss_ecx; 648876Srgrimes int tss_edx; 658876Srgrimes int tss_ebx; 664Srgrimes int tss_esp; /* user stack pointer */ 674Srgrimes#define tss_usp tss_esp 684Srgrimes int tss_ebp; /* user frame pointer */ 694Srgrimes#define tss_fp tss_ebp 708876Srgrimes int tss_esi; 718876Srgrimes int tss_edi; 724Srgrimes int tss_es; /* actually 16 bits: top 16 bits must be zero */ 734Srgrimes int tss_cs; /* actually 16 bits: top 16 bits must be zero */ 744Srgrimes int tss_ss; /* actually 16 bits: top 16 bits must be zero */ 754Srgrimes int tss_ds; /* actually 16 bits: top 16 bits must be zero */ 764Srgrimes int tss_fs; /* actually 16 bits: top 16 bits must be zero */ 774Srgrimes int tss_gs; /* actually 16 bits: top 16 bits must be zero */ 784Srgrimes int tss_ldt; /* actually 16 bits: top 16 bits must be zero */ 794Srgrimes int tss_ioopt; /* options & io offset bitmap: currently zero */ 804Srgrimes /* XXX unimplemented .. i/o permission bitmap */ 814Srgrimes}; 82719Swollman#endif /* _MACHINE_TSS_H_ */ 83