xref: /original-bsd/sys/vax/vax/nexus.h (revision cfa2a17a)
1 /*-
2  * Copyright (c) 1982, 1986 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)nexus.h	7.3 (Berkeley) 05/09/91
8  */
9 
10 /*
11  * Information about nexus's.
12  *
13  * Each machine has an address of backplane slots (nexi).
14  * Each nexus is some type of adapter, whose code is the low
15  * byte of the first word of the adapter address space.
16  * At boot time the system looks through the array of available
17  * slots and finds the interconnects for the machine.
18  */
19 #define	NNEXSBI		16
20 #if VAX8600
21 #define	NNEX8600	NNEXSBI
22 #define	NEXA8600	((struct nexus *)(0x20000000))
23 #define	NEXB8600	((struct nexus *)(0x22000000))
24 #endif
25 #if VAX780
26 #define	NNEX780	NNEXSBI
27 #define	NEX780	((struct nexus *)0x20000000)
28 #endif
29 #if VAX750
30 #define	NNEX750	NNEXSBI
31 #define	NEX750	((struct nexus *)0xf20000)
32 #endif
33 #if VAX730
34 #define	NNEX730	NNEXSBI
35 #define	NEX730	((struct nexus *)0xf20000)
36 #endif
37 #define	NEXSIZE	0x2000
38 
39 #if VAX8600
40 #define	MAXNNEXUS (2 * NNEXSBI)
41 #else
42 #define	MAXNNEXUS NNEXSBI
43 #endif
44 
45 #ifndef LOCORE
46 struct	nexus {
47 	union nexcsr {
48 		long	nex_csr;
49 		u_char	nex_type;
50 	} nexcsr;
51 	long	nex_pad[NEXSIZE / sizeof (long) - 1];
52 };
53 #ifdef	KERNEL
54 struct nexus nexus[MAXNNEXUS];
55 #endif
56 #endif
57 
58 /*
59  * Bits in high word of nexus's.
60  */
61 #define	SBI_PARFLT	(1<<31)		/* sbi parity fault */
62 #define	SBI_WSQFLT	(1<<30)		/* write sequence fault */
63 #define	SBI_URDFLT	(1<<29)		/* unexpected read data fault */
64 #define	SBI_ISQFLT	(1<<28)		/* interlock sequence fault */
65 #define	SBI_MXTFLT	(1<<27)		/* multiple transmitter fault */
66 #define	SBI_XMTFLT	(1<<26)		/* transmit fault */
67 
68 #define	NEX_CFGFLT	(0xfc000000)
69 
70 #ifndef LOCORE
71 #if defined(VAX780) || defined(VAX8600)
72 #define	NEXFLT_BITS \
73 "\20\40PARFLT\37WSQFLT\36URDFLT\35ISQFLT\34MXTFLT\33XMTFLT"
74 #endif
75 #endif
76 
77 #define	NEX_APD		(1<<23)		/* adaptor power down */
78 #define	NEX_APU		(1<<22)		/* adaptor power up */
79 
80 #define	MBA_OT		(1<<21)		/* overtemperature */
81 
82 #define	UBA_UBINIT	(1<<18)		/* unibus init */
83 #define	UBA_UBPDN	(1<<17)		/* unibus power down */
84 #define	UBA_UBIC	(1<<16)		/* unibus initialization complete */
85 
86 /*
87  * Types for nex_type.
88  */
89 #define	NEX_ANY		0		/* pseudo for handling 11/750 */
90 #define	NEX_MEM4	0x08		/* 4K chips, non-interleaved mem */
91 #define	NEX_MEM4I	0x09		/* 4K chips, interleaved mem */
92 #define	NEX_MEM16	0x10		/* 16K chips, non-interleaved mem */
93 #define	NEX_MEM16I	0x11		/* 16K chips, interleaved mem */
94 #define	NEX_MBA		0x20		/* Massbus adaptor */
95 #define	NEX_UBA0	0x28		/* Unibus adaptor */
96 #define	NEX_UBA1	0x29		/* 4 flavours for 4 addr spaces */
97 #define	NEX_UBA2	0x2a
98 #define	NEX_UBA3	0x2b
99 #define	NEX_DR32	0x30		/* DR32 user i'face to SBI */
100 #define	NEX_CI		0x38		/* CI adaptor */
101 #define	NEX_MPM0	0x40		/* Multi-port mem */
102 #define	NEX_MPM1	0x41		/* Who knows why 4 different ones ? */
103 #define	NEX_MPM2	0x42
104 #define	NEX_MPM3	0x43
105 #define	NEX_MEM64L	0x68		/* 64K chips, non-interleaved, lower */
106 #define	NEX_MEM64LI	0x69		/* 64K chips, ext-interleaved, lower */
107 #define	NEX_MEM64U	0x6a		/* 64K chips, non-interleaved, upper */
108 #define	NEX_MEM64UI	0x6b		/* 64K chips, ext-interleaved, upper */
109 #define	NEX_MEM64I	0x6c		/* 64K chips, interleaved */
110 #define	NEX_MEM256L	0x70		/* 256K chips, non-interleaved, lower */
111 #define	NEX_MEM256LI	0x71		/* 256K chips, ext-interleaved, lower */
112 #define	NEX_MEM256U	0x72		/* 256K chips, non-interleaved, upper */
113 #define	NEX_MEM256UI	0x73		/* 256K chips, ext-interleaved, upper */
114 #define	NEX_MEM256I	0x74		/* 256K chips, interleaved */
115