pcb.h revision 1.1
11.1Stsubai/*	$NetBSD: pcb.h,v 1.1 1998/05/15 10:15:54 tsubai Exp $	*/
21.1Stsubai
31.1Stsubai/*-
41.1Stsubai * Copyright (C) 1995, 1996 Wolfgang Solfrank.
51.1Stsubai * Copyright (C) 1995, 1996 TooLs GmbH.
61.1Stsubai * All rights reserved.
71.1Stsubai *
81.1Stsubai * Redistribution and use in source and binary forms, with or without
91.1Stsubai * modification, are permitted provided that the following conditions
101.1Stsubai * are met:
111.1Stsubai * 1. Redistributions of source code must retain the above copyright
121.1Stsubai *    notice, this list of conditions and the following disclaimer.
131.1Stsubai * 2. Redistributions in binary form must reproduce the above copyright
141.1Stsubai *    notice, this list of conditions and the following disclaimer in the
151.1Stsubai *    documentation and/or other materials provided with the distribution.
161.1Stsubai * 3. All advertising materials mentioning features or use of this software
171.1Stsubai *    must display the following acknowledgement:
181.1Stsubai *	This product includes software developed by TooLs GmbH.
191.1Stsubai * 4. The name of TooLs GmbH may not be used to endorse or promote products
201.1Stsubai *    derived from this software without specific prior written permission.
211.1Stsubai *
221.1Stsubai * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
231.1Stsubai * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
241.1Stsubai * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
251.1Stsubai * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
261.1Stsubai * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
271.1Stsubai * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
281.1Stsubai * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
291.1Stsubai * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
301.1Stsubai * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
311.1Stsubai * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
321.1Stsubai */
331.1Stsubai#ifndef	_MACHINE_PCB_H_
341.1Stsubai#define	_MACHINE_PCB_H_
351.1Stsubai
361.1Stsubaitypedef int faultbuf[24];
371.1Stsubai
381.1Stsubaistruct pcb {
391.1Stsubai	struct pmap *pcb_pm;	/* pmap of our vmspace */
401.1Stsubai	struct pmap *pcb_pmreal; /* real address of above */
411.1Stsubai	register_t pcb_sp;	/* saved SP */
421.1Stsubai	int pcb_spl;		/* saved SPL */
431.1Stsubai	faultbuf *pcb_onfault;	/* For use during copyin/copyout */
441.1Stsubai	int pcb_flags;
451.1Stsubai#define	PCB_FPU		1	/* Process had FPU initialized */
461.1Stsubai	struct fpu {
471.1Stsubai		double fpr[32];
481.1Stsubai		double fpcsr;	/* FPCSR stored as double for easier access */
491.1Stsubai	} pcb_fpu;		/* Floating point processor */
501.1Stsubai};
511.1Stsubai
521.1Stsubaistruct md_coredump {
531.1Stsubai	struct trapframe frame;
541.1Stsubai	/* Need to add FPU regs here */
551.1Stsubai};
561.1Stsubai
571.1Stsubai#ifdef	_KERNEL
581.1Stsubaiextern struct pcb *curpcb;
591.1Stsubaiextern struct pmap *curpm;
601.1Stsubaiextern struct proc *fpuproc;
611.1Stsubai#endif
621.1Stsubai#endif	/* _MACHINE_PCB_H_ */
63