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