Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * OpenSPARC T2 Processor File: tcu_regs_bist.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 | #define TEST_DATA0 0x4c3fdead4c3fbeef | |
42 | #define tmp1 %l2 | |
43 | #define tmp2 %l3 | |
44 | ||
45 | ||
46 | #include "asi_s.h" | |
47 | #include "mcu_defines.h" | |
48 | #include "tcu_defines.h" | |
49 | ||
50 | /************************************************************************ | |
51 | Test case code start | |
52 | ************************************************************************/ | |
53 | ||
54 | #ifdef FAST_BOOT | |
55 | #define RESET_VEC 0x0000000000000000 | |
56 | #else | |
57 | #define RESET_VEC 0xfffffffff0000000 | |
58 | #endif | |
59 | ||
60 | SECTION .RED_SEC TEXT_VA = RESET_VEC | |
61 | attr_text { | |
62 | Name=.RED_SEC, | |
63 | hypervisor | |
64 | } | |
65 | ||
66 | .text | |
67 | nop | |
68 | nop | |
69 | nop | |
70 | nop | |
71 | nop | |
72 | nop | |
73 | nop | |
74 | nop | |
75 | ||
76 | ||
77 | .global main | |
78 | ||
79 | ||
80 | ! Debug Port Configuration | |
81 | L1: | |
82 | setx 0x8600000000, %l5, %l6 | |
83 | ldx [%l6], %g3 | |
84 | cmp %g3, %g0 | |
85 | bne bad_trap | |
86 | membar #Sync | |
87 | ||
88 | ! IO Quiesce Control | |
89 | L2: | |
90 | setx 0x8600000000, %l5, %l6 | |
91 | add %l6, 0x8, %g7 | |
92 | ldx [%g7], %g3 | |
93 | cmp %g3, %g0 | |
94 | bne bad_trap | |
95 | membar #Sync | |
96 | ||
97 | ! MBIST Mode | |
98 | ! L3: | |
99 | ! setx 0x8500000000, %l5, %l6 | |
100 | ! ldx [%l6], %g3 | |
101 | ! cmp %g3, %g0 | |
102 | ! bne bad_trap | |
103 | ! membar #Sync | |
104 | ||
105 | ! MBIST Bypass | |
106 | ! L4: | |
107 | ! setx 0x8500000000, %l5, %l6 | |
108 | ! setx 0x8, %l5, %g7 | |
109 | ! add %l6, %g7, %g7 | |
110 | ! ldx [%g7], %g3 | |
111 | ! cmp %g3, %g0 | |
112 | ! bne bad_trap | |
113 | ! membar #Sync | |
114 | ||
115 | ! MBIST Start | |
116 | L5: | |
117 | setx 0x8500000000, %l5, %l6 | |
118 | setx 0x10, %l5, %g7 | |
119 | add %l6, %g7, %g7 | |
120 | ldx [%g7], %g3 | |
121 | cmp %g3, %g0 | |
122 | bne bad_trap | |
123 | membar #Sync | |
124 | ||
125 | ! MBIST Abort | |
126 | L6: | |
127 | setx 0x8500000000, %l5, %l6 | |
128 | setx 0x18, %l5, %g7 | |
129 | add %l6, %g7, %g7 | |
130 | ldx [%g7], %g3 | |
131 | cmp %g3, %g0 | |
132 | bne bad_trap | |
133 | membar #Sync | |
134 | ||
135 | ! MBIST Result | |
136 | L7: | |
137 | setx 0x8500000000, %l5, %l6 | |
138 | setx 0x20, %l5, %g7 | |
139 | add %l6, %g7, %g7 | |
140 | ldx [%g7], %g3 | |
141 | cmp %g3, %g0 | |
142 | bne bad_trap | |
143 | membar #Sync | |
144 | ||
145 | ! MBIST Done | |
146 | L8: | |
147 | setx 0x8500000000, %l5, %l6 | |
148 | setx 0x28, %l5, %g7 | |
149 | add %l6, %g7, %g7 | |
150 | ldx [%g7], %g3 | |
151 | cmp %g3, %g0 | |
152 | bne bad_trap | |
153 | membar #Sync | |
154 | ||
155 | ! MBIST Fail | |
156 | L9: | |
157 | setx 0x8500000000, %l5, %l6 | |
158 | setx 0x30, %l5, %g7 | |
159 | add %l6, %g7, %g7 | |
160 | ldx [%g7], %g3 | |
161 | cmp %g3, %g0 | |
162 | bne bad_trap | |
163 | membar #Sync | |
164 | ||
165 | ! MBIST Start WMR | |
166 | L10: | |
167 | setx 0x8500000000, %l5, %l6 | |
168 | setx 0x38, %l5, %g7 | |
169 | add %l6, %g7, %g7 | |
170 | ldx [%g7], %g3 | |
171 | cmp %g3, %g0 | |
172 | bne bad_trap | |
173 | membar #Sync | |
174 | ||
175 | ! LBIST Mode | |
176 | L11: | |
177 | setx 0x8500000000, %l5, %l6 | |
178 | setx 0x40, %l5, %g7 | |
179 | add %l6, %g7, %g7 | |
180 | ldx [%g7], %g3 | |
181 | cmp %g3, %g0 | |
182 | bne bad_trap | |
183 | membar #Sync | |
184 | ||
185 | ! LBIST Bypass | |
186 | L12: | |
187 | setx 0x8500000000, %l5, %l6 | |
188 | setx 0x48, %l5, %g7 | |
189 | add %l6, %g7, %g7 | |
190 | ldx [%g7], %g3 | |
191 | cmp %g3, %g0 | |
192 | bne bad_trap | |
193 | membar #Sync | |
194 | ||
195 | ! LBIST Start | |
196 | L13: | |
197 | setx 0x8500000000, %l5, %l6 | |
198 | setx 0x50, %l5, %g7 | |
199 | add %l6, %g7, %g7 | |
200 | ldx [%g7], %g3 | |
201 | cmp %g3, %g0 | |
202 | bne bad_trap | |
203 | membar #Sync | |
204 | ||
205 | ! LBIST Done | |
206 | L14: | |
207 | setx 0x8500000000, %l5, %l6 | |
208 | setx 0x60, %l5, %g7 | |
209 | add %l6, %g7, %g7 | |
210 | ldx [%g7], %g3 | |
211 | cmp %g3, %g0 | |
212 | bne bad_trap | |
213 | membar #Sync | |
214 | ||
215 | ! Cycle Count | |
216 | L15: | |
217 | setx 0x8500000000, %l5, %l6 | |
218 | setx 0x100, %l5, %g7 | |
219 | add %l6, %g7, %g7 | |
220 | ldx [%g7], %g3 | |
221 | cmp %g3, %g0 | |
222 | bne bad_trap | |
223 | membar #Sync | |
224 | ||
225 | ! DCR | |
226 | L16: | |
227 | setx 0x8500000000, %l5, %l6 | |
228 | setx 0x108, %l5, %g7 | |
229 | add %l6, %g7, %g7 | |
230 | ldx [%g7], %g3 | |
231 | cmp %g3, %g0 | |
232 | bne bad_trap | |
233 | membar #Sync | |
234 | ||
235 | ! Trigout | |
236 | L17: | |
237 | setx 0x8500000000, %l5, %l6 | |
238 | setx 0x110, %l5, %g7 | |
239 | add %l6, %g7, %g7 | |
240 | ldx [%g7], %g3 | |
241 | cmp %g3, %g0 | |
242 | bne bad_trap | |
243 | membar #Sync | |
244 | ||
245 | ! PEU Testconfig Time | |
246 | L18: | |
247 | setx 0x8500000000, %l5, %l6 | |
248 | add %l6, 0x180, %g7 | |
249 | ldx [%g7], %g3 | |
250 | cmp %g3, %g0 | |
251 | bne bad_trap | |
252 | membar #Sync | |
253 | ||
254 | ! SSI Log | |
255 | L19: | |
256 | setx 0x8500000000, %l5, %l6 | |
257 | add %l6, 0x18, %g7 | |
258 | ldx [%g7], %g3 | |
259 | cmp %g3, %g0 | |
260 | bne bad_trap | |
261 | membar #Sync | |
262 | ||
263 | ! PLL_CTL | |
264 | L20: | |
265 | setx 0x1002011c1, tmp1, tmp2 | |
266 | setx 0x8300000000, %l5, %l6 | |
267 | ldx [%l6], %g7 | |
268 | cmp %g7, %l3 | |
269 | bne bad_trap | |
270 | membar #Sync | |
271 | ||
272 | ||
273 | good_trap: | |
274 | ba good_trap | |
275 | nop | |
276 | nop | |
277 | bad_trap: | |
278 | ba bad_trap | |
279 | nop | |
280 | ||
281 | ||
282 | /************************************************************************ | |
283 | Test case data start | |
284 | ************************************************************************/ | |
285 | .data | |
286 | .xword 0x0 | |
287 | user_data_start: | |
288 | .end | |
289 |