xref: /netbsd/sys/arch/hp300/stand/common/samachdep.h (revision bf9ec67e)
1 /*	$NetBSD: samachdep.h,v 1.7 2002/03/16 06:20:08 gmcgarry Exp $	*/
2 
3 /*
4  * Copyright (c) 1982, 1990, 1993
5  *	The Regents of the University of California.  All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  * 3. All advertising materials mentioning features or use of this software
16  *    must display the following acknowledgement:
17  *	This product includes software developed by the University of
18  *	California, Berkeley and its contributors.
19  * 4. Neither the name of the University nor the names of its contributors
20  *    may be used to endorse or promote products derived from this software
21  *    without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33  * SUCH DAMAGE.
34  *
35  *	@(#)samachdep.h	8.1 (Berkeley) 6/10/93
36  */
37 
38 #include <sys/types.h>
39 #include <machine/hp300spu.h>
40 
41 #define	NHPIB		4
42 #define	NSCSI		2
43 #define NRD		8
44 #define NCT		8
45 #define NSD		8
46 
47 #define NITE		4
48 
49 /* from cpu.h */
50 #define	INTIOBASE	(0x00400000)
51 #define IIOV(x)		(x)
52 #define DIOBASE		(0x600000)
53 #define	DIOCSIZE	(0x10000)
54 #define DIOIIBASE	(0x01000000)
55 #define DIOIICSIZE	(0x00400000)
56 
57 #define MHZ_8		1
58 #define MHZ_16		2
59 #define MHZ_25		3
60 #define MHZ_33		4
61 #define MHZ_50		6
62 
63 extern	int cpuspeed, machineid, mmuid;
64 extern	int howto;
65 extern	int cons_scode;
66 extern	u_int opendev;
67 extern	u_int bootdev;
68 char	*getmachineid __P((void));
69 
70 extern	int userom;
71 void	romputchar __P((int));
72 
73 void	exec_hp300 __P((char *, u_long, int));
74 void	transfer __P((char *entry, int howto, int opendev, int conscode,
75 	    char *lowram, char *esym));
76 void	_transfer __P((char *entry, int howto, int opendev, int conscode,
77 	    char *lowram, char *esym));
78 
79 #define DELAY(n)	{ register int N = cpuspeed * (n); while (--N > 0); }
80 
81 /* bogon grfinfo structure to keep grf_softc happy */
82 struct grfinfo {
83 	int	grf_foo;
84 };
85 
86 /*
87  * Switch we use to set punit in devopen.
88  */
89 struct punitsw {
90 	int	(*p_punit) __P((int, int, int *));
91 };
92 extern	struct punitsw punitsw[];
93 extern	int npunit;
94 
95 extern	struct devsw devsw_net[];
96 extern	int ndevs_net;
97 
98 extern	struct devsw devsw_general[];
99 extern	int ndevs_general;
100 
101 extern	struct fs_ops file_system_rawfs[];
102 extern	struct fs_ops file_system_ufs[];
103 extern	struct fs_ops file_system_nfs[];
104 
105 extern	char bootprog_name[], bootprog_rev[], bootprog_date[],
106 	    bootprog_maker[];
107