| 1 | /* |
| 2 | * ========== Copyright Header Begin ========================================== |
| 3 | * |
| 4 | * OpenSPARC T2 Processor File: niu_tx_gen_hboot-1.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 | |
| 40 | #include "hboot.s" |
| 41 | #include "niu_defines.h" |
| 42 | |
| 43 | #define TX_LOG_PAGE_VLD_ADDR mpeval(FZC_DMC_ADDRESS_RANGE+0x40000) |
| 44 | #define TX_LOG_PAGE_VLD_DATA 0x1 |
| 45 | |
| 46 | /************************************************************************ |
| 47 | Test case code start |
| 48 | ************************************************************************/ |
| 49 | .text |
| 50 | .global main |
| 51 | |
| 52 | main: |
| 53 | ta T_CHANGE_HPRIV |
| 54 | nop |
| 55 | |
| 56 | #include "niu_init_tx.h" |
| 57 | !#include "niu_init.h" |
| 58 | ! |
| 59 | ! Thread 0 Start |
| 60 | ! |
| 61 | ! |
| 62 | thread_0: |
| 63 | |
| 64 | Init_flow: |
| 65 | nop ! $EV trig_pc_d(1, @VA(.MAIN.Init_flow)) -> pktGenConfig() |
| 66 | SetActive: |
| 67 | nop ! $EV trig_pc_d(1, @VA(.MAIN.SetActive)) -> DMAActivate(3) |
| 68 | Gen_Packet: |
| 69 | nop ! $EV trig_pc_d(1, @VA(.MAIN.Gen_Packet)) -> pktgen(0,10) |
| 70 | |
| 71 | setx 0x0000008100640000, %g1, %g2 |
| 72 | setx 0x0ffff00000000037 , %g1, %g3 |
| 73 | stxa %g3, [%g2]ASI_PRIMARY_LITTLE |
| 74 | nop |
| 75 | setx 0x0000008100640018, %g1, %g2 |
| 76 | setx 0x0010e7a529800084 , %g1, %g3 |
| 77 | stxa %g3, [%g2]ASI_PRIMARY_LITTLE |
| 78 | nop |
| 79 | setx 0x0000008100640028, %g1, %g2 |
| 80 | setx 0x0000000000000000 , %g1, %g3 |
| 81 | stxa %g3, [%g2]ASI_PRIMARY_LITTLE |
| 82 | nop |
| 83 | |
| 84 | |
| 85 | setx loop_count, %g1, %g4 |
| 86 | delay_loop: |
| 87 | ldxa [%g2]ASI_PRIMARY_LITTLE, %g5 |
| 88 | nop |
| 89 | nop |
| 90 | nop |
| 91 | nop |
| 92 | dec %g4 |
| 93 | brnz %g4, delay_loop |
| 94 | nop |
| 95 | |
| 96 | |
| 97 | test_passed: |
| 98 | nop ! $EV trig_pc_d(1, @VA(.MAIN.test_passed)) -> NIU_EXIT_chk() |
| 99 | EXIT_GOOD |
| 100 | |
| 101 | test_failed: |
| 102 | EXIT_BAD |
| 103 | |
| 104 | |
| 105 | /************************************************************************ |
| 106 | Test case data start |
| 107 | ************************************************************************/ |
| 108 | SECTION descriptor data_va=0x100000000 |
| 109 | |
| 110 | attr_data { |
| 111 | Name = descriptor, |
| 112 | hypervisor, |
| 113 | compressimage |
| 114 | } |
| 115 | .data |
| 116 | .align 0x10000 |
| 117 | descriptor: |
| 118 | .xword 0x0060452301000484 |
| 119 | .xword 0x0068452301000484 |
| 120 | .xword 0x0070452301000484 |
| 121 | .xword 0x0078452301000484 |
| 122 | .xword 0x0080452301000484 |
| 123 | .xword 0x0088452301000484 |
| 124 | .xword 0x0090452301000484 |
| 125 | .xword 0x0098452301000484 |
| 126 | |
| 127 | .xword 0x0060452301000484 |
| 128 | .xword 0x0068452301000484 |
| 129 | .xword 0x0070452301000484 |
| 130 | .xword 0x0078452301000484 |
| 131 | .xword 0x0080452301000484 |
| 132 | .xword 0x0088452301000484 |
| 133 | .xword 0x0090452301000484 |
| 134 | .xword 0x0098452301000484 |
| 135 | .xword 0x0060452301000484 |
| 136 | .xword 0x0068452301000484 |
| 137 | .xword 0x0070452301000484 |
| 138 | .xword 0x0078452301000484 |
| 139 | .xword 0x0080452301000484 |
| 140 | .xword 0x0088452301000484 |
| 141 | .xword 0x0090452301000484 |
| 142 | .xword 0x0098452301000484 |
| 143 | |
| 144 | .xword 0x0060452301000484 |
| 145 | .xword 0x0064452301000484 |
| 146 | .xword 0x0068452301000484 |
| 147 | .xword 0x006c452301000484 |
| 148 | .xword 0x0070452301000484 |
| 149 | .xword 0x0074452301000484 |
| 150 | .xword 0x0078452301000484 |
| 151 | .xword 0x007c452301000484 |
| 152 | .xword 0x8404000123456400 |
| 153 | .xword 0x8404000123456000 |
| 154 | .xword 0x8404000123456c00 |
| 155 | .xword 0x8404000123456800 |
| 156 | .xword 0x8404000123457400 |
| 157 | .xword 0x8404000123457000 |
| 158 | .xword 0x8404000123457c00 |
| 159 | .xword 0x8404000123457800 |
| 160 | |
| 161 | /************************************************************************/ |