1*9640410aSmiod /* $OpenBSD: pcb.h,v 1.15 2015/07/29 18:52:44 miod Exp $ */ 247bc79e1Srahnds /* $NetBSD: pcb.h,v 1.1 1996/09/30 16:34:29 ws Exp $ */ 347bc79e1Srahnds 447bc79e1Srahnds /*- 547bc79e1Srahnds * Copyright (C) 1995, 1996 Wolfgang Solfrank. 647bc79e1Srahnds * Copyright (C) 1995, 1996 TooLs GmbH. 747bc79e1Srahnds * All rights reserved. 847bc79e1Srahnds * 947bc79e1Srahnds * Redistribution and use in source and binary forms, with or without 1047bc79e1Srahnds * modification, are permitted provided that the following conditions 1147bc79e1Srahnds * are met: 1247bc79e1Srahnds * 1. Redistributions of source code must retain the above copyright 1347bc79e1Srahnds * notice, this list of conditions and the following disclaimer. 1447bc79e1Srahnds * 2. Redistributions in binary form must reproduce the above copyright 1547bc79e1Srahnds * notice, this list of conditions and the following disclaimer in the 1647bc79e1Srahnds * documentation and/or other materials provided with the distribution. 1747bc79e1Srahnds * 3. All advertising materials mentioning features or use of this software 1847bc79e1Srahnds * must display the following acknowledgement: 1947bc79e1Srahnds * This product includes software developed by TooLs GmbH. 2047bc79e1Srahnds * 4. The name of TooLs GmbH may not be used to endorse or promote products 2147bc79e1Srahnds * derived from this software without specific prior written permission. 2247bc79e1Srahnds * 2347bc79e1Srahnds * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 2447bc79e1Srahnds * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2547bc79e1Srahnds * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2647bc79e1Srahnds * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2747bc79e1Srahnds * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 2847bc79e1Srahnds * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 2947bc79e1Srahnds * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 3047bc79e1Srahnds * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 3147bc79e1Srahnds * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 3247bc79e1Srahnds * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3347bc79e1Srahnds */ 3452c13d20Sdrahn #ifndef _POWERPC_PCB_H_ 3552c13d20Sdrahn #define _POWERPC_PCB_H_ 3647bc79e1Srahnds 37b43c05a1Srahnds #include <machine/reg.h> 38eca2c144Spefo 39eca2c144Spefo 40eca2c144Spefo typedef struct __faultbuf { 41eca2c144Spefo int pc; 42eca2c144Spefo int sp; 43eca2c144Spefo int cr; 44eca2c144Spefo int regs[20]; 45eca2c144Spefo } faultbuf; 4647bc79e1Srahnds 4747bc79e1Srahnds struct pcb { 4847bc79e1Srahnds struct pmap *pcb_pm; /* pmap of our vmspace */ 4947bc79e1Srahnds struct pmap *pcb_pmreal; /* real address of above */ 5047bc79e1Srahnds register_t pcb_sp; /* saved SP */ 5147bc79e1Srahnds faultbuf *pcb_onfault; /* For use during copyin/copyout */ 5247bc79e1Srahnds int pcb_flags; 5347bc79e1Srahnds #define PCB_FPU 1 /* Process had FPU initialized */ 5447bc79e1Srahnds struct fpu { 5547bc79e1Srahnds double fpr[32]; 5647bc79e1Srahnds double fpcsr; /* FPCSR stored as double for easier access */ 5747bc79e1Srahnds } pcb_fpu; /* Floating point processor */ 580dcf4312Sdrahn struct vreg *pcb_vr; /* Vector unit */ 59dc522544Sdrahn struct cpu_info *pcb_fpcpu; 60dc522544Sdrahn struct cpu_info *pcb_veccpu; 6147bc79e1Srahnds }; 6247bc79e1Srahnds 6347bc79e1Srahnds #ifdef _KERNEL 6447bc79e1Srahnds extern struct proc *fpuproc; 65961bb659Sderaadt int setfault(faultbuf *env) __returns_twice; 6647bc79e1Srahnds #endif 6752c13d20Sdrahn #endif /* _POWERPC_PCB_H_ */ 68