| 1 | /* |
| 2 | * ========== Copyright Header Begin ========================================== |
| 3 | * |
| 4 | * OpenSPARC T2 Processor File: n2_all_mcu_all_l2.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 | |
| 42 | #include "hboot.s" |
| 43 | #include "asi_s.h" |
| 44 | |
| 45 | #define L20 0x0000134000 |
| 46 | #define L21 0x0000134040 |
| 47 | |
| 48 | #define L22 0x0000134080 |
| 49 | #define L23 0x00001340c0 |
| 50 | |
| 51 | #define L24 0x0000134100 |
| 52 | #define L25 0x0000134140 |
| 53 | |
| 54 | #define L26 0x0000134180 |
| 55 | #define L27 0x00001341c0 |
| 56 | |
| 57 | .text |
| 58 | .global main |
| 59 | |
| 60 | |
| 61 | main: |
| 62 | ta T_CHANGE_HPRIV |
| 63 | |
| 64 | |
| 65 | /******************* |
| 66 | DIMM 0,1 |
| 67 | *******************/ |
| 68 | L2_Init: |
| 69 | setx 0x1111111111111110, %g7, %o0 |
| 70 | setx 0x2222222222222220, %g7, %o1 |
| 71 | setx 0x3333333333333330, %g7, %o2 |
| 72 | setx 0x4444444444444440, %g7, %o3 |
| 73 | setx 0x5555555555555550, %g7, %o4 |
| 74 | setx 0x6666666666666660, %g7, %o5 |
| 75 | setx 0x8888888888888880, %g7, %o6 |
| 76 | setx 0x9999999999999990, %g7, %o7 |
| 77 | |
| 78 | setx L20, %g7, %l0 |
| 79 | setx L21, %g7, %l1 |
| 80 | |
| 81 | setx L22, %g7, %l2 |
| 82 | setx L23, %g7, %l3 |
| 83 | |
| 84 | setx L24, %g7, %l4 |
| 85 | setx L25, %g7, %l5 |
| 86 | |
| 87 | setx L26, %g7, %l6 |
| 88 | setx L27, %g7, %l7 |
| 89 | |
| 90 | L2_0: |
| 91 | stx %o0, [%l0] |
| 92 | ldx [%l0], %g1 |
| 93 | |
| 94 | L2_1: |
| 95 | stx %o1, [%l1] |
| 96 | ldx [%l1], %g1 |
| 97 | |
| 98 | L2_2: |
| 99 | stx %o2, [%l2] |
| 100 | ldx [%l2], %g1 |
| 101 | |
| 102 | L2_3: |
| 103 | stx %o3, [%l3] |
| 104 | ldx [%l3], %g1 |
| 105 | |
| 106 | L2_4: |
| 107 | stx %o4, [%l4] |
| 108 | ldx [%l4], %g1 |
| 109 | |
| 110 | L2_5: |
| 111 | stx %o5, [%l5] |
| 112 | ldx [%l5], %g1 |
| 113 | |
| 114 | L2_6: |
| 115 | stx %o6, [%l6] |
| 116 | ldx [%l6], %g1 |
| 117 | |
| 118 | L2_7: |
| 119 | stx %o7, [%l7] |
| 120 | ldx [%l7], %g1 |
| 121 | |
| 122 | |
| 123 | /****************************************************** |
| 124 | * Exit code |
| 125 | *******************************************************/ |
| 126 | |
| 127 | test_pass: |
| 128 | EXIT_GOOD |
| 129 | |
| 130 | test_fail: |
| 131 | EXIT_BAD |
| 132 | |