Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * OpenSPARC T2 Processor File: niu_tx_gen_boot.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 "boot.s" | |
42 | #include "niu_defines.h" | |
43 | ||
44 | /************************************************************************ | |
45 | Test case code start | |
46 | ************************************************************************/ | |
47 | .text | |
48 | .global main | |
49 | ||
50 | main: | |
51 | ||
52 | #include "niu_init.h" | |
53 | ! | |
54 | ! Thread 0 Start | |
55 | ! | |
56 | ! | |
57 | thread_0: | |
58 | ||
59 | Init_flow: | |
60 | nop ! $EV trig_pc_d(1, @VA(.MAIN.Init_flow)) -> pktGenConfig() | |
61 | nop | |
62 | ||
63 | Gen_Packet: | |
64 | nop ! $EV trig_pc_d(1, @VA(.MAIN.Gen_Packet)) -> pktgen(0,8) | |
65 | ||
66 | ||
67 | tx_begin: | |
68 | setTxRingConfig: | |
69 | setx TX_RNG_CFIG, %g1, %g2 ! $EV trig_pc_d(1, @VA(.MAIN.setTxRingConfig)) -> printf("Triggering setTxRingConfig",*,1) | |
70 | setx TxRingConfig_data, %g1, %g3 | |
71 | stx %g3, [%g2] | |
72 | nop | |
73 | setTxRingKick: | |
74 | setx TX_RING_KICK, %g1, %g2 | |
75 | setx Tx_Ring_Kick_data, %g1, %g3 | |
76 | stx %g3, [%g2] | |
77 | nop | |
78 | setTxCs: | |
79 | setx TX_CS, %g1, %g2 | |
80 | setx SetTxCs_data, %g1, %g3 | |
81 | stx %g3, [%g2] | |
82 | nop | |
83 | ||
84 | nop | |
85 | nop | |
86 | stx %g0, [%g2] ! Unstall the dma Engine | |
87 | nop | |
88 | ||
89 | setx loop_count, %g1, %g4 | |
90 | delay_loop: | |
91 | ldx [%g2], %g5 | |
92 | nop | |
93 | nop | |
94 | nop | |
95 | nop | |
96 | dec %g4 | |
97 | brnz %g4, delay_loop | |
98 | nop | |
99 | ||
100 | ||
101 | test_passed: | |
102 | EXIT_GOOD | |
103 | ||
104 | test_failed: | |
105 | EXIT_BAD | |
106 | ||
107 | ||
108 | /************************************************************************ | |
109 | Test case data start | |
110 | ************************************************************************/ | |
111 | SECTION descriptor data_va=0x100000000 | |
112 | attr_data { | |
113 | Name = descriptor, | |
114 | hypervisor, | |
115 | compressimage | |
116 | } | |
117 | .data | |
118 | .align 0x10000 | |
119 | descriptor: | |
120 | .xword 0x0060452301000484 | |
121 | .xword 0x0064452301000484 | |
122 | .xword 0x0068452301000484 | |
123 | .xword 0x006c452301000484 | |
124 | .xword 0x0070452301000484 | |
125 | .xword 0x0074452301000484 | |
126 | .xword 0x0078452301000484 | |
127 | .xword 0x007c452301000484 | |
128 | ||
129 | /************************************************************************/ | |
130 | SECTION pkt0_data data_va=0x123456000 | |
131 | attr_data { | |
132 | Name = pkt0_data, | |
133 | hypervisor, | |
134 | compressimage, | |
135 | notsb | |
136 | } | |
137 | .data | |
138 | pkt0_data: | |
139 | ||
140 | /************************************************************************/ | |
141 | SECTION pkt1_data data_va=0x123456100 | |
142 | attr_data { | |
143 | Name = pkt1_data, | |
144 | hypervisor, | |
145 | compressimage, | |
146 | notsb | |
147 | } | |
148 | .data | |
149 | pkt1_data: | |
150 | ||
151 | /************************************************************************/ | |
152 | SECTION pkt2_data data_va=0x123456200 | |
153 | attr_data { | |
154 | Name = pkt2_data, | |
155 | hypervisor, | |
156 | compressimage, | |
157 | notsb | |
158 | } | |
159 | .data | |
160 | pkt2_data: | |
161 | ||
162 | /************************************************************************/ | |
163 | SECTION pkt3_data data_va=0x123456300 | |
164 | attr_data { | |
165 | Name = pkt3_data, | |
166 | hypervisor, | |
167 | compressimage, | |
168 | notsb | |
169 | } | |
170 | .data | |
171 | pkt3_data: | |
172 | ||
173 | /************************************************************************/ | |
174 | SECTION pkt4_data data_va=0x123456400 | |
175 | attr_data { | |
176 | Name = pkt4_data, | |
177 | hypervisor, | |
178 | compressimage, | |
179 | notsb | |
180 | } | |
181 | .data | |
182 | pkt4_data: | |
183 | ||
184 | /************************************************************************/ | |
185 | SECTION pkt5_data data_va=0x123456500 | |
186 | attr_data { | |
187 | Name = pkt5_data, | |
188 | hypervisor, | |
189 | compressimage, | |
190 | notsb | |
191 | } | |
192 | .data | |
193 | pkt5_data: | |
194 | ||
195 | /************************************************************************/ | |
196 | SECTION pkt6_data data_va=0x123456600 | |
197 | attr_data { | |
198 | Name = pkt6_data, | |
199 | hypervisor, | |
200 | compressimage, | |
201 | notsb | |
202 | } | |
203 | .data | |
204 | pkt6_data: | |
205 | ||
206 | /************************************************************************/ | |
207 | SECTION pkt7_data data_va=0x123456700 | |
208 | attr_data { | |
209 | Name = pkt7_data, | |
210 | hypervisor, | |
211 | compressimage, | |
212 | notsb | |
213 | } | |
214 | .data | |
215 | pkt7_data: |