xref: /csrg-svn/sys/i386/include/tss.h (revision 40472)
1*40472Sbill /*
2*40472Sbill  * Intel 386 Context Data Type
3*40472Sbill  */
4*40472Sbill 
5*40472Sbill 
6*40472Sbill struct i386tss {
7*40472Sbill 	int	tss_link;	/* actually 16 bits: top 16 bits must be zero */
8*40472Sbill 	int	tss_esp0; 	/* kernel stack pointer priviledge level 0 */
9*40472Sbill #define	tss_ksp	tss_esp0
10*40472Sbill 	int	tss_ss0;	/* actually 16 bits: top 16 bits must be zero */
11*40472Sbill 	int	tss_esp1; 	/* kernel stack pointer priviledge level 1 */
12*40472Sbill 	int	tss_ss1;	/* actually 16 bits: top 16 bits must be zero */
13*40472Sbill 	int	tss_esp2; 	/* kernel stack pointer priviledge level 2 */
14*40472Sbill 	int	tss_ss2;	/* actually 16 bits: top 16 bits must be zero */
15*40472Sbill 	struct  ptd *tss_cr3; 	/* page table directory */
16*40472Sbill #define	tss_ptd	tss_cr3
17*40472Sbill 	int	tss_eip; 	/* program counter */
18*40472Sbill #define	tss_pc	tss_eip
19*40472Sbill 	int	tss_eflags; 	/* program status longword */
20*40472Sbill #define	tss_psl	tss_eflags
21*40472Sbill 	int	tss_eax;
22*40472Sbill 	int	tss_ecx;
23*40472Sbill 	int	tss_edx;
24*40472Sbill 	int	tss_ebx;
25*40472Sbill 	int	tss_esp; 	/* user stack pointer */
26*40472Sbill #define	tss_usp	tss_esp
27*40472Sbill 	int	tss_ebp; 	/* user frame pointer */
28*40472Sbill #define	tss_fp	tss_ebp
29*40472Sbill 	int	tss_esi;
30*40472Sbill 	int	tss_edi;
31*40472Sbill 	int	tss_es;		/* actually 16 bits: top 16 bits must be zero */
32*40472Sbill 	int	tss_cs;		/* actually 16 bits: top 16 bits must be zero */
33*40472Sbill 	int	tss_ss;		/* actually 16 bits: top 16 bits must be zero */
34*40472Sbill 	int	tss_ds;		/* actually 16 bits: top 16 bits must be zero */
35*40472Sbill 	int	tss_fs;		/* actually 16 bits: top 16 bits must be zero */
36*40472Sbill 	int	tss_gs;		/* actually 16 bits: top 16 bits must be zero */
37*40472Sbill 	int	tss_ldt;	/* actually 16 bits: top 16 bits must be zero */
38*40472Sbill 	int	tss_ioopt;	/* options & io offset bitmap: currently zero */
39*40472Sbill 				/* XXX unimplemented .. i/o permission bitmap */
40*40472Sbill };
41