Home | History | Annotate | Line # | Download | only in include
nexus.h revision 1.12
      1 /*	$NetBSD: nexus.h,v 1.12 1996/08/20 14:19:43 ragge Exp $	*/
      2 
      3 /*-
      4  * Copyright (c) 1982, 1986 The Regents of the University of California.
      5  * All rights reserved.
      6  *
      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. All advertising materials mentioning features or use of this software
     16  *    must display the following acknowledgement:
     17  *	This product includes software developed by the University of
     18  *	California, Berkeley and its contributors.
     19  * 4. Neither the name of the University nor the names of its contributors
     20  *    may be used to endorse or promote products derived from this software
     21  *    without specific prior written permission.
     22  *
     23  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     27  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     29  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33  * SUCH DAMAGE.
     34  *
     35  *	@(#)nexus.h	7.3 (Berkeley) 5/9/91
     36  */
     37 
     38 #ifndef _VAX_NEXUS_H_
     39 #define _VAX_NEXUS_H_
     40 /*
     41  * Different definitions for nicer autoconf probing.
     42  */
     43 #define VAX_SBIBUS      1       /* SBI parent; 780/790 */
     44 #define VAX_CPUBUS      2       /* Has backplane CPU */
     45 #define VAX_MEMBUS      4       /* Has backplane memory */
     46 #define VAX_UNIBUS      8       /* Directly attached (630/650) */
     47 #define VAX_VSBUS       16      /* VAXstation board */
     48 #define VAX_BIBUS       32      /* BI bus expansions: 8200/8800 */
     49 #define VAX_CMIBUS	64	/* CMI backplane (750) */
     50 
     51 /*
     52  * Information about nexus's.
     53  *
     54  * Each machine has an address of backplane slots (nexi).
     55  * Each nexus is some type of adapter, whose code is the low
     56  * byte of the first word of the adapter address space.
     57  * At boot time the system looks through the array of available
     58  * slots and finds the interconnects for the machine.
     59  */
     60 #define IO_CMI750       2
     61 #define MAXNMCR         1
     62 
     63 #define	NNEXSBI		16
     64 #if VAX8600
     65 #define	NNEX8600	NNEXSBI
     66 #define	NEXA8600	((struct nexus *)(0x20000000))
     67 #define	NEXB8600	((struct nexus *)(0x22000000))
     68 #endif
     69 #if VAX780
     70 #define	NNEX780	NNEXSBI
     71 #define	NEX780	((struct nexus *)0x20000000)
     72 #endif
     73 #if VAX730
     74 #define	NNEX730	NNEXSBI
     75 #define	NEX730	((struct nexus *)0xf20000)
     76 #endif
     77 #define	NEXSIZE	0x2000
     78 
     79 #if VAX8600
     80 #define	MAXNNEXUS (2 * NNEXSBI)
     81 #else
     82 #define	MAXNNEXUS NNEXSBI
     83 #endif
     84 
     85 #ifndef _LOCORE
     86 
     87 #include <sys/types.h>
     88 
     89 struct	nexus {
     90 	union nexcsr {
     91 		long	nex_csr;
     92 		u_char	nex_type;
     93 	} nexcsr;
     94 	long	nex_pad[NEXSIZE / sizeof (long) - 1];
     95 };
     96 
     97 struct sbi_attach_args {
     98 	u_int	nexnum; 	/* This nexus TR number */
     99 	u_int	type;		/* This nexus type */
    100 	int	nexinfo;	/* Some info sent between attach & match */
    101 	void	*nexaddr;	/* Virtual address of this nexus */
    102 };
    103 
    104 /* Memory device struct. This should be somewhere else */
    105 struct mem_softc {
    106 	struct	device sc_dev;
    107 	caddr_t	sc_memaddr;
    108 	int	sc_memtype;
    109 	int	sc_memnr;
    110 };
    111 
    112 struct bp_conf {
    113 	char *type;
    114 	int num;
    115 	int partyp;
    116 	int bp_addr;
    117 };
    118 
    119 extern caddr_t *nex_vec;
    120 #define nex_vec_num(ipl, nexnum) nex_vec[(ipl-14)*16+nexnum]
    121 
    122 #endif
    123 
    124 /*
    125  * Bits in high word of nexus's.
    126  */
    127 #define	SBI_PARFLT	(1<<31)		/* sbi parity fault */
    128 #define	SBI_WSQFLT	(1<<30)		/* write sequence fault */
    129 #define	SBI_URDFLT	(1<<29)		/* unexpected read data fault */
    130 #define	SBI_ISQFLT	(1<<28)		/* interlock sequence fault */
    131 #define	SBI_MXTFLT	(1<<27)		/* multiple transmitter fault */
    132 #define	SBI_XMTFLT	(1<<26)		/* transmit fault */
    133 
    134 #define	NEX_CFGFLT	(0xfc000000)
    135 
    136 #ifndef _LOCORE
    137 #if defined(VAX780) || defined(VAX8600)
    138 #define	NEXFLT_BITS \
    139 "\20\40PARFLT\37WSQFLT\36URDFLT\35ISQFLT\34MXTFLT\33XMTFLT"
    140 #endif
    141 #endif
    142 
    143 #define	NEX_APD		(1<<23)		/* adaptor power down */
    144 #define	NEX_APU		(1<<22)		/* adaptor power up */
    145 
    146 #define	MBA_OT		(1<<21)		/* overtemperature */
    147 
    148 #define	UBA_UBINIT	(1<<18)		/* unibus init */
    149 #define	UBA_UBPDN	(1<<17)		/* unibus power down */
    150 #define	UBA_UBIC	(1<<16)		/* unibus initialization complete */
    151 
    152 /*
    153  * Types for nex_type.
    154  */
    155 #define	NEX_ANY		0		/* pseudo for handling 11/750 */
    156 #define	NEX_MEM4	0x08		/* 4K chips, non-interleaved mem */
    157 #define	NEX_MEM4I	0x09		/* 4K chips, interleaved mem */
    158 #define	NEX_MEM16	0x10		/* 16K chips, non-interleaved mem */
    159 #define	NEX_MEM16I	0x11		/* 16K chips, interleaved mem */
    160 #define	NEX_MBA		0x20		/* Massbus adaptor */
    161 #define	NEX_UBA0	0x28		/* Unibus adaptor */
    162 #define	NEX_UBA1	0x29		/* 4 flavours for 4 addr spaces */
    163 #define	NEX_UBA2	0x2a
    164 #define	NEX_UBA3	0x2b
    165 #define	NEX_DR32	0x30		/* DR32 user i'face to SBI */
    166 #define	NEX_CI		0x38		/* CI adaptor */
    167 #define	NEX_MPM0	0x40		/* Multi-port mem */
    168 #define	NEX_MPM1	0x41		/* Who knows why 4 different ones ? */
    169 #define	NEX_MPM2	0x42
    170 #define	NEX_MPM3	0x43
    171 #define	NEX_MEM64L	0x68		/* 64K chips, non-interleaved, lower */
    172 #define	NEX_MEM64LI	0x69		/* 64K chips, ext-interleaved, lower */
    173 #define	NEX_MEM64U	0x6a		/* 64K chips, non-interleaved, upper */
    174 #define	NEX_MEM64UI	0x6b		/* 64K chips, ext-interleaved, upper */
    175 #define	NEX_MEM64I	0x6c		/* 64K chips, interleaved */
    176 #define	NEX_MEM256L	0x70		/* 256K chips, non-interleaved, lower */
    177 #define	NEX_MEM256LI	0x71		/* 256K chips, ext-interleaved, lower */
    178 #define	NEX_MEM256U	0x72		/* 256K chips, non-interleaved, upper */
    179 #define	NEX_MEM256UI	0x73		/* 256K chips, ext-interleaved, upper */
    180 #define	NEX_MEM256I	0x74		/* 256K chips, interleaved */
    181 
    182 /* Memory classes */
    183 #define	M780C		0
    184 #define	M780EL		1
    185 #define	M780EU		2
    186 
    187 /* Memory recover defines */
    188 #define	MCHK_PANIC	-1
    189 #define	MCHK_RECOVERED	0
    190 
    191 #ifndef	_LOCORE
    192 struct	nexus *nexus;
    193 #endif
    194 
    195 #endif /* _VAX_NEXUS_H_ */
    196