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