xref: /csrg-svn/sys/tahoe/include/pcb.h (revision 49429)
1*49429Sbostic /*-
2*49429Sbostic  * Copyright (c) 1988 The Regents of the University of California.
3*49429Sbostic  * All rights reserved.
434408Skarels  *
5*49429Sbostic  * This code is derived from software contributed to Berkeley by
6*49429Sbostic  * Computer Consoles Inc.
7*49429Sbostic  *
8*49429Sbostic  * %sccs.include.redist.c%
9*49429Sbostic  *
10*49429Sbostic  *	@(#)pcb.h	7.2 (Berkeley) 05/08/91
1134408Skarels  */
1225678Ssam 
1324126Ssam /*
1424126Ssam  * TAHOE process control block
1524126Ssam  */
1625678Ssam struct pcb {
1724126Ssam 	int	pcb_ksp; 	/* kernel stack pointer */
1824126Ssam 	int	pcb_usp; 	/* user stack pointer */
1924126Ssam 	int	pcb_r0;
2024126Ssam 	int	pcb_r1;
2124126Ssam 	int	pcb_r2;
2224126Ssam 	int	pcb_r3;
2324126Ssam 	int	pcb_r4;
2424126Ssam 	int	pcb_r5;
2524126Ssam 	int	pcb_r6;
2624126Ssam 	int	pcb_r7;
2724126Ssam 	int	pcb_r8;
2824126Ssam 	int	pcb_r9;
2924126Ssam 	int	pcb_r10;
3024126Ssam 	int	pcb_r11;
3124126Ssam 	int	pcb_r12;
3224126Ssam 	int	pcb_r13;
3324126Ssam #define	pcb_fp pcb_r13
3424126Ssam 	int	pcb_pc; 	/* program counter */
3524126Ssam 	int	pcb_psl; 	/* program status longword */
3624126Ssam 	struct  pte *pcb_p0br; 	/* seg 0 base register */
3724126Ssam 	int	pcb_p0lr; 	/* seg 0 length register and astlevel */
3824126Ssam 	struct  pte *pcb_p1br; 	/* seg 1 base register */
3924126Ssam 	int	pcb_p1lr; 	/* seg 1 length register and pme */
4024126Ssam 	struct  pte *pcb_p2br; 	/* seg 2 base register */
4124126Ssam 	int	pcb_p2lr; 	/* seg 2 length register and pme */
4224126Ssam 	int	pcb_ach;	/* accumulator - high order longword */
4324126Ssam 	int	pcb_acl;	/* accumulator - low order longword */
4424126Ssam #define ACH	pcb_ach
4524126Ssam #define ACL	pcb_acl
4625678Ssam 	int	pcb_hfs;	/* fp status register */
4724126Ssam /*
4824126Ssam  * Software pcb (extension)
4924126Ssam  */
5024126Ssam 	union {
5124126Ssam 		float 	*faddr;	/* address of single precision accumulator */
5224126Ssam 		double	*daddr; /* address of double precision accumulator */
5324126Ssam 	} pcb_savacc;
5424126Ssam #define FSAVACC	pcb_savacc.faddr
5524126Ssam #define DSAVACC pcb_savacc.daddr
5624126Ssam 	int	pcb_szpt; 	/* number of pages of user page table */
5724126Ssam 	int	pcb_cmap2;
5824126Ssam 	int	*pcb_sswap;
5925678Ssam 	long	pcb_sigc[5];	/* sigcode actually 19 bytes */
6024126Ssam };
6124126Ssam 
6224126Ssam extern long	*user_psl;
6324126Ssam 
6425678Ssam #define	aston() { \
6525678Ssam 	u.u_pcb.pcb_psl |= PSL_SFE; \
6625678Ssam 	if ((int)user_psl != 0) \
6725678Ssam 		*user_psl |= PSL_SFE; \
6825678Ssam }
6924126Ssam 
7025678Ssam #define	astoff() { \
7125678Ssam 	u.u_pcb.pcb_psl &= ~ PSL_SFE; \
7225678Ssam 	if ((int)user_psl != 0) \
7325678Ssam 		*user_psl &= ~PSL_SFE; \
7425678Ssam }
75