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