Home | History | Annotate | Line # | Download | only in include
      1 /*	$NetBSD: proc.h,v 1.11 2023/10/06 11:45:37 skrll Exp $	*/
      2 
      3 #ifndef _IA64_PROC_H_
      4 #define _IA64_PROC_H_
      5 
      6 #include <machine/frame.h>
      7 
      8 /*
      9  * Process u-area is organised as follows:
     10  *
     11  *   -------------------------------------------
     12  *  |                      |         |    |     |
     13  *  |  bspstore       sp   | 16bytes | TF | PCB |
     14  *  |  ---->        <---   |         |    |     |
     15  *   -------------------------------------------
     16  *              -----> Higher Addresses
     17  */
     18 
     19 /*
     20  * Machine-dependent part of the lwp structure for ia64
     21  */
     22 struct mdlwp {
     23 	u_long	md_flags;
     24 	struct	trapframe *md_tf;	/* trap/syscall registers */
     25 	__volatile int md_astpending;	/* AST pending for this process */
     26 	void *user_stack;
     27 	uint64_t user_stack_size;
     28 };
     29 
     30 /*
     31  * md_flags usage
     32  * --------------
     33  * XXX:
     34  */
     35 
     36 struct mdproc {
     37   /* XXX: Todo */
     38 	void	(*md_syscall)(struct lwp *, u_int64_t, struct trapframe *);
     39 					/* Syscall handling function */
     40 };
     41 
     42 #define UAREA_PCB_OFFSET	(USPACE - sizeof(struct pcb))
     43 #define UAREA_TF_OFFSET		(UAREA_PCB_OFFSET - sizeof(struct trapframe))
     44 #define UAREA_SP_OFFSET		(UAREA_TF_OFFSET - 16)
     45 #define UAREA_BSPSTORE_OFFSET	(0)
     46 #define UAREA_STACK_SIZE	(USPACE - 16 - sizeof(struct trapframe) - sizeof(struct pcb))
     47 
     48 #endif /* _IA64_PROC_H_ */
     49