Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * OpenSPARC T2 Processor File: niu_tx.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_NUCLEUS_ALSO | |
39 | #define MAIN_PAGE_HV_ALSO | |
40 | ||
41 | #include "defines.h" | |
42 | #include "nmacros.h" | |
43 | #include "boot.s" | |
44 | #include "niu_defines.h" | |
45 | ||
46 | /************************************************************************ | |
47 | Test case code start | |
48 | ************************************************************************/ | |
49 | .text | |
50 | .global main | |
51 | ||
52 | main: | |
53 | ||
54 | ! | |
55 | ! Thread 0 Start | |
56 | ! | |
57 | #include "niu_init.h" | |
58 | ||
59 | thread_0: | |
60 | ||
61 | tx_begin: | |
62 | setTxRingConfig: | |
63 | setx TX_RNG_CFIG, %g1, %g2 | |
64 | setx TxRingConfig_data, %g1, %g3 | |
65 | stx %g3, [%g2] | |
66 | nop | |
67 | setTxRingKick: | |
68 | setx TX_RING_KICK, %g1, %g2 | |
69 | setx Tx_Ring_Kick_data, %g1, %g3 | |
70 | stx %g3, [%g2] | |
71 | nop | |
72 | setTxCs: | |
73 | setx TX_CS, %g1, %g2 | |
74 | setx SetTxCs_data, %g1, %g3 | |
75 | stx %g3, [%g2] | |
76 | nop | |
77 | ||
78 | nop | |
79 | nop | |
80 | stx %g0, [%g2] ! Unstall the dma Engine | |
81 | nop | |
82 | ||
83 | setx loop_count, %g1, %g4 | |
84 | delay_loop: | |
85 | ldx [%g2], %g5 | |
86 | nop | |
87 | nop | |
88 | nop | |
89 | nop | |
90 | dec %g4 | |
91 | brnz %g4, delay_loop | |
92 | nop | |
93 | ||
94 | ||
95 | test_passed: | |
96 | EXIT_GOOD | |
97 | ||
98 | test_failed: | |
99 | EXIT_BAD | |
100 | ||
101 | ||
102 | /************************************************************************ | |
103 | Test case data start | |
104 | ************************************************************************/ | |
105 | SECTION descriptor data_va=0x100000000 | |
106 | attr_data { | |
107 | Name = descriptor, | |
108 | hypervisor, | |
109 | compressimage | |
110 | } | |
111 | .data | |
112 | .align 0x10000 | |
113 | descriptor: | |
114 | .xword 0x8404000123456100 | |
115 | .xword 0x8404000123456000 | |
116 | .xword 0x8404000123456300 | |
117 | .xword 0x8404000123456200 | |
118 | .xword 0x8404000123456500 | |
119 | .xword 0x8404000123456400 | |
120 | .xword 0x8404000123456700 | |
121 | .xword 0x8404000123456600 | |
122 | ||
123 | /************************************************************************/ | |
124 | SECTION pkt0_data data_va=0x123456000 | |
125 | attr_data { | |
126 | Name = pkt0_data, | |
127 | hypervisor, | |
128 | compressimage, | |
129 | notsb | |
130 | } | |
131 | .data | |
132 | pkt0_data: | |
133 | .xword 0x0000000000000000 | |
134 | .xword 0x0000000000300000 | |
135 | .xword 0x0045000800001111 | |
136 | .xword 0xaaaa0000bbbbdddd | |
137 | .xword 0x88880000cccc8c62 | |
138 | .xword 0x0003000000001e00 | |
139 | .xword 0x7a0433ca07060504 | |
140 | .xword 0x0302010000000000 | |
141 | ||
142 | /************************************************************************/ | |
143 | SECTION pkt1_data data_va=0x123456100 | |
144 | attr_data { | |
145 | Name = pkt1_data, | |
146 | hypervisor, | |
147 | compressimage, | |
148 | notsb | |
149 | } | |
150 | .data | |
151 | pkt1_data: | |
152 | .xword 0x0000000000000000 | |
153 | .xword 0x0000000000300000 | |
154 | .xword 0x0045000800001111 | |
155 | .xword 0xaaaa0000bbbbdddd | |
156 | .xword 0x88880000cccc8c62 | |
157 | .xword 0x0003000000001e00 | |
158 | .xword 0x6d7f278907060504 | |
159 | .xword 0x0302010001000000 | |
160 | ||
161 | /************************************************************************/ | |
162 | SECTION pkt2_data data_va=0x123456200 | |
163 | attr_data { | |
164 | Name = pkt2_data, | |
165 | hypervisor, | |
166 | compressimage, | |
167 | notsb | |
168 | } | |
169 | .data | |
170 | pkt2_data: | |
171 | .xword 0x0000000000000000 | |
172 | .xword 0x0000000000300000 | |
173 | .xword 0x0045000800001111 | |
174 | .xword 0xaaaa0000bbbbdddd | |
175 | .xword 0x88880000cccc8c62 | |
176 | .xword 0x0003000000001e00 | |
177 | .xword 0x54f21b4c07060504 | |
178 | .xword 0x0302010002000000 | |
179 | ||
180 | /************************************************************************/ | |
181 | SECTION pkt3_data data_va=0x123456300 | |
182 | attr_data { | |
183 | Name = pkt3_data, | |
184 | hypervisor, | |
185 | compressimage, | |
186 | notsb | |
187 | } | |
188 | .data | |
189 | pkt3_data: | |
190 | .xword 0x0000000000000000 | |
191 | .xword 0x0000000000300000 | |
192 | .xword 0x0045000800001111 | |
193 | .xword 0xaaaa0000bbbbdddd | |
194 | .xword 0x88880000cccc8c62 | |
195 | .xword 0x0003000000001e00 | |
196 | .xword 0x43890f0f07060504 | |
197 | .xword 0x0302010003000000 | |
198 | ||
199 | /************************************************************************/ | |
200 | SECTION pkt4_data data_va=0x123456400 | |
201 | attr_data { | |
202 | Name = pkt4_data, | |
203 | hypervisor, | |
204 | compressimage, | |
205 | notsb | |
206 | } | |
207 | .data | |
208 | pkt4_data: | |
209 | .xword 0x0000000000000000 | |
210 | .xword 0x0000000000300000 | |
211 | .xword 0x0045000800001111 | |
212 | .xword 0xaaaa0000bbbbdddd | |
213 | .xword 0x88880000cccc8c62 | |
214 | .xword 0x0003000000001e00 | |
215 | .xword 0x27e862c607060504 | |
216 | .xword 0x0302010004000000 | |
217 | ||
218 | /************************************************************************/ | |
219 | SECTION pkt5_data data_va=0x123456500 | |
220 | attr_data { | |
221 | Name = pkt5_data, | |
222 | hypervisor, | |
223 | compressimage, | |
224 | notsb | |
225 | } | |
226 | .data | |
227 | pkt5_data: | |
228 | .xword 0x0000000000000000 | |
229 | .xword 0x0000000000300000 | |
230 | .xword 0x0045000800001111 | |
231 | .xword 0xaaaa0000bbbbdddd | |
232 | .xword 0x88880000cccc8c62 | |
233 | .xword 0x0003000000001e00 | |
234 | .xword 0x3093768507060504 | |
235 | .xword 0x0302010005000000 | |
236 | ||
237 | /************************************************************************/ | |
238 | SECTION pkt6_data data_va=0x123456600 | |
239 | attr_data { | |
240 | Name = pkt6_data, | |
241 | hypervisor, | |
242 | compressimage, | |
243 | notsb | |
244 | } | |
245 | .data | |
246 | pkt6_data: | |
247 | .xword 0x0000000000000000 | |
248 | .xword 0x0000000000300000 | |
249 | .xword 0x0045000800001111 | |
250 | .xword 0xaaaa0000bbbbdddd | |
251 | .xword 0x88880000cccc8c62 | |
252 | .xword 0x0003000000001e00 | |
253 | .xword 0x091e4a4007060504 | |
254 | .xword 0x0302010006000000 | |
255 | ||
256 | /************************************************************************/ | |
257 | SECTION pkt7_data data_va=0x123456700 | |
258 | attr_data { | |
259 | Name = pkt7_data, | |
260 | hypervisor, | |
261 | compressimage, | |
262 | notsb | |
263 | } | |
264 | .data | |
265 | pkt7_data: | |
266 | .xword 0x0000000000000000 | |
267 | .xword 0x0000000000300000 | |
268 | .xword 0x0045000800001111 | |
269 | .xword 0xaaaa0000bbbbdddd | |
270 | .xword 0x88880000cccc8c62 | |
271 | .xword 0x0003000000001e00 | |
272 | .xword 0x1e655e0307060504 | |
273 | .xword 0x0302010007000000 |