Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / diag / assembly / arch / prm / tso / tso_directed / tso_n1_binit2.s
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: tso_n1_binit2.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
46.text
47main:
48 wr %g0, 0x4, %fprs /* make sure fef is 1 */
49 ta T_CHANGE_PRIV
50
51setup_addresses:
52 setx in_stream, %g2, srcaddr
53 setx out_stream, %g2, dstaddr
54 setx 0x100, %g2, count
55
56timing_loop:
57 ldda [srcaddr] 0x22, %l0
58 add srcaddr, 0x10, srcaddr
59 ldda [srcaddr] 0x22, %l2
60 add srcaddr, 0x10, srcaddr
61 ldda [srcaddr] 0x22, %l4
62 add srcaddr, 0x10, srcaddr
63 ldda [srcaddr] 0x22, %l6
64 add srcaddr, 0x10, srcaddr
65 stxa %l0, [dstaddr] 0x22
66 add dstaddr, 0x8, dstaddr
67 stxa %l1, [dstaddr] 0x22
68 add dstaddr, 0x8, dstaddr
69 stxa %l2, [dstaddr] 0x22
70 add dstaddr, 0x8, dstaddr
71 stxa %l3, [dstaddr] 0x22
72 add dstaddr, 0x8, dstaddr
73 stxa %l4, [dstaddr] 0x22
74 add dstaddr, 0x8, dstaddr
75 stxa %l5, [dstaddr] 0x22
76 add dstaddr, 0x8, dstaddr
77 stxa %l6, [dstaddr] 0x22
78 add dstaddr, 0x8, dstaddr
79 stxa %l7, [dstaddr] 0x22
80 add dstaddr, 0x8, dstaddr
81
82 deccc count
83 bg,pt %xcc,timing_loop
84 nop
85
86trap:
87 ta GOOD_TRAP
88user_text_end:
89
90!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
91
92.global in_stream
93.global out_stream
94.data
95.align 0x1000
96user_data_start:
97in_stream:
98 .word 0xb1bababa
99 .word 0xb2bababa
100 .word 0xb3bababa
101 .word 0xb4bababa
102 .word 0xb5bababa
103 .word 0xb6bababa
104 .word 0xb7bababa
105 .word 0xb8bababa
106 .word 0xb9bababa
107 .word 0xbabababa
108 .word 0xbbbababa
109 .word 0xbcbababa
110 .word 0xbdbababa
111 .word 0xbebababa
112 .word 0xbfbababa
113 .skip 16000
114
115! offset the out_stream block
116.align 0x1000
117out_stream:
118 .skip 16000
119
120user_data_end: