Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / diag / assembly / arch / prm / tso / tso_directed / tso_n2_ncrdwr1_user.s
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: tso_n2_ncrdwr1_user.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_HV_ALSO
39#define PART0_NZ_RANOTPA_2 0
40#define ENABLE_PCIE_LINK_TRAINING
41#include "hboot.s"
42
43.text
44.global main
45main:
46
47/************************************
48 set up pointers
49*************************************/
50setx 0x00d01ee000, %g1, %g3 ! should be translated to 0xc100000000 = MEM32
51
52/************************************
53 Start doing non cacheable access
54 RW's are done to the DMUPIO space
55 starting from 0xC1
56*************************************/
57!=====================
58! Now some NC writes and reads
59!=====================
60mov %g0, %g4
61setx 0x0102030405060708, %g1, %g2
62set 0x10, %g5
63
64stloop1:
65 stx %g2, [%g3 + %g4]
66 inc %g2
67 add 0x8, %g4, %g4
68 deccc %g5
69bne stloop1
70nop
71
72mov 0x78, %g4
73dec %g2
74set 0x10, %g5
75
76ldloop1:
77 ldx [%g3 + %g4], %g1
78 subcc %g2, %g1, %g0
79 bne h_bad_end
80 nop
81 dec %g2
82 sub %g4, 0x8, %g4
83 deccc %g5
84bne ldloop1
85nop
86
87!========================
88mov 0x80, %g4
89setx 0x0807060504030201, %g1, %g2
90set 0x10, %g5
91
92stloop2:
93 st %g2, [%g3 + %g4]
94 inc %g2
95 add 0x4, %g4, %g4
96 deccc %g5
97bne stloop2
98nop
99
100mov 0xbc, %g4
101set 0x04030210, %g2
102set 0x10, %g5
103
104ldloop2:
105 ld [%g3 + %g4], %g1
106 subcc %g2, %g1, %g0
107 bne h_bad_end
108 nop
109 dec %g2
110 sub %g4, 0x4, %g4
111 deccc %g5
112bne ldloop2
113nop
114
115!=============================
116
117mov 0x100, %g4
118setx 0x0a0b0c0d0e0f0102, %g1, %g2
119set 0x10, %g5
120
121stloop3:
122 sth %g2, [%g3 + %g4]
123 inc %g2
124 add 0x2, %g4, %g4
125 deccc %g5
126bne stloop3
127nop
128
129mov 0x11e, %g4
130set 0x0111, %g2
131set 0x10, %g5
132
133ldloop3:
134 lduh [%g3 + %g4], %g1
135 subcc %g2, %g1, %g0
136 bne h_bad_end
137 nop
138 dec %g2
139 sub %g4, 0x2, %g4
140 deccc %g5
141bne ldloop3
142nop
143
144!=============================
145mov 0x180, %g4
146!set 0x1, %g2
147setx 0x0807060504030201, %g1, %g2
148set 0x10, %g5
149
150stloop4:
151 stb %g2, [%g3 + %g4]
152 inc %g2
153 add 0x1, %g4, %g4
154 deccc %g5
155bne stloop4
156nop
157
158mov 0x18f, %g4
159set 0x10, %g2
160set 0x10, %g5
161
162ldloop4:
163 ldub [%g3 + %g4], %g1
164 subcc %g2, %g1, %g0
165 bne h_bad_end
166 nop
167 dec %g2
168 sub %g4, 0x1, %g4
169 deccc %g5
170bne ldloop4
171nop
172
173normal_end:
174ta T_GOOD_TRAP
175nop
176
177h_bad_end:
178ta T_BAD_TRAP
179nop
180
181/*
182* Data section
183*/
184
185SECTION .NCDATA DATA_VA=0x00d01ee000
186
187attr_data {
188 Name = .NCDATA,
189 VA=0x00d01ee000,
190 RA=0xc100000000,
191 PA=0xc100000000,
192 part_0_ctx_nonzero_tsb_config_2,
193 TTE_G=0, TTE_Context=PCONTEXT, TTE_V=1, TTE_Size=0, TTE_SIZE_PTR=0, TTE_NFO=0,
194 TTE_IE=0, TTE_Soft2=0, TTE_Diag=0, TTE_Soft=0,
195 TTE_L=0, TTE_CP=0, TTE_CV=0, TTE_E=1, TTE_P=0, TTE_W=1
196 }
197
198.data
199.global ncdata_base
200ncdata_base:
201 .skip 1000
202
203