1 /*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * %sccs.include.redist.c% 9 * 10 * @(#)tss.h 5.4 (Berkeley) 01/18/91 11 */ 12 13 /* 14 * Intel 386 Context Data Type 15 */ 16 17 struct i386tss { 18 int tss_link; /* actually 16 bits: top 16 bits must be zero */ 19 int tss_esp0; /* kernel stack pointer priviledge level 0 */ 20 #define tss_ksp tss_esp0 21 int tss_ss0; /* actually 16 bits: top 16 bits must be zero */ 22 int tss_esp1; /* kernel stack pointer priviledge level 1 */ 23 int tss_ss1; /* actually 16 bits: top 16 bits must be zero */ 24 int tss_esp2; /* kernel stack pointer priviledge level 2 */ 25 int tss_ss2; /* actually 16 bits: top 16 bits must be zero */ 26 /* struct ptd *tss_cr3; /* page table directory */ 27 int tss_cr3; /* page table directory */ 28 #define tss_ptd tss_cr3 29 int tss_eip; /* program counter */ 30 #define tss_pc tss_eip 31 int tss_eflags; /* program status longword */ 32 #define tss_psl tss_eflags 33 int tss_eax; 34 int tss_ecx; 35 int tss_edx; 36 int tss_ebx; 37 int tss_esp; /* user stack pointer */ 38 #define tss_usp tss_esp 39 int tss_ebp; /* user frame pointer */ 40 #define tss_fp tss_ebp 41 int tss_esi; 42 int tss_edi; 43 int tss_es; /* actually 16 bits: top 16 bits must be zero */ 44 int tss_cs; /* actually 16 bits: top 16 bits must be zero */ 45 int tss_ss; /* actually 16 bits: top 16 bits must be zero */ 46 int tss_ds; /* actually 16 bits: top 16 bits must be zero */ 47 int tss_fs; /* actually 16 bits: top 16 bits must be zero */ 48 int tss_gs; /* actually 16 bits: top 16 bits must be zero */ 49 int tss_ldt; /* actually 16 bits: top 16 bits must be zero */ 50 int tss_ioopt; /* options & io offset bitmap: currently zero */ 51 /* XXX unimplemented .. i/o permission bitmap */ 52 }; 53