Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * OpenSPARC T2 Processor File: memop_l2_err_status_reg.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 | #define L2_ERROR_STATUS_REG_ADDR 0xab00000000 | |
41 | ||
42 | #include "hboot.s" | |
43 | #include "asi_s.h" | |
44 | ||
45 | /************************************************************************ | |
46 | Test case code start | |
47 | ************************************************************************/ | |
48 | ||
49 | .text | |
50 | .global main | |
51 | ||
52 | main: | |
53 | ta T_CHANGE_HPRIV | |
54 | ||
55 | ! Read the bank 0 L2 Control Register | |
56 | bank0: | |
57 | setx L2_ERROR_STATUS_REG_ADDR, %g1, %g2 | |
58 | ldx [%g2], %g5 | |
59 | membar #Sync | |
60 | ||
61 | ! Write the bank 0 L2 Error Status Register | |
62 | ||
63 | stx %g5, [%g2] | |
64 | membar #Sync | |
65 | ||
66 | ! Read the bank 1 L2 Error Status Register | |
67 | bank1: | |
68 | add %g2, 64, %g2 | |
69 | ldx [%g2], %g5 | |
70 | membar #Sync | |
71 | ||
72 | ! Write the bank 1 L2 Error Status Register | |
73 | ||
74 | stx %g5, [%g2] | |
75 | membar #Sync | |
76 | ||
77 | ! Read the bank 2 L2 Error Status Register | |
78 | bank2: | |
79 | add %g2, 64, %g2 | |
80 | ldx [%g2], %g5 | |
81 | membar #Sync | |
82 | ||
83 | ! Write the bank 2 L2 Error Status Register | |
84 | ||
85 | stx %g5, [%g2] | |
86 | membar #Sync | |
87 | ||
88 | ! Read the bank 3 L2 Error Status Register | |
89 | bank3: | |
90 | add %g2, 64, %g2 | |
91 | ldx [%g2], %g5 | |
92 | membar #Sync | |
93 | ||
94 | ! Write the bank 3 L2 Error Status Register | |
95 | ||
96 | stx %g5, [%g2] | |
97 | membar #Sync | |
98 | ||
99 | ! Read the bank 4 L2 Error Status Register | |
100 | bank4: | |
101 | add %g2, 64, %g2 | |
102 | ldx [%g2], %g5 | |
103 | membar #Sync | |
104 | ||
105 | ! Write the bank 4 L2 Error Status Register | |
106 | ||
107 | stx %g5, [%g2] | |
108 | membar #Sync | |
109 | ||
110 | ! Read the bank 5 L2 Error Status Register | |
111 | bank5: | |
112 | add %g2, 64, %g2 | |
113 | ldx [%g2], %g5 | |
114 | membar #Sync | |
115 | ||
116 | ! Write the bank 5 L2 Error Status Register | |
117 | ||
118 | stx %g5, [%g2] | |
119 | membar #Sync | |
120 | ||
121 | ! Read the bank 6 L2 Error Status Register | |
122 | bank6: | |
123 | add %g2, 64, %g2 | |
124 | ldx [%g2], %g5 | |
125 | membar #Sync | |
126 | ||
127 | ! Write the bank 6 L2 Error Status Register | |
128 | ||
129 | stx %g5, [%g2] | |
130 | membar #Sync | |
131 | ||
132 | ! Read the bank 7 L2 Error Status Register | |
133 | bank7: | |
134 | add %g2, 64, %g2 | |
135 | ldx [%g2], %g5 | |
136 | membar #Sync | |
137 | ||
138 | ! Write the bank 7 L2 Error Status Register | |
139 | ||
140 | stx %g5, [%g2] | |
141 | membar #Sync | |
142 | ||
143 | test_passed: | |
144 | EXIT_GOOD | |
145 | ||
146 | test_failed: | |
147 | EXIT_BAD | |
148 | ||
149 | ||
150 | /************************************************************************ | |
151 | Test case data start | |
152 | ************************************************************************/ | |
153 | .data | |
154 | user_data_start: | |
155 | .xword 0x0 | |
156 | .end | |
157 | ||
158 | ||
159 |