xref: /csrg-svn/sys/i386/include/pcb.h (revision 49520)
141058Swilliam /*-
241058Swilliam  * Copyright (c) 1990 The Regents of the University of California.
341058Swilliam  * 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*49520Swilliam  *	@(#)pcb.h	5.8 (Berkeley) 05/09/91
1141058Swilliam  */
1241058Swilliam 
13*49520Swilliam 
1440463Sbill /*
1540463Sbill  * Intel 386 process control block
1640463Sbill  */
17*49520Swilliam #include "machine/tss.h"
18*49520Swilliam #include "machine/npx.h"
1940463Sbill 
2040463Sbill struct pcb {
2140463Sbill 	struct	i386tss pcbtss;
2240463Sbill #define	pcb_ksp	pcbtss.tss_esp0
2340463Sbill #define	pcb_ptd	pcbtss.tss_cr3
2445964Swilliam #define	pcb_cr3	pcb_ptd
2540463Sbill #define	pcb_pc	pcbtss.tss_eip
2640463Sbill #define	pcb_psl	pcbtss.tss_eflags
2740463Sbill #define	pcb_usp	pcbtss.tss_esp
2840463Sbill #define	pcb_fp	pcbtss.tss_ebp
2940463Sbill /*
3040463Sbill  * Software pcb (extension)
3140463Sbill  */
3245964Swilliam 	int	pcb_flags;
3345964Swilliam #define	FP_WASUSED	0x1	/* floating point has been used in this proc */
3445964Swilliam #define	FP_NEEDSSAVE	0x2	/* needs save on next context switch */
3545964Swilliam #define	FP_NEEDSRESTORE	0x4	/* need restore on next DNA fault */
3645964Swilliam #define	FP_USESEMC	0x8	/* process uses EMC memory-mapped mode */
3740463Sbill 	struct	save87	pcb_savefpu;
3845588Sbill 	struct	emcsts	pcb_saveemc;
3940463Sbill 	struct	pte	*pcb_p0br;
4040463Sbill 	struct	pte	*pcb_p1br;
4140463Sbill 	int	pcb_p0lr;
4240463Sbill 	int	pcb_p1lr;
4340463Sbill 	int	pcb_szpt; 	/* number of pages of user page table */
4440463Sbill 	int	pcb_cmap2;
4540463Sbill 	int	*pcb_sswap;
4645964Swilliam 	long	pcb_sigc[8];
4745588Sbill 	int	pcb_iml;	/* interrupt mask level */
4840463Sbill };
49