Home | History | Annotate | Line # | Download | only in include
      1 /*	$NetBSD: ka670.h,v 1.4 2017/05/22 17:12:11 ragge Exp $	*/
      2 /*
      3  * Copyright (c) 1999 Ludd, University of Lule}, Sweden.
      4  * All rights reserved.
      5  *
      6  * This code is derived from software contributed to Ludd by Bertram Barth.
      7  *
      8  * Redistribution and use in source and binary forms, with or without
      9  * modification, are permitted provided that the following conditions
     10  * are met:
     11  * 1. Redistributions of source code must retain the above copyright
     12  *    notice, this list of conditions and the following disclaimer.
     13  * 2. Redistributions in binary form must reproduce the above copyright
     14  *    notice, this list of conditions and the following disclaimer in the
     15  *    documentation and/or other materials provided with the distribution.
     16  *
     17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27  */
     28 
     29 /*
     30  * Definitions for I/O addresses of
     31  *
     32  *	VAX 4000/300 (KA670)
     33  */
     34 #ifndef _VAX_KA670_H_
     35 #define _VAX_KA670_H_
     36 
     37 #define KA670_SIDEX	0x20040004	/* SID extension register */
     38 #define KA670_IORESET	0x20020000	/* I/O Reset register */
     39 
     40 #define KA670_ROM_BASE	0x20040000	/* System module ROM */
     41 #define KA670_ROM_END	0x2007FFFF
     42 #define KA670_ROM_SIZE	   0x40000
     43 
     44 /*
     45  * The following values refer to bits/bitfields within the 4 internal
     46  * registers controlling primary cache:
     47  * PR_PCTAG(124, tag-register)		PR_PCIDX(125, index-register)
     48  * PR_PCERR(126, error-register)	PR_PCSTS(127, status-register)
     49  */
     50 #define KA670_PCTAG_TAG		0x1FFFF800	/* bits 11-29 */
     51 #define KA670_PCTAG_PARITY	0x40000000
     52 #define KA670_PCTAG_VALID	0x80000000
     53 
     54 #define KA670_PCIDX_INDEX	0x000007F8	/* 0x100 Q-word entries */
     55 
     56 #define KA670_PCERR_ADDR		0x3FFFFFFF
     57 
     58 #define KA670_PCS_FORCEHIT	0x00000001	/* Force hit */
     59 #define KA670_PCS_ENABLE		0x00000002	/* Enable primary cache */
     60 #define KA670_PCS_FLUSH		0x00000004	/* Flush cache */
     61 #define KA670_PCS_REFRESH	0x00000008	/* Enable refresh */
     62 #define KA670_PCS_HIT		0x00000010	/* Cache hit */
     63 #define KA670_PCS_INTERRUPT	0x00000020	/* Interrupt pending */
     64 #define KA670_PCS_TRAP2		0x00000040	/* Trap while trap */
     65 #define KA670_PCS_TRAP1		0x00000080	/* Micro trap/machine check */
     66 #define KA670_PCS_TPERR		0x00000100	/* Tag parity error */
     67 #define KA670_PCS_DPERR		0x00000200	/* Dal data parity error */
     68 #define KA670_PCS_PPERR		0x00000400	/* P data parity error */
     69 #define KA670_PCS_BUSERR		0x00000800	/* Bus error */
     70 #define KA670_PCS_BCHIT		0x00001000	/* B cache hit */
     71 
     72 #define KA670_PCSTS_BITS \
     73 	"\020\015BCHIT\014BUSERR\013PPERR\012DPERR\011TPERR\010TRAP1" \
     74 	"\007TRAP2\006INTR\005HIT\004REFRESH\003FLUSH\002ENABLE\001FORCEHIT"
     75 
     76 #define KA670_BCSTS_BITS \
     77 	"\020\015BCHIT\014BUSERR\013PPERR\012DPERR\011TPERR\010TRAP1" \
     78 	"\007TRAP2\006INTR\005HIT\004REFRESH\003FLUSH\002ENABLE\001FORCEHIT"
     79 
     80 /*
     81  * Bits in PR_ACCS (Floating Point Accelerator Register)
     82  */
     83 #define KA670_ACCS_VECTOR	(1<<0)	/* Vector Unit Present */
     84 #define KA670_ACCS_FCHIP		(1<<1)	/* FPU chip present */
     85 #define KA670_ACCS_WEP		(1<<31) /* Write Even Parity */
     86 
     87 /*
     88  * CPU-specific definitions for VAX 6000/400 (Calypso/XRP).
     89  */
     90 
     91 /* Rigel SSC definitions */
     92 #define RSSC_ADDR	0x20140000	/* Phys address */
     93 #define RSSC_CONFIG	0x10		/* Offset */
     94 #define RSSC_BUSCTRL	0x20		/* Offset */
     95 #define RSSC_OPORT	0x30		/* Offset */
     96 #define RSSC_IPORT	0x40		/* Offset */
     97 
     98 #endif /* _VAX_KA670_H_ */
     99