Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / diag / assembly / arch / prm / cmp / ncu_ras_regs.s
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: ncu_ras_regs.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 "hboot.s"
42#include "asi_s.h"
43
44.text
45.global main
46
47
48main:
49 ta T_CHANGE_HPRIV
50
51get_th_id:
52 ta T_RD_THID
53
54// cmp %o1,0x0
55// bne test_pass
56 nop
57
58!Write then read data of ESR_REG
59 setx 0x0000008000003000,%g7,%g1
60 setx esr_data,%g7,%g2
61 set 0x05,%g3
62
63loop1:
64 ldx [%g2],%g4
65 stx %g4,[%g1]
66 ldx [%g1], %g5
67 ! mulx %g4, 0x8000076dbfffffff,%g4
68 cmp %g4, %g5
69 bne %xcc, test_fail
70 add %g2,8,%g2
71 sub %g3,1,%g3
72 cmp %g3,%g0
73 bne loop1
74 nop
75
76
77!Write then read data of ELE_REG
78 setx 0x0000008000003008,%g7,%g1
79 setx reg_data,%g7,%g2
80 set 0x05,%g3
81
82loop2:
83 ldx [%g2],%g4
84 stx %g4,[%g1]
85 ldx [%g1], %g5
86 ! mulx %g4, 0x0000076dbfffffff,%g4
87 cmp %g4, %g5
88 bne %xcc, test_fail
89 add %g2,8,%g2
90 sub %g3,1,%g3
91 cmp %g3,%g0
92 bne loop2
93 nop
94
95!Write then read data of EIE_REG
96 setx 0x0000008000003010,%g7,%g1
97 setx reg_data,%g7,%g2
98 set 0x05,%g3
99
100loop3:
101 ldx [%g2],%g4
102 stx %g4,[%g1]
103 ldx [%g1], %g5
104 ! mulx %g4, 0x0000076dbfffffff,%g4
105 cmp %g4, %g5
106 bne %xcc, test_fail
107 add %g2,8,%g2
108 sub %g3,1,%g3
109 cmp %g3,%g0
110 bne loop3
111 nop
112
113/*
114!Write then read data of EJR_REG
115 setx 0x0000008000003018,%g7,%g1
116 setx reg_data,%g7,%g2
117 set 0x05,%g3
118
119loop4:
120 ldx [%g2],%g4
121 stx %g4,[%g1]
122 ldx [%g1], %g5
123 ! mulx %g4, 0x0000076dbfffffff,%g4
124 cmp %g4, %g5
125 bne %xcc, test_fail
126 add %g2,8,%g2
127 sub %g3,1,%g3
128 cmp %g3,%g0
129 bne loop4
130 nop
131*/
132
133!Write then read data of FEE_REG
134 setx 0x0000008000003020,%g7,%g1
135 setx reg_data,%g7,%g2
136 set 0x05,%g3
137
138loop5:
139 ldx [%g2],%g4
140 stx %g4,[%g1]
141 ldx [%g1], %g5
142 ! mulx %g4, 0x0000076dbfffffff,%g4
143 cmp %g4, %g5
144 bne %xcc, test_fail
145 add %g2,8,%g2
146 sub %g3,1,%g3
147 cmp %g3,%g0
148 bne loop5
149 nop
150
151!Write then read data of SIISYN_REG
152 setx 0x0000008000003030,%g7,%g1
153 setx reg_data,%g7,%g2
154 set 0x05,%g3
155
156loop6:
157 ldx [%g2],%g4
158 stx %g4,[%g1]
159 ldx [%g1], %g5
160 ! mulx %g4, 0x87000fffffffffff,%g4
161 cmp %g4, %g5
162 bne %xcc, test_fail
163 add %g2,8,%g2
164 sub %g3,1,%g3
165 cmp %g3,%g0
166 bne loop6
167 nop
168
169!Write then read data of NCUSYN_REG
170 setx 0x0000008000003038,%g7,%g1
171 setx reg_data,%g7,%g2
172 set 0x05,%g3
173
174loop7:
175 ldx [%g2],%g4
176 stx %g4,[%g1]
177 ldx [%g1], %g5
178 ! mulx %g4, 0x8cffffffffffffff,%g4
179 cmp %g4, %g5
180 bne %xcc, test_fail
181 add %g2,8,%g2
182 sub %g3,1,%g3
183 cmp %g3,%g0
184 bne loop7
185 nop
186
187!Write then read data of NCUSYN_REG
188 setx 0x0000008000003030,%g7,%g1
189 setx reg_data,%g7,%g2
190 set 0x05,%g3
191
192loop8:
193 ldx [%g2],%g4
194 stx %g4,[%g1]
195 ldx [%g1], %g5
196 ! mulx %g4, 0xc0f8000fffffffff,%g4
197 cmp %g4, %g5
198 bne %xcc, test_fail
199 add %g2,8,%g2
200 sub %g3,1,%g3
201 cmp %g3,%g0
202 bne loop8
203 nop
204
205
206
207
208/******************************************************
209 * Exit code
210 *******************************************************/
211
212test_pass:
213EXIT_GOOD
214
215test_fail:
216EXIT_BAD
217
218.data
219.align 0x100
220esr_data:
221 .xword 0x80000245023832d0
222 .xword 0x80000228aaaaaaaa
223 .xword 0x8000054515555555
224 .xword 0x80000768b937cfea
225 .xword 0x0000000000000000
226 .xword 0x800006e836cd0984
227 .xword 0x800005ecda993bad
228 .xword 0x800004defecadbce
229 .xword 0x800003b3fdce9723
230 .xword 0x8000020432363bde
231 .xword 0x800001793bdefacd
232.align 0x100
233reg_data:
234 .xword 0x00000245023832d0
235 .xword 0x00000228aaaaaaaa
236 .xword 0x0000054515555555
237 .xword 0x00000768b937cfea
238 .xword 0x0000000000000000
239 .xword 0xe2873fe836cd0984
240 .xword 0xbf363fecda993bad
241 .xword 0xbaceefdefecadbce
242 .xword 0x987233b3fdce9723
243 .xword 0x0003290432363bde
244 .xword 0xabd934793bdefacd
245.end
246