xref: /csrg-svn/sys/vax/include/pcb.h (revision 9004)
1*9004Sroot /*	pcb.h	4.6	82/10/31	*/
264Sbill 
364Sbill /*
464Sbill  * VAX process control block
564Sbill  */
664Sbill 
764Sbill struct pcb
864Sbill {
964Sbill 	int	pcb_ksp; 	/* kernel stack pointer */
1064Sbill 	int	pcb_esp; 	/* exec stack pointer */
1164Sbill 	int	pcb_ssp; 	/* supervisor stack pointer */
1264Sbill 	int	pcb_usp; 	/* user stack pointer */
1364Sbill 	int	pcb_r0;
1464Sbill 	int	pcb_r1;
1564Sbill 	int	pcb_r2;
1664Sbill 	int	pcb_r3;
1764Sbill 	int	pcb_r4;
1864Sbill 	int	pcb_r5;
1964Sbill 	int	pcb_r6;
2064Sbill 	int	pcb_r7;
2164Sbill 	int	pcb_r8;
2264Sbill 	int	pcb_r9;
2364Sbill 	int	pcb_r10;
2464Sbill 	int	pcb_r11;
2564Sbill 	int	pcb_r12;
263776Sroot #define	pcb_ap pcb_r12
2764Sbill 	int	pcb_r13;
283776Sroot #define	pcb_fp pcb_r13
2964Sbill 	int	pcb_pc; 	/* program counter */
3064Sbill 	int	pcb_psl; 	/* program status longword */
3164Sbill 	struct  pte *pcb_p0br; 	/* seg 0 base register */
3264Sbill 	int	pcb_p0lr; 	/* seg 0 length register and astlevel */
3364Sbill 	struct  pte *pcb_p1br; 	/* seg 1 base register */
3464Sbill 	int	pcb_p1lr; 	/* seg 1 length register and pme */
3564Sbill /*
3664Sbill  * Software pcb (extension)
3764Sbill  */
3864Sbill 	int	pcb_szpt; 	/* number of pages of user page table */
3964Sbill 	int	pcb_cmap2;
4064Sbill 	int	*pcb_sswap;
4164Sbill 	int	pcb_sigc[3];
4264Sbill };
432447Swnj 
442447Swnj #define	AST_NONE	0x04000000	/* ast level */
452447Swnj #define	AST_USER	0x03000000	/* ast for user mode */
462447Swnj 
472447Swnj #define	ASTLVL_NONE	4
482447Swnj #define	ASTLVL_USER	3
492447Swnj 
502447Swnj #define	AST_CLR		0x07000000
51*9004Sroot #define	PME_CLR		0x80000000
522447Swnj 
532447Swnj #define	aston() \
542447Swnj 	{ \
552447Swnj 		u.u_pcb.pcb_p0lr = (u.u_pcb.pcb_p0lr &~ AST_CLR) | AST_USER; \
562447Swnj 		mtpr(ASTLVL, ASTLVL_USER); \
572447Swnj 	}
582447Swnj 
592447Swnj #define	astoff() \
602447Swnj 	{ \
612447Swnj 		u.u_pcb.pcb_p0lr = (u.u_pcb.pcb_p0lr &~ AST_CLR) | AST_NONE; \
622447Swnj 		mtpr(ASTLVL, ASTLVL_NONE); \
632447Swnj 	}
64