nubus.h revision 1.3 1 /* $NetBSD: nubus.h,v 1.3 1994/10/26 08:46:15 cgd 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
59 /* this is the main data structure that points to good stuff */
60 struct header {
61 long offset;
62 long length;
63 long crc;
64 char romrev;
65 char format;
66 long tst;
67 char reserved;
68 char bytelane;
69 } ;
70
71
72 /* this is what the directory entries contain */
73 struct dir {
74 unsigned char rsrc;
75 unsigned long offset;
76 unsigned long base;
77 };
78
79 /* describe a single slot */
80 struct slot {
81 int size;
82 struct header head;
83 struct dir mainDir[15];
84 long type;
85 char name[40];
86 char manufacturer[40];
87 };
88
89 struct nubus_hw{
90 int found; /* If there is a card there */
91 caddr_t addr; /* Phys addr of start of card */
92 caddr_t rom; /* Phys addr of start of ROM */
93 int claimed; /* TRUE if a driver claims this */
94 struct slot Slot; /* MF NUBUS STUFF */
95 /* any other Nubus stuff we can think of when we get */
96 /* the NuBus documentation */
97 };
98