1 1.5 msaitoh /* $NetBSD: ttwogareg.h,v 1.5 2021/12/05 04:31:06 msaitoh Exp $ */ 2 1.1 thorpej 3 1.1 thorpej /*- 4 1.1 thorpej * Copyright (c) 1999 The NetBSD Foundation, Inc. 5 1.1 thorpej * All rights reserved. 6 1.1 thorpej * 7 1.1 thorpej * This code is derived from software contributed to The NetBSD Foundation 8 1.1 thorpej * by Jason R. Thorpe. 9 1.1 thorpej * 10 1.1 thorpej * Redistribution and use in source and binary forms, with or without 11 1.1 thorpej * modification, are permitted provided that the following conditions 12 1.1 thorpej * are met: 13 1.1 thorpej * 1. Redistributions of source code must retain the above copyright 14 1.1 thorpej * notice, this list of conditions and the following disclaimer. 15 1.1 thorpej * 2. Redistributions in binary form must reproduce the above copyright 16 1.1 thorpej * notice, this list of conditions and the following disclaimer in the 17 1.1 thorpej * documentation and/or other materials provided with the distribution. 18 1.1 thorpej * 19 1.1 thorpej * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20 1.1 thorpej * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 1.1 thorpej * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22 1.1 thorpej * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23 1.1 thorpej * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 1.1 thorpej * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 1.1 thorpej * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 1.1 thorpej * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 1.1 thorpej * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 1.1 thorpej * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 1.1 thorpej * POSSIBILITY OF SUCH DAMAGE. 30 1.1 thorpej */ 31 1.1 thorpej 32 1.1 thorpej /* 33 1.1 thorpej * Register description for the Digital Equipment Corp. T2 Gate Array, 34 1.1 thorpej * the CBUS->PCI bridge found in the Sable, Sable-Gamma, and Lynx. 35 1.1 thorpej * 36 1.1 thorpej * Note all CBUS registers on the Sable are located in the T2. The 37 1.1 thorpej * T2 is located at address 3.8E00.0000. 38 1.1 thorpej */ 39 1.1 thorpej 40 1.1 thorpej /* 41 1.1 thorpej * CBUS address bias for the Sable-Gamma and Lynx (EV5) 42 1.1 thorpej */ 43 1.1 thorpej #define T2_GAMMA_CBUS_BIAS 0x8000000000UL 44 1.1 thorpej 45 1.1 thorpej extern bus_addr_t ttwoga_gamma_cbus_bias; 46 1.1 thorpej 47 1.4 matt #define REGVAL(r) (*(volatile uint64_t *) \ 48 1.1 thorpej ALPHA_PHYS_TO_K0SEG(ttwoga_gamma_cbus_bias + (r))) 49 1.1 thorpej 50 1.1 thorpej /* 51 1.1 thorpej * Sable/T2 System Address Map. There is a 34-bit physical address space. 52 1.1 thorpej * 53 1.1 thorpej * 0.0000.0000 Physical memory (2G - cached) 54 1.1 thorpej * 55 1.1 thorpej * 0.8000.0000 Reserved (2G - cached) 56 1.1 thorpej * 57 1.1 thorpej * 1.0000.0000 Allocate invalid (2G - uncached) 58 1.1 thorpej * 59 1.1 thorpej * 1.8000.0000 PCI 1 Dense Memory (2G - uncached) 60 1.1 thorpej * 61 1.1 thorpej * 2.0000.0000 PCI 0 Sparse Memory (4G - uncached, 128M addressable) 62 1.1 thorpej * 63 1.1 thorpej * 3.0000.0000 PCI 1 Sparse Memory (2G - uncached, 64M addressable) 64 1.1 thorpej * 65 1.1 thorpej * 3.8000.0000 CBUS CSRs (256M - uncached) 66 1.1 thorpej * 67 1.1 thorpej * 3.9000.0000 PCI 0 Configuration (128M - uncached) 68 1.1 thorpej * 69 1.1 thorpej * 3.9800.0000 PCI 1 Configuration (128M - uncached) 70 1.1 thorpej * 71 1.1 thorpej * 3.a000.0000 PCI 0 Sparse I/O (256M - uncached, 8M addressable) 72 1.1 thorpej * 73 1.1 thorpej * 3.b000.0000 PCI 1 Sparse I/O (256M - uncached, 8M addressable) 74 1.1 thorpej * 75 1.1 thorpej * 3.c000.0000 PCI 0 Dense Memory (1G - uncached) 76 1.1 thorpej */ 77 1.1 thorpej 78 1.1 thorpej #define T2_PCI1_DMEM_BASE 0x180000000UL 79 1.1 thorpej 80 1.1 thorpej #define T2_PCI0_SMEM_BASE 0x200000000UL 81 1.1 thorpej 82 1.1 thorpej #define T2_PCI1_SMEM_BASE 0x300000000UL 83 1.1 thorpej 84 1.1 thorpej #define T2_CBUS_BASE 0x380000000UL 85 1.1 thorpej 86 1.1 thorpej #define T2_PCI0_CONF_BASE 0x390000000UL 87 1.1 thorpej 88 1.1 thorpej #define T2_PCI1_CONF_BASE 0x398000000UL 89 1.1 thorpej 90 1.1 thorpej #define T2_PCI0_SIO_BASE 0x3a0000000UL 91 1.1 thorpej 92 1.1 thorpej #define T2_PCI1_SIO_BASE 0x3b0000000UL 93 1.1 thorpej 94 1.1 thorpej #define T2_PCI0_DMEM_BASE 0x3c0000000UL 95 1.1 thorpej 96 1.1 thorpej 97 1.1 thorpej /* 98 1.1 thorpej * CBUS address map: 99 1.1 thorpej * 100 1.1 thorpej * 3.8000.0000 CPU0 CSRs 101 1.1 thorpej * 3.8100.0000 CPU1 CSRs 102 1.1 thorpej * 3.8200.0000 CPU2 CSRs 103 1.1 thorpej * 3.8300.0000 CPU3 CSRs 104 1.1 thorpej * 3.8400.0000 reserved 105 1.1 thorpej * 3.8700.0000 reserved 106 1.1 thorpej * 3.8800.0000 MEM0 CSRs 107 1.1 thorpej * 3.8900.0000 MEM1 CSRs 108 1.1 thorpej * 3.8a00.0000 MEM2 CSRs 109 1.1 thorpej * 3.8b00.0000 MEM3 CSRs 110 1.1 thorpej * 3.8c00.0000 reserved 111 1.1 thorpej * 3.8e00.0000 T2 Gate Array (PCI interface) 112 1.1 thorpej * 3.8f00.0000 Expansion I/O 113 1.1 thorpej */ 114 1.1 thorpej #define T2_CBUS_SLOT_STRIDE 0x01000000UL 115 1.1 thorpej 116 1.1 thorpej #define T2_CBUS_CPUn_BASE(n) (T2_CBUS_BASE + 0x00000000UL + \ 117 1.1 thorpej ((n) * T2_CBUS_SLOT_STRIDE)) 118 1.1 thorpej #if 0 119 1.1 thorpej #define T2_CBUS_CPU0_BASE (T2_CBUS_BASE + 0x00000000UL) 120 1.1 thorpej #define T2_CBUS_CPU1_BASE (T2_CBUS_BASE + 0x01000000UL) 121 1.1 thorpej #define T2_CBUS_CPU2_BASE (T2_CBUS_BASE + 0x02000000UL) 122 1.1 thorpej #define T2_CBUS_CPU3_BASE (T2_CBUS_BASE + 0x03000000UL) 123 1.1 thorpej #endif 124 1.1 thorpej #define T2_CBUS_MEMn_BASE(n) (T2_CBUS_BASE + 0x08000000UL + \ 125 1.1 thorpej ((n) * T2_CBUS_SLOT_STRIDE)) 126 1.1 thorpej #if 0 127 1.1 thorpej #define T2_CBUS_MEM0_BASE (T2_CBUS_BASE + 0x08000000UL) 128 1.1 thorpej #define T2_CBUS_MEM1_BASE (T2_CBUS_BASE + 0x09000000UL) 129 1.1 thorpej #define T2_CBUS_MEM2_BASE (T2_CBUS_BASE + 0x0a000000UL) 130 1.1 thorpej #define T2_CBUS_MEM3_BASE (T2_CBUS_BASE + 0x0b000000UL) 131 1.1 thorpej #endif 132 1.1 thorpej #define T2_CBUS_TTWOGA_BASE (T2_CBUS_BASE + 0x0e000000UL) 133 1.1 thorpej #define T2_CBUS_EXPIO_BASE (T2_CBUS_BASE + 0x0f000000UL) 134 1.1 thorpej 135 1.1 thorpej 136 1.1 thorpej /* 137 1.1 thorpej * CBUS CPU module control/status registers. 138 1.1 thorpej */ 139 1.1 thorpej #define T2_SABLE_BCC 0x00000000 /* Backup Cache Control */ 140 1.1 thorpej 141 1.1 thorpej #define T2_SABLE_BCCE 0x00000020 /* Backup Cache Correctable Error */ 142 1.1 thorpej 143 1.1 thorpej #define T2_SABLE_BCCEA 0x00000040 /* Backup Cache Correctable Error 144 1.1 thorpej Address (latched) */ 145 1.1 thorpej 146 1.1 thorpej #define T2_SABLE_BCUE 0x00000080 /* Backup Cache Uncorrectable Error */ 147 1.1 thorpej 148 1.1 thorpej #define T2_SABLE_BCUEA 0x000000a0 /* Backup Cache Uncorrectable Error 149 1.1 thorpej Address (latched) */ 150 1.1 thorpej 151 1.1 thorpej #define T2_SABLE_DTER 0x000000c0 /* Duplicate Tag Error */ 152 1.1 thorpej 153 1.1 thorpej #define T2_SABLE_CBCTL 0x000000e0 /* CBUS Control */ 154 1.1 thorpej 155 1.1 thorpej #define T2_SABLE_CBE 0x00000100 /* CBUS Error */ 156 1.1 thorpej 157 1.1 thorpej #define T2_SABLE_CBEAL 0x00000120 /* CBUS Error Address Low (latched) */ 158 1.1 thorpej 159 1.1 thorpej #define T2_SABLE_CBEAH 0x00000140 /* CBUS Error Address High (latched) */ 160 1.1 thorpej 161 1.1 thorpej #define T2_SABLE_PMBX 0x00000180 /* Processor Mailbox */ 162 1.1 thorpej 163 1.1 thorpej #define T2_SABLE_IPIR 0x000001a0 /* Interprocessor Interrupt Request */ 164 1.1 thorpej 165 1.1 thorpej #define T2_SABLE_SIC 0x000001c0 /* System Interrupt Clear */ 166 1.1 thorpej 167 1.1 thorpej #define T2_SABLE_ADLK 0x000001e0 /* Address Lock */ 168 1.1 thorpej 169 1.1 thorpej #define T2_SABLE_MADRL 0x00000200 /* CBUS Miss Address */ 170 1.1 thorpej 171 1.1 thorpej #define T2_SABLE_REV 0x00000220 /* CMIC Revision */ 172 1.1 thorpej 173 1.1 thorpej 174 1.1 thorpej /* 175 1.1 thorpej * T2 Gate Array control/status registers. 176 1.1 thorpej */ 177 1.1 thorpej #define T2_SIZE 0x4e0 178 1.1 thorpej #define _T2GA(b, r) REGVAL((T2_CBUS_TTWOGA_BASE + (T2_SIZE * (b))) + (r)) 179 1.1 thorpej #define T2GA(tcp, r) _T2GA((tcp)->tc_hose, (r)) 180 1.1 thorpej 181 1.1 thorpej #define T2_IOCSR 0x0000UL /* I/O control status */ 182 1.1 thorpej /* 0x0000000000000001UL must be zero */ 183 1.1 thorpej #define IOCSR_EL 0x0000000000000002UL /* enable loopback */ 184 1.1 thorpej #define IOCSR_ESMV 0x0000000000000004UL /* enable state mach. vis. */ 185 1.1 thorpej #define IOCSR_PDBP 0x0000000000000008UL /* PCI drive bad parity */ 186 1.1 thorpej #define IOCSR_PCIS0_1 0x0000000000000010UL /* PCI slot 0 present */ 187 1.1 thorpej #define IOCSR_PCIS0_2 0x0000000000000020UL /* PCI slot 0 present */ 188 1.1 thorpej #define IOCSR_PINT 0x0000000000000040UL /* PCI interrupt high */ 189 1.1 thorpej #define IOCSR_ENTLBEC 0x0000000000000080UL /* enable TLB error check */ 190 1.1 thorpej #define IOCSR_ENCCMDA 0x0000000000000100UL /* enable CXACK check */ 191 1.1 thorpej /* 0x0000000000000200UL must be zero */ 192 1.5 msaitoh #define IOCSR_ENXXCHG 0x0000000000000400UL /* EV5 excl. exchange enable */ 193 1.1 thorpej /* 0x0000000000000800UL must be zero */ 194 1.1 thorpej #define IOCSR_CAWWP0 0x0000000000001000UL /* CBUS c/a wr. wrong parity */ 195 1.1 thorpej #define IOCSR_CAWWP2 0x0000000000002000UL /* CBUS c/a wr. wrong parity */ 196 1.1 thorpej #define IOCSR_DWWPE 0x0000000000004000UL /* CBUS d. wr. wrong parity e */ 197 1.1 thorpej #define IOCSR_PCIS2_2 0x0000000000008000UL /* PCI slot 2 present */ 198 1.1 thorpej #define IOCSR_PSERR 0x0000000000010000UL /* power supply error */ 199 1.1 thorpej #define IOCSR_MBA7 0x0000000000020000UL /* ext. MBA<7> asserted */ 200 1.1 thorpej #define IOCSR_PCIS1_1 0x0000000000040000UL /* PCI slot 1 present */ 201 1.1 thorpej #define IOCSR_PCIS1_2 0x0000000000080000UL /* PCI slot 1 present */ 202 1.1 thorpej #define IOCSR_PDWWP1 0x0000000000100000UL /* PCI DMA WWP HW1 */ 203 1.1 thorpej #define IOCSR_PDWWP0 0x0000000000200000UL /* PCI DMA WWP HW0 */ 204 1.1 thorpej #define IOCSR_PBR 0x0000000000400000UL /* PCI bus reset */ 205 1.1 thorpej #define IOCSR_PIR 0x0000000000800000UL /* PCI interface reset */ 206 1.1 thorpej #define IOCSR_ENCOI 0x0000000001000000UL /* en. ACK,CUCERR, o-o-s */ 207 1.1 thorpej #define IOCSR_EPMS 0x0000000002000000UL /* enable PCI mem space */ 208 1.1 thorpej #define IOCSR_ETLB 0x0000000004000000UL /* enable TLB */ 209 1.1 thorpej #define IOCSR_EACC 0x0000000008000000UL /* en. atomic CBUS cycles */ 210 1.1 thorpej #define IOCSR_FTLB 0x0000000010000000UL /* flush TLB */ 211 1.1 thorpej #define IOCSR_ECPC 0x0000000020000000UL /* en. CBUS parity check */ 212 1.1 thorpej #define IOCSR_CIR 0x0000000040000000UL /* CBUS interface reset */ 213 1.1 thorpej #define IOCSR_EPL 0x0000000080000000UL /* enable PCI lock */ 214 1.1 thorpej #define IOCSR_CBBCE 0x0000000100000000UL /* CBUS bk-to-bk cycle en. */ 215 1.1 thorpej #define IOCSR_TRN 0x0000000e00000000UL /* T2 revision number */ 216 1.1 thorpej #define IOCSR_TRN_SHIFT 33 217 1.1 thorpej #define TRN_T3 4 218 1.1 thorpej #define IOCSR_SMVL 0x0000007000000000UL /* mach. state vis. select */ 219 1.1 thorpej #define IOCSR_SMVL_SHIFT 36 220 1.1 thorpej #define SMVL_CBUS_CC 0 /* CBUS cycle counter */ 221 1.1 thorpej #define SMVL_CBUS_RES 1 /* CBUS responder */ 222 1.1 thorpej #define SMVL_CBUS_COM 2 /* CBUS commander */ 223 1.1 thorpej #define SMVL_PCI_COM 3 /* PCI commander */ 224 1.1 thorpej #define SMVL_PCI_RES 4 /* PCI responder */ 225 1.1 thorpej #define SMVL_TLB_INV 5 /* TLB invalidate */ 226 1.1 thorpej #define SMVL_PCI_COR 6 /* PCI corner */ 227 1.1 thorpej #define SMVL_CBUS_COR 7 /* CBUS corner */ 228 1.1 thorpej #define IOCSR_PCIS2_2H 0x0000008000000000UL /* PCI slot 2 present */ 229 1.1 thorpej #define IOCSR_EPR 0x0000010000000000UL /* enable passive release */ 230 1.1 thorpej /* 0x00000e0000000000UL must be zero */ 231 1.1 thorpej #define IOCSR_CAWWP1 0x0000100000000000UL /* CBUS c/a wr. wrong parity */ 232 1.1 thorpej #define IOCSR_CAWWP3 0x0000200000000000UL /* CBUS c/a wr. wrong parity */ 233 1.1 thorpej #define IOCSR_DWWPO 0x0000400000000000UL /* CBUS data wr. parity odd */ 234 1.1 thorpej /* 0x000f800000000000UL must be zero */ 235 1.1 thorpej #define IOCSR_PRM 0x0010000000000000UL /* PCI read multiple */ 236 1.1 thorpej #define IOCSR_PWM 0x0020000000000000UL /* PCI write multiple */ 237 1.1 thorpej #define IOCSR_FPRDPED 0x0040000000000000UL /* force PCI RDPE detect */ 238 1.1 thorpej #define IOCSR_FPADPED 0x0080000000000000UL /* force PCI APE detect */ 239 1.1 thorpej #define IOCSR_FPWDPED 0x0100000000000000UL /* force PCI WDPE detect */ 240 1.1 thorpej #define IOCSR_EPNMI 0x0200000000000000UL /* enable PCI NMI */ 241 1.1 thorpej #define IOCSR_EPDTI 0x0400000000000000UL /* enable PCI DTI */ 242 1.1 thorpej #define IOCSR_EPSEI 0x0800000000000000UL /* enable PCI SERR */ 243 1.1 thorpej #define IOCSR_EPPEI 0x1000000000000000UL /* enable PCI PERR */ 244 1.1 thorpej #define IOCSR_ERDPC 0x2000000000000000UL /* enable PCI RDP */ 245 1.1 thorpej #define IOCSR_EADPC 0x4000000000000000UL /* enable PCI AP int */ 246 1.1 thorpej #define IOCSR_EWDPC 0x8000000000000000UL /* enable PCI WDP */ 247 1.1 thorpej 248 1.1 thorpej 249 1.1 thorpej #define T2_CERR1 0x0020UL /* CBUS error 1 */ 250 1.1 thorpej #define CERR1_URE 0x0000000000000001UL /* uncorrectable read error */ 251 1.1 thorpej #define CERR1_NAE 0x0000000000000002UL /* no acknowledge */ 252 1.1 thorpej #define CERR1_CAPE 0x0000000000000004UL /* cmd addr. parity error */ 253 1.1 thorpej #define CERR1_MCAPE 0x0000000000000008UL /* missed cmd addr par err */ 254 1.1 thorpej #define CERR1_RWDPE 0x0000000000000010UL /* resp wr data par err */ 255 1.1 thorpej #define CERR1_MRWDPE 0x0000000000000020UL /* missed rsp data par err */ 256 1.1 thorpej #define CERR1_RDPE 0x0000000000000040UL /* read data par error */ 257 1.1 thorpej #define CERR1_MRDPE 0x0000000000000080UL /* missed read data per err */ 258 1.1 thorpej #define CERR1_CAPE0 0x0000000000000100UL /* CA par err LW 0 */ 259 1.1 thorpej #define CERR1_CAPE2 0x0000000000000200UL /* CA par err LW 2 */ 260 1.1 thorpej #define CERR1_DPE0 0x0000000000000400UL /* data par err LW 0 */ 261 1.1 thorpej #define CERR1_DPE2 0x0000000000000800UL /* data par err LW 2 */ 262 1.1 thorpej #define CERR1_DPE4 0x0000000000001000UL /* data par err LW 4 */ 263 1.1 thorpej #define CERR1_DPE6 0x0000000000002000UL /* data per err LW 6 */ 264 1.1 thorpej /* 0x000000000000c000UL must be zero */ 265 1.1 thorpej #define CERR1_CWDP 0x0000000000010000UL /* cmdr wr. data par err */ 266 1.1 thorpej #define CERR1_BSE 0x0000000000020000UL /* bus sync error */ 267 1.1 thorpej #define CERR1_IPFNE 0x0000000000040000UL /* invalid PFN */ 268 1.1 thorpej /* 0x000000fffff80000UL must be zero */ 269 1.1 thorpej #define CERR1_CAPE1 0x0000010000000000UL /* CA par err LW 1 */ 270 1.1 thorpej #define CERR1_CAPE3 0x0000020000000000UL /* CA par err LW 3 */ 271 1.1 thorpej #define CERR1_DPE1 0x0000040000000000UL /* data par err LW 1 */ 272 1.1 thorpej #define CERR1_DPE3 0x0000080000000000UL /* data par err LW 3 */ 273 1.1 thorpej #define CERR1_DPE5 0x0000100000000000UL /* data par err LW 5 */ 274 1.1 thorpej #define CERR1_DPE7 0x0000200000000000UL /* data par err LW 7 */ 275 1.1 thorpej /* 0xffffc00000000000UL must be zero */ 276 1.1 thorpej 277 1.1 thorpej 278 1.1 thorpej #define T2_CERR2 0x0040UL /* CBUS error 2 */ 279 1.1 thorpej /* 280 1.1 thorpej * These bits correspond to CBUS CAD [63:00] during the 281 1.1 thorpej * command/address transfer of the failing cycle. 282 1.1 thorpej */ 283 1.1 thorpej 284 1.1 thorpej 285 1.1 thorpej #define T2_CERR3 0x0060UL /* CBUS error 3 */ 286 1.1 thorpej /* 287 1.1 thorpej * These bits correspond to CBUS CAD [127:64] during the 288 1.1 thorpej * command/address transfer of the failing cycle. 289 1.1 thorpej */ 290 1.1 thorpej 291 1.1 thorpej 292 1.1 thorpej #define T2_PERR1 0x0080UL /* PCI error 1 */ 293 1.1 thorpej #define PERR1_PWDPE 0x0000000000000001UL /* wr. data par error */ 294 1.1 thorpej #define PERR1_PAPE 0x0000000000000002UL /* addr par error */ 295 1.1 thorpej #define PERR1_PRDPE 0x0000000000000004UL /* rd. data par error */ 296 1.1 thorpej #define PERR1_PPE 0x0000000000000008UL /* parity error */ 297 1.1 thorpej #define PERR1_PSE 0x0000000000000010UL /* system error */ 298 1.1 thorpej #define PERR1_PDTE 0x0000000000000020UL /* device timeout error */ 299 1.1 thorpej #define PERR1_NMI 0x0000000000000040UL /* non-maskable interrupt */ 300 1.1 thorpej 301 1.1 thorpej 302 1.1 thorpej #define T2_PERR2 0x00a0UL /* PCI error 2 */ 303 1.1 thorpej #define PERR2_PEA 0x00000000ffffffffUL /* error address */ 304 1.1 thorpej #define PERR2_PEC 0x0000001f00000000UL /* error command */ 305 1.1 thorpej #define PERR2_PEC_SHIFT 32 306 1.1 thorpej 307 1.1 thorpej 308 1.1 thorpej #define T2_PSCR 0x00c0UL /* PCI special cycle */ 309 1.1 thorpej 310 1.1 thorpej 311 1.1 thorpej #define T2_HAE0_1 0x00e0UL /* High Address Extension 1 */ 312 1.1 thorpej #define HAE0_1_PUA1 0x000000000000001fUL 313 1.1 thorpej /* 314 1.1 thorpej * PCI Upper Address -- PCI_AD<31:27> when accessing the 128M 315 1.1 thorpej * window of PCI0 Sparse Memory. 316 1.1 thorpej */ 317 1.1 thorpej 318 1.1 thorpej 319 1.1 thorpej #define T2_HAE0_2 0x0100UL /* High Address Extension 2 */ 320 1.1 thorpej #define HAE0_2_PUA2 0x00000000000001ffUL 321 1.1 thorpej /* 322 1.1 thorpej * PCI Upper Address -- PCI_AD<31:23> when accessing the 8M 323 1.1 thorpej * window of PCI0 I/O space. 324 1.1 thorpej */ 325 1.1 thorpej 326 1.1 thorpej 327 1.1 thorpej #define T2_HBASE 0x0120UL /* PCI Hole Base */ 328 1.1 thorpej #define HBASE_PHEA 0x00000000000001ffUL /* hole end */ 329 1.1 thorpej /* 0x0000000000001e00UL must be zero */ 330 1.1 thorpej #define HBASE_PHE1 0x0000000000002000UL /* hole enable 1 */ 331 1.1 thorpej #define HBASE_PHE2 0x0000000000004000UL /* hole enable 2 */ 332 1.1 thorpej #define HBASE_PHSA 0x0000000000ff8000UL /* hole start */ 333 1.1 thorpej 334 1.1 thorpej 335 1.1 thorpej #define T2_WBASE1 0x0140UL /* Window Base 1 */ 336 1.1 thorpej #define WBASEx_PWEA 0x0000000000000fffUL /* window end */ 337 1.1 thorpej /* 0x000000000003f000UL must be zero */ 338 1.1 thorpej #define WBASEx_SGE 0x0000000000040000UL /* scatter/gather enable */ 339 1.1 thorpej #define WBASEx_PWE 0x0000000000080000UL /* PCI window enable */ 340 1.1 thorpej #define WBASEx_PWSA 0x00000000fff00000UL /* window start */ 341 1.1 thorpej #define WBASEx_PWxA_SHIFT 20 342 1.1 thorpej 343 1.1 thorpej 344 1.1 thorpej #define T2_WMASK1 0x0160UL /* Window Mask 1 */ 345 1.1 thorpej #define WMASKx_PWM 0x000000007ff00000UL /* PCI window mask */ 346 1.1 thorpej 347 1.1 thorpej 348 1.1 thorpej #define T2_TBASE1 0x0180UL /* Translated Base 1 */ 349 1.1 thorpej #define TBASEx_TBA 0x000000007ffffe00UL /* translated base address */ 350 1.1 thorpej 351 1.1 thorpej 352 1.1 thorpej #define T2_WBASE2 0x01a0UL /* Window Base 2 */ 353 1.1 thorpej 354 1.1 thorpej #define T2_WMASK2 0x01c0UL /* Window Mask 2 */ 355 1.1 thorpej 356 1.1 thorpej #define T2_TBASE2 0x01e0UL /* Translated Base 2 */ 357 1.1 thorpej 358 1.1 thorpej #define T2_TLBBR 0x0200UL /* TLB bypass */ 359 1.1 thorpej #define TLBBR_TLBBV 0x0000000000000001UL /* TLB bypass valid */ 360 1.1 thorpej #define TLBRR_TLBBD 0x000000000007fffeUL /* TLB bypass data */ 361 1.1 thorpej 362 1.1 thorpej 363 1.1 thorpej #define T2_IVRPR 0x0220UL /* IVR passive release */ 364 1.1 thorpej #define IVRPR_PRVECT 0x00000000000000ffUL /* passive release vector */ 365 1.1 thorpej 366 1.1 thorpej 367 1.1 thorpej #define T2_IVIAR 0x0220UL /* IVR interrupt address (pass 2) */ 368 1.1 thorpej #define IVIAR_IV 0x0003ffff00000000UL /* interrupt vector address */ 369 1.1 thorpej 370 1.1 thorpej 371 1.1 thorpej #define T2_HAE0_3 0x0240UL /* High Address Extension 3 (pass 2) */ 372 1.1 thorpej #define HAE0_3_PCA 0x00000000c0000000UL 373 1.1 thorpej #define HAE0_3_PCA_SHIFT 30 374 1.1 thorpej /* 375 1.1 thorpej * PCI Configuration Address -- PCI_AD<1:0> when accessing 376 1.1 thorpej * PCI configuration space, used to differentiate between 377 1.1 thorpej * Type 0 and Type 1 cycles. 378 1.1 thorpej */ 379 1.1 thorpej 380 1.1 thorpej 381 1.1 thorpej #define T2_HAE0_4 0x0260UL /* High Address Extension 4 (pass 2) */ 382 1.1 thorpej #define HAE0_4_PUA1 0x0000000000000003UL 383 1.1 thorpej /* 384 1.1 thorpej * PCI Upper Address -- PCI_AD<31:30> when accessing the 1G 385 1.1 thorpej * window of PCI0 Dense Memory. 386 1.1 thorpej */ 387 1.1 thorpej 388 1.1 thorpej 389 1.1 thorpej #define T2_WBASE3 0x0280UL /* Window Base 3 (T3/T4) */ 390 1.1 thorpej 391 1.1 thorpej #define T2_WMASK3 0x02a0UL /* Window Mask 3 (T3/T4) */ 392 1.1 thorpej 393 1.1 thorpej #define T2_TBASE3 0x02c0UL /* Translated Base 3 (T3/T4) */ 394 1.1 thorpej 395 1.1 thorpej /* 0x02e0UL unused */ 396 1.1 thorpej 397 1.1 thorpej #define T2_TDR0 0x0300UL /* TLB Data 0 */ 398 1.1 thorpej #define TDRx_TLBTD 0x000000003fffffffUL /* TLB entry tag */ 399 1.1 thorpej #define TDRx_TLBV 0x0000000100000000UL /* TLB entry valid */ 400 1.1 thorpej #define TDRx_TLBPFN 0x0003fffe00000000UL /* TLB entry data */ 401 1.1 thorpej 402 1.1 thorpej 403 1.1 thorpej #define T2_TDR1 0x0320UL /* TLB Data 1 */ 404 1.1 thorpej 405 1.1 thorpej #define T2_TDR2 0x0340UL /* TLB Data 2 */ 406 1.1 thorpej 407 1.1 thorpej #define T2_TDR3 0x0360UL /* TLB Data 3 */ 408 1.1 thorpej 409 1.1 thorpej #define T2_TDR4 0x0380UL /* TLB Data 4 */ 410 1.1 thorpej 411 1.1 thorpej #define T2_TDR5 0x03a0UL /* TLB Data 5 */ 412 1.1 thorpej 413 1.1 thorpej #define T2_TDR6 0x03c0UL /* TLB Data 6 */ 414 1.1 thorpej 415 1.1 thorpej #define T2_TDR7 0x03e0UL /* TLB Data 7 */ 416 1.1 thorpej 417 1.1 thorpej #define T2_WBASE4 0x0400UL /* Window Base 4 (T3/T4) */ 418 1.1 thorpej 419 1.1 thorpej #define T2_WMASK4 0x0420UL /* Window Mask 4 (T3/T4) */ 420 1.1 thorpej 421 1.1 thorpej #define T2_TBASE4 0x0440UL /* Translated Base 4 (T3/T4) */ 422 1.1 thorpej 423 1.1 thorpej #define T2_AIR 0x0460UL /* Address Indirection (T3/T4) */ 424 1.1 thorpej 425 1.1 thorpej #define T2_VAR 0x0480UL /* Vector Address (T3/T4) */ 426 1.1 thorpej 427 1.1 thorpej #define T2_DIR 0x04a0UL /* Data Indirection (T3/T4) */ 428 1.1 thorpej 429 1.1 thorpej #define T2_ICE 0x04c0UL /* IC enable (T3/T4) */ 430