Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / diag / assembly / arch / prm / tcu / tcu_regs_soc.s
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: tcu_regs_soc.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#define TEST_DATA0 0x4c3fdead4c3fbeef
42#define tmp1 %l2
43#define tmp2 %l3
44
45
46#include "asi_s.h"
47#include "mcu_defines.h"
48#include "tcu_defines.h"
49
50/************************************************************************
51 Test case code start
52 ************************************************************************/
53
54#ifdef FAST_BOOT
55#define RESET_VEC 0x0000000000000000
56#else
57#define RESET_VEC 0xfffffffff0000000
58#endif
59
60SECTION .RED_SEC TEXT_VA = RESET_VEC
61attr_text {
62 Name=.RED_SEC,
63 hypervisor
64}
65
66.text
67 nop
68 nop
69 nop
70 nop
71 nop
72 nop
73 nop
74 nop
75
76
77.global main
78
79
80 ! NCU Debug Trigger
81L1:
82 setx 0x8000000000, %l5, %l6
83 setx 0x4000, %l5, %g7
84 add %l6, %g7, %g7
85 ldx [%g7], %g3
86 cmp %g3, %g0
87 bne bad_trap
88 membar #Sync
89
90 ! SOC Error Status
91L2:
92 setx 0x8000000000, %l5, %l6
93 setx 0x3000, %l5, %g7
94 add %l6, %g7, %g7
95 ldx [%g7], %g3
96 cmp %g3, %g0
97 bne bad_trap
98 membar #Sync
99
100 ! SOC Pending Error Status
101L3:
102 setx 0x8000000000, %l5, %l6
103 setx 0x3028, %l5, %g7
104 add %l6, %g7, %g7
105 ldx [%g7], %g3
106 cmp %g3, %g0
107 bne bad_trap
108 membar #Sync
109
110 ! SOC SII Error Syndrome
111L4:
112 setx 0x8000000000, %l5, %l6
113 setx 0x3030, %l5, %g7
114 add %l6, %g7, %g7
115 ldx [%g7], %g3
116 cmp %g3, %g0
117 bne bad_trap
118 membar #Sync
119
120 ! SOC NCU Error Syndrome
121L5:
122 setx 0x8000000000, %l5, %l6
123 setx 0x3038, %l5, %g7
124 add %l6, %g7, %g7
125 ldx [%g7], %g3
126 cmp %g3, %g0
127 bne bad_trap
128 membar #Sync
129
130 ! Serial Number
131L6:
132 setx 0x8000000000, %l5, %l6
133 setx 0x1000, %l5, %g7
134 add %l6, %g7, %g7
135 ldx [%g7], %g3
136 cmp %g3, %g0
137 bne bad_trap
138 membar #Sync
139
140
141good_trap:
142 ba good_trap
143 nop
144 nop
145bad_trap:
146 ba bad_trap
147 nop
148
149
150/************************************************************************
151 Test case data start
152 ************************************************************************/
153.data
154.xword 0x0
155user_data_start:
156.end
157