1 /* $NetBSD: vaxstand.h,v 1.11 2022/04/25 15:06:34 mlelstv 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 * 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27 /* Variables used in autoconf */ 28 extern int askname; 29 extern struct rpb bootrpb; 30 extern int csrbase, nexaddr; 31 32 /* devsw type definitions, used in bootxx and conf */ 33 #define SADEV(name,strategy,open,close,ioctl) \ 34 { (char *)name, \ 35 (int(*)(void *, int ,daddr_t , size_t, void *, size_t *))strategy, \ 36 (int(*)(struct open_file *, ...))open, \ 37 (int(*)(struct open_file *))close, \ 38 (int(*)(struct open_file *,u_long, void *))ioctl} 39 40 #define SDELAY(count) {volatile int i; for (i = count; i; i--);} 41 /* 42 * Easy-to-use definitions 43 */ 44 #define min(x,y) (x < y ? x : y) 45 46 struct netif_driver; 47 48 int net_devinit(struct open_file *f, struct netif_driver *drv, u_char *eaddr); 49 int ubmap(int mapno, int vaddr, int size); 50 51 /* device calls */ 52 int raopen(struct open_file *, int, int, int, int), 53 rastrategy(void *, int, daddr_t, size_t, void *, size_t *); 54 int hpopen(struct open_file *, int, int, int, int), 55 hpstrategy(void *, int, daddr_t, size_t, void *, size_t *); 56 int ctuopen(struct open_file *, int, int, int, int), 57 ctustrategy(void *, int, daddr_t, size_t, void *, size_t *); 58 int tmscpopen(struct open_file *, int, int, int, int), 59 tmscpstrategy(void *, int, daddr_t, size_t, void *, size_t *); 60 int romopen(struct open_file *, int, int, int, int), 61 romstrategy(void *, int, daddr_t, size_t, void *, size_t *), 62 romioctl(struct open_file *, u_long, void *); 63 int mfmopen(struct open_file *, int, int, int, int), 64 mfmstrategy(void *, int, daddr_t, size_t, void *, size_t *); 65 int sdopen(struct open_file *), 66 sdstrategy(void *, int, daddr_t, size_t, void *, size_t *); 67 int leopen(struct open_file *, int, int, int, int), 68 leclose(struct open_file *); 69 int qeopen(struct open_file *, int, int, int, int), 70 qeclose(struct open_file *); 71 int zeopen(struct open_file *, int, int, int, int), 72 zeclose(struct open_file *); 73 int deopen(struct open_file *, int, int, int, int), 74 declose(struct open_file *); 75 int niopen(struct open_file *, int, int, int, int), 76 niclose(struct open_file *); 77 int netopen(struct open_file *), netclose(struct open_file *); 78 79