141058Swilliam /*- 2*63359Sbostic * Copyright (c) 1990, 1993 3*63359Sbostic * The Regents of the University of California. All rights reserved. 441058Swilliam * 541058Swilliam * This code is derived from software contributed to Berkeley by 641058Swilliam * William Jolitz. 741058Swilliam * 846006Swilliam * %sccs.include.redist.c% 941058Swilliam * 10*63359Sbostic * @(#)tss.h 8.1 (Berkeley) 06/11/93 1141058Swilliam */ 1241058Swilliam 1340472Sbill /* 1440472Sbill * Intel 386 Context Data Type 1540472Sbill */ 1640472Sbill 1740472Sbill struct i386tss { 1845964Swilliam int tss_link; /* actually 16 bits: top 16 bits must be zero */ 1945964Swilliam int tss_esp0; /* kernel stack pointer priviledge level 0 */ 2040472Sbill #define tss_ksp tss_esp0 2145964Swilliam int tss_ss0; /* actually 16 bits: top 16 bits must be zero */ 2245964Swilliam int tss_esp1; /* kernel stack pointer priviledge level 1 */ 2345964Swilliam int tss_ss1; /* actually 16 bits: top 16 bits must be zero */ 2445964Swilliam int tss_esp2; /* kernel stack pointer priviledge level 2 */ 2545964Swilliam int tss_ss2; /* actually 16 bits: top 16 bits must be zero */ 2645964Swilliam /* struct ptd *tss_cr3; /* page table directory */ 2745964Swilliam int tss_cr3; /* page table directory */ 2840472Sbill #define tss_ptd tss_cr3 2945964Swilliam int tss_eip; /* program counter */ 3040472Sbill #define tss_pc tss_eip 3145964Swilliam int tss_eflags; /* program status longword */ 3240472Sbill #define tss_psl tss_eflags 3345964Swilliam int tss_eax; 3445964Swilliam int tss_ecx; 3545964Swilliam int tss_edx; 3645964Swilliam int tss_ebx; 3745964Swilliam int tss_esp; /* user stack pointer */ 3840472Sbill #define tss_usp tss_esp 3945964Swilliam int tss_ebp; /* user frame pointer */ 4040472Sbill #define tss_fp tss_ebp 4145964Swilliam int tss_esi; 4245964Swilliam int tss_edi; 4345964Swilliam int tss_es; /* actually 16 bits: top 16 bits must be zero */ 4445964Swilliam int tss_cs; /* actually 16 bits: top 16 bits must be zero */ 4545964Swilliam int tss_ss; /* actually 16 bits: top 16 bits must be zero */ 4645964Swilliam int tss_ds; /* actually 16 bits: top 16 bits must be zero */ 4745964Swilliam int tss_fs; /* actually 16 bits: top 16 bits must be zero */ 4845964Swilliam int tss_gs; /* actually 16 bits: top 16 bits must be zero */ 4945964Swilliam int tss_ldt; /* actually 16 bits: top 16 bits must be zero */ 5045964Swilliam int tss_ioopt; /* options & io offset bitmap: currently zero */ 5140472Sbill /* XXX unimplemented .. i/o permission bitmap */ 5240472Sbill }; 53