Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * OpenSPARC T2 Processor File: PCIeDMARdAllCacheLineOffsets.s | |
5 | * Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved | |
6 | * 4150 Network Circle, Santa Clara, California 95054, U.S.A. | |
7 | * | |
8 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
9 | * | |
10 | * This program is free software; you can redistribute it and/or modify | |
11 | * it under the terms of the GNU General Public License as published by | |
12 | * the Free Software Foundation; version 2 of the License. | |
13 | * | |
14 | * This program is distributed in the hope that it will be useful, | |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | * GNU General Public License for more details. | |
18 | * | |
19 | * You should have received a copy of the GNU General Public License | |
20 | * along with this program; if not, write to the Free Software | |
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 | * | |
23 | * For the avoidance of doubt, and except that if any non-GPL license | |
24 | * choice is available it will apply instead, Sun elects to use only | |
25 | * the General Public License version 2 (GPLv2) at this time for any | |
26 | * software where a choice of GPL license versions is made | |
27 | * available with the language indicating that GPLv2 or any later version | |
28 | * may be used, or where a choice of which version of the GPL is applied is | |
29 | * otherwise unspecified. | |
30 | * | |
31 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
32 | * CA 95054 USA or visit www.sun.com if you need additional information or | |
33 | * have any questions. | |
34 | * | |
35 | * | |
36 | * ========== Copyright Header End ============================================ | |
37 | */ | |
38 | #define ENABLE_PCIE_LINK_TRAINING | |
39 | #define MAIN_PAGE_HV_ALSO | |
40 | ||
41 | #include "hboot.s" | |
42 | #include "peu_defines.h" | |
43 | ||
44 | #define DMA_DATA_ADDR 0x0000000076543000 | |
45 | ||
46 | /************************************************************************ | |
47 | Test case code start | |
48 | ************************************************************************/ | |
49 | .text | |
50 | .global main | |
51 | ||
52 | main: | |
53 | ta T_CHANGE_HPRIV | |
54 | nop | |
55 | ||
56 | ! enable bypass in IOMMU | |
57 | setx FIRE_DLC_MMU_CSR_A_CTL_ADDR, %g1, %g2 | |
58 | setx FIRE_DLC_MMU_CSR_A_CTL__BYPASS_EN, %g1, %g3 | |
59 | stx %g3, [%g2] | |
60 | ldx [%g2], %g3 | |
61 | ||
62 | DMA0: nop; nop; nop; nop; nop | |
63 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA0)) -> EnablePCIeIgCmd("DMARD", fffc000076543000, fffc000076543000, "64'h041",1) | |
64 | ||
65 | DMA1: nop; nop; nop; nop; nop | |
66 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA1)) -> EnablePCIeIgCmd("DMARD", fffc000076543081, fffc000076543081, "64'h041",1) | |
67 | ||
68 | DMA2: nop; nop; nop; nop; nop | |
69 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA2)) -> EnablePCIeIgCmd("DMARD", fffc000076543102, fffc000076543102, "64'h041",1) | |
70 | ||
71 | DMA3: nop; nop; nop; nop; nop | |
72 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA3)) -> EnablePCIeIgCmd("DMARD", fffc000076543183, fffc000076543183, "64'h041",1) | |
73 | ||
74 | DMA4: nop; nop; nop; nop; nop | |
75 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA4)) -> EnablePCIeIgCmd("DMARD", fffc000076543204, fffc000076543204, "64'h041",1) | |
76 | ||
77 | DMA5: nop; nop; nop; nop; nop | |
78 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA5)) -> EnablePCIeIgCmd("DMARD", fffc000076543285, fffc000076543285, "64'h041",1) | |
79 | ||
80 | DMA6: nop; nop; nop; nop; nop | |
81 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA6)) -> EnablePCIeIgCmd("DMARD", fffc000076543306, fffc000076543306, "64'h041",1) | |
82 | ||
83 | DMA7: nop; nop; nop; nop; nop | |
84 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA7)) -> EnablePCIeIgCmd("DMARD", fffc000076543387, fffc000076543387, "64'h041",1) | |
85 | ||
86 | DMA8: nop; nop; nop; nop; nop | |
87 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA8)) -> EnablePCIeIgCmd("DMARD", fffc000076543408, fffc000076543408, "64'h041",1) | |
88 | ||
89 | DMA9: nop; nop; nop; nop; nop | |
90 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA9)) -> EnablePCIeIgCmd("DMARD", fffc000076543489, fffc000076543489, "64'h041",1) | |
91 | ||
92 | DMA10: nop; nop; nop; nop; nop | |
93 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA10)) -> EnablePCIeIgCmd("DMARD", fffc00007654350a, fffc00007654350a, "64'h041",1) | |
94 | ||
95 | DMA11: nop; nop; nop; nop; nop | |
96 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA11)) -> EnablePCIeIgCmd("DMARD", fffc00007654358b, fffc00007654358b, "64'h041",1) | |
97 | ||
98 | DMA12: nop; nop; nop; nop; nop | |
99 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA12)) -> EnablePCIeIgCmd("DMARD", fffc00007654360c, fffc00007654360c, "64'h041",1) | |
100 | ||
101 | DMA13: nop; nop; nop; nop; nop | |
102 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA13)) -> EnablePCIeIgCmd("DMARD", fffc00007654368d, fffc00007654368d, "64'h041",1) | |
103 | ||
104 | DMA14: nop; nop; nop; nop; nop | |
105 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA14)) -> EnablePCIeIgCmd("DMARD", fffc00007654370e, fffc00007654370e, "64'h041",1) | |
106 | ||
107 | DMA15: nop; nop; nop; nop; nop | |
108 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA15)) -> EnablePCIeIgCmd("DMARD", fffc00007654378f, fffc00007654378f, "64'h041",1) | |
109 | ||
110 | DMA16: nop; nop; nop; nop; nop | |
111 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA16)) -> EnablePCIeIgCmd("DMARD", fffc000076543810, fffc000076543810, "64'h041",1) | |
112 | ||
113 | DMA17: nop; nop; nop; nop; nop | |
114 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA17)) -> EnablePCIeIgCmd("DMARD", fffc000076543891, fffc000076543891, "64'h041",1) | |
115 | ||
116 | DMA18: nop; nop; nop; nop; nop | |
117 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA18)) -> EnablePCIeIgCmd("DMARD", fffc000076543912, fffc000076543912, "64'h041",1) | |
118 | ||
119 | DMA19: nop; nop; nop; nop; nop | |
120 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA19)) -> EnablePCIeIgCmd("DMARD", fffc000076543993, fffc000076543993, "64'h041",1) | |
121 | ||
122 | DMA20: nop; nop; nop; nop; nop | |
123 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA20)) -> EnablePCIeIgCmd("DMARD", fffc000076543a14, fffc000076543a14, "64'h041",1) | |
124 | ||
125 | DMA21: nop; nop; nop; nop; nop | |
126 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA21)) -> EnablePCIeIgCmd("DMARD", fffc000076543a95, fffc000076543a95, "64'h041",1) | |
127 | ||
128 | DMA22: nop; nop; nop; nop; nop | |
129 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA22)) -> EnablePCIeIgCmd("DMARD", fffc000076543b16, fffc000076543b16, "64'h041",1) | |
130 | ||
131 | DMA23: nop; nop; nop; nop; nop | |
132 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA23)) -> EnablePCIeIgCmd("DMARD", fffc000076543b97, fffc000076543b97, "64'h041",1) | |
133 | ||
134 | DMA24: nop; nop; nop; nop; nop | |
135 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA24)) -> EnablePCIeIgCmd("DMARD", fffc000076543c18, fffc000076543c18, "64'h041",1) | |
136 | ||
137 | DMA25: nop; nop; nop; nop; nop | |
138 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA25)) -> EnablePCIeIgCmd("DMARD", fffc000076543c99, fffc000076543c99, "64'h041",1) | |
139 | ||
140 | DMA26: nop; nop; nop; nop; nop | |
141 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA26)) -> EnablePCIeIgCmd("DMARD", fffc000076543d1a, fffc000076543d1a, "64'h041",1) | |
142 | ||
143 | DMA27: nop; nop; nop; nop; nop | |
144 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA27)) -> EnablePCIeIgCmd("DMARD", fffc000076543d9b, fffc000076543d9b, "64'h041",1) | |
145 | ||
146 | DMA28: nop; nop; nop; nop; nop | |
147 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA28)) -> EnablePCIeIgCmd("DMARD", fffc000076543e1c, fffc000076543e1c, "64'h041",1) | |
148 | ||
149 | DMA29: nop; nop; nop; nop; nop | |
150 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA29)) -> EnablePCIeIgCmd("DMARD", fffc000076543e9d, fffc000076543e9d, "64'h041",1) | |
151 | ||
152 | DMA30: nop; nop; nop; nop; nop | |
153 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA30)) -> EnablePCIeIgCmd("DMARD", fffc000076543f1e, fffc000076543f1e, "64'h041",1) | |
154 | ||
155 | DMA31: nop; nop; nop; nop; nop | |
156 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA31)) -> EnablePCIeIgCmd("DMARD", fffc00007654401f, fffc00007654401f, "64'h041",1) | |
157 | ||
158 | DMA32: nop; nop; nop; nop; nop | |
159 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA32)) -> EnablePCIeIgCmd("DMARD", fffc0000765440a0, fffc0000765440a0, "64'h041",1) | |
160 | ||
161 | DMA33: nop; nop; nop; nop; nop | |
162 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA33)) -> EnablePCIeIgCmd("DMARD", fffc000076544121, fffc000076544121, "64'h041",1) | |
163 | ||
164 | DMA34: nop; nop; nop; nop; nop | |
165 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA34)) -> EnablePCIeIgCmd("DMARD", fffc0000765441a2, fffc0000765441a2, "64'h041",1) | |
166 | ||
167 | DMA35: nop; nop; nop; nop; nop | |
168 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA35)) -> EnablePCIeIgCmd("DMARD", fffc000076544223, fffc000076544223, "64'h041",1) | |
169 | ||
170 | DMA36: nop; nop; nop; nop; nop | |
171 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA36)) -> EnablePCIeIgCmd("DMARD", fffc0000765442a4, fffc0000765442a4, "64'h041",1) | |
172 | ||
173 | DMA37: nop; nop; nop; nop; nop | |
174 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA37)) -> EnablePCIeIgCmd("DMARD", fffc000076544325, fffc000076544325, "64'h041",1) | |
175 | ||
176 | DMA38: nop; nop; nop; nop; nop | |
177 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA38)) -> EnablePCIeIgCmd("DMARD", fffc0000765443a6, fffc0000765443a6, "64'h041",1) | |
178 | ||
179 | DMA39: nop; nop; nop; nop; nop | |
180 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA39)) -> EnablePCIeIgCmd("DMARD", fffc000076544427, fffc000076544427, "64'h041",1) | |
181 | ||
182 | DMA40: nop; nop; nop; nop; nop | |
183 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA40)) -> EnablePCIeIgCmd("DMARD", fffc0000765444a8, fffc0000765444a8, "64'h041",1) | |
184 | ||
185 | DMA41: nop; nop; nop; nop; nop | |
186 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA41)) -> EnablePCIeIgCmd("DMARD", fffc000076544529, fffc000076544529, "64'h041",1) | |
187 | ||
188 | DMA42: nop; nop; nop; nop; nop | |
189 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA42)) -> EnablePCIeIgCmd("DMARD", fffc0000765445aa, fffc0000765445aa, "64'h041",1) | |
190 | ||
191 | DMA43: nop; nop; nop; nop; nop | |
192 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA43)) -> EnablePCIeIgCmd("DMARD", fffc00007654462b, fffc00007654462b, "64'h041",1) | |
193 | ||
194 | DMA44: nop; nop; nop; nop; nop | |
195 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA44)) -> EnablePCIeIgCmd("DMARD", fffc0000765446ac, fffc0000765446ac, "64'h041",1) | |
196 | ||
197 | DMA45: nop; nop; nop; nop; nop | |
198 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA45)) -> EnablePCIeIgCmd("DMARD", fffc00007654472d, fffc00007654472d, "64'h041",1) | |
199 | ||
200 | DMA46: nop; nop; nop; nop; nop | |
201 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA46)) -> EnablePCIeIgCmd("DMARD", fffc0000765447ae, fffc0000765447ae, "64'h041",1) | |
202 | ||
203 | DMA47: nop; nop; nop; nop; nop | |
204 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA47)) -> EnablePCIeIgCmd("DMARD", fffc00007654482f, fffc00007654482f, "64'h041",1) | |
205 | ||
206 | DMA48: nop; nop; nop; nop; nop | |
207 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA48)) -> EnablePCIeIgCmd("DMARD", fffc0000765448b0, fffc0000765448b0, "64'h041",1) | |
208 | ||
209 | DMA49: nop; nop; nop; nop; nop | |
210 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA49)) -> EnablePCIeIgCmd("DMARD", fffc000076544931, fffc000076544931, "64'h041",1) | |
211 | ||
212 | DMA50: nop; nop; nop; nop; nop | |
213 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA50)) -> EnablePCIeIgCmd("DMARD", fffc0000765449b2, fffc0000765449b2, "64'h041",1) | |
214 | ||
215 | DMA51: nop; nop; nop; nop; nop | |
216 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA51)) -> EnablePCIeIgCmd("DMARD", fffc000076544a33, fffc000076544a33, "64'h041",1) | |
217 | ||
218 | DMA52: nop; nop; nop; nop; nop | |
219 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA52)) -> EnablePCIeIgCmd("DMARD", fffc000076544ab4, fffc000076544ab4, "64'h041",1) | |
220 | ||
221 | DMA53: nop; nop; nop; nop; nop | |
222 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA53)) -> EnablePCIeIgCmd("DMARD", fffc000076544b35, fffc000076544b35, "64'h041",1) | |
223 | ||
224 | DMA54: nop; nop; nop; nop; nop | |
225 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA54)) -> EnablePCIeIgCmd("DMARD", fffc000076544bb6, fffc000076544bb6, "64'h041",1) | |
226 | ||
227 | DMA55: nop; nop; nop; nop; nop | |
228 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA55)) -> EnablePCIeIgCmd("DMARD", fffc000076544c37, fffc000076544c37, "64'h041",1) | |
229 | ||
230 | DMA56: nop; nop; nop; nop; nop | |
231 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA56)) -> EnablePCIeIgCmd("DMARD", fffc000076544cb8, fffc000076544cb8, "64'h041",1) | |
232 | ||
233 | DMA57: nop; nop; nop; nop; nop | |
234 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA57)) -> EnablePCIeIgCmd("DMARD", fffc000076544d39, fffc000076544d39, "64'h041",1) | |
235 | ||
236 | DMA58: nop; nop; nop; nop; nop | |
237 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA58)) -> EnablePCIeIgCmd("DMARD", fffc000076544dba, fffc000076544dba, "64'h041",1) | |
238 | ||
239 | DMA59: nop; nop; nop; nop; nop | |
240 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA59)) -> EnablePCIeIgCmd("DMARD", fffc000076544e3b, fffc000076544e3b, "64'h041",1) | |
241 | ||
242 | DMA60: nop; nop; nop; nop; nop | |
243 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA60)) -> EnablePCIeIgCmd("DMARD", fffc000076544ebc, fffc000076544ebc, "64'h041",1) | |
244 | ||
245 | DMA61: nop; nop; nop; nop; nop | |
246 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA61)) -> EnablePCIeIgCmd("DMARD", fffc000076544f3d, fffc000076544f3d, "64'h041",1) | |
247 | ||
248 | DMA62: nop; nop; nop; nop; nop | |
249 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA62)) -> EnablePCIeIgCmd("DMARD", fffc00007654503e, fffc00007654503e, "64'h041",1) | |
250 | ||
251 | DMA63: nop; nop; nop; nop; nop | |
252 | ! $EV trig_pc_d(1,@VA(.MAIN.DMA63)) -> EnablePCIeIgCmd("DMARD", fffc0000765450bf, fffc0000765450bf, "64'h041",1) | |
253 | ||
254 | ||
255 | ||
256 | ! select a CSR in the PIU and transmit the command to NCU | |
257 | ||
258 | setx FIRE_PLC_TLU_CTB_TLR_CSR_A_TLU_CTL_ADDR, %g1, %g2 | |
259 | setx 0x020, %g1, %g4 | |
260 | ||
261 | delay_loop: | |
262 | ldx [%g2], %g5 | |
263 | nop | |
264 | nop | |
265 | nop | |
266 | nop | |
267 | dec %g4 | |
268 | brnz %g4, delay_loop | |
269 | nop | |
270 | ||
271 | test_passed: | |
272 | EXIT_GOOD | |
273 | ||
274 | test_failed: | |
275 | EXIT_BAD | |
276 | ||
277 | ||
278 | /************************************************************************ | |
279 | Test case data start | |
280 | ************************************************************************/ | |
281 | ||
282 | SECTION .DATA DATA_VA=DMA_DATA_ADDR | |
283 | attr_data { | |
284 | Name = .DATA, | |
285 | hypervisor, | |
286 | compressimage | |
287 | } | |
288 | .data | |
289 | init_mem(0x0101010201030104, 1024*8, 8, +, 0, +, 0x0004000400040004) | |
290 | ||
291 | /************************************************************************/ |