| 1 | /* |
| 2 | * ========== Copyright Header Begin ========================================== |
| 3 | * |
| 4 | * OpenSPARC T2 Processor File: tso_n1_binit1.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 srcaddr %i0 |
| 39 | #define dstaddr %i1 |
| 40 | #define count %i2 |
| 41 | |
| 42 | #include "hboot.s" |
| 43 | |
| 44 | .global main |
| 45 | .text |
| 46 | main: |
| 47 | wr %g0, 0x4, %fprs /* make sure fef is 1 */ |
| 48 | ta T_CHANGE_PRIV |
| 49 | |
| 50 | setup_addresses: |
| 51 | setx in_stream, %g2, srcaddr |
| 52 | setx out_stream, %g2, dstaddr |
| 53 | |
| 54 | ldda [srcaddr] 0x22, %l0 |
| 55 | add srcaddr, 0x10, srcaddr |
| 56 | ldda [srcaddr] 0x22, %l2 |
| 57 | add srcaddr, 0x10, srcaddr |
| 58 | ldda [srcaddr] 0x22, %l4 |
| 59 | add srcaddr, 0x10, srcaddr |
| 60 | ldda [srcaddr] 0x22, %l6 |
| 61 | stxa %l0, [dstaddr] 0x22 |
| 62 | add dstaddr, 0x8, dstaddr |
| 63 | stxa %l1, [dstaddr] 0x22 |
| 64 | add dstaddr, 0x8, dstaddr |
| 65 | stxa %l2, [dstaddr] 0x22 |
| 66 | add dstaddr, 0x8, dstaddr |
| 67 | stxa %l3, [dstaddr] 0x22 |
| 68 | add dstaddr, 0x8, dstaddr |
| 69 | stxa %l4, [dstaddr] 0x22 |
| 70 | add dstaddr, 0x8, dstaddr |
| 71 | stxa %l5, [dstaddr] 0x22 |
| 72 | add dstaddr, 0x8, dstaddr |
| 73 | stxa %l6, [dstaddr] 0x22 |
| 74 | add dstaddr, 0x8, dstaddr |
| 75 | stxa %l7, [dstaddr] 0x22 |
| 76 | |
| 77 | trap: |
| 78 | ta GOOD_TRAP |
| 79 | user_text_end: |
| 80 | |
| 81 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 82 | |
| 83 | .global in_stream |
| 84 | .global out_stream |
| 85 | .data |
| 86 | .align 0x1000 |
| 87 | user_data_start: |
| 88 | in_stream: |
| 89 | .word 0xb1bababa |
| 90 | .word 0xb2bababa |
| 91 | .word 0xb3bababa |
| 92 | .word 0xb4bababa |
| 93 | .word 0xb5bababa |
| 94 | .word 0xb6bababa |
| 95 | .word 0xb7bababa |
| 96 | .word 0xb8bababa |
| 97 | .word 0xb9bababa |
| 98 | .word 0xbabababa |
| 99 | .word 0xbbbababa |
| 100 | .word 0xbcbababa |
| 101 | .word 0xbdbababa |
| 102 | .word 0xbebababa |
| 103 | .word 0xbfbababa |
| 104 | .skip 512 |
| 105 | |
| 106 | ! offset the out_stream block |
| 107 | .align 0x1000 |
| 108 | out_stream: |
| 109 | .skip 1024 |
| 110 | |
| 111 | user_data_end: |