xref: /netbsd/sys/arch/vax/boot/boot/vaxstand.h (revision 6550d01e)
1 /*	$NetBSD: vaxstand.h,v 1.8 2005/12/11 12:19:30 christos Exp $ */
2 /*
3  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  * 3. All advertising materials mentioning features or use of this software
15  *    must display the following acknowledgement:
16  *     This product includes software developed at Ludd, University of Lule}.
17  * 4. The name of the author may not be used to endorse or promote products
18  *    derived from this software without specific prior written permission
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 /* Variables used in autoconf */
33 extern int askname;
34 extern struct rpb bootrpb;
35 extern int csrbase, nexaddr;
36 
37 /* devsw type definitions, used in bootxx and conf */
38 #define SADEV(name,strategy,open,close,ioctl) \
39 	{ (char *)name, \
40 	 (int(*)(void *, int ,daddr_t , size_t, void *, size_t *))strategy, \
41 	 (int(*)(struct open_file *, ...))open, \
42 	 (int(*)(struct open_file *))close, \
43 	 (int(*)(struct open_file *,u_long, void *))ioctl}
44 
45 #define SDELAY(count) {volatile int i; for (i = count; i; i--);}
46 /*
47  * Easy-to-use definitions
48  */
49 #define min(x,y) (x < y ? x : y)
50 
51 struct netif_driver;
52 
53 int net_devinit(struct open_file *f, struct netif_driver *drv, u_char *eaddr);
54 
55 /* device calls */
56 int	raopen(struct open_file *, int, int, int, int),
57 	    rastrategy(void *, int, daddr_t, size_t, void *, size_t *);
58 int	hpopen(struct open_file *, int, int, int, int),
59 	    hpstrategy(void *, int, daddr_t, size_t, void *, size_t *);
60 int	ctuopen(struct open_file *, int, int, int, int),
61 	    ctustrategy(void *, int, daddr_t, size_t, void *, size_t *);
62 int	tmscpopen(struct open_file *, int, int, int, int),
63 	    tmscpstrategy(void *, int, daddr_t, size_t, void *, size_t *);
64 int	romopen(struct open_file *, int, int, int, int),
65 	    romstrategy(void *, int, daddr_t, size_t, void *, size_t *);
66 int	mfmopen(struct open_file *, int, int, int, int),
67 	    mfmstrategy(void *, int, daddr_t, size_t, void *, size_t *);
68 int	sdopen(struct open_file *),
69 	    sdstrategy(void *, int, daddr_t, size_t, void *, size_t *);
70 int	leopen(struct open_file *, int, int, int, int),
71 	    leclose(struct open_file *);
72 int	qeopen(struct open_file *, int, int, int, int),
73 	    qeclose(struct open_file *);
74 int	zeopen(struct open_file *, int, int, int, int),
75 	    zeclose(struct open_file *);
76 int	deopen(struct open_file *, int, int, int, int),
77 	    declose(struct open_file *);
78 int	niopen(struct open_file *, int, int, int, int),
79 	    niclose(struct open_file *);
80 int	netopen(struct open_file *), netclose(struct open_file *);
81 
82