xref: /original-bsd/sys/vax/include/pcb.h (revision 1a56dd2c)
1 /*
2  * Copyright (c) 1982, 1986 Regents of the University of California.
3  * All rights reserved.  The Berkeley software License Agreement
4  * specifies the terms and conditions for redistribution.
5  *
6  *	@(#)pcb.h	7.1 (Berkeley) 06/05/86
7  */
8 
9 /*
10  * VAX process control block
11  */
12 
13 struct pcb
14 {
15 	int	pcb_ksp; 	/* kernel stack pointer */
16 	int	pcb_esp; 	/* exec stack pointer */
17 	int	pcb_ssp; 	/* supervisor stack pointer */
18 	int	pcb_usp; 	/* user stack pointer */
19 	int	pcb_r0;
20 	int	pcb_r1;
21 	int	pcb_r2;
22 	int	pcb_r3;
23 	int	pcb_r4;
24 	int	pcb_r5;
25 	int	pcb_r6;
26 	int	pcb_r7;
27 	int	pcb_r8;
28 	int	pcb_r9;
29 	int	pcb_r10;
30 	int	pcb_r11;
31 	int	pcb_r12;
32 #define	pcb_ap pcb_r12
33 	int	pcb_r13;
34 #define	pcb_fp pcb_r13
35 	int	pcb_pc; 	/* program counter */
36 	int	pcb_psl; 	/* program status longword */
37 	struct  pte *pcb_p0br; 	/* seg 0 base register */
38 	int	pcb_p0lr; 	/* seg 0 length register and astlevel */
39 	struct  pte *pcb_p1br; 	/* seg 1 base register */
40 	int	pcb_p1lr; 	/* seg 1 length register and pme */
41 /*
42  * Software pcb (extension)
43  */
44 	int	pcb_szpt; 	/* number of pages of user page table */
45 	int	pcb_cmap2;
46 	int	*pcb_sswap;
47 	int	pcb_sigc[5];
48 };
49 
50 #define	AST_NONE	0x04000000	/* ast level */
51 #define	AST_USER	0x03000000	/* ast for user mode */
52 
53 #define	ASTLVL_NONE	4
54 #define	ASTLVL_USER	3
55 
56 #define	AST_CLR		0x07000000
57 #define	PME_CLR		0x80000000
58 
59 #define	aston() \
60 	{ \
61 		mtpr(ASTLVL, ASTLVL_USER); \
62 	}
63 
64 #define	astoff() \
65 	{ \
66 		mtpr(ASTLVL, ASTLVL_NONE); \
67 	}
68