2003-08-07 20:26:28 +04:00
|
|
|
/* $NetBSD: proc.h,v 1.17 2003/08/07 16:28:28 agc Exp $ */
|
1994-10-27 00:08:38 +03:00
|
|
|
|
1993-10-12 06:22:19 +03:00
|
|
|
/*
|
1994-05-27 12:40:50 +04:00
|
|
|
* Copyright (c) 1992, 1993
|
|
|
|
* The Regents of the University of California. All rights reserved.
|
1993-10-12 06:22:19 +03:00
|
|
|
*
|
|
|
|
* This code is derived from software contributed to Berkeley by
|
|
|
|
* Ralph Campbell.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
2003-08-07 20:26:28 +04:00
|
|
|
* 3. Neither the name of the University nor the names of its contributors
|
1993-10-12 06:22:19 +03:00
|
|
|
* may be used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
1994-10-27 00:08:38 +03:00
|
|
|
* @(#)proc.h 8.1 (Berkeley) 6/10/93
|
1993-10-12 06:22:19 +03:00
|
|
|
*/
|
|
|
|
|
1997-07-07 07:54:24 +04:00
|
|
|
#ifndef _MIPS_PROC_H_
|
|
|
|
#define _MIPS_PROC_H_
|
2001-01-16 09:01:26 +03:00
|
|
|
|
2003-01-18 01:58:53 +03:00
|
|
|
#include <sys/param.h>
|
|
|
|
|
|
|
|
struct lwp;
|
2001-01-16 09:01:26 +03:00
|
|
|
|
1993-10-12 06:22:19 +03:00
|
|
|
/*
|
1997-06-15 21:36:24 +04:00
|
|
|
* Machine-dependent part of the proc structure for MIPS
|
1993-10-12 06:22:19 +03:00
|
|
|
*/
|
2003-01-18 01:58:53 +03:00
|
|
|
|
|
|
|
struct mdlwp {
|
2001-01-15 00:18:39 +03:00
|
|
|
void *md_regs; /* registers on current frame */
|
1993-10-12 06:22:19 +03:00
|
|
|
int md_flags; /* machine-dependent flags */
|
|
|
|
int md_upte[UPAGES]; /* ptes for mapping u page */
|
2002-11-09 23:05:57 +03:00
|
|
|
vaddr_t md_ss_addr; /* single step address for ptrace */
|
1993-10-12 06:22:19 +03:00
|
|
|
int md_ss_instr; /* single step instruction for ptrace */
|
2003-01-18 01:58:53 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct mdproc {
|
2001-01-15 00:18:39 +03:00
|
|
|
__volatile int md_astpending; /* AST pending on return to userland */
|
2001-01-16 09:01:26 +03:00
|
|
|
/* syscall entry for this process */
|
2003-01-18 01:58:53 +03:00
|
|
|
void (*md_syscall)(struct lwp *, u_int, u_int, u_int);
|
1993-10-12 06:22:19 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
/* md_flags */
|
|
|
|
#define MDP_FPUSED 0x0001 /* floating point coprocessor used */
|
1997-05-25 13:56:45 +04:00
|
|
|
|
1997-06-15 21:36:24 +04:00
|
|
|
/*
|
|
|
|
* MIPS trapframe
|
|
|
|
*/
|
|
|
|
struct frame {
|
1999-01-14 21:45:45 +03:00
|
|
|
mips_reg_t f_regs[38];
|
2001-10-16 20:31:32 +04:00
|
|
|
u_int32_t f_ppl; /* previous priority level */
|
|
|
|
int32_t f_pad; /* for 8 byte aligned */
|
1997-06-15 21:36:24 +04:00
|
|
|
};
|
|
|
|
|
1997-06-02 05:58:38 +04:00
|
|
|
#ifdef _KERNEL
|
1997-05-25 13:56:45 +04:00
|
|
|
/* kernel single-step emulation */
|
2003-01-18 01:58:53 +03:00
|
|
|
int mips_singlestep(struct lwp *l);
|
1997-06-02 05:58:38 +04:00
|
|
|
#endif /* _KERNEL */
|
1997-07-07 07:54:24 +04:00
|
|
|
|
|
|
|
#endif /* _MIPS_PROC_H_ */
|