proc.h revision 1.6 1 1.6 agc /* $NetBSD: proc.h,v 1.6 2003/08/07 16:29:29 agc Exp $ */
2 1.1 itojun
3 1.1 itojun /*
4 1.1 itojun * Copyright (c) 1991 Regents of the University of California.
5 1.1 itojun * All rights reserved.
6 1.6 agc *
7 1.6 agc * Redistribution and use in source and binary forms, with or without
8 1.6 agc * modification, are permitted provided that the following conditions
9 1.6 agc * are met:
10 1.6 agc * 1. Redistributions of source code must retain the above copyright
11 1.6 agc * notice, this list of conditions and the following disclaimer.
12 1.6 agc * 2. Redistributions in binary form must reproduce the above copyright
13 1.6 agc * notice, this list of conditions and the following disclaimer in the
14 1.6 agc * documentation and/or other materials provided with the distribution.
15 1.6 agc * 3. Neither the name of the University nor the names of its contributors
16 1.6 agc * may be used to endorse or promote products derived from this software
17 1.6 agc * without specific prior written permission.
18 1.6 agc *
19 1.6 agc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 1.6 agc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 1.6 agc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 1.6 agc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 1.6 agc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 1.6 agc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 1.6 agc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 1.6 agc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 1.6 agc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 1.6 agc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 1.6 agc * SUCH DAMAGE.
30 1.6 agc *
31 1.6 agc * @(#)proc.h 7.1 (Berkeley) 5/15/91
32 1.6 agc */
33 1.6 agc
34 1.6 agc /*
35 1.6 agc * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
36 1.1 itojun *
37 1.1 itojun * Redistribution and use in source and binary forms, with or without
38 1.1 itojun * modification, are permitted provided that the following conditions
39 1.1 itojun * are met:
40 1.1 itojun * 1. Redistributions of source code must retain the above copyright
41 1.1 itojun * notice, this list of conditions and the following disclaimer.
42 1.1 itojun * 2. Redistributions in binary form must reproduce the above copyright
43 1.1 itojun * notice, this list of conditions and the following disclaimer in the
44 1.1 itojun * documentation and/or other materials provided with the distribution.
45 1.1 itojun * 3. All advertising materials mentioning features or use of this software
46 1.1 itojun * must display the following acknowledgement:
47 1.1 itojun * This product includes software developed by the University of
48 1.1 itojun * California, Berkeley and its contributors.
49 1.1 itojun * 4. Neither the name of the University nor the names of its contributors
50 1.1 itojun * may be used to endorse or promote products derived from this software
51 1.1 itojun * without specific prior written permission.
52 1.1 itojun *
53 1.1 itojun * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
54 1.1 itojun * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
55 1.1 itojun * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
56 1.1 itojun * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
57 1.1 itojun * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
58 1.1 itojun * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
59 1.1 itojun * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
60 1.1 itojun * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
61 1.1 itojun * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
62 1.1 itojun * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
63 1.1 itojun * SUCH DAMAGE.
64 1.1 itojun *
65 1.1 itojun * @(#)proc.h 7.1 (Berkeley) 5/15/91
66 1.1 itojun */
67 1.1 itojun
68 1.3 uch #ifndef _SH3_PROC_H_
69 1.3 uch #define _SH3_PROC_H_
70 1.5 thorpej
71 1.1 itojun /*
72 1.1 itojun * Machine-dependent part of the proc structure for sh3.
73 1.1 itojun */
74 1.3 uch
75 1.5 thorpej #include <machine/param.h>
76 1.5 thorpej
77 1.3 uch /* Kernel stack PTE */
78 1.3 uch struct md_upte {
79 1.3 uch u_int32_t addr;
80 1.3 uch u_int32_t data;
81 1.3 uch };
82 1.3 uch
83 1.5 thorpej struct mdlwp {
84 1.3 uch struct trapframe *md_regs; /* user context */
85 1.4 uch struct pcb *md_pcb; /* pcb access address */
86 1.3 uch int md_flags; /* machine-dependent flags */
87 1.3 uch /* u-area PTE: *2 .. SH4 data/address data array access */
88 1.3 uch struct md_upte md_upte[UPAGES * 2];
89 1.1 itojun };
90 1.1 itojun
91 1.1 itojun /* md_flags */
92 1.1 itojun #define MDP_USEDFPU 0x0001 /* has used the FPU */
93 1.5 thorpej
94 1.5 thorpej struct mdproc {
95 1.5 thorpej __volatile int md_astpending; /* AST pending on return to userland */
96 1.5 thorpej };
97 1.2 uch
98 1.2 uch #ifdef _KERNEL
99 1.3 uch #ifndef _LOCORE
100 1.4 uch void sh_proc0_init(void);
101 1.3 uch extern struct md_upte *curupte; /* SH3 wired u-area hack */
102 1.3 uch #endif /* _LOCORE */
103 1.3 uch #endif /* _KERNEL */
104 1.3 uch #endif /* !_SH3_PROC_H_ */
105