pcb.h revision 1.6 1 1.6 uch /* $NetBSD: pcb.h,v 1.6 2002/04/28 17:10:36 uch Exp $ */
2 1.1 itojun
3 1.1 itojun /*-
4 1.4 uch * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
5 1.1 itojun * Copyright (c) 1995 Charles M. Hannum. All rights reserved.
6 1.1 itojun * Copyright (c) 1990 The Regents of the University of California.
7 1.1 itojun * All rights reserved.
8 1.1 itojun *
9 1.1 itojun * This code is derived from software contributed to Berkeley by
10 1.1 itojun * William Jolitz.
11 1.1 itojun *
12 1.1 itojun * Redistribution and use in source and binary forms, with or without
13 1.1 itojun * modification, are permitted provided that the following conditions
14 1.1 itojun * are met:
15 1.1 itojun * 1. Redistributions of source code must retain the above copyright
16 1.1 itojun * notice, this list of conditions and the following disclaimer.
17 1.1 itojun * 2. Redistributions in binary form must reproduce the above copyright
18 1.1 itojun * notice, this list of conditions and the following disclaimer in the
19 1.1 itojun * documentation and/or other materials provided with the distribution.
20 1.1 itojun * 3. All advertising materials mentioning features or use of this software
21 1.1 itojun * must display the following acknowledgement:
22 1.1 itojun * This product includes software developed by the University of
23 1.1 itojun * California, Berkeley and its contributors.
24 1.1 itojun * 4. Neither the name of the University nor the names of its contributors
25 1.1 itojun * may be used to endorse or promote products derived from this software
26 1.1 itojun * without specific prior written permission.
27 1.1 itojun *
28 1.1 itojun * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
29 1.1 itojun * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 1.1 itojun * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 1.1 itojun * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
32 1.1 itojun * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 1.1 itojun * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 1.1 itojun * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 1.1 itojun * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 1.1 itojun * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 1.1 itojun * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 1.1 itojun * SUCH DAMAGE.
39 1.1 itojun *
40 1.1 itojun * @(#)pcb.h 5.10 (Berkeley) 5/12/91
41 1.1 itojun */
42 1.1 itojun
43 1.1 itojun /*
44 1.1 itojun * SH3 process control block
45 1.1 itojun * T.Horiuchi Brains Corp. 05/27/1998
46 1.1 itojun */
47 1.1 itojun
48 1.1 itojun #ifndef _SH3_PCB_H_
49 1.6 uch #define _SH3_PCB_H_
50 1.1 itojun
51 1.4 uch #include <sh3/frame.h>
52 1.1 itojun
53 1.1 itojun struct pcb {
54 1.4 uch struct switchframe pcb_sf;
55 1.4 uch vaddr_t pcb_sp; /* kernel stack top */
56 1.4 uch vaddr_t pcb_fp; /* frame top */
57 1.1 itojun int pageDirReg; /* Page Directory of this process */
58 1.1 itojun int pcb_flags;
59 1.1 itojun caddr_t pcb_onfault; /* copyin/out fault recovery */
60 1.1 itojun int fusubail;
61 1.1 itojun struct pmap *pcb_pmap; /* back pointer to our pmap */
62 1.1 itojun };
63 1.1 itojun
64 1.1 itojun /*
65 1.1 itojun * The pcb is augmented with machine-dependent additional data for
66 1.1 itojun * core dumps. For the SH3, there is nothing to add.
67 1.1 itojun */
68 1.1 itojun struct md_coredump {
69 1.1 itojun long md_pad[8];
70 1.1 itojun };
71 1.1 itojun
72 1.1 itojun #ifdef _KERNEL
73 1.4 uch extern struct pcb *curpcb; /* our current running pcb */
74 1.1 itojun #endif
75 1.1 itojun
76 1.5 uch #endif /* !_SH3_PCB_H_ */
77