xref: /titanic_41/usr/src/uts/sun4u/ml/mach_offsets.in (revision 99ebb4ca412cb0a19d77a3899a87c055b9c30fa8)
1\
2\ CDDL HEADER START
3\
4\ The contents of this file are subject to the terms of the
5\ Common Development and Distribution License (the "License").
6\ You may not use this file except in compliance with the License.
7\
8\ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9\ or http://www.opensolaris.org/os/licensing.
10\ See the License for the specific language governing permissions
11\ and limitations under the License.
12\
13\ When distributing Covered Code, include this CDDL HEADER in each
14\ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15\ If applicable, add the following below this CDDL HEADER, with the
16\ fields enclosed by brackets "[]" replaced with your own identifying
17\ information: Portions Copyright [yyyy] [name of copyright owner]
18\
19\ CDDL HEADER END
20\
21\ Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
22\ Use is subject to license terms.
23\
24\ offsets.in: input file to produce assym.h using the stabs program
25\
26\
27\ Guidelines:
28\
29\ A blank line is required between structure/union/intrinsic names.
30\
31\ The general form is:
32\
33\	name size_define [shift_define]
34\		[member_name [offset_define]]
35\	{blank line}
36\
37\ If no individual member_name's are specified then NO members are processed.
38\ If offset_define is not specified then the member_name is
39\ converted to all caps and used instead.  If the size of an item is
40\ a power of two then an optional shift count may be output using
41\ shift_define as the name but only if shift_define was specified.
42\
43\ Arrays cause stabs to automatically output the per-array-item increment
44\ in addition to the base address:
45\
46\	 foo FOO_SIZE
47\		array	FOO_ARRAY
48\
49\ results in:
50\
51\	#define	FOO_ARRAY	0x0
52\	#define	FOO_ARRAY_INCR	0x4
53\
54\ which allows \#define's to be used to specify array items:
55\
56\	#define	FOO_0	(FOO_ARRAY + (0 * FOO_ARRAY_INCR))
57\	#define	FOO_1	(FOO_ARRAY + (1 * FOO_ARRAY_INCR))
58\	...
59\	#define	FOO_n	(FOO_ARRAY + (n * FOO_ARRAY_INCR))
60\
61\ There are several examples below (search for _INCR).
62\
63\ There is currently no manner in which to identify "anonymous"
64\ structures or unions so if they are to be used in assembly code
65\ they must be given names.
66\
67\ When specifying the offsets of nested structures/unions each nested
68\ structure or union must be listed separately then use the
69\ "\#define" escapes to add the offsets from the base structure/union
70\ and all of the nested structures/unions together.  See the many
71\ examples already in this file.
72
73#pragma ident	"%Z%%M%	%I%	%E% SMI"
74
75#ifndef	_GENASSYM
76#define	_GENASSYM
77#endif
78
79#include <vm/hat_sfmmu.h>
80#include <sys/spitregs.h>
81#include <sys/cheetahregs.h>
82#include <sys/fpras_impl.h>
83#include <sys/traptrace.h>
84
85machcpu
86	intrstat		MCPU_INTRSTAT
87	pil_high_start		MCPU_PIL_HIGH_START
88
89trap_trace_record	TRAP_ENT_SIZE
90	tt_tl		TRAP_ENT_TL
91	tt_tt		TRAP_ENT_TT
92	tt_tpc		TRAP_ENT_TPC
93	tt_tstate	TRAP_ENT_TSTATE
94	tt_tick		TRAP_ENT_TICK
95	tt_sp		TRAP_ENT_SP
96	tt_tr		TRAP_ENT_TR
97	tt_f1		TRAP_ENT_F1
98	tt_f2		TRAP_ENT_F2
99	tt_f3		TRAP_ENT_F3
100	tt_f4		TRAP_ENT_F4
101
102hat	HAT_SIZE
103	sfmmu_cpusran
104	sfmmu_tsb
105	sfmmu_ismblkpa
106	sfmmu_flags
107	sfmmu_cext
108	sfmmu_ctx_lock
109	sfmmu_ctxs
110
111sfmmu_global_stat HATSTAT_SIZE
112	sf_pagefaults		HATSTAT_PAGEFAULT
113	sf_uhash_searches	HATSTAT_UHASH_SEARCH
114	sf_uhash_links		HATSTAT_UHASH_LINKS
115	sf_khash_searches	HATSTAT_KHASH_SEARCH
116	sf_khash_links		HATSTAT_KHASH_LINKS
117
118sf_hment	SFHME_SIZE	SFHME_SHIFT
119	hme_tte		SFHME_TTE
120
121tsbmiss		TSBMISS_SIZE TSBMISS_SHIFT
122	tsbptr		TSBMISS_TSBPTR
123	tsbptr4m	TSBMISS_TSBPTR4M
124	ksfmmup		TSBMISS_KHATID
125	usfmmup		TSBMISS_UHATID
126	khashsz		TSBMISS_KHASHSZ
127	khashstart	TSBMISS_KHASHSTART
128	dcache_line_mask	TSBMISS_DMASK
129	uhashsz		TSBMISS_UHASHSZ
130	uhashstart	TSBMISS_UHASHSTART
131	hat_flags	TSBMISS_HATFLAGS
132	ismblkpa	TSBMISS_ISMBLKPA
133	itlb_misses	TSBMISS_ITLBMISS
134	dtlb_misses	TSBMISS_DTLBMISS
135	utsb_misses	TSBMISS_UTSBMISS
136	ktsb_misses	TSBMISS_KTSBMISS
137	uprot_traps	TSBMISS_UPROTS
138	kprot_traps	TSBMISS_KPROTS
139	scratch		TSBMISS_SCRATCH
140
141\#define	TSB_TAGACC	(0 * TSBMISS_SCRATCH_INCR)
142\#define	TSBMISS_HMEBP	(1 * TSBMISS_SCRATCH_INCR)
143\#define	TSBMISS_HATID	(2 * TSBMISS_SCRATCH_INCR)
144\#define	TSBMISS_XMMURET	(3 * TSBMISS_SCRATCH_INCR)
145\#define	TSBMISS_XMMUPTR	(4 * TSBMISS_SCRATCH_INCR)
146
147kpmtsbm		KPMTSBM_SIZE KPMTSBM_SHIFT
148	vbase		KPMTSBM_VBASE
149	vend		KPMTSBM_VEND
150	flags		KPMTSBM_FLAGS
151	sz_shift	KPMTSBM_SZSHIFT
152	kpmp_shift	KPMTSBM_KPMPSHIFT
153	kpmp2pshft	KPMTSBM_KPMP2PSHFT
154	kpmp_table_sz	KPMTSBM_KPMPTABLESZ
155	kpmp_tablepa	KPMTSBM_KPMPTABLEPA
156	msegphashpa	KPMTSBM_MSEGPHASHPA
157	tsbptr		KPMTSBM_TSBPTR
158	kpm_dtlb_misses	KPMTSBM_DTLBMISS
159	kpm_tsb_misses	KPMTSBM_TSBMISS
160
161kpm_page	KPMPAGE_SIZE KPMPAGE_SHIFT
162	kp_refcnt	KPMPAGE_REFCNT
163	kp_refcnta	KPMPAGE_REFCNTA
164	kp_refcntc	KPMPAGE_REFCNTC
165	kp_refcnts	KPMPAGE_REFCNTS
166
167kpm_hlk		KPMHLK_SIZE KPMHLK_SHIFT
168	khl_mutex	KPMHLK_MUTEX
169	khl_lock	KPMHLK_LOCK
170
171kpm_spage	KPMSPAGE_SIZE KPMSPAGE_SHIFT
172	kp_mapped	KPMSPAGE_MAPPED
173
174kpm_shlk	KPMSHLK_SIZE KPMSHLK_SHIFT
175	kshl_lock	KPMSHLK_LOCK
176
177memseg		MEMSEG_SIZE
178	pages		MEMSEG_PAGES
179	epages		MEMSEG_EPAGES
180	pages_base	MEMSEG_PAGES_BASE
181	pages_end	MEMSEG_PAGES_END
182	next		MEMSEG_NEXT
183	lnext		MEMSEG_LNEXT
184	nextpa		MEMSEG_NEXTPA
185	pagespa		MEMSEG_PAGESPA
186	epagespa	MEMSEG_EPAGESPA
187	kpm_pbase	MEMSEG_KPM_PBASE
188	kpm_nkpmpgs	MEMSEG_KPM_NKPMPGS
189	mseg_un
190	kpm_pagespa	MEMSEG_KPM_PAGESPA
191
192\#define	MEMSEG_KPM_PAGES	(MSEG_UN)
193\#define	MEMSEG_KPM_SPAGES	(MSEG_UN)
194
195page		PAGE_SIZE
196	p_pagenum	PAGE_PAGENUM
197
198tsb_info	TSBINFO_SIZE
199	tsb_tte		TSBINFO_TTE
200	tsb_va		TSBINFO_VADDR
201	tsb_pa		TSBINFO_PADDR
202	tsb_szc		TSBINFO_SZCODE
203	tsb_next	TSBINFO_NEXTPTR
204
205cpu_node	CPU_NODE_SIZE
206	implementation
207	version
208	nodeid
209	clock_freq
210	tick_nsec_scale
211	ecache_size	ECACHE_SIZE
212	ecache_linesize	ECACHE_LINESIZE
213	device_id	DEVICE_ID
214	itlb_size	ITLB_SIZE
215	dtlb_size	DTLB_SIZE
216
217spitfire_scrub_misc_t
218	ec_scrub_outstanding
219
220spitfire_private_t
221	sfpr_scrub_misc
222	sfpr_scrub_afsr
223
224cheetah_private_t
225	chpr_icache_size
226	chpr_icache_linesize
227	chpr_tl1_err_data
228	chpr_scrub_misc
229	chpr_fecctl0_logout
230	chpr_cecc_logout
231	chpr_async_logout
232	chpr_tlb_logout
233	chpr_fpras_timestamp
234
235ch_scrub_misc_t
236	chsm_outstanding
237
238ch_cpu_logout_t		CH_CPU_LOGOUT_SIZE
239	clo_flags	CH_CLO_FLAGS
240	clo_nest_cnt	CH_CLO_NEST_CNT
241	clo_data	CH_CLO_DATA
242	clo_sdw_data	CH_CLO_SDW_DATA
243
244ch_err_tl1_data_t	CH_ERR_TL1_DATA_SIZE
245	ch_err_tl1_g1
246	ch_err_tl1_g2
247	ch_err_tl1_g3
248	ch_err_tl1_g4
249	ch_err_tl1_g5
250	ch_err_tl1_g6
251	ch_err_tl1_g7
252	ch_err_tl1_tpc
253	ch_err_tl1_flags
254	ch_err_tl1_tmp
255	ch_err_tl1_logout
256
257ch_cpu_errors_t         CH_CPU_ERROR_SIZE
258	afsr		CH_CPU_ERRORS_AFSR
259	afar		CH_CPU_ERRORS_AFAR
260	shadow_afsr	CH_CPU_ERRORS_SHADOW_AFSR
261	shadow_afar	CH_CPU_ERRORS_SHADOW_AFAR
262	afsr_ext	CH_CPU_ERRORS_AFSR_EXT
263	shadow_afsr_ext	CH_CPU_ERRORS_SHADOW_AFSR_EXT
264	afar2		CH_CPU_ERRORS_AFAR2
265
266ch_diag_data_t		CH_DIAG_DATA_SIZE
267	chd_afar	CH_CHD_AFAR
268	chd_afar2	CH_CHD_AFAR2
269	chd_afsr	CH_CHD_AFSR
270	chd_afsr_ext	CH_CHD_AFSR_EXT
271	chd_ec_data	CH_CHD_EC_DATA
272	chd_l2_data	CH_CHD_L2_DATA
273	chd_dc_data	CH_CHD_DC_DATA
274	chd_ic_data	CH_CHD_IC_DATA
275
276ch_ec_data_t		CH_EC_DATA_SIZE
277	ec_idx		CH_EC_IDX
278	ec_tag		CH_EC_TAG
279	ec_tag_ecc	CH_EC_TAG_ECC
280	ec_data		CH_EC_DATA
281
282ch_dc_data		CH_DC_DATA_SIZE
283	dc_idx		CH_DC_IDX
284	dc_way		CH_DC_WAY
285	dc_tag		CH_DC_TAG
286	dc_utag		CH_DC_UTAG
287	dc_sntag	CH_DC_SNTAG
288	dc_data		CH_DC_DATA
289	dc_pn_data_parity	CH_DC_PN_DATA_PARITY
290
291ch_ic_data		CH_IC_DATA_SIZE
292	ic_idx		CH_IC_IDX
293	ic_way		CH_IC_WAY
294	ic_patag	CH_IC_PATAG
295	ic_utag		CH_IC_UTAG
296	ic_upper	CH_IC_UPPER
297	ic_lower	CH_IC_LOWER
298	ic_sntag	CH_IC_SNTAG
299	ic_data		CH_IC_DATA
300
301fpras_chkfn		FPRAS_CHKFN_SIZE FPRAS_CHKFN_SIZE_SHIFT
302	fpras_blk0
303
304fpras_chkfngrp		FPRAS_CHKFNGRP_SIZE FPRAS_CHKFNGRP_SIZE_SHIFT
305
306ch_pc_data		CH_PC_DATA_SIZE
307	pc_idx		CH_PC_IDX
308	pc_way		CH_PC_WAY
309	pc_status	CH_PC_STATUS
310	pc_tag		CH_PC_TAG
311	pc_sntag	CH_PC_SNTAG
312	pc_data		CH_PC_DATA
313
314pn_tlb_logout		PN_TLO_SIZE
315	tlo_info	PN_TLO_INFO
316	tlo_addr	PN_TLO_ADDR
317	tlo_pc		PN_TLO_PC
318	tlo_itlb_tte	PN_TLO_ITLB_TTE
319	tlo_dtlb_tte	PN_TLO_DTLB_TTE
320
321ch_tte_entry		CH_TLO_TTE_SIZE
322	ch_tte_tag	CH_TLO_TTE_TAG
323	ch_tte_data	CH_TLO_TTE_DATA
324
325ptl1_regs
326	ptl1_trap_regs
327	ptl1_g1
328	ptl1_g2
329	ptl1_g3
330	ptl1_g4
331	ptl1_g5
332	ptl1_g6
333	ptl1_g7
334	ptl1_tick
335	ptl1_dmmu_sfar
336	ptl1_dmmu_sfsr
337	ptl1_dmmu_tag_access
338	ptl1_immu_sfsr
339	ptl1_immu_tag_access
340	ptl1_rwindow
341	ptl1_softint
342	ptl1_pstate
343	ptl1_pil
344	ptl1_cwp
345	ptl1_wstate
346	ptl1_otherwin
347	ptl1_cleanwin
348	ptl1_cansave
349	ptl1_canrestore
350
351