xref: /csrg-svn/sys/i386/include/pcb.h (revision 45964)
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  *
841058Swilliam  * %sccs.include.noredist.c%
941058Swilliam  *
10*45964Swilliam  *	@(#)pcb.h	5.5 (Berkeley) 01/15/91
1141058Swilliam  */
1241058Swilliam 
1340463Sbill /*
1440463Sbill  * Intel 386 process control block
1540463Sbill  */
1640463Sbill #include "tss.h"
17*45964Swilliam #include "npx.h"
1840463Sbill 
1940463Sbill struct pcb {
2040463Sbill 	struct	i386tss pcbtss;
2140463Sbill #define	pcb_ksp	pcbtss.tss_esp0
2240463Sbill #define	pcb_ptd	pcbtss.tss_cr3
23*45964Swilliam #define	pcb_cr3	pcb_ptd
2440463Sbill #define	pcb_pc	pcbtss.tss_eip
2540463Sbill #define	pcb_psl	pcbtss.tss_eflags
2640463Sbill #define	pcb_usp	pcbtss.tss_esp
2740463Sbill #define	pcb_fp	pcbtss.tss_ebp
2840463Sbill /*
2940463Sbill  * Software pcb (extension)
3040463Sbill  */
31*45964Swilliam 	int	pcb_flags;
32*45964Swilliam #define	FP_WASUSED	0x1	/* floating point has been used in this proc */
33*45964Swilliam #define	FP_NEEDSSAVE	0x2	/* needs save on next context switch */
34*45964Swilliam #define	FP_NEEDSRESTORE	0x4	/* need restore on next DNA fault */
35*45964Swilliam #define	FP_USESEMC	0x8	/* process uses EMC memory-mapped mode */
3640463Sbill 	struct	save87	pcb_savefpu;
3745588Sbill 	struct	emcsts	pcb_saveemc;
3840463Sbill 	struct	pte	*pcb_p0br;
3940463Sbill 	struct	pte	*pcb_p1br;
4040463Sbill 	int	pcb_p0lr;
4140463Sbill 	int	pcb_p1lr;
4240463Sbill 	int	pcb_szpt; 	/* number of pages of user page table */
4340463Sbill 	int	pcb_cmap2;
4440463Sbill 	int	*pcb_sswap;
45*45964Swilliam 	long	pcb_sigc[8];
4645588Sbill 	int	pcb_iml;	/* interrupt mask level */
4740463Sbill };
48