Home | History | Annotate | Line # | Download | only in include
pcb.h revision 1.26
      1  1.26       mrg /*	$NetBSD: pcb.h,v 1.26 2020/08/17 04:15:33 mrg Exp $	*/
      2   1.4       cgd 
      3   1.1   deraadt /*
      4  1.22     rmind  * Copyright (c) 1988 University of Utah.
      5   1.2     glass  * Copyright (c) 1992, 1993
      6   1.2     glass  *	The Regents of the University of California.  All rights reserved.
      7  1.17       agc  *
      8  1.17       agc  * This code is derived from software contributed to Berkeley by
      9  1.17       agc  * the Systems Programming Group of the University of Utah Computer
     10  1.17       agc  * Science Department and Ralph Campbell.
     11  1.17       agc  *
     12  1.17       agc  * Redistribution and use in source and binary forms, with or without
     13  1.17       agc  * modification, are permitted provided that the following conditions
     14  1.17       agc  * are met:
     15  1.17       agc  * 1. Redistributions of source code must retain the above copyright
     16  1.17       agc  *    notice, this list of conditions and the following disclaimer.
     17  1.17       agc  * 2. Redistributions in binary form must reproduce the above copyright
     18  1.17       agc  *    notice, this list of conditions and the following disclaimer in the
     19  1.17       agc  *    documentation and/or other materials provided with the distribution.
     20  1.17       agc  * 3. Neither the name of the University nor the names of its contributors
     21  1.17       agc  *    may be used to endorse or promote products derived from this software
     22  1.17       agc  *    without specific prior written permission.
     23  1.17       agc  *
     24  1.17       agc  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     25  1.17       agc  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     26  1.17       agc  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     27  1.17       agc  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     28  1.17       agc  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     29  1.17       agc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     30  1.17       agc  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     31  1.17       agc  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     32  1.17       agc  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     33  1.17       agc  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     34  1.17       agc  * SUCH DAMAGE.
     35  1.17       agc  *
     36  1.17       agc  * from: Utah Hdr: pcb.h 1.13 89/04/23
     37  1.17       agc  *
     38  1.17       agc  *	@(#)pcb.h	8.1 (Berkeley) 6/10/93
     39  1.17       agc  */
     40   1.1   deraadt 
     41  1.16   tsutsui #ifndef _MIPS_PCB_H_
     42  1.16   tsutsui #define	_MIPS_PCB_H_
     43  1.15    simonb 
     44  1.21      matt #include <mips/types.h>
     45   1.7    mhitch #include <mips/reg.h>
     46   1.7    mhitch 
     47  1.23      matt struct pcb_faultinfo {
     48  1.23      matt 	void *pfi_faultpte;
     49  1.23      matt 	vaddr_t pfi_faultaddr;
     50  1.23      matt 	u_int pfi_repeats;
     51  1.23      matt 	pid_t pfi_lastpid;
     52  1.23      matt 	uint8_t pfi_faulttype;
     53  1.23      matt };
     54  1.23      matt 
     55   1.1   deraadt /*
     56   1.6  jonathan  * MIPS process control block
     57   1.1   deraadt  */
     58  1.21      matt struct pcb {
     59  1.25       mrg 	mips_label_t pcb_context;	/* kernel context for resume */
     60  1.20  christos 	void *	pcb_onfault;		/* for copyin/copyout faults */
     61  1.21      matt 	uint32_t pcb_ppl;		/* previous priority level */
     62  1.23      matt 	struct fpreg pcb_fpregs;	/* saved floating point registers */
     63  1.24      matt 	struct dspreg pcb_dspregs;	/* saved DSP registers */
     64  1.23      matt 	struct pcb_faultinfo pcb_faultinfo;
     65   1.1   deraadt };
     66   1.1   deraadt 
     67   1.1   deraadt /*
     68   1.1   deraadt  * The pcb is augmented with machine-dependent additional data for
     69   1.9  nisimura  * core dumps.
     70   1.1   deraadt  */
     71   1.1   deraadt struct md_coredump {
     72   1.9  nisimura 	mips_reg_t md_regs[38];
     73   1.9  nisimura 	struct fpreg md_fpregs;
     74   1.1   deraadt };
     75   1.7    mhitch 
     76   1.7    mhitch #ifdef _KERNEL
     77  1.18        he #define	PCB_FSR(pcb)	((pcb)->pcb_fpregs.r_regs[_R_FSR - _FPBASE])
     78   1.7    mhitch #endif
     79  1.26       mrg 
     80  1.26       mrg #ifndef _KERNEL
     81  1.26       mrg /* Connect the dots for crash(8). */
     82  1.26       mrg vaddr_t db_mach_addr_cpuswitch(void);
     83  1.26       mrg #endif
     84  1.26       mrg 
     85  1.16   tsutsui #endif /*_MIPS_PCB_H_*/
     86