Home | History | Annotate | Line # | Download | only in include
pcb.h revision 1.12.4.3
      1  1.12.4.3  thorpej /*	$NetBSD: pcb.h,v 1.12.4.3 2002/12/11 06:11:04 thorpej Exp $	*/
      2  1.12.4.2  nathanw 
      3  1.12.4.2  nathanw /*
      4  1.12.4.2  nathanw  * Copyright (c) 1988 University of Utah.
      5  1.12.4.2  nathanw  * Copyright (c) 1992, 1993
      6  1.12.4.2  nathanw  *	The Regents of the University of California.  All rights reserved.
      7  1.12.4.2  nathanw  *
      8  1.12.4.2  nathanw  * This code is derived from software contributed to Berkeley by
      9  1.12.4.2  nathanw  * the Systems Programming Group of the University of Utah Computer
     10  1.12.4.2  nathanw  * Science Department and Ralph Campbell.
     11  1.12.4.2  nathanw  *
     12  1.12.4.2  nathanw  * Redistribution and use in source and binary forms, with or without
     13  1.12.4.2  nathanw  * modification, are permitted provided that the following conditions
     14  1.12.4.2  nathanw  * are met:
     15  1.12.4.2  nathanw  * 1. Redistributions of source code must retain the above copyright
     16  1.12.4.2  nathanw  *    notice, this list of conditions and the following disclaimer.
     17  1.12.4.2  nathanw  * 2. Redistributions in binary form must reproduce the above copyright
     18  1.12.4.2  nathanw  *    notice, this list of conditions and the following disclaimer in the
     19  1.12.4.2  nathanw  *    documentation and/or other materials provided with the distribution.
     20  1.12.4.2  nathanw  * 3. All advertising materials mentioning features or use of this software
     21  1.12.4.2  nathanw  *    must display the following acknowledgement:
     22  1.12.4.2  nathanw  *	This product includes software developed by the University of
     23  1.12.4.2  nathanw  *	California, Berkeley and its contributors.
     24  1.12.4.2  nathanw  * 4. Neither the name of the University nor the names of its contributors
     25  1.12.4.2  nathanw  *    may be used to endorse or promote products derived from this software
     26  1.12.4.2  nathanw  *    without specific prior written permission.
     27  1.12.4.2  nathanw  *
     28  1.12.4.2  nathanw  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     29  1.12.4.2  nathanw  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     30  1.12.4.2  nathanw  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     31  1.12.4.2  nathanw  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     32  1.12.4.2  nathanw  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     33  1.12.4.2  nathanw  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     34  1.12.4.2  nathanw  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     35  1.12.4.2  nathanw  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     36  1.12.4.2  nathanw  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     37  1.12.4.2  nathanw  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     38  1.12.4.2  nathanw  * SUCH DAMAGE.
     39  1.12.4.2  nathanw  *
     40  1.12.4.2  nathanw  * from: Utah Hdr: pcb.h 1.13 89/04/23
     41  1.12.4.2  nathanw  *
     42  1.12.4.2  nathanw  *	@(#)pcb.h	8.1 (Berkeley) 6/10/93
     43  1.12.4.2  nathanw  */
     44  1.12.4.2  nathanw 
     45  1.12.4.3  thorpej #ifndef _MIPS_PCB_H_
     46  1.12.4.3  thorpej #define	_MIPS_PCB_H_
     47  1.12.4.3  thorpej 
     48  1.12.4.2  nathanw #include <mips/reg.h>
     49  1.12.4.2  nathanw 
     50  1.12.4.2  nathanw /*
     51  1.12.4.2  nathanw  * MIPS process control block
     52  1.12.4.2  nathanw  */
     53  1.12.4.2  nathanw struct pcb
     54  1.12.4.2  nathanw {
     55  1.12.4.2  nathanw 	struct fpreg pcb_fpregs;	/* saved floating point registers */
     56  1.12.4.2  nathanw 	mips_reg_t pcb_context[12];	/* kernel context for resume */
     57  1.12.4.2  nathanw 	caddr_t	pcb_onfault;		/* for copyin/copyout faults */
     58  1.12.4.2  nathanw 	u_int32_t pcb_ppl;		/* previous priority level */
     59  1.12.4.2  nathanw };
     60  1.12.4.2  nathanw 
     61  1.12.4.2  nathanw /*
     62  1.12.4.2  nathanw  * The pcb is augmented with machine-dependent additional data for
     63  1.12.4.2  nathanw  * core dumps.
     64  1.12.4.2  nathanw  */
     65  1.12.4.2  nathanw struct md_coredump {
     66  1.12.4.2  nathanw 	mips_reg_t md_regs[38];
     67  1.12.4.2  nathanw 	struct fpreg md_fpregs;
     68  1.12.4.2  nathanw };
     69  1.12.4.2  nathanw 
     70  1.12.4.2  nathanw #ifdef _KERNEL
     71  1.12.4.2  nathanw #define	PCB_FSR(pcb)	((pcb)->pcb_fpregs.r_regs[FSR - FPBASE])
     72  1.12.4.2  nathanw #endif
     73  1.12.4.3  thorpej #endif /*_MIPS_PCB_H_*/
     74