1 1.19 thorpej /* $NetBSD: ciareg.h,v 1.19 1998/06/05 00:53:02 thorpej Exp $ */ 2 1.1 cgd 3 1.1 cgd /* 4 1.4 cgd * Copyright (c) 1995, 1996 Carnegie-Mellon University. 5 1.1 cgd * All rights reserved. 6 1.1 cgd * 7 1.10 thorpej * Authors: Chris G. Demetriou, Jason R. Thorpe 8 1.1 cgd * 9 1.1 cgd * Permission to use, copy, modify and distribute this software and 10 1.1 cgd * its documentation is hereby granted, provided that both the copyright 11 1.1 cgd * notice and this permission notice appear in all copies of the 12 1.1 cgd * software, derivative works or modified versions, and any portions 13 1.1 cgd * thereof, and that both notices appear in supporting documentation. 14 1.1 cgd * 15 1.1 cgd * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 16 1.1 cgd * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 17 1.1 cgd * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 18 1.1 cgd * 19 1.1 cgd * Carnegie Mellon requests users of this software to return to 20 1.1 cgd * 21 1.1 cgd * Software Distribution Coordinator or Software.Distribution (at) CS.CMU.EDU 22 1.1 cgd * School of Computer Science 23 1.1 cgd * Carnegie Mellon University 24 1.1 cgd * Pittsburgh PA 15213-3890 25 1.1 cgd * 26 1.1 cgd * any improvements or extensions that they make and grant Carnegie the 27 1.1 cgd * rights to redistribute these changes. 28 1.1 cgd */ 29 1.1 cgd 30 1.1 cgd /* 31 1.1 cgd * 21171 Chipset registers and constants. 32 1.1 cgd * 33 1.9 cgd * Taken from EC-QE18B-TE. 34 1.1 cgd */ 35 1.1 cgd 36 1.9 cgd #define REGVAL(r) (*(volatile int32_t *)ALPHA_PHYS_TO_K0SEG(r)) 37 1.1 cgd 38 1.1 cgd /* 39 1.1 cgd * Base addresses 40 1.1 cgd */ 41 1.6 cgd #define CIA_PCI_SMEM1 0x8000000000UL 42 1.6 cgd #define CIA_PCI_SMEM2 0x8400000000UL 43 1.6 cgd #define CIA_PCI_SMEM3 0x8500000000UL 44 1.6 cgd #define CIA_PCI_SIO1 0x8580000000UL 45 1.6 cgd #define CIA_PCI_SIO2 0x85c0000000UL 46 1.6 cgd #define CIA_PCI_DENSE 0x8600000000UL 47 1.6 cgd #define CIA_PCI_CONF 0x8700000000UL 48 1.6 cgd #define CIA_PCI_IACK 0x8720000000UL 49 1.6 cgd #define CIA_CSRS 0x8740000000UL 50 1.6 cgd #define CIA_PCI_MC_CSRS 0x8750000000UL 51 1.6 cgd #define CIA_PCI_ATRANS 0x8760000000UL 52 1.10 thorpej #define CIA_PCI_TBIA 0x8760000100UL 53 1.12 thorpej #define CIA_EV56_BWMEM 0x8800000000UL 54 1.12 thorpej #define CIA_EV56_BWIO 0x8900000000UL 55 1.12 thorpej #define CIA_EV56_BWCONF0 0x8a00000000UL 56 1.12 thorpej #define CIA_EV56_BWCONF1 0x8b00000000UL 57 1.10 thorpej 58 1.10 thorpej #define CIA_PCI_W0BASE 0x8760000400UL 59 1.10 thorpej #define CIA_PCI_W0MASK 0x8760000440UL 60 1.10 thorpej #define CIA_PCI_T0BASE 0x8760000480UL 61 1.10 thorpej 62 1.10 thorpej #define CIA_PCI_W1BASE 0x8760000500UL 63 1.10 thorpej #define CIA_PCI_W1MASK 0x8760000540UL 64 1.10 thorpej #define CIA_PCI_T1BASE 0x8760000580UL 65 1.10 thorpej 66 1.10 thorpej #define CIA_PCI_W2BASE 0x8760000600UL 67 1.10 thorpej #define CIA_PCI_W2MASK 0x8760000640UL 68 1.10 thorpej #define CIA_PCI_T2BASE 0x8760000680UL 69 1.10 thorpej 70 1.10 thorpej #define CIA_PCI_W3BASE 0x8760000700UL 71 1.10 thorpej #define CIA_PCI_W3MASK 0x8760000740UL 72 1.10 thorpej #define CIA_PCI_T3BASE 0x8760000780UL 73 1.14 thorpej 74 1.19 thorpej #define PYXIS_INT_REQ 0x87a0000000UL 75 1.14 thorpej #define PYXIS_INT_MASK 0x87a0000040UL 76 1.14 thorpej #define PYXIS_GPO 0x87a0000180UL 77 1.10 thorpej 78 1.10 thorpej /* 79 1.10 thorpej * Values for CIA_PCI_TBIA 80 1.10 thorpej */ 81 1.10 thorpej #define CIA_PCI_TBIA_NOOP 0 /* no operation */ 82 1.10 thorpej #define CIA_PCI_TBIA_LOCKED 1 /* invalidate and unlock locked tags */ 83 1.10 thorpej #define CIA_PCI_TBIA_UNLOCKED 2 /* invalidate unlocked tags */ 84 1.10 thorpej #define CIA_PCI_TBIA_ALL 3 /* invalidate and unlock all tags */ 85 1.18 thorpej 86 1.18 thorpej #define CIA_TLB_NTAGS 8 /* number of TLB entries */ 87 1.10 thorpej 88 1.10 thorpej /* 89 1.10 thorpej * Values for CIA_PCI_WnBASE 90 1.10 thorpej */ 91 1.10 thorpej #define CIA_PCI_WnBASE_W_BASE 0xfff00000 92 1.10 thorpej #define CIA_PCI_WnBASE_DAC_EN 0x00000008 /* W3BASE only */ 93 1.10 thorpej #define CIA_PCI_WnBASE_MEMCS_EN 0x00000004 /* W0BASE only */ 94 1.10 thorpej #define CIA_PCI_WnBASE_SG_EN 0x00000002 95 1.10 thorpej #define CIA_PCI_WnBASE_W_EN 0x00000001 96 1.10 thorpej 97 1.10 thorpej /* 98 1.10 thorpej * Values for CIA_PCI_WnMASK 99 1.10 thorpej */ 100 1.10 thorpej #define CIA_PCI_WnMASK_W_MASK 0xfff00000 101 1.10 thorpej #define CIA_PCI_WnMASK_1M 0x00000000 102 1.10 thorpej #define CIA_PCI_WnMASK_2M 0x00100000 103 1.10 thorpej #define CIA_PCI_WnMASK_4M 0x00300000 104 1.10 thorpej #define CIA_PCI_WnMASK_8M 0x00700000 105 1.10 thorpej #define CIA_PCI_WnMASK_16M 0x00f00000 106 1.10 thorpej #define CIA_PCI_WnMASK_32M 0x01f00000 107 1.10 thorpej #define CIA_PCI_WnMASK_64M 0x03f00000 108 1.10 thorpej #define CIA_PCI_WnMASK_128M 0x07f00000 109 1.10 thorpej #define CIA_PCI_WnMASK_256M 0x0ff00000 110 1.10 thorpej #define CIA_PCI_WnMASK_512M 0x1ff00000 111 1.10 thorpej #define CIA_PCI_WnMASK_1G 0x3ff00000 112 1.10 thorpej #define CIA_PCI_WnMASK_2G 0x7ff00000 113 1.10 thorpej #define CIA_PCI_WnMASK_4G 0xfff00000 114 1.10 thorpej 115 1.10 thorpej /* 116 1.10 thorpej * Values for CIA_PCI_TnBASE 117 1.10 thorpej */ 118 1.10 thorpej #define CIA_PCI_TnBASE_MASK 0xfffffff0 119 1.10 thorpej #define CIA_PCI_TnBASE_SHIFT 2 120 1.2 cgd 121 1.2 cgd /* 122 1.2 cgd * General CSRs 123 1.2 cgd */ 124 1.12 thorpej 125 1.12 thorpej #define CIA_CSR_REV (CIA_CSRS + 0x80) 126 1.12 thorpej 127 1.12 thorpej #define REV_MASK 0x000000ff 128 1.16 thorpej #define REV_ALT_MEM 0x00000100 129 1.17 thorpej 130 1.17 thorpej #define CIA_CSR_CTRL (CIA_CSRS + 0x100) 131 1.17 thorpej 132 1.17 thorpej #define CTRL_RCI_EN 0x00000001 133 1.17 thorpej #define CTRL_PCI_LOCK_EN 0x00000002 134 1.17 thorpej #define CTRL_PCI_LOOP_EN 0x00000004 135 1.17 thorpej #define CTRL_FST_BB_EN 0x00000008 136 1.17 thorpej #define CTRL_PCI_MST_EN 0x00000010 137 1.17 thorpej #define CTRL_PCI_MEM_EN 0x00000020 138 1.17 thorpej #define CTRL_PCI_REQ64_EN 0x00000040 139 1.17 thorpej #define CTRL_PCI_ACK64_EN 0x00000080 140 1.17 thorpej #define CTRL_ADDR_PE_EN 0x00000100 141 1.17 thorpej #define CTRL_PERR_EN 0x00000200 142 1.17 thorpej #define CTRL_FILL_ERR_EN 0x00000400 143 1.17 thorpej #define CTRL_ECC_CHK_EN 0x00001000 144 1.17 thorpej #define CTRL_CACK_EN_PE 0x00002000 145 1.17 thorpej #define CTRL_CON_IDLE_BC 0x00004000 146 1.17 thorpej #define CTRL_CSR_IOA_BYPASS 0x00008000 147 1.17 thorpej #define CTRL_IO_FLUSHREQ_EN 0x00010000 148 1.17 thorpej #define CTRL_CPU_CLUSHREQ_EN 0x00020000 149 1.17 thorpej #define CTRL_ARB_EV5_EN 0x00040000 150 1.17 thorpej #define CTRL_EN_ARB_LINK 0x00080000 151 1.17 thorpej #define CTRL_RD_TYPE 0x00300000 152 1.17 thorpej #define CTRL_RL_TYPE 0x03000000 153 1.17 thorpej #define CTRL_RM_TYPE 0x30000000 154 1.12 thorpej 155 1.12 thorpej #define CIA_CSR_CNFG (CIA_CSRS + 0x140) 156 1.12 thorpej 157 1.12 thorpej #define CNFG_BWEN 0x00000001 158 1.12 thorpej #define CNFG_MWEN 0x00000010 159 1.12 thorpej #define CNFG_DWEN 0x00000020 160 1.12 thorpej #define CNFG_WLEN 0x00000100 161 1.13 thorpej 162 1.13 thorpej #define CIA_CSR_CNFG_BITS "\20\11WLEN\6DWEN\5MWEN\1BWEN" 163 1.2 cgd 164 1.2 cgd #define CIA_CSR_HAE_MEM (CIA_CSRS + 0x400) 165 1.2 cgd 166 1.6 cgd #define HAE_MEM_REG1_START(x) (((u_int32_t)(x) & 0xe0000000UL) << 0) 167 1.6 cgd #define HAE_MEM_REG1_MASK 0x1fffffffUL 168 1.6 cgd #define HAE_MEM_REG2_START(x) (((u_int32_t)(x) & 0x0000f800UL) << 16) 169 1.6 cgd #define HAE_MEM_REG2_MASK 0x07ffffffUL 170 1.7 cgd #define HAE_MEM_REG3_START(x) (((u_int32_t)(x) & 0x000000fcUL) << 24) 171 1.6 cgd #define HAE_MEM_REG3_MASK 0x03ffffffUL 172 1.2 cgd 173 1.2 cgd #define CIA_CSR_HAE_IO (CIA_CSRS + 0x440) 174 1.3 cgd 175 1.6 cgd #define HAE_IO_REG1_START(x) 0UL 176 1.6 cgd #define HAE_IO_REG1_MASK 0x01ffffffUL 177 1.6 cgd #define HAE_IO_REG2_START(x) (((u_int32_t)(x) & 0xfe000000UL) << 0) 178 1.6 cgd #define HAE_IO_REG2_MASK 0x01ffffffUL 179 1.15 thorpej 180 1.15 thorpej #define CIA_CSR_CFG (CIA_CSRS + 0x480) 181 1.15 thorpej 182 1.15 thorpej #define CFG_CFG_MASK 0x00000003UL 183 1.7 cgd 184 1.7 cgd #define CIA_CSR_CIA_ERR (CIA_CSRS + 0x8200) 185 1.11 thorpej 186 1.11 thorpej #define CIA_ERR_COR_ERR 0x00000001 187 1.11 thorpej #define CIA_ERR_UN_COR_ERR 0x00000002 188 1.11 thorpej #define CIA_ERR_CPU_PE 0x00000004 189 1.11 thorpej #define CIA_ERR_MEM_NEM 0x00000008 190 1.11 thorpej #define CIA_ERR_PCI_SERR 0x00000010 191 1.11 thorpej #define CIA_ERR_PERR 0x00000020 192 1.11 thorpej #define CIA_ERR_PCI_ADDR_PE 0x00000040 193 1.11 thorpej #define CIA_ERR_RCVD_MAS_ABT 0x00000080 194 1.11 thorpej #define CIA_ERR_RCVD_TAR_ABT 0x00000100 195 1.11 thorpej #define CIA_ERR_PA_PTE_INV 0x00000200 196 1.11 thorpej #define CIA_ERR_FROM_WRT_ERR 0x00000400 197 1.11 thorpej #define CIA_ERR_IOA_TIMEOUT 0x00000800 198 1.11 thorpej #define CIA_ERR_LOST_COR_ERR 0x00010000 199 1.11 thorpej #define CIA_ERR_LOST_UN_COR_ERR 0x00020000 200 1.11 thorpej #define CIA_ERR_LOST_CPU_PE 0x00040000 201 1.11 thorpej #define CIA_ERR_LOST_MEM_NEM 0x00080000 202 1.11 thorpej #define CIA_ERR_LOST_PERR 0x00200000 203 1.11 thorpej #define CIA_ERR_LOST_PCI_ADDR_PE 0x00400000 204 1.11 thorpej #define CIA_ERR_LOST_RCVD_MAS_ABT 0x00800000 205 1.11 thorpej #define CIA_ERR_LOST_RCVD_TAR_ABT 0x01000000 206 1.11 thorpej #define CIA_ERR_LOST_PA_PTE_INV 0x02000000 207 1.11 thorpej #define CIA_ERR_LOST_FROM_WRT_ERR 0x04000000 208 1.11 thorpej #define CIA_ERR_LOST_IOA_TIMEOUT 0x08000000 209 1.11 thorpej #define CIA_ERR_VALID 0x80000000 210