Home | History | Annotate | Line # | Download | only in boot
      1 /*	$NetBSD: vaxstand.h,v 1.12 2025/07/14 12:39:34 hans 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 	    raclose(struct open_file *);
     55 int	hpopen(struct open_file *, int, int, int, int),
     56 	    hpstrategy(void *, int, daddr_t, size_t, void *, size_t *);
     57 int	ctuopen(struct open_file *, int, int, int, int),
     58 	    ctustrategy(void *, int, daddr_t, size_t, void *, size_t *);
     59 int	tmscpopen(struct open_file *, int, int, int, int),
     60 	    tmscpstrategy(void *, int, daddr_t, size_t, void *, size_t *);
     61 int	romopen(struct open_file *, int, int, int, int),
     62 	    romstrategy(void *, int, daddr_t, size_t, void *, size_t *),
     63 	    romioctl(struct open_file *, u_long, void *);
     64 int	mfmopen(struct open_file *, int, int, int, int),
     65 	    mfmstrategy(void *, int, daddr_t, size_t, void *, size_t *);
     66 int	sdopen(struct open_file *),
     67 	    sdstrategy(void *, int, daddr_t, size_t, void *, size_t *);
     68 int	leopen(struct open_file *, int, int, int, int),
     69 	    leclose(struct open_file *);
     70 int	qeopen(struct open_file *, int, int, int, int),
     71 	    qeclose(struct open_file *);
     72 int	zeopen(struct open_file *, int, int, int, int),
     73 	    zeclose(struct open_file *);
     74 int	deopen(struct open_file *, int, int, int, int),
     75 	    declose(struct open_file *);
     76 int	niopen(struct open_file *, int, int, int, int),
     77 	    niclose(struct open_file *);
     78 int	netopen(struct open_file *), netclose(struct open_file *);
     79 
     80