xref: /csrg-svn/sys/i386/include/pcb.h (revision 45588)
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*45588Sbill  *	@(#)pcb.h	5.2 (Berkeley) 11/14/90
1141058Swilliam  */
1241058Swilliam 
1340463Sbill /*
1440463Sbill  * Intel 386 process control block
1540463Sbill  */
1640463Sbill #include "tss.h"
17*45588Sbill #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
2340463Sbill #define	pcb_pc	pcbtss.tss_eip
2440463Sbill #define	pcb_psl	pcbtss.tss_eflags
2540463Sbill #define	pcb_usp	pcbtss.tss_esp
2640463Sbill #define	pcb_fp	pcbtss.tss_ebp
2740463Sbill /*
2840463Sbill  * Software pcb (extension)
2940463Sbill  */
3041058Swilliam 	int	pcb_fpsav;
3141058Swilliam #define	FP_NEEDSAVE	0x1	/* need save on next context switch */
3241058Swilliam #define	FP_NEEDRESTORE	0x2	/* need restore on next DNA fault */
33*45588Sbill #define	FP_USESEMC	0x4	/* process uses EMC memory-mapped mode */
3440463Sbill 	struct	save87	pcb_savefpu;
35*45588Sbill 	struct	emcsts	pcb_saveemc;
3640463Sbill 	struct	pte	*pcb_p0br;
3740463Sbill 	struct	pte	*pcb_p1br;
3840463Sbill 	int	pcb_p0lr;
3940463Sbill 	int	pcb_p1lr;
4040463Sbill 	int	pcb_szpt; 	/* number of pages of user page table */
4140463Sbill 	int	pcb_cmap2;
4240463Sbill 	int	*pcb_sswap;
43*45588Sbill 	long	pcb_sigc[8];	/* sigcode actually 19 bytes */
44*45588Sbill 	int	pcb_iml;	/* interrupt mask level */
4540463Sbill };
46