Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / diag / assembly / isa3 / isa3_core_id.s
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: isa3_core_id.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 "nmacros.h"
39#define MAIN_PAGE_HV_ALSO
40#define MAIN_PAGE_NUCLEUS_ALSO
41#define ENABLE_HT0_DAE_Invalid_Asi_0x14
42#include "hboot.s"
43
44/************************************************************************
45 Test case code start
46 ************************************************************************/
47
48.text
49.global main
50
51main: /* test begin */
52
53 ta T_CHANGE_HPRIV
54
55 /* Get thread ID for later use */
56 ta T_RD_THID
57 mov %o1, %l6
58 umul %l6, 256, %l7
59 /* Set up the reference for nosas checking */
60 set 7, %i1
61 sllx %i1, 32, %i1
62 set 63, %i2
63 sllx %i2, 16, %i2
64 or %i1, %i2, %i3
65 or %i3, %l6, %i3
66
67 /* ASI_CMP_CORE_ID */
68 wr %g0, 0x63, %asi
69 ldxa [0x10] %asi, %l7
70
71 cmp %l7, %i3
72 bne bad_exit
73 nop
74
75 /* Isolate the core id */
76 and %l7, 0x3f, %l6
77
78 /* ASI_CMP_CORE_INTR_ID */
79 wr %g0, 0x63, %asi
80 ldxa [0x0] %asi, %l7
81
82 cmp %l6, %l7
83 bne bad_exit
84 nop
85
86 /* Attempt to write to ASI_CMP_CORE_INTR_ID. It should trap. */
87 stxa %l7, [0x0] %asi
88
89 nop
90 EXIT_GOOD
91bad_exit: EXIT_BAD
92
93
94/************************************************************************
95 Test case data start
96 ************************************************************************/
97.data
98
99user_data_start:
100.xword 0x0001020304050607
101.xword 0x08090a0b0c0d0e0f
102.xword 0x1011121314151617
103.xword 0x18191a1b1c1d1e1f
104.xword 0x2021222324252627
105.xword 0x28292a2b2c2d2e2f
106.xword 0x3031323334353637
107.xword 0x38393a3b3c3d3e3f
108.xword 0x4041424344454647
109.xword 0x48494a4b4c4d4e4f
110.xword 0x5051525354555657
111.xword 0x58595a5b5c5d5e5f
112.xword 0x6061626364656667
113.xword 0x68696a6b6c6d6e6f
114.xword 0x7071727374757677
115.xword 0x78797a7b7c7d7e7f
116.xword 0x8081828384858687
117.xword 0x88898a8b8c8d8e8f
118.xword 0x9091929394959697
119.xword 0x98999a9b9c9d9e9f
120.xword 0xa0a1a2a3a4a5a6a7
121.xword 0xa8a9aaabacadaeaf
122.xword 0xb0b1b2b3b4b5b6b7
123.xword 0xb8b9babbbcbdbebf
124.xword 0xc0c1c2c3c4c5c6c7
125.xword 0xc8c9cacbcccdcecf
126.xword 0xd0d1d2d3d4d5d6d7
127.xword 0xd8d9dadbdcdddedf
128.xword 0xe0e1e2e3e4e5e6e7
129.xword 0xe8e9eaebecedeeef
130.xword 0xf0f1f2f3f4f5f6f7
131.xword 0xf8f9fafbfcfdfeff
132.xword 0x0001020304050607
133.xword 0x08090a0b0c0d0e0f
134.xword 0x1011121314151617
135.xword 0x18191a1b1c1d1e1f
136.xword 0x2021222324252627
137.xword 0x28292a2b2c2d2e2f
138.xword 0x3031323334353637
139.xword 0x38393a3b3c3d3e3f
140.xword 0x4041424344454647
141.xword 0x48494a4b4c4d4e4f
142.xword 0x5051525354555657
143.xword 0x58595a5b5c5d5e5f
144.xword 0x6061626364656667
145.xword 0x68696a6b6c6d6e6f
146.xword 0x7071727374757677
147.xword 0x78797a7b7c7d7e7f
148.xword 0x8081828384858687
149.xword 0x88898a8b8c8d8e8f
150.xword 0x9091929394959697
151.xword 0x98999a9b9c9d9e9f
152.xword 0xa0a1a2a3a4a5a6a7
153.xword 0xa8a9aaabacadaeaf
154.xword 0xb0b1b2b3b4b5b6b7
155.xword 0xb8b9babbbcbdbebf
156.xword 0xc0c1c2c3c4c5c6c7
157.xword 0xc8c9cacbcccdcecf
158.xword 0xd0d1d2d3d4d5d6d7
159.xword 0xd8d9dadbdcdddedf
160.xword 0xe0e1e2e3e4e5e6e7
161.xword 0xe8e9eaebecedeeef
162.xword 0xf0f1f2f3f4f5f6f7
163.xword 0xf8f9fafbfcfdfeff
164.xword 0x0001020304050607
165.xword 0x08090a0b0c0d0e0f
166.xword 0x1011121314151617
167.xword 0x18191a1b1c1d1e1f
168.xword 0x2021222324252627
169.xword 0x28292a2b2c2d2e2f
170.xword 0x3031323334353637
171.xword 0x38393a3b3c3d3e3f
172.xword 0x4041424344454647
173.xword 0x48494a4b4c4d4e4f
174.xword 0x5051525354555657
175.xword 0x58595a5b5c5d5e5f
176.xword 0x6061626364656667
177.xword 0x68696a6b6c6d6e6f
178.xword 0x7071727374757677
179.xword 0x78797a7b7c7d7e7f
180.xword 0x8081828384858687
181.xword 0x88898a8b8c8d8e8f
182.xword 0x9091929394959697
183.xword 0x98999a9b9c9d9e9f
184.xword 0xa0a1a2a3a4a5a6a7
185.xword 0xa8a9aaabacadaeaf
186.xword 0xb0b1b2b3b4b5b6b7
187.xword 0xb8b9babbbcbdbebf
188.xword 0xc0c1c2c3c4c5c6c7
189.xword 0xc8c9cacbcccdcecf
190.xword 0xd0d1d2d3d4d5d6d7
191.xword 0xd8d9dadbdcdddedf
192.xword 0xe0e1e2e3e4e5e6e7
193.xword 0xe8e9eaebecedeeef
194.xword 0xf0f1f2f3f4f5f6f7
195.xword 0xf8f9fafbfcfdfeff
196.xword 0x0001020304050607
197.xword 0x08090a0b0c0d0e0f
198.xword 0x1011121314151617
199.xword 0x18191a1b1c1d1e1f
200.xword 0x2021222324252627
201.xword 0x28292a2b2c2d2e2f
202.xword 0x3031323334353637
203.xword 0x38393a3b3c3d3e3f
204.xword 0x4041424344454647
205.xword 0x48494a4b4c4d4e4f
206.xword 0x5051525354555657
207.xword 0x58595a5b5c5d5e5f
208.xword 0x6061626364656667
209.xword 0x68696a6b6c6d6e6f
210.xword 0x7071727374757677
211.xword 0x78797a7b7c7d7e7f
212.xword 0x8081828384858687
213.xword 0x88898a8b8c8d8e8f
214.xword 0x9091929394959697
215.xword 0x98999a9b9c9d9e9f
216.xword 0xa0a1a2a3a4a5a6a7
217.xword 0xa8a9aaabacadaeaf
218.xword 0xb0b1b2b3b4b5b6b7
219.xword 0xb8b9babbbcbdbebf
220.xword 0xc0c1c2c3c4c5c6c7
221.xword 0xc8c9cacbcccdcecf
222.xword 0xd0d1d2d3d4d5d6d7
223.xword 0xd8d9dadbdcdddedf
224.xword 0xe0e1e2e3e4e5e6e7
225.xword 0xe8e9eaebecedeeef
226.xword 0xf0f1f2f3f4f5f6f7
227.xword 0xf8f9fafbfcfdfeff
228.xword 0x0001020304050607
229.xword 0x08090a0b0c0d0e0f
230.xword 0x1011121314151617
231.xword 0x18191a1b1c1d1e1f
232.xword 0x2021222324252627
233.xword 0x28292a2b2c2d2e2f
234.xword 0x3031323334353637
235.xword 0x38393a3b3c3d3e3f
236.xword 0x4041424344454647
237.xword 0x48494a4b4c4d4e4f
238.xword 0x5051525354555657
239.xword 0x58595a5b5c5d5e5f
240.xword 0x6061626364656667
241.xword 0x68696a6b6c6d6e6f
242.xword 0x7071727374757677
243.xword 0x78797a7b7c7d7e7f
244.xword 0x8081828384858687
245.xword 0x88898a8b8c8d8e8f
246.xword 0x9091929394959697
247.xword 0x98999a9b9c9d9e9f
248.xword 0xa0a1a2a3a4a5a6a7
249.xword 0xa8a9aaabacadaeaf
250.xword 0xb0b1b2b3b4b5b6b7
251.xword 0xb8b9babbbcbdbebf
252.xword 0xc0c1c2c3c4c5c6c7
253.xword 0xc8c9cacbcccdcecf
254.xword 0xd0d1d2d3d4d5d6d7
255.xword 0xd8d9dadbdcdddedf
256.xword 0xe0e1e2e3e4e5e6e7
257.xword 0xe8e9eaebecedeeef
258.xword 0xf0f1f2f3f4f5f6f7
259.xword 0xf8f9fafbfcfdfeff
260.end