Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * OpenSPARC T2 Processor File: ifu_basic_br.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 | #include "defines.h" | |
39 | #include "old_boot.s" | |
40 | ||
41 | !SECTION .MAIN TEXT_VA = 0xfffffffff0000000 | |
42 | !attr_text { | |
43 | ! Name=.MAIN, | |
44 | ! hypervisor | |
45 | !} | |
46 | ||
47 | .text | |
48 | .global main | |
49 | ||
50 | main: | |
51 | ||
52 | ! 1st fetch should be from RSTVaddr+0x20 | |
53 | ||
54 | illtrap | |
55 | illtrap | |
56 | illtrap | |
57 | illtrap | |
58 | illtrap | |
59 | illtrap | |
60 | illtrap | |
61 | illtrap | |
62 | ||
63 | ! First intsruction fetched should be from here RSTVaddr+0x20 | |
64 | ||
65 | ! First set up some registers with values .. | |
66 | ||
67 | setx 0x524e4f2c0e9a829e, %g1, %g2 | |
68 | setx 0x21f892f023188c4b, %g1, %g3 | |
69 | setx 0x0b2a330b797f1524, %g1, %g4 | |
70 | ||
71 | setx 0xfffffffff0000000, %g1, %g5 | |
72 | setx 0x454f5c220664cd3c, %g1, %g6 | |
73 | setx 0x5d7085ae11898343, %g1, %g7 | |
74 | ||
75 | ! Now do some useful stuff .. | |
76 | start: | |
77 | add %g1, %g2, %g2 | |
78 | add %g2, %g3, %g3 | |
79 | add %g3, %g4, %g4 | |
80 | add %g4, %g5, %g6 | |
81 | add %g5, %g6, %g7 | |
82 | add %g6, %g7, %g1 | |
83 | bpos,a start | |
84 | addcc %g0, 0x1fff, %g1 | |
85 | ||
86 | xor %g2, %g6, %g1 | |
87 | ||
88 | inc %g6 | |
89 | cmp %g5, %g6 ; | |
90 | cmp %g3, 0x1 | |
91 | ||
92 | nop | |
93 | nop | |
94 | nop | |
95 | nop | |
96 | nop | |
97 | nop | |
98 | !good_trap: | |
99 | ! b good_trap | |
100 | EXIT_GOOD | |
101 | nop | |
102 | nop | |
103 | ||
104 | !SECTION .DATA TEXT_VA = 0xffffff0000000000 | |
105 | !attr_text { | |
106 | ! Name=.DATA, | |
107 | ! hypervisor | |
108 | !} | |
109 | ||
110 | .data | |
111 | .xword 0x0 | |
112 | .xword 0x1 | |
113 | .xword 0x2 | |
114 | .xword 0x3 | |
115 | .xword 0x4 | |
116 | .xword 0x5 | |
117 | .xword 0x6 | |
118 | .xword 0x7 | |
119 | ||
120 | .end | |
121 | ||
122 |