xref: /netbsd-src/sys/arch/hp300/stand/common/samachdep.h (revision 8e6f7afb5bba2c07fd084c08249718961dfbc1d1)
1 /*	$NetBSD: samachdep.h,v 1.6 2001/01/02 04:14:34 simonb 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	transfer __P((char *entry, int howto, int opendev, int conscode,
74 	    char *lowram, char *esym));
75 void	_transfer __P((char *entry, int howto, int opendev, int conscode,
76 	    char *lowram, char *esym));
77 
78 #define DELAY(n)	{ register int N = cpuspeed * (n); while (--N > 0); }
79 
80 /* bogon grfinfo structure to keep grf_softc happy */
81 struct grfinfo {
82 	int	grf_foo;
83 };
84 
85 /*
86  * Switch we use to set punit in devopen.
87  */
88 struct punitsw {
89 	int	(*p_punit) __P((int, int, int *));
90 };
91 extern	struct punitsw punitsw[];
92 extern	int npunit;
93 
94 extern	struct devsw devsw_net[];
95 extern	int ndevs_net;
96 
97 extern	struct devsw devsw_general[];
98 extern	int ndevs_general;
99 
100 extern	struct fs_ops file_system_rawfs[];
101 extern	struct fs_ops file_system_ufs[];
102 extern	struct fs_ops file_system_nfs[];
103 
104 extern	char bootprog_name[], bootprog_rev[], bootprog_date[],
105 	    bootprog_maker[];
106