Home | History | Annotate | Line # | Download | only in include
nexus.h revision 1.1
      1 /*-
      2  * Copyright (c) 1982, 1986 The Regents of the University of California.
      3  * All rights reserved.
      4  *
      5  * Redistribution and use in source and binary forms, with or without
      6  * modification, are permitted provided that the following conditions
      7  * are met:
      8  * 1. Redistributions of source code must retain the above copyright
      9  *    notice, this list of conditions and the following disclaimer.
     10  * 2. Redistributions in binary form must reproduce the above copyright
     11  *    notice, this list of conditions and the following disclaimer in the
     12  *    documentation and/or other materials provided with the distribution.
     13  * 3. All advertising materials mentioning features or use of this software
     14  *    must display the following acknowledgement:
     15  *	This product includes software developed by the University of
     16  *	California, Berkeley and its contributors.
     17  * 4. Neither the name of the University nor the names of its contributors
     18  *    may be used to endorse or promote products derived from this software
     19  *    without specific prior written permission.
     20  *
     21  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     27  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     30  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     31  * SUCH DAMAGE.
     32  *
     33  *	from: @(#)nexus.h	7.3 (Berkeley) 5/9/91
     34  *	$Id: nexus.h,v 1.1 1994/08/02 20:20:39 ragge Exp $
     35  */
     36 
     37 /*
     38  * Information about nexus's.
     39  *
     40  * Each machine has an address of backplane slots (nexi).
     41  * Each nexus is some type of adapter, whose code is the low
     42  * byte of the first word of the adapter address space.
     43  * At boot time the system looks through the array of available
     44  * slots and finds the interconnects for the machine.
     45  */
     46 #define IO_CMI750       2
     47 #define MAXNMCR         1
     48 
     49 #define	NNEXSBI		16
     50 #if VAX8600
     51 #define	NNEX8600	NNEXSBI
     52 #define	NEXA8600	((struct nexus *)(0x20000000))
     53 #define	NEXB8600	((struct nexus *)(0x22000000))
     54 #endif
     55 #if VAX780
     56 #define	NNEX780	NNEXSBI
     57 #define	NEX780	((struct nexus *)0x20000000)
     58 #endif
     59 #if VAX750
     60 #define	NNEX750	NNEXSBI
     61 #ifndef ASSEMBLER
     62 #define NEX750           ((struct nexus*)0xf20000)
     63 #else
     64 #define NEX750           (0xF20000)
     65 #endif
     66 #endif
     67 #if VAX730
     68 #define	NNEX730	NNEXSBI
     69 #define	NEX730	((struct nexus *)0xf20000)
     70 #endif
     71 #define	NEXSIZE	0x2000
     72 
     73 #if VAX8600
     74 #define	MAXNNEXUS (2 * NNEXSBI)
     75 #else
     76 #define	MAXNNEXUS NNEXSBI
     77 #endif
     78 
     79 #ifndef ASSEMBLER
     80 
     81 #include "sys/types.h"
     82 
     83 struct	nexus {
     84 	union nexcsr {
     85 		long	nex_csr;
     86 		u_char	nex_type;
     87 	} nexcsr;
     88 	long	nex_pad[NEXSIZE / sizeof (long) - 1];
     89 };
     90 
     91 struct iobus {
     92         int io_type;
     93         int io_addr;
     94         int io_size;
     95         int io_details;
     96 };
     97 
     98 struct nexusconnect {
     99         int psb_nnexus;
    100         struct nexus *psb_nexbase;
    101 	int psb_ubatype;
    102 	int psb_nubabdp;
    103 	caddr_t *psb_umaddr;
    104         int *psb_nextype;
    105 };
    106 
    107 extern caddr_t *nex_vec;
    108 #define nex_vec_num(ipl, nexnum) nex_vec[(ipl-14)*16+nexnum]
    109 
    110 /* XXX
    111 #ifdef	KERNEL
    112 struct nexus nexus[MAXNNEXUS];
    113 #endif
    114 */
    115 #endif
    116 
    117 /*
    118  * Bits in high word of nexus's.
    119  */
    120 #define	SBI_PARFLT	(1<<31)		/* sbi parity fault */
    121 #define	SBI_WSQFLT	(1<<30)		/* write sequence fault */
    122 #define	SBI_URDFLT	(1<<29)		/* unexpected read data fault */
    123 #define	SBI_ISQFLT	(1<<28)		/* interlock sequence fault */
    124 #define	SBI_MXTFLT	(1<<27)		/* multiple transmitter fault */
    125 #define	SBI_XMTFLT	(1<<26)		/* transmit fault */
    126 
    127 #define	NEX_CFGFLT	(0xfc000000)
    128 
    129 #ifndef LOCORE
    130 #if defined(VAX780) || defined(VAX8600)
    131 #define	NEXFLT_BITS \
    132 "\20\40PARFLT\37WSQFLT\36URDFLT\35ISQFLT\34MXTFLT\33XMTFLT"
    133 #endif
    134 #endif
    135 
    136 #define	NEX_APD		(1<<23)		/* adaptor power down */
    137 #define	NEX_APU		(1<<22)		/* adaptor power up */
    138 
    139 #define	MBA_OT		(1<<21)		/* overtemperature */
    140 
    141 #define	UBA_UBINIT	(1<<18)		/* unibus init */
    142 #define	UBA_UBPDN	(1<<17)		/* unibus power down */
    143 #define	UBA_UBIC	(1<<16)		/* unibus initialization complete */
    144 
    145 /*
    146  * Types for nex_type.
    147  */
    148 #define	NEX_ANY		0		/* pseudo for handling 11/750 */
    149 #define	NEX_MEM4	0x08		/* 4K chips, non-interleaved mem */
    150 #define	NEX_MEM4I	0x09		/* 4K chips, interleaved mem */
    151 #define	NEX_MEM16	0x10		/* 16K chips, non-interleaved mem */
    152 #define	NEX_MEM16I	0x11		/* 16K chips, interleaved mem */
    153 #define	NEX_MBA		0x20		/* Massbus adaptor */
    154 #define	NEX_UBA0	0x28		/* Unibus adaptor */
    155 #define	NEX_UBA1	0x29		/* 4 flavours for 4 addr spaces */
    156 #define	NEX_UBA2	0x2a
    157 #define	NEX_UBA3	0x2b
    158 #define	NEX_DR32	0x30		/* DR32 user i'face to SBI */
    159 #define	NEX_CI		0x38		/* CI adaptor */
    160 #define	NEX_MPM0	0x40		/* Multi-port mem */
    161 #define	NEX_MPM1	0x41		/* Who knows why 4 different ones ? */
    162 #define	NEX_MPM2	0x42
    163 #define	NEX_MPM3	0x43
    164 #define	NEX_MEM64L	0x68		/* 64K chips, non-interleaved, lower */
    165 #define	NEX_MEM64LI	0x69		/* 64K chips, ext-interleaved, lower */
    166 #define	NEX_MEM64U	0x6a		/* 64K chips, non-interleaved, upper */
    167 #define	NEX_MEM64UI	0x6b		/* 64K chips, ext-interleaved, upper */
    168 #define	NEX_MEM64I	0x6c		/* 64K chips, interleaved */
    169 #define	NEX_MEM256L	0x70		/* 256K chips, non-interleaved, lower */
    170 #define	NEX_MEM256LI	0x71		/* 256K chips, ext-interleaved, lower */
    171 #define	NEX_MEM256U	0x72		/* 256K chips, non-interleaved, upper */
    172 #define	NEX_MEM256UI	0x73		/* 256K chips, ext-interleaved, upper */
    173 #define	NEX_MEM256I	0x74		/* 256K chips, interleaved */
    174