xref: /original-bsd/sys/hp300/include/pcb.h (revision abd50c55)
1 /*
2  * Copyright (c) 1988 University of Utah.
3  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
4  * All rights reserved.
5  *
6  * This code is derived from software contributed to Berkeley by
7  * the Systems Programming Group of the University of Utah Computer
8  * Science Department.
9  *
10  * %sccs.include.redist.c%
11  *
12  * from: Utah $Hdr: pcb.h 1.13 89/04/23$
13  *
14  *	@(#)pcb.h	7.1 (Berkeley) 05/08/90
15  */
16 
17 #ifdef KERNEL
18 #include "frame.h"
19 #else
20 #include <hp300/frame.h>
21 #endif
22 
23 /*
24  * HP300 process control block
25  */
26 struct pcb
27 {
28 	short	pcb_flags;	/* misc. process flags (+0) */
29 	short	pcb_ps; 	/* processor status word (+2) */
30 	int	pcb_ustp;	/* user segment table pointer (+4) */
31 	int	pcb_usp;	/* user stack pointer (+8) */
32 	int	pcb_regs[12];	/* D0-D7, A0-A7 (+C) */
33 	struct pte *pcb_p0br;	/* P0 base register (+3C) */
34 	int	pcb_p0lr;	/* P0 length register (+40) */
35 	struct pte *pcb_p1br;	/* P1 base register (+44) */
36 	int	pcb_p1lr;	/* P1 length register (+48) */
37 	int	pcb_szpt; 	/* number of pages of user page table (+4C) */
38 	int	pcb_cmap2;	/* temporary copy PTE (+50) */
39 	int	*pcb_sswap;	/* saved context for swap return (+54) */
40 	short	pcb_sigc[12];	/* signal trampoline code (+58) */
41 	caddr_t	pcb_onfault;	/* for copyin/out faults (+70) */
42 	struct fpframe pcb_fpregs; /* 68881/2 context save area (+74) */
43 	int	pcb_exec[16];	/* exec structure for core dumps (+1B8) */
44 	int	pcb_res[2];	/* reserved for future expansion (+1F8) */
45 };
46 
47 /* flags */
48 
49 #define	PCB_AST		0x0001	/* async trap pending */
50 #define PCB_HPUXMMAP	0x0010	/* VA space is multiple mapped */
51 #define PCB_HPUXTRACE	0x0020	/* being traced by an HPUX process */
52 #define PCB_HPUXBIN	0x0040	/* loaded from an HPUX format binary */
53 				/* note: does NOT imply SHPUX */
54 
55 #define aston() \
56 	{ \
57 		u.u_pcb.pcb_flags |= PCB_AST; \
58 	}
59 
60 #define astoff() \
61 	{ \
62 		u.u_pcb.pcb_flags &= ~PCB_AST; \
63 	}
64 
65 #define astpend() \
66 	(u.u_pcb.pcb_flags & PCB_AST)
67