xref: /csrg-svn/sys/tahoe/include/pcb.h (revision 34408)
1*34408Skarels /*
2*34408Skarels  * Copyright (c) 1988 Regents of the University of California.
3*34408Skarels  * All rights reserved.  The Berkeley software License Agreement
4*34408Skarels  * specifies the terms and conditions for redistribution.
5*34408Skarels  *
6*34408Skarels  *	@(#)pcb.h	7.1 (Berkeley) 05/21/88
7*34408Skarels  */
825678Ssam 
924126Ssam /*
1024126Ssam  * TAHOE process control block
1124126Ssam  */
1225678Ssam struct pcb {
1324126Ssam 	int	pcb_ksp; 	/* kernel stack pointer */
1424126Ssam 	int	pcb_usp; 	/* user stack pointer */
1524126Ssam 	int	pcb_r0;
1624126Ssam 	int	pcb_r1;
1724126Ssam 	int	pcb_r2;
1824126Ssam 	int	pcb_r3;
1924126Ssam 	int	pcb_r4;
2024126Ssam 	int	pcb_r5;
2124126Ssam 	int	pcb_r6;
2224126Ssam 	int	pcb_r7;
2324126Ssam 	int	pcb_r8;
2424126Ssam 	int	pcb_r9;
2524126Ssam 	int	pcb_r10;
2624126Ssam 	int	pcb_r11;
2724126Ssam 	int	pcb_r12;
2824126Ssam 	int	pcb_r13;
2924126Ssam #define	pcb_fp pcb_r13
3024126Ssam 	int	pcb_pc; 	/* program counter */
3124126Ssam 	int	pcb_psl; 	/* program status longword */
3224126Ssam 	struct  pte *pcb_p0br; 	/* seg 0 base register */
3324126Ssam 	int	pcb_p0lr; 	/* seg 0 length register and astlevel */
3424126Ssam 	struct  pte *pcb_p1br; 	/* seg 1 base register */
3524126Ssam 	int	pcb_p1lr; 	/* seg 1 length register and pme */
3624126Ssam 	struct  pte *pcb_p2br; 	/* seg 2 base register */
3724126Ssam 	int	pcb_p2lr; 	/* seg 2 length register and pme */
3824126Ssam 	int	pcb_ach;	/* accumulator - high order longword */
3924126Ssam 	int	pcb_acl;	/* accumulator - low order longword */
4024126Ssam #define ACH	pcb_ach
4124126Ssam #define ACL	pcb_acl
4225678Ssam 	int	pcb_hfs;	/* fp status register */
4324126Ssam /*
4424126Ssam  * Software pcb (extension)
4524126Ssam  */
4624126Ssam 	union {
4724126Ssam 		float 	*faddr;	/* address of single precision accumulator */
4824126Ssam 		double	*daddr; /* address of double precision accumulator */
4924126Ssam 	} pcb_savacc;
5024126Ssam #define FSAVACC	pcb_savacc.faddr
5124126Ssam #define DSAVACC pcb_savacc.daddr
5224126Ssam 	int	pcb_szpt; 	/* number of pages of user page table */
5324126Ssam 	int	pcb_cmap2;
5424126Ssam 	int	*pcb_sswap;
5525678Ssam 	long	pcb_sigc[5];	/* sigcode actually 19 bytes */
5624126Ssam };
5724126Ssam 
5824126Ssam extern long	*user_psl;
5924126Ssam 
6025678Ssam #define	aston() { \
6125678Ssam 	u.u_pcb.pcb_psl |= PSL_SFE; \
6225678Ssam 	if ((int)user_psl != 0) \
6325678Ssam 		*user_psl |= PSL_SFE; \
6425678Ssam }
6524126Ssam 
6625678Ssam #define	astoff() { \
6725678Ssam 	u.u_pcb.pcb_psl &= ~ PSL_SFE; \
6825678Ssam 	if ((int)user_psl != 0) \
6925678Ssam 		*user_psl &= ~PSL_SFE; \
7025678Ssam }
71