Commit | Line | Data |
---|---|---|
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 | |
45 | main: | |
46 | ||
47 | /************************************ | |
48 | set up pointers | |
49 | *************************************/ | |
50 | setx 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 | !===================== | |
60 | mov %g0, %g4 | |
61 | setx 0x0102030405060708, %g1, %g2 | |
62 | set 0x10, %g5 | |
63 | ||
64 | stloop1: | |
65 | stx %g2, [%g3 + %g4] | |
66 | inc %g2 | |
67 | add 0x8, %g4, %g4 | |
68 | deccc %g5 | |
69 | bne stloop1 | |
70 | nop | |
71 | ||
72 | mov 0x78, %g4 | |
73 | dec %g2 | |
74 | set 0x10, %g5 | |
75 | ||
76 | ldloop1: | |
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 | |
84 | bne ldloop1 | |
85 | nop | |
86 | ||
87 | !======================== | |
88 | mov 0x80, %g4 | |
89 | setx 0x0807060504030201, %g1, %g2 | |
90 | set 0x10, %g5 | |
91 | ||
92 | stloop2: | |
93 | st %g2, [%g3 + %g4] | |
94 | inc %g2 | |
95 | add 0x4, %g4, %g4 | |
96 | deccc %g5 | |
97 | bne stloop2 | |
98 | nop | |
99 | ||
100 | mov 0xbc, %g4 | |
101 | set 0x04030210, %g2 | |
102 | set 0x10, %g5 | |
103 | ||
104 | ldloop2: | |
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 | |
112 | bne ldloop2 | |
113 | nop | |
114 | ||
115 | !============================= | |
116 | ||
117 | mov 0x100, %g4 | |
118 | setx 0x0a0b0c0d0e0f0102, %g1, %g2 | |
119 | set 0x10, %g5 | |
120 | ||
121 | stloop3: | |
122 | sth %g2, [%g3 + %g4] | |
123 | inc %g2 | |
124 | add 0x2, %g4, %g4 | |
125 | deccc %g5 | |
126 | bne stloop3 | |
127 | nop | |
128 | ||
129 | mov 0x11e, %g4 | |
130 | set 0x0111, %g2 | |
131 | set 0x10, %g5 | |
132 | ||
133 | ldloop3: | |
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 | |
141 | bne ldloop3 | |
142 | nop | |
143 | ||
144 | !============================= | |
145 | mov 0x180, %g4 | |
146 | !set 0x1, %g2 | |
147 | setx 0x0807060504030201, %g1, %g2 | |
148 | set 0x10, %g5 | |
149 | ||
150 | stloop4: | |
151 | stb %g2, [%g3 + %g4] | |
152 | inc %g2 | |
153 | add 0x1, %g4, %g4 | |
154 | deccc %g5 | |
155 | bne stloop4 | |
156 | nop | |
157 | ||
158 | mov 0x18f, %g4 | |
159 | set 0x10, %g2 | |
160 | set 0x10, %g5 | |
161 | ||
162 | ldloop4: | |
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 | |
170 | bne ldloop4 | |
171 | nop | |
172 | ||
173 | normal_end: | |
174 | ta T_GOOD_TRAP | |
175 | nop | |
176 | ||
177 | h_bad_end: | |
178 | ta T_BAD_TRAP | |
179 | nop | |
180 | ||
181 | /* | |
182 | * Data section | |
183 | */ | |
184 | ||
185 | SECTION .NCDATA DATA_VA=0x00d01ee000 | |
186 | ||
187 | attr_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 | |
200 | ncdata_base: | |
201 | .skip 1000 | |
202 | ||
203 |