| 1 | /* |
| 2 | * ========== Copyright Header Begin ========================================== |
| 3 | * |
| 4 | * OpenSPARC T2 Processor File: ncu_intmem_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 | |
| 48 | main: |
| 49 | ta T_CHANGE_HPRIV |
| 50 | |
| 51 | get_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 MONDO_BUSY_REG |
| 59 | setx 0x0000008000000000,%g7,%g1 |
| 60 | setx reg_data,%g7,%g2 |
| 61 | set 128,%g3 |
| 62 | |
| 63 | loop1: |
| 64 | ldx [%g2],%g4 |
| 65 | stx %g4,[%g1] |
| 66 | ldx [%g1], %g5 |
| 67 | cmp %g4, %g5 |
| 68 | bne %xcc, test_fail |
| 69 | |
| 70 | |
| 71 | add %g1,8,%g1 |
| 72 | add %g2,8,%g2 |
| 73 | sub %g3,1,%g3 |
| 74 | cmp %g3,%g0 |
| 75 | |
| 76 | bne loop1 |
| 77 | nop |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | /****************************************************** |
| 83 | * Exit code |
| 84 | *******************************************************/ |
| 85 | |
| 86 | test_pass: |
| 87 | EXIT_GOOD |
| 88 | |
| 89 | test_fail: |
| 90 | EXIT_BAD |
| 91 | |
| 92 | .data |
| 93 | .align 0x100 |
| 94 | reg_data: |
| 95 | .xword 0x0000000000003f3f |
| 96 | .xword 0x0000000000002a2a |
| 97 | .xword 0x0000000000001203 |
| 98 | .xword 0x0000000000001515 |
| 99 | .xword 0x0000000000003f2a |
| 100 | .xword 0x0000000000002307 |
| 101 | .xword 0x0000000000001914 |
| 102 | .xword 0x0000000000003b2d |
| 103 | .xword 0x0000000000002b3e |
| 104 | .xword 0x0000000000001703 |
| 105 | .xword 0x0000000000003b1e |
| 106 | .xword 0x0000000000003a2d |
| 107 | .xword 0x0000000000003e38 |
| 108 | .xword 0x000000000000330e |
| 109 | .xword 0x0000000000000319 |
| 110 | .xword 0x0000000000003e2e |
| 111 | .xword 0x0000000000003537 |
| 112 | .xword 0x0000000000002304 |
| 113 | .xword 0x0000000000003e19 |
| 114 | .xword 0x0000000000000022 |
| 115 | .xword 0x0000000000003235 |
| 116 | .xword 0x0000000000000605 |
| 117 | .xword 0x000000000000031d |
| 118 | .xword 0x000000000000082b |
| 119 | .xword 0x0000000000003634 |
| 120 | .xword 0x0000000000002a03 |
| 121 | .xword 0x0000000000000f19 |
| 122 | .xword 0x0000000000003d3b |
| 123 | .xword 0x0000000000002a2b |
| 124 | .xword 0x0000000000003d07 |
| 125 | .xword 0x0000000000002c12 |
| 126 | .xword 0x0000000000002d32 |
| 127 | .xword 0x0000000000003f21 |
| 128 | .xword 0x0000000000003f3f |
| 129 | .xword 0x0000000000002a2a |
| 130 | .xword 0x0000000000001203 |
| 131 | .xword 0x0000000000001515 |
| 132 | .xword 0x0000000000003f2a |
| 133 | .xword 0x0000000000002337 |
| 134 | .xword 0x0000000000001904 |
| 135 | .xword 0x0000000000003b1d |
| 136 | .xword 0x0000000000002b2e |
| 137 | .xword 0x0000000000001733 |
| 138 | .xword 0x0000000000003b0e |
| 139 | .xword 0x0000000000003a1d |
| 140 | .xword 0x0000000000003e28 |
| 141 | .xword 0x000000000000332e |
| 142 | .xword 0x0000000000000339 |
| 143 | .xword 0x0000000000003e0e |
| 144 | .xword 0x0000000000003517 |
| 145 | .xword 0x0000000000002324 |
| 146 | .xword 0x0000000000003e39 |
| 147 | .xword 0x0000000000000002 |
| 148 | .xword 0x0000000000003215 |
| 149 | .xword 0x0000000000000625 |
| 150 | .xword 0x000000000000033d |
| 151 | .xword 0x000000000000080b |
| 152 | .xword 0x0000000000003614 |
| 153 | .xword 0x0000000000002a23 |
| 154 | .xword 0x0000000000000f39 |
| 155 | .xword 0x0000000000003d0b |
| 156 | .xword 0x0000000000002a1b |
| 157 | .xword 0x0000000000003d27 |
| 158 | .xword 0x0000000000002c32 |
| 159 | .xword 0x0000000000002d02 |
| 160 | .xword 0x0000000000003f11 |
| 161 | .xword 0x0000000000003f2f |
| 162 | .xword 0x0000000000002a3a |
| 163 | .xword 0x0000000000001203 |
| 164 | .xword 0x0000000000001515 |
| 165 | .xword 0x0000000000003f2a |
| 166 | .xword 0x0000000000002337 |
| 167 | .xword 0x0000000000001904 |
| 168 | .xword 0x0000000000003b1d |
| 169 | .xword 0x0000000000002b2e |
| 170 | .xword 0x0000000000001723 |
| 171 | .xword 0x0000000000003b3e |
| 172 | .xword 0x0000000000003a0d |
| 173 | .xword 0x0000000000003e18 |
| 174 | .xword 0x000000000000332e |
| 175 | .xword 0x0000000000000329 |
| 176 | .xword 0x0000000000003e3e |
| 177 | .xword 0x0000000000003507 |
| 178 | .xword 0x0000000000002314 |
| 179 | .xword 0x0000000000003e29 |
| 180 | .xword 0x0000000000000032 |
| 181 | .xword 0x0000000000003205 |
| 182 | .xword 0x0000000000000615 |
| 183 | .xword 0x000000000000032d |
| 184 | .xword 0x000000000000082b |
| 185 | .xword 0x0000000000003634 |
| 186 | .xword 0x0000000000002a03 |
| 187 | .xword 0x0000000000000f19 |
| 188 | .xword 0x0000000000003d2b |
| 189 | .xword 0x0000000000002a3b |
| 190 | .xword 0x0000000000003d07 |
| 191 | .xword 0x0000000000002c12 |
| 192 | .xword 0x0000000000002d32 |
| 193 | .xword 0x0000000000003f21 |
| 194 | .xword 0x0000000000003f3f |
| 195 | .xword 0x0000000000002a2a |
| 196 | .xword 0x0000000000001203 |
| 197 | .xword 0x0000000000001525 |
| 198 | .xword 0x0000000000003f1a |
| 199 | .xword 0x0000000000002337 |
| 200 | .xword 0x0000000000001924 |
| 201 | .xword 0x0000000000003b0d |
| 202 | .xword 0x0000000000002b1e |
| 203 | .xword 0x0000000000001723 |
| 204 | .xword 0x0000000000003b3e |
| 205 | .xword 0x0000000000003a0d |
| 206 | .xword 0x0000000000003e18 |
| 207 | .xword 0x000000000000332e |
| 208 | .xword 0x0000000000000339 |
| 209 | .xword 0x0000000000003e0e |
| 210 | .xword 0x0000000000003517 |
| 211 | .xword 0x0000000000002324 |
| 212 | .xword 0x0000000000003e09 |
| 213 | .xword 0x0000000000002l12 |
| 214 | .xword 0x0000000000003215 |
| 215 | .xword 0x0000000000000605 |
| 216 | .xword 0x000000000000132d |
| 217 | .xword 0x000000000000083b |
| 218 | .xword 0x0000000000003604 |
| 219 | .xword 0x0000000000002a13 |
| 220 | .xword 0x0000000000000f29 |
| 221 | .xword 0x0000000000003d3b |
| 222 | .xword 0x0000000000002a2b |
| 223 | .xword 0x0000000000003d17 |
| 224 | .xword 0x0000000000002c12 |
| 225 | .end |