Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * OpenSPARC T2 Processor File: rx_p1_MULTI_3DMA_rand_0700.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 MAIN_PAGE_HV_ALSO | |
39 | ||
40 | #include "hboot.s"rx_p0p1_MULTI_2DMA_rand_0C.s | |
41 | #include "niu_defines.h" | |
42 | #define FAIR_PKT_COUNT ((RXMAC_PKTCNT) - (RXMAC_PKTCNT%8)) | |
43 | ||
44 | .text | |
45 | .global main | |
46 | ||
47 | main: | |
48 | ta T_CHANGE_HPRIV | |
49 | nop | |
50 | # 94 "diag.j.pp" | |
51 | ! | |
52 | ! Thread 0 Start | |
53 | ! | |
54 | ! | |
55 | !@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
56 | ! Init DMA Channel 5 @@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
57 | !@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
58 | ||
59 | P_NIU_RxInitDma_0: | |
60 | setx TX_CS, %g1, %g2 | |
61 | nop ! $EV trig_pc_d(1, @VA(.MAIN.P_NIU_RxInitDma_0)) -> NIU_InitRxDma(5, RX_DESC_RING_LENGTH, RX_COMPL_RING_LEN, RBR_CONFIG_B_DATA, RX_INITIAL_KICK, 0x0, NIU_RX_MULTI_DMA) | |
62 | setx 0x5, %g1, %g4 | |
63 | delay_loop_Rx_0: | |
64 | ldxa [%g2]ASI_PRIMARY_LITTLE, %g5 | |
65 | nop | |
66 | nop | |
67 | nop | |
68 | nop | |
69 | dec %g4 | |
70 | brnz %g4, delay_loop_Rx_0 | |
71 | nop | |
72 | ||
73 | nop | |
74 | setx 0x5, %g1, %o0 | |
75 | setx 0x5, %g1, %o1 | |
76 | setx RX_DESC_RING_LENGTH, %g1, %o2 | |
77 | setx RX_COMPL_RING_LEN, %g1, %o3 | |
78 | setx RBR_CONFIG_B_DATA, %g1, %o4 | |
79 | setx RX_INITIAL_KICK, %g1, %o5 | |
80 | mov %g0, %o6 | |
81 | call NiuInitRxDma | |
82 | nop | |
83 | !@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
84 | ! Init DMA Channel 6 @@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
85 | !@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
86 | ||
87 | P_NIU_RxInitDma_1: | |
88 | nop ! $EV trig_pc_d(1, @VA(.MAIN.P_NIU_RxInitDma_1)) -> NIU_InitRxDma(6, RX_DESC_RING_LENGTH, RX_COMPL_RING_LEN, RBR_CONFIG_B_DATA, RX_INITIAL_KICK, 0x0, NIU_RX_MULTI_DMA) | |
89 | setx 0x5, %g1, %g4 | |
90 | delay_loop_Rx_1: | |
91 | ldxa [%g2]ASI_PRIMARY_LITTLE, %g5 | |
92 | nop | |
93 | nop | |
94 | nop | |
95 | nop | |
96 | dec %g4 | |
97 | brnz %g4, delay_loop_Rx_1 | |
98 | nop | |
99 | ||
100 | nop | |
101 | setx 0x6, %g1, %o0 | |
102 | setx 0x6, %g1, %l2 | |
103 | setx RX_DESC_RING_LENGTH, %g1, %o2 | |
104 | setx RX_COMPL_RING_LEN, %g1, %o3 | |
105 | setx RBR_CONFIG_B_DATA, %g1, %o4 | |
106 | setx RX_INITIAL_KICK, %g1, %o5 | |
107 | ! setx NIU_RX_MULTI_DMA, %g1, %o6 | |
108 | mov %g0, %o6 | |
109 | call NiuInitRxDma | |
110 | nop | |
111 | !@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
112 | ! Init DMA Channel 7 @@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
113 | !@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
114 | ||
115 | P_NIU_RxInitDma_2: | |
116 | nop ! $EV trig_pc_d(1, @VA(.MAIN.P_NIU_RxInitDma_2)) -> NIU_InitRxDma(7, RX_DESC_RING_LENGTH, RX_COMPL_RING_LEN, RBR_CONFIG_B_DATA, RX_INITIAL_KICK, 0x0, NIU_RX_MULTI_DMA) | |
117 | setx 0x5, %g1, %g4 | |
118 | delay_loop_Rx_2: | |
119 | ldxa [%g2]ASI_PRIMARY_LITTLE, %g5 | |
120 | nop | |
121 | nop | |
122 | nop | |
123 | nop | |
124 | dec %g4 | |
125 | brnz %g4, delay_loop_Rx_2 | |
126 | nop | |
127 | ||
128 | nop | |
129 | setx 0x7, %g1, %o0 | |
130 | setx RX_DESC_RING_LENGTH, %g1, %o2 | |
131 | setx RX_COMPL_RING_LEN, %g1, %o3 | |
132 | setx RBR_CONFIG_B_DATA, %g1, %o4 | |
133 | setx RX_INITIAL_KICK, %g1, %o5 | |
134 | setx NIU_RX_MULTI_DMA, %g1, %o6 | |
135 | call NiuInitRxDma | |
136 | nop | |
137 | P0_NIU_RxPkt_Conf: | |
138 | nop ! $EV trig_pc_d(1, @VA(.MAIN.P0_NIU_RxPkt_Conf)) -> NIU_RxPktConf(RXMAC_PKTCNT,0) | |
139 | ldxa [%g2]ASI_PRIMARY_LITTLE, %g5 | |
140 | nop | |
141 | P1_NIU_RxPkt_Conf: | |
142 | nop ! $EV trig_pc_d(1, @VA(.MAIN.P1_NIU_RxPkt_Conf)) -> NIU_RxPktConf(RXMAC_PKTCNT,1) | |
143 | ldxa [%g2]ASI_PRIMARY_LITTLE, %g5 | |
144 | nop | |
145 | P_NIU_Rx_GenPkt: | |
146 | setx RXMAC_PKTCNT, %g1, %g6 | |
147 | nop | |
148 | Rx_pktcnt_loop: | |
149 | nop ! $EV trig_pc_d(1, @VA(.MAIN.Rx_pktcnt_loop)) -> NIU_RxGenPkt(MAC_ID, 0, RXMAC_PKTCNT, 0x50,0x0, NIU_RX_MULTI_DMA, 1) | |
150 | ldxa [%g2]ASI_PRIMARY_LITTLE, %g5 | |
151 | nop | |
152 | nop | |
153 | nop | |
154 | nop | |
155 | ||
156 | delay_loop0: | |
157 | mulx %o1, 0x200, %g4 | |
158 | setx RCR_STAT_A, %g7, %g2 | |
159 | add %g2, %g4, %g2 | |
160 | ldxa [%g2]ASI_PRIMARY_LITTLE, %g4 | |
161 | ||
162 | mulx %l2, 0x200, %g5 | |
163 | setx RCR_STAT_A, %g7, %g2 | |
164 | add %g2, %g5, %g2 | |
165 | ldxa [%g2]ASI_PRIMARY_LITTLE, %g3 | |
166 | ||
167 | mulx %o0, 0x200, %g5 | |
168 | setx RCR_STAT_A, %g7, %g2 | |
169 | add %g2, %g5, %g2 | |
170 | ldxa [%g2]ASI_PRIMARY_LITTLE, %g5 | |
171 | ||
172 | add %g5, %g4, %g5 | |
173 | add %g5, %g3, %g5 | |
174 | cmp %g5, FAIR_PKT_COUNT | |
175 | bne delay_loop0 | |
176 | nop | |
177 | ||
178 | ||
179 | test_passed: | |
180 | nop | |
181 | EXIT_GOOD | |
182 | # 218 "diag.j.pp" | |
183 | ||
184 | /************************************************************************ | |
185 | Test case data start | |
186 | ************************************************************************/ | |
187 | !SECTION SetRngConfig_init data_va=0x100000000 | |
188 | !attr_data { | |
189 | ! Name = SetRngConfig_init, | |
190 | ! hypervisor, | |
191 | ! compressimage | |
192 | ! } | |
193 | !.data | |
194 | !SetRngConfig_init: | |
195 | ! .xword 0x0060452301000484 | |
196 | ||
197 | SECTION SetRxLogMask1_init data_va=0x200000100 | |
198 | attr_data { | |
199 | Name = SetRxLogMask1_init, | |
200 | hypervisor, | |
201 | compressimage | |
202 | } | |
203 | .data | |
204 | SetRxLogMask1_init: | |
205 | .xword 0x0060452301000484 | |
206 | ||
207 | SECTION SetRxLogVal1_init data_va=0x200000200 | |
208 | attr_data { | |
209 | Name = SetRxLogVal1_init, | |
210 | hypervisor, | |
211 | compressimage | |
212 | } | |
213 | .data | |
214 | SetRxLogVal1_init: | |
215 | .xword 0x0060452301000484 | |
216 | ||
217 | SECTION SetRxLogRelo1_init data_va=0x200000300 | |
218 | attr_data { | |
219 | Name = SetRxLogRelo1_init, | |
220 | hypervisor, | |
221 | compressimage | |
222 | } | |
223 | .data | |
224 | SetRxLogRelo1_init: | |
225 | .xword 0x0060452301000484 | |
226 | ||
227 | SECTION SetRxLogPgVld_init data_va=0x200000400 | |
228 | attr_data { | |
229 | Name = SetRxLogPgVld_init, | |
230 | hypervisor, | |
231 | compressimage | |
232 | } | |
233 | .data | |
234 | SetRxLogPgVld_init: | |
235 | .xword 0x0060452301000484 | |
236 | SECTION SetRbrConfig_A_init data_va=0x200000500 | |
237 | attr_data { | |
238 | Name = SetRbrConfig_A_init, | |
239 | hypervisor, | |
240 | compressimage | |
241 | } | |
242 | .data | |
243 | SetRbrConfig_A_init: | |
244 | .xword 0x0060452301000484 | |
245 | SECTION SetRbrConfig_B_init data_va=0x200000600 | |
246 | attr_data { | |
247 | Name = SetRbrConfig_B_init, | |
248 | hypervisor, | |
249 | compressimage | |
250 | } | |
251 | .data | |
252 | SetRbrConfig_B_init: | |
253 | .xword 0x0060452301000484 | |
254 | SECTION SetRcrConfig_A_init data_va=0x200000700 | |
255 | attr_data { | |
256 | Name = SetRcrConfig_A_init, | |
257 | hypervisor, | |
258 | compressimage | |
259 | } | |
260 | .data | |
261 | SetRcrConfig_A_init: | |
262 | .xword 0x0060452301000484 | |
263 | SECTION SetRxDmaCfig_1_0_init data_va=0x200000800 | |
264 | attr_data { | |
265 | Name = SetRxDmaCfig_1_0_init, | |
266 | hypervisor, | |
267 | compressimage | |
268 | } | |
269 | .data | |
270 | SetRxDmaCfig_1_0_init: | |
271 | .xword 0x0060452301000484 | |
272 | SECTION SetRxdmaCfig2Start_init data_va=0x200000900 | |
273 | attr_data { | |
274 | Name = SetRxdmaCfig2Start_init, | |
275 | hypervisor, | |
276 | compressimage | |
277 | } | |
278 | .data | |
279 | SetRxdmaCfig2Start_init: | |
280 | .xword 0x0060452301000484 | |
281 | SECTION SetRxDmaCfig_1_1_init data_va=0x200000a00 | |
282 | attr_data { | |
283 | Name = SetRxDmaCfig_1_1_init, | |
284 | hypervisor, | |
285 | compressimage | |
286 | } | |
287 | .data | |
288 | SetRxDmaCfig_1_1_init: | |
289 | .xword 0x0060452301000484 | |
290 | # 331 "diag.j.pp" | |
291 | SECTION SetRxRingKick_init data_va=0x200000b00 | |
292 | attr_data { | |
293 | Name = SetRxRingKick_init, | |
294 | hypervisor, | |
295 | compressimage | |
296 | } | |
297 | .data | |
298 | SetRxRingKick_init: | |
299 | .xword 0x0060452301000484 | |
300 | ||
301 | SECTION SetRxLogMask2_init data_va=0x200000c00 | |
302 | attr_data { | |
303 | Name = SetRxLogMask2_init, | |
304 | hypervisor, | |
305 | compressimage | |
306 | } | |
307 | .data | |
308 | SetRxLogMask2_init: | |
309 | .xword 0x0060452301000484 | |
310 | ||
311 | SECTION SetRxLogVal2_init data_va=0x200000d00 | |
312 | attr_data { | |
313 | Name = SetRxLogVal2_init, | |
314 | hypervisor, | |
315 | compressimage | |
316 | } | |
317 | .data | |
318 | SetRxLogVal2_init: | |
319 | .xword 0x0060452301000484 | |
320 | ||
321 | SECTION SetRxLogRelo2_init data_va=0x200000e00 | |
322 | attr_data { | |
323 | Name = SetRxLogRelo2_init, | |
324 | hypervisor, | |
325 | compressimage | |
326 | } | |
327 | .data | |
328 | SetRxLogRelo2_init: | |
329 | .xword 0x0060452301000484 | |
330 | # 374 "diag.j.pp" | |
331 | ||
332 | #if 0 | |
333 | #endif |