No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / vax / include / nexus.h
blob88ea39dfb2a5eda694708bb9422e48a28887481f
1 /* $NetBSD: nexus.h,v 1.24 2007/03/04 06:00:57 christos Exp $ */
3 /*-
4 * Copyright (c) 1982, 1986 The Regents of the University of California.
5 * All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the University nor the names of its contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
31 * @(#)nexus.h 7.3 (Berkeley) 5/9/91
34 #ifndef _VAX_NEXUS_H_
35 #define _VAX_NEXUS_H_
37 #include <machine/bus.h>
39 #ifdef _KERNEL
40 #include "opt_cputype.h"
41 #endif
43 * Different definitions for nicer autoconf probing.
45 enum bustypes {
46 VAX_SBIBUS, /* SBI parent (780) */
47 VAX_CMIBUS, /* CMI backplane (750) */
48 VAX_UNIBUS, /* Direct backplane (730) */
49 VAX_ABUS, /* SBI placeholder (8600) */
50 VAX_BIBUS, /* BI bus (8200) */
51 VAX_NMIBUS, /* NMI backplane (8800) */
52 VAX_VSBUS, /* Virtual vaxstation bus */
53 VAX_IBUS, /* Internal Microvax bus */
54 VAX_XMIBUS, /* XMI master bus (6000) */
57 * Information about nexus's.
59 * Each machine has an address of backplane slots (nexi).
60 * Each nexus is some type of adapter, whose code is the low
61 * byte of the first word of the adapter address space.
62 * At boot time the system looks through the array of available
63 * slots and finds the interconnects for the machine.
65 #define IO_CMI750 2
66 #define MAXNMCR 1
68 #define NNEXSBI 16
69 #if VAX8600 || VAXANY
70 #define NNEX8600 NNEXSBI
71 #define NEXA8600 ((struct nexus *)(0x20000000))
72 #define NEXB8600 ((struct nexus *)(0x22000000))
73 #endif
74 #if VAX780 || VAXANY
75 #define NNEX780 NNEXSBI
76 #define NEX780 ((struct nexus *)0x20000000)
77 #endif
78 #if VAX730 || VAXANY
79 #define NNEX730 NNEXSBI
80 #define NEX730 ((struct nexus *)0xf20000)
81 #endif
82 #define NEXSIZE 0x2000
84 #if VAX8600 || VAXANY
85 #define MAXNNEXUS (2 * NNEXSBI)
86 #else
87 #define MAXNNEXUS NNEXSBI
88 #endif
90 #ifdef _KERNEL
92 struct nexus {
93 union nexcsr {
94 long nex_csr;
95 u_char nex_type;
96 } nexcsr;
97 long nex_pad[NEXSIZE / sizeof (long) - 1];
100 struct sbi_attach_args {
101 int sa_nexnum; /* This nexus TR number */
102 int sa_type; /* This nexus type */
103 int sa_sbinum;
104 bus_space_tag_t sa_iot;
105 bus_space_handle_t sa_ioh;
106 bus_dma_tag_t sa_dmat;
109 /* Memory device struct. This should be somewhere else */
110 struct mem_softc {
111 struct device *sc_dev;
112 void * sc_memaddr;
113 int sc_memtype;
114 int sc_memnr;
117 struct ibus_attach_args {
118 const char *ia_type;
119 int ia_num;
120 int ia_partyp;
121 paddr_t ia_addr;
123 #endif
126 * Bits in high word of nexus's.
128 #define SBI_PARFLT (1<<31) /* sbi parity fault */
129 #define SBI_WSQFLT (1<<30) /* write sequence fault */
130 #define SBI_URDFLT (1<<29) /* unexpected read data fault */
131 #define SBI_ISQFLT (1<<28) /* interlock sequence fault */
132 #define SBI_MXTFLT (1<<27) /* multiple transmitter fault */
133 #define SBI_XMTFLT (1<<26) /* transmit fault */
135 #define NEX_CFGFLT (0xfc000000)
137 #ifndef _LOCORE
138 #if VAX780 || VAX8600 || VAXANY
139 #define NEXFLT_BITS \
140 "\20\40PARFLT\37WSQFLT\36URDFLT\35ISQFLT\34MXTFLT\33XMTFLT"
141 #endif
142 #endif
144 #define NEX_APD (1<<23) /* adaptor power down */
145 #define NEX_APU (1<<22) /* adaptor power up */
147 #define MBA_OT (1<<21) /* overtemperature */
149 #define UBA_UBINIT (1<<18) /* unibus init */
150 #define UBA_UBPDN (1<<17) /* unibus power down */
151 #define UBA_UBIC (1<<16) /* unibus initialization complete */
154 * Types for nex_type.
156 #define NEX_ANY 0 /* pseudo for handling 11/750 */
157 #define NEX_MEM4 0x08 /* 4K chips, non-interleaved mem */
158 #define NEX_MEM4I 0x09 /* 4K chips, interleaved mem */
159 #define NEX_MEM16 0x10 /* 16K chips, non-interleaved mem */
160 #define NEX_MEM16I 0x11 /* 16K chips, interleaved mem */
161 #define NEX_MBA 0x20 /* Massbus adaptor */
162 #define NEX_UBA0 0x28 /* Unibus adaptor */
163 #define NEX_UBA1 0x29 /* 4 flavours for 4 addr spaces */
164 #define NEX_UBA2 0x2a
165 #define NEX_UBA3 0x2b
166 #define NEX_DR32 0x30 /* DR32 user i'face to SBI */
167 #define NEX_CI 0x38 /* CI adaptor */
168 #define NEX_MPM0 0x40 /* Multi-port mem */
169 #define NEX_MPM1 0x41 /* Who knows why 4 different ones ? */
170 #define NEX_MPM2 0x42
171 #define NEX_MPM3 0x43
172 #define NEX_MEM64L 0x68 /* 64K chips, non-interleaved, lower */
173 #define NEX_MEM64LI 0x69 /* 64K chips, ext-interleaved, lower */
174 #define NEX_MEM64U 0x6a /* 64K chips, non-interleaved, upper */
175 #define NEX_MEM64UI 0x6b /* 64K chips, ext-interleaved, upper */
176 #define NEX_MEM64I 0x6c /* 64K chips, interleaved */
177 #define NEX_MEM256L 0x70 /* 256K chips, non-interleaved, lower */
178 #define NEX_MEM256LI 0x71 /* 256K chips, ext-interleaved, lower */
179 #define NEX_MEM256U 0x72 /* 256K chips, non-interleaved, upper */
180 #define NEX_MEM256UI 0x73 /* 256K chips, ext-interleaved, upper */
181 #define NEX_MEM256I 0x74 /* 256K chips, interleaved */
183 /* Memory classes */
184 #define M_NONE 0
185 #define M780C 1
186 #define M780EL 2
187 #define M780EU 3
189 /* Memory recover defines */
190 #define MCHK_PANIC -1
191 #define MCHK_RECOVERED 0
193 #endif /* _VAX_NEXUS_H_ */