Home | History | Annotate | Line # | Download | only in nubus
nubus.h revision 1.4
      1 /*	$NetBSD: nubus.h,v 1.4 1995/04/21 02:48:01 briggs Exp $	*/
      2 
      3 /*-
      4  * Copyright (C) 1993	Allen K. Briggs, Chris P. Caputo,
      5  *			Michael L. Finch, Bradley A. Grantham, and
      6  *			Lawrence A. Kesteloot
      7  * All rights reserved.
      8  *
      9  * Redistribution and use in source and binary forms, with or without
     10  * modification, are permitted provided that the following conditions
     11  * are met:
     12  * 1. Redistributions of source code must retain the above copyright
     13  *    notice, this list of conditions and the following disclaimer.
     14  * 2. Redistributions in binary form must reproduce the above copyright
     15  *    notice, this list of conditions and the following disclaimer in the
     16  *    documentation and/or other materials provided with the distribution.
     17  * 3. All advertising materials mentioning features or use of this software
     18  *    must display the following acknowledgement:
     19  *	This product includes software developed by the Alice Group.
     20  * 4. The names of the Alice Group or any of its members may not be used
     21  *    to endorse or promote products derived from this software without
     22  *    specific prior written permission.
     23  *
     24  * THIS SOFTWARE IS PROVIDED BY THE ALICE GROUP ``AS IS'' AND ANY EXPRESS OR
     25  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     26  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     27  * IN NO EVENT SHALL THE ALICE GROUP BE LIABLE FOR ANY DIRECT, INDIRECT,
     28  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     29  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     30  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     31  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     32  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     33  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     34  */
     35 
     36 #define NUBUS_VIDEO		3
     37 #define NUBUS_NETWORK		4
     38 #define NUBUS_MOTHERBOARD	0x0a
     39 #define NUBUS_MAXSLOTS		16
     40 
     41 struct imagedata {
     42 	long    whatTheHellIsThis;
     43 	long    offset;
     44 	short   rowbytes;
     45 	short   top;
     46 	short   left;
     47 	short   right;
     48 	short   bottom;
     49 	short   version;
     50 	short   packType;
     51 	short   packSize;
     52 	long    hRes;
     53 	long    vRes;
     54 	short   pixelType;
     55 	short   pixelSize;
     56 };
     57 
     58 /* this is the main data structure that points to good stuff */
     59 struct header {
     60 	long    offset;
     61 	long    length;
     62 	long    crc;
     63 	char    romrev;
     64 	char    format;
     65 	long    tst;
     66 	char    reserved;
     67 	char    bytelane;
     68 };
     69 
     70 /* this is what the directory entries contain */
     71 struct dir {
     72 	unsigned char rsrc;
     73 	unsigned long offset;
     74 	unsigned long base;
     75 };
     76 
     77 /* describe a single slot */
     78 struct slot {
     79 	int     size;
     80 	struct header head;
     81 	struct dir mainDir[15];
     82 	long    type;
     83 	char    name[40];
     84 	char    manufacturer[40];
     85 };
     86 
     87 struct nubus_hw {
     88 	int     found;		/* If there is a card there	 */
     89 	caddr_t addr;		/* Phys addr of start of card	 */
     90 	caddr_t rom;		/* Phys addr of start of ROM	 */
     91 	int     claimed;	/* TRUE if a driver claims this */
     92 	struct slot slot;	/* MF NUBUS STUFF */
     93 	/* any other Nubus stuff we can think of when we get */
     94 	/* the NuBus documentation */
     95 };
     96