xref: /netbsd/sys/arch/sun2/sun2/machdep.h (revision c4a72b64)
1 /*	$NetBSD: machdep.h,v 1.7 2002/10/20 02:37:33 chs Exp $	*/
2 
3 /*
4  * Copyright (c) 2001 Matthew Fredette
5  * Copyright (c) 1994 Gordon W. Ross
6  * Copyright (c) 1993 Adam Glass
7  * Copyright (c) 1988 University of Utah.
8  * Copyright (c) 1982, 1990 The Regents of the University of California.
9  * All rights reserved.
10  *
11  * This code is derived from software contributed to Berkeley by
12  * the Systems Programming Group of the University of Utah Computer
13  * Science Department.
14  *
15  * Redistribution and use in source and binary forms, with or without
16  * modification, are permitted provided that the following conditions
17  * are met:
18  * 1. Redistributions of source code must retain the above copyright
19  *    notice, this list of conditions and the following disclaimer.
20  * 2. Redistributions in binary form must reproduce the above copyright
21  *    notice, this list of conditions and the following disclaimer in the
22  *    documentation and/or other materials provided with the distribution.
23  * 3. All advertising materials mentioning features or use of this software
24  *    must display the following acknowledgement:
25  *	This product includes software developed by the University of
26  *	California, Berkeley and its contributors.
27  * 4. Neither the name of the University nor the names of its contributors
28  *    may be used to endorse or promote products derived from this software
29  *    without specific prior written permission.
30  *
31  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
32  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
35  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
39  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
40  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41  * SUCH DAMAGE.
42  *
43  *	from: Utah Hdr: cpu.h 1.16 91/03/25
44  *	from: @(#)cpu.h	7.7 (Berkeley) 6/27/91
45  *	cpu.h,v 1.2 1993/05/22 07:58:17 cgd Exp
46  */
47 
48 /*
49  * Internal definitions unique to sun2/68k cpu support.
50  * These are the "private" declarations - those needed
51  * only here in machine-independent code.  The "public"
52  * definitions are in cpu.h (used by common code).
53  */
54 
55 #ifdef _KERNEL
56 
57 /* Prototypes... */
58 
59 struct frame;
60 struct fpframe;
61 struct pcb;
62 struct proc;
63 struct reg;
64 struct trapframe;
65 struct uio;
66 
67 extern int fputype;
68 
69 extern label_t *nofault;
70 
71 extern vaddr_t vmmap;	/* XXX - See mem.c */
72 
73 void	clock_init  __P((void));
74 void	cninit __P((void));
75 
76 void	dumpconf __P((void));
77 void	dumpsys __P((void));
78 
79 int 	fpu_emulate __P((struct trapframe *, struct fpframe *));
80 
81 int 	getdfc __P((void));
82 int 	getsfc __P((void));
83 
84 /* Backward compatibility... */
85 #define getsr	_getsr
86 
87 void**	getvbr __P((void));
88 
89 void	initfpu __P((void));
90 
91 void	set_clk_mode __P((int, int));
92 
93 void	setvbr __P((void **));
94 
95 void	g0_entry __P((void));
96 void	g4_entry __P((void));
97 
98 void	swapconf __P((void));
99 
100 void	zs_init __P((void));
101 
102 struct sun2_kcore_hdr;
103 
104 /* Kernel virtual address space available: */
105 extern vaddr_t virtual_avail, virtual_end;
106 /* Physical address space available: */
107 extern paddr_t avail_start, avail_end;
108 
109 /* pmap.c */
110 void	pmap_bootstrap __P((vaddr_t nextva));
111 void	pmap_kcore_hdr __P((struct sun2_kcore_hdr *));
112 void	pmap_get_pagemap __P((int *pt, int off));
113 
114 #endif	/* _KERNEL */
115