Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / diag / assembly / arch / prm / mcu / n2_mcu_0_all_fbdimm_rkhi.s
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: n2_mcu_0_all_fbdimm_rkhi.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
42#include "hboot.s"
43#include "asi_s.h"
44
45#ifdef MCU0
46#define L20_MCU_DM0_BK0 0x0000134000
47#define L20_MCU_DM0_BK2 0x0000134200
48#define L20_MCU_DM0_BK4 0x0000134400
49#define L20_MCU_DM0_BK6 0x0000134600
50
51#define L20_MCU_DM1_BK0 0x0800134000
52#define L20_MCU_DM1_BK2 0x0800134200
53#define L20_MCU_DM1_BK4 0x0800134400
54#define L20_MCU_DM1_BK6 0x0800134600
55
56#define L20_MCU_DM2_BK0 0x1000134000
57#define L20_MCU_DM2_BK2 0x1000134200
58#define L20_MCU_DM2_BK4 0x1000134400
59#define L20_MCU_DM2_BK6 0x1000134600
60
61#define L20_MCU_DM3_BK0 0x1800134000
62#define L20_MCU_DM3_BK2 0x1800134200
63#define L20_MCU_DM3_BK4 0x1800134400
64#define L20_MCU_DM3_BK6 0x1800134600
65
66#define L20_MCU_DM4_BK0 0x2000134000
67#define L20_MCU_DM4_BK2 0x2000134200
68#define L20_MCU_DM4_BK4 0x2000134400
69#define L20_MCU_DM4_BK6 0x2000134600
70
71#define L20_MCU_DM5_BK0 0x2800134000
72#define L20_MCU_DM5_BK2 0x2800134200
73#define L20_MCU_DM5_BK4 0x2800134400
74#define L20_MCU_DM5_BK6 0x2800134600
75
76#define L20_MCU_DM6_BK0 0x3000134000
77#define L20_MCU_DM6_BK2 0x3000134200
78#define L20_MCU_DM6_BK4 0x3000134400
79#define L20_MCU_DM6_BK6 0x3000134600
80
81#define L20_MCU_DM7_BK0 0x3800134000
82#define L20_MCU_DM7_BK2 0x3800134200
83#define L20_MCU_DM7_BK4 0x3800134400
84#define L20_MCU_DM7_BK6 0x3800134600
85
86
87#define L21_MCU_DM0_BK0 0x0000134040
88#define L21_MCU_DM0_BK2 0x0000134240
89#define L21_MCU_DM0_BK4 0x0000134440
90#define L21_MCU_DM0_BK6 0x0000134640
91
92#define L21_MCU_DM1_BK0 0x0800134040
93#define L21_MCU_DM1_BK2 0x0800134240
94#define L21_MCU_DM1_BK4 0x0800134440
95#define L21_MCU_DM1_BK6 0x0800134640
96
97#define L21_MCU_DM2_BK0 0x1000134040
98#define L21_MCU_DM2_BK2 0x1000134240
99#define L21_MCU_DM2_BK4 0x1000134440
100#define L21_MCU_DM2_BK6 0x1000134640
101
102#define L21_MCU_DM3_BK0 0x1800134040
103#define L21_MCU_DM3_BK2 0x1800134240
104#define L21_MCU_DM3_BK4 0x1800134440
105#define L21_MCU_DM3_BK6 0x1800134640
106
107#define L21_MCU_DM4_BK0 0x2000134040
108#define L21_MCU_DM4_BK2 0x2000134240
109#define L21_MCU_DM4_BK4 0x2000134440
110#define L21_MCU_DM4_BK6 0x2000134640
111
112#define L21_MCU_DM5_BK0 0x2800134040
113#define L21_MCU_DM5_BK2 0x2800134240
114#define L21_MCU_DM5_BK4 0x2800134440
115#define L21_MCU_DM5_BK6 0x2800134640
116
117#define L21_MCU_DM6_BK0 0x3000134040
118#define L21_MCU_DM6_BK2 0x3000134240
119#define L21_MCU_DM6_BK4 0x3000134440
120#define L21_MCU_DM6_BK6 0x3000134640
121
122#define L21_MCU_DM7_BK0 0x3800134040
123#define L21_MCU_DM7_BK2 0x3800134240
124#define L21_MCU_DM7_BK4 0x3800134440
125#define L21_MCU_DM7_BK6 0x3800134640
126#endif
127
128#ifdef MCU1
129#define L20_MCU_DM0_BK0 0x0000134080
130#define L20_MCU_DM0_BK2 0x0000134280
131#define L20_MCU_DM0_BK4 0x0000134480
132#define L20_MCU_DM0_BK6 0x0000134680
133
134#define L20_MCU_DM1_BK0 0x0800134080
135#define L20_MCU_DM1_BK2 0x0800134280
136#define L20_MCU_DM1_BK4 0x0800134480
137#define L20_MCU_DM1_BK6 0x0800134680
138
139#define L20_MCU_DM2_BK0 0x1000134080
140#define L20_MCU_DM2_BK2 0x1000134280
141#define L20_MCU_DM2_BK4 0x1000134480
142#define L20_MCU_DM2_BK6 0x1000134680
143
144#define L20_MCU_DM3_BK0 0x1800134080
145#define L20_MCU_DM3_BK2 0x1800134280
146#define L20_MCU_DM3_BK4 0x1800134480
147#define L20_MCU_DM3_BK6 0x1800134680
148
149#define L20_MCU_DM4_BK0 0x2000134080
150#define L20_MCU_DM4_BK2 0x2000134280
151#define L20_MCU_DM4_BK4 0x2000134480
152#define L20_MCU_DM4_BK6 0x2000134680
153
154#define L20_MCU_DM5_BK0 0x2800134080
155#define L20_MCU_DM5_BK2 0x2800134280
156#define L20_MCU_DM5_BK4 0x2800134480
157#define L20_MCU_DM5_BK6 0x2800134680
158
159#define L20_MCU_DM6_BK0 0x3000134080
160#define L20_MCU_DM6_BK2 0x3000134280
161#define L20_MCU_DM6_BK4 0x3000134480
162#define L20_MCU_DM6_BK6 0x3000134680
163
164#define L20_MCU_DM7_BK0 0x3800134080
165#define L20_MCU_DM7_BK2 0x3800134280
166#define L20_MCU_DM7_BK4 0x3800134480
167#define L20_MCU_DM7_BK6 0x3800134680
168
169
170#define L21_MCU_DM0_BK0 0x00001340c0
171#define L21_MCU_DM0_BK2 0x00001342c0
172#define L21_MCU_DM0_BK4 0x00001344c0
173#define L21_MCU_DM0_BK6 0x00001346c0
174
175#define L21_MCU_DM1_BK0 0x08001340c0
176#define L21_MCU_DM1_BK2 0x08001342c0
177#define L21_MCU_DM1_BK4 0x08001344c0
178#define L21_MCU_DM1_BK6 0x08001346c0
179
180#define L21_MCU_DM2_BK0 0x10001340c0
181#define L21_MCU_DM2_BK2 0x10001342c0
182#define L21_MCU_DM2_BK4 0x10001344c0
183#define L21_MCU_DM2_BK6 0x10001346c0
184
185#define L21_MCU_DM3_BK0 0x18001340c0
186#define L21_MCU_DM3_BK2 0x18001342c0
187#define L21_MCU_DM3_BK4 0x18001344c0
188#define L21_MCU_DM3_BK6 0x18001346c0
189
190#define L21_MCU_DM4_BK0 0x20001340c0
191#define L21_MCU_DM4_BK2 0x20001342c0
192#define L21_MCU_DM4_BK4 0x20001344c0
193#define L21_MCU_DM4_BK6 0x20001346c0
194
195
196#define L21_MCU_DM5_BK0 0x28001340c0
197#define L21_MCU_DM5_BK2 0x28001342c0
198#define L21_MCU_DM5_BK4 0x28001344c0
199#define L21_MCU_DM5_BK6 0x28001346c0
200
201#define L21_MCU_DM6_BK0 0x30001340c0
202#define L21_MCU_DM6_BK2 0x30001342c0
203#define L21_MCU_DM6_BK4 0x30001344c0
204#define L21_MCU_DM6_BK6 0x30001346c0
205
206#define L21_MCU_DM7_BK0 0x38001340c0
207#define L21_MCU_DM7_BK2 0x38001342c0
208#define L21_MCU_DM7_BK4 0x38001344c0
209#define L21_MCU_DM7_BK6 0x38001346c0
210#endif
211
212#ifdef MCU2
213#define L20_MCU_DM0_BK0 0x0000134100
214#define L20_MCU_DM0_BK2 0x0000134300
215#define L20_MCU_DM0_BK4 0x0000134500
216#define L20_MCU_DM0_BK6 0x0000134700
217
218#define L20_MCU_DM1_BK0 0x0800134100
219#define L20_MCU_DM1_BK2 0x0800134300
220#define L20_MCU_DM1_BK4 0x0800134500
221#define L20_MCU_DM1_BK6 0x0800134700
222
223#define L20_MCU_DM2_BK0 0x1000134100
224#define L20_MCU_DM2_BK2 0x1000134300
225#define L20_MCU_DM2_BK4 0x1000134500
226#define L20_MCU_DM2_BK6 0x1000134700
227
228#define L20_MCU_DM3_BK0 0x1800134100
229#define L20_MCU_DM3_BK2 0x1800134300
230#define L20_MCU_DM3_BK4 0x1800134500
231#define L20_MCU_DM3_BK6 0x1800134700
232
233#define L20_MCU_DM4_BK0 0x2000134100
234#define L20_MCU_DM4_BK2 0x2000134300
235#define L20_MCU_DM4_BK4 0x2000134500
236#define L20_MCU_DM4_BK6 0x2000134700
237
238#define L20_MCU_DM5_BK0 0x2800134100
239#define L20_MCU_DM5_BK2 0x2800134300
240#define L20_MCU_DM5_BK4 0x2800134500
241#define L20_MCU_DM5_BK6 0x2800134700
242
243#define L20_MCU_DM6_BK0 0x3000134100
244#define L20_MCU_DM6_BK2 0x3000134300
245#define L20_MCU_DM6_BK4 0x3000134500
246#define L20_MCU_DM6_BK6 0x3000134700
247
248#define L20_MCU_DM7_BK0 0x3800134100
249#define L20_MCU_DM7_BK2 0x3800134300
250#define L20_MCU_DM7_BK4 0x3800134500
251#define L20_MCU_DM7_BK6 0x3800134700
252
253
254#define L21_MCU_DM0_BK0 0x0000134140
255#define L21_MCU_DM0_BK2 0x0000134340
256#define L21_MCU_DM0_BK4 0x0000134540
257#define L21_MCU_DM0_BK6 0x0000134740
258
259#define L21_MCU_DM1_BK0 0x0800134140
260#define L21_MCU_DM1_BK2 0x0800134340
261#define L21_MCU_DM1_BK4 0x0800134540
262#define L21_MCU_DM1_BK6 0x0800134740
263
264#define L21_MCU_DM2_BK0 0x1000134140
265#define L21_MCU_DM2_BK2 0x1000134340
266#define L21_MCU_DM2_BK4 0x1000134540
267#define L21_MCU_DM2_BK6 0x1000134740
268
269#define L21_MCU_DM3_BK0 0x1800134140
270#define L21_MCU_DM3_BK2 0x1800134340
271#define L21_MCU_DM3_BK4 0x1800134540
272#define L21_MCU_DM3_BK6 0x1800134740
273
274#define L21_MCU_DM4_BK0 0x2000134140
275#define L21_MCU_DM4_BK2 0x2000134340
276#define L21_MCU_DM4_BK4 0x2000134540
277#define L21_MCU_DM4_BK6 0x2000134740
278
279
280#define L21_MCU_DM5_BK0 0x2800134140
281#define L21_MCU_DM5_BK2 0x2800134340
282#define L21_MCU_DM5_BK4 0x2800134540
283#define L21_MCU_DM5_BK6 0x2800134740
284
285#define L21_MCU_DM6_BK0 0x3000134140
286#define L21_MCU_DM6_BK2 0x3000134340
287#define L21_MCU_DM6_BK4 0x3000134540
288#define L21_MCU_DM6_BK6 0x3000134740
289
290#define L21_MCU_DM7_BK0 0x3800134140
291#define L21_MCU_DM7_BK2 0x3800134340
292#define L21_MCU_DM7_BK4 0x3800134540
293#define L21_MCU_DM7_BK6 0x3800134740
294#endif
295
296#ifdef MCU3
297#define L20_MCU_DM0_BK0 0x0000134180
298#define L20_MCU_DM0_BK2 0x0000134380
299#define L20_MCU_DM0_BK4 0x0000134580
300#define L20_MCU_DM0_BK6 0x0000134780
301
302#define L20_MCU_DM1_BK0 0x0800134180
303#define L20_MCU_DM1_BK2 0x0800134380
304#define L20_MCU_DM1_BK4 0x0800134580
305#define L20_MCU_DM1_BK6 0x0800134780
306
307#define L20_MCU_DM2_BK0 0x1000134180
308#define L20_MCU_DM2_BK2 0x1000134380
309#define L20_MCU_DM2_BK4 0x1000134580
310#define L20_MCU_DM2_BK6 0x1000134780
311
312#define L20_MCU_DM3_BK0 0x1800134180
313#define L20_MCU_DM3_BK2 0x1800134380
314#define L20_MCU_DM3_BK4 0x1800134580
315#define L20_MCU_DM3_BK6 0x1800134780
316
317#define L20_MCU_DM4_BK0 0x2000134180
318#define L20_MCU_DM4_BK2 0x2000134380
319#define L20_MCU_DM4_BK4 0x2000134580
320#define L20_MCU_DM4_BK6 0x2000134780
321
322#define L20_MCU_DM5_BK0 0x2800134180
323#define L20_MCU_DM5_BK2 0x2800134380
324#define L20_MCU_DM5_BK4 0x2800134580
325#define L20_MCU_DM5_BK6 0x2800134780
326
327#define L20_MCU_DM6_BK0 0x3000134180
328#define L20_MCU_DM6_BK2 0x3000134380
329#define L20_MCU_DM6_BK4 0x3000134580
330#define L20_MCU_DM6_BK6 0x3000134780
331
332#define L20_MCU_DM7_BK0 0x3800134180
333#define L20_MCU_DM7_BK2 0x3800134380
334#define L20_MCU_DM7_BK4 0x3800134580
335#define L20_MCU_DM7_BK6 0x3800134780
336
337
338#define L21_MCU_DM0_BK0 0x00001341c0
339#define L21_MCU_DM0_BK2 0x00001343c0
340#define L21_MCU_DM0_BK4 0x00001345c0
341#define L21_MCU_DM0_BK6 0x00001347c0
342
343#define L21_MCU_DM1_BK0 0x08001341c0
344#define L21_MCU_DM1_BK2 0x08001343c0
345#define L21_MCU_DM1_BK4 0x08001345c0
346#define L21_MCU_DM1_BK6 0x08001347c0
347
348#define L21_MCU_DM2_BK0 0x10001341c0
349#define L21_MCU_DM2_BK2 0x10001343c0
350#define L21_MCU_DM2_BK4 0x10001345c0
351#define L21_MCU_DM2_BK6 0x10001347c0
352
353#define L21_MCU_DM3_BK0 0x18001341c0
354#define L21_MCU_DM3_BK2 0x18001343c0
355#define L21_MCU_DM3_BK4 0x18001345c0
356#define L21_MCU_DM3_BK6 0x18001347c0
357
358#define L21_MCU_DM4_BK0 0x20001341c0
359#define L21_MCU_DM4_BK2 0x20001343c0
360#define L21_MCU_DM4_BK4 0x20001345c0
361#define L21_MCU_DM4_BK6 0x20001347c0
362
363
364#define L21_MCU_DM5_BK0 0x28001341c0
365#define L21_MCU_DM5_BK2 0x28001343c0
366#define L21_MCU_DM5_BK4 0x28001345c0
367#define L21_MCU_DM5_BK6 0x28001347c0
368
369#define L21_MCU_DM6_BK0 0x30001341c0
370#define L21_MCU_DM6_BK2 0x30001343c0
371#define L21_MCU_DM6_BK4 0x30001345c0
372#define L21_MCU_DM6_BK6 0x30001347c0
373
374#define L21_MCU_DM7_BK0 0x38001341c0
375#define L21_MCU_DM7_BK2 0x38001343c0
376#define L21_MCU_DM7_BK4 0x38001345c0
377#define L21_MCU_DM7_BK6 0x38001347c0
378#endif
379
380
381#ifdef L2_OFF
382#define L2_ON_OFF_DM 0x1
383#else
384#define L2_ON_OFF_DM 0x0
385#endif
386
387
388.text
389.global main
390
391
392main:
393 ta T_CHANGE_HPRIV
394
395
396L2_on_off_dm:
397 setx L2CS_PA0, %l6, %g1
398 ldx [%g1], %o1
399
400 setx 0xfffffffffffffffc, %l6, %i1 ! <1:0>=00
401 and %i1, %o1, %o2
402
403 mov L2_ON_OFF_DM, %l0
404 or %o2, %l0, %l1
405
406 stx %l1, [%g1]
407
408 nop
409 membar #Sync
410
411 /**********************
412 L2 Bank 0
413 **********************/
414
415/*******************
416 DIMM 0,1
417*******************/
418L20_dimm01_init:
419 setx 0x1111111111111110, %g7, %o0
420 setx 0x2222222222222220, %g7, %o1
421 setx 0x3333333333333330, %g7, %o2
422 setx 0x4444444444444440, %g7, %o3
423 setx 0x5555555555555550, %g7, %o4
424 setx 0x6666666666666660, %g7, %o5
425 setx 0x7777777777777770, %g7, %o6
426 setx 0x8888888888888880, %g7, %o7
427
428 setx L20_MCU_DM0_BK0, %g7, %l0
429 setx L20_MCU_DM0_BK2, %g7, %l1
430 setx L20_MCU_DM0_BK4, %g7, %l2
431 setx L20_MCU_DM0_BK6, %g7, %l3
432
433 setx L20_MCU_DM1_BK0, %g7, %l4
434 setx L20_MCU_DM1_BK2, %g7, %l5
435 setx L20_MCU_DM1_BK4, %g7, %l6
436 setx L20_MCU_DM1_BK6, %g7, %l7
437
438L20_dimm01_rd_wr:
439 !DIMM0,1
440 stx %o0, [%l0]
441 ldx [%l0], %g1
442
443 stx %o1, [%l1]
444 ldx [%l1], %g1
445
446 stx %o2, [%l2]
447 ldx [%l2], %g1
448
449 stx %o3, [%l3]
450 ldx [%l3], %g1
451
452 stx %o4, [%l4]
453 ldx [%l4], %g1
454
455 stx %o5, [%l5]
456 ldx [%l5], %g1
457
458 stx %o6, [%l6]
459 ldx [%l6], %g1
460
461 stx %o7, [%l7]
462 ldx [%l7], %g1
463
464/*******************
465 DIMM2,3
466*******************/
467L20_dimm23_init:
468 setx L20_MCU_DM2_BK0, %g7, %i0
469 setx L20_MCU_DM2_BK2, %g7, %i1
470 setx L20_MCU_DM2_BK4, %g7, %i2
471 setx L20_MCU_DM2_BK6, %g7, %i3
472
473 setx L20_MCU_DM3_BK0, %g7, %i4
474 setx L20_MCU_DM3_BK2, %g7, %i5
475 setx L20_MCU_DM3_BK4, %g7, %i6
476 setx L20_MCU_DM3_BK6, %g7, %i7
477
478 inc %o0
479 inc %o1
480 inc %o2
481 inc %o3
482 inc %o4
483 inc %o5
484 inc %o6
485 inc %o7
486
487L20_dimm23_rd_wr:
488 !DIMM0,1
489 stx %o0, [%i0]
490 ldx [%i0], %g1
491
492 stx %o1, [%i1]
493 ldx [%i1], %g1
494
495 stx %o2, [%i2]
496 ldx [%i2], %g1
497
498 stx %o3, [%i3]
499 ldx [%i3], %g1
500
501 stx %o4, [%i4]
502 ldx [%i4], %g1
503
504 stx %o5, [%i5]
505 ldx [%i5], %g1
506
507 stx %o6, [%i6]
508 ldx [%i6], %g1
509
510 stx %o7, [%i7]
511 ldx [%i7], %g1
512
513
514/********************************
515* DIMM 4, 5
516*********************************/
517L20_dimm45_init:
518 setx L20_MCU_DM4_BK0, %g7, %l0
519 setx L20_MCU_DM4_BK2, %g7, %l1
520 setx L20_MCU_DM4_BK4, %g7, %l2
521 setx L20_MCU_DM4_BK6, %g7, %l3
522
523 setx L20_MCU_DM5_BK0, %g7, %l4
524 setx L20_MCU_DM5_BK2, %g7, %l5
525 setx L20_MCU_DM5_BK4, %g7, %l6
526 setx L20_MCU_DM5_BK6, %g7, %l7
527
528 inc %o0
529 inc %o1
530 inc %o2
531 inc %o3
532 inc %o4
533 inc %o5
534 inc %o6
535 inc %o7
536
537L20_dimm45_rd_wr:
538 !DIMM4,5
539 stx %o0, [%l0]
540 ldx [%l0], %g1
541
542 stx %o1, [%l1]
543 ldx [%l1], %g1
544
545 stx %o2, [%l2]
546 ldx [%l2], %g1
547
548 stx %o3, [%l3]
549 ldx [%l3], %g1
550
551 stx %o4, [%l4]
552 ldx [%l4], %g1
553
554 stx %o5, [%l5]
555 ldx [%l5], %g1
556
557 stx %o6, [%l6]
558 ldx [%l6], %g1
559
560 stx %o7, [%l7]
561 ldx [%l7], %g1
562
563/********************************
564* DIMM 6, 7
565*********************************/
566L20_dimm67_init:
567 setx L20_MCU_DM6_BK0, %g7, %i0
568 setx L20_MCU_DM6_BK2, %g7, %i1
569 setx L20_MCU_DM6_BK4, %g7, %i2
570 setx L20_MCU_DM6_BK6, %g7, %i3
571
572 setx L20_MCU_DM7_BK0, %g7, %i4
573 setx L20_MCU_DM7_BK2, %g7, %i5
574 setx L20_MCU_DM7_BK4, %g7, %i6
575 setx L20_MCU_DM7_BK6, %g7, %i7
576
577 inc %o0
578 inc %o1
579 inc %o2
580 inc %o3
581 inc %o4
582 inc %o5
583 inc %o6
584 inc %o7
585
586L20_dimm67_rd_wr:
587 !DIMM6,7
588 stx %o0, [%i0]
589 ldx [%i0], %g1
590
591 stx %o1, [%i1]
592 ldx [%i1], %g1
593
594 stx %o2, [%i2]
595 ldx [%i2], %g1
596
597 stx %o3, [%i3]
598 ldx [%i3], %g1
599
600 stx %o4, [%i4]
601 ldx [%i4], %g1
602
603 stx %o5, [%i5]
604 ldx [%i5], %g1
605
606 stx %o6, [%i6]
607 ldx [%i6], %g1
608
609 stx %o7, [%i7]
610 ldx [%i7], %g1
611
612
613 /***********************************
614 L2 Bank 1
615 ***********************************/
616
617/********************************
618* DIMM 0, 1
619*********************************/
620L21_dimm01_init:
621 setx L21_MCU_DM0_BK0, %g7, %l0
622 setx L21_MCU_DM0_BK2, %g7, %l1
623 setx L21_MCU_DM0_BK4, %g7, %l2
624 setx L21_MCU_DM0_BK6, %g7, %l3
625
626 setx L21_MCU_DM1_BK0, %g7, %l4
627 setx L21_MCU_DM1_BK2, %g7, %l5
628 setx L21_MCU_DM1_BK4, %g7, %l6
629 setx L21_MCU_DM1_BK6, %g7, %l7
630
631 inc %o0
632 inc %o1
633 inc %o2
634 inc %o3
635 inc %o4
636 inc %o5
637 inc %o6
638 inc %o7
639
640L21_dimm01_rd_wr:
641 !DIMM0,1
642 stx %o0, [%l0]
643 ldx [%l0], %g1
644
645 stx %o1, [%l1]
646 ldx [%l1], %g1
647
648 stx %o2, [%l2]
649 ldx [%l2], %g1
650
651 stx %o3, [%l3]
652 ldx [%l3], %g1
653
654 stx %o4, [%l4]
655 ldx [%l4], %g1
656
657 stx %o5, [%l5]
658 ldx [%l5], %g1
659
660 stx %o6, [%l6]
661 ldx [%l6], %g1
662
663 stx %o7, [%l7]
664 ldx [%l7], %g1
665
666/********************************
667* DIMM 2, 3
668*********************************/
669L21_dimm23_init:
670 setx L21_MCU_DM2_BK0, %g7, %i0
671 setx L21_MCU_DM2_BK2, %g7, %i1
672 setx L21_MCU_DM2_BK4, %g7, %i2
673 setx L21_MCU_DM2_BK6, %g7, %i3
674
675 setx L21_MCU_DM3_BK0, %g7, %i4
676 setx L21_MCU_DM3_BK2, %g7, %i5
677 setx L21_MCU_DM3_BK4, %g7, %i6
678 setx L21_MCU_DM3_BK6, %g7, %i7
679
680 inc %o0
681 inc %o1
682 inc %o2
683 inc %o3
684 inc %o4
685 inc %o5
686 inc %o6
687 inc %o7
688
689L21_dimm23_rd_wr:
690 !DIMM2,3
691 stx %o0, [%i0]
692 ldx [%i0], %g1
693
694 stx %o1, [%i1]
695 ldx [%i1], %g1
696
697 stx %o2, [%i2]
698 ldx [%i2], %g1
699
700 stx %o3, [%i3]
701 ldx [%i3], %g1
702
703 stx %o4, [%i4]
704 ldx [%i4], %g1
705
706 stx %o5, [%i5]
707 ldx [%i5], %g1
708
709 stx %o6, [%i6]
710 ldx [%i6], %g1
711
712 stx %o7, [%i7]
713 ldx [%i7], %g1
714
715
716/********************************
717* DIMM4, 5
718*********************************/
719L21_dimm45_init:
720 setx L21_MCU_DM4_BK0, %g7, %l0
721 setx L21_MCU_DM4_BK2, %g7, %l1
722 setx L21_MCU_DM4_BK4, %g7, %l2
723 setx L21_MCU_DM4_BK6, %g7, %l3
724
725 setx L21_MCU_DM5_BK0, %g7, %l4
726 setx L21_MCU_DM5_BK2, %g7, %l5
727 setx L21_MCU_DM5_BK4, %g7, %l6
728 setx L21_MCU_DM5_BK6, %g7, %l7
729
730 inc %o0
731 inc %o1
732 inc %o2
733 inc %o3
734 inc %o4
735 inc %o5
736 inc %o6
737 inc %o7
738
739L21_dimm45_rd_wr:
740 !DIMM4,5
741 stx %o0, [%l0]
742 ldx [%l0], %g1
743
744 stx %o1, [%l1]
745 ldx [%l1], %g1
746
747 stx %o2, [%l2]
748 ldx [%l2], %g1
749
750 stx %o3, [%l3]
751 ldx [%l3], %g1
752
753 stx %o4, [%l4]
754 ldx [%l4], %g1
755
756 stx %o5, [%l5]
757 ldx [%l5], %g1
758
759 stx %o6, [%l6]
760 ldx [%l6], %g1
761
762 stx %o7, [%l7]
763 ldx [%l7], %g1
764
765/********************************
766* DIMM 6, 7
767*********************************/
768L21_dimm67_init:
769 setx L21_MCU_DM6_BK0, %g7, %i0
770 setx L21_MCU_DM6_BK2, %g7, %i1
771 setx L21_MCU_DM6_BK4, %g7, %i2
772 setx L21_MCU_DM6_BK6, %g7, %i3
773
774 setx L21_MCU_DM7_BK0, %g7, %i4
775 setx L21_MCU_DM7_BK2, %g7, %i5
776 setx L21_MCU_DM7_BK4, %g7, %i6
777 setx L21_MCU_DM7_BK6, %g7, %i7
778
779
780 inc %o0
781 inc %o1
782 inc %o2
783 inc %o3
784 inc %o4
785 inc %o5
786 inc %o6
787 inc %o7
788
789L21_dimm67_rd_wr:
790 !DIMM6,7
791 stx %o0, [%i0]
792 ldx [%i0], %g1
793
794 stx %o1, [%i1]
795 ldx [%i1], %g1
796
797 stx %o2, [%i2]
798 ldx [%i2], %g1
799
800 stx %o3, [%i3]
801 ldx [%i3], %g1
802
803 stx %o4, [%i4]
804 ldx [%i4], %g1
805
806 stx %o5, [%i5]
807 ldx [%i5], %g1
808
809 stx %o6, [%i6]
810 ldx [%i6], %g1
811
812 stx %o7, [%i7]
813 ldx [%i7], %g1
814
815
816/******************************************************
817 * Exit code
818 *******************************************************/
819
820test_pass:
821EXIT_GOOD
822
823test_fail:
824EXIT_BAD
825