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