xref: /titanic_52/usr/src/uts/sun4u/ml/mach_offsets.in (revision 41efec2219526a9b3ecce26f97aba761ef1e1d0d)
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 2007 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_tteflags
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
122	ksfmmup		TSBMISS_KHATID
123	usfmmup		TSBMISS_UHATID
124	tsbptr		TSBMISS_TSBPTR
125	tsbptr4m	TSBMISS_TSBPTR4M
126	ismblkpa	TSBMISS_ISMBLKPA
127	khashstart	TSBMISS_KHASHSTART
128	uhashstart	TSBMISS_UHASHSTART
129	khashsz		TSBMISS_KHASHSZ
130	uhashsz		TSBMISS_UHASHSZ
131	dcache_line_mask	TSBMISS_DMASK
132	uhat_tteflags	TSBMISS_UTTEFLAGS
133	uhat_rtteflags	TSBMISS_URTTEFLAGS
134	utsb_misses	TSBMISS_UTSBMISS
135	ktsb_misses	TSBMISS_KTSBMISS
136	uprot_traps	TSBMISS_UPROTS
137	kprot_traps	TSBMISS_KPROTS
138	scratch		TSBMISS_SCRATCH
139
140\#define	TSB_TAGACC	(0 * TSBMISS_SCRATCH_INCR)
141\#define	TSBMISS_HMEBP	(1 * TSBMISS_SCRATCH_INCR)
142\#define	TSBMISS_HATID	(2 * TSBMISS_SCRATCH_INCR)
143
144kpmtsbm		KPMTSBM_SIZE KPMTSBM_SHIFT
145	vbase		KPMTSBM_VBASE
146	vend		KPMTSBM_VEND
147	flags		KPMTSBM_FLAGS
148	sz_shift	KPMTSBM_SZSHIFT
149	kpmp_shift	KPMTSBM_KPMPSHIFT
150	kpmp2pshft	KPMTSBM_KPMP2PSHFT
151	kpmp_table_sz	KPMTSBM_KPMPTABLESZ
152	kpmp_tablepa	KPMTSBM_KPMPTABLEPA
153	msegphashpa	KPMTSBM_MSEGPHASHPA
154	tsbptr		KPMTSBM_TSBPTR
155	kpm_dtlb_misses	KPMTSBM_DTLBMISS
156	kpm_tsb_misses	KPMTSBM_TSBMISS
157
158kpm_page	KPMPAGE_SIZE KPMPAGE_SHIFT
159	kp_refcnt	KPMPAGE_REFCNT
160	kp_refcnta	KPMPAGE_REFCNTA
161	kp_refcntc	KPMPAGE_REFCNTC
162	kp_refcnts	KPMPAGE_REFCNTS
163
164kpm_hlk		KPMHLK_SIZE KPMHLK_SHIFT
165	khl_mutex	KPMHLK_MUTEX
166	khl_lock	KPMHLK_LOCK
167
168kpm_spage	KPMSPAGE_SIZE KPMSPAGE_SHIFT
169	kp_mapped	KPMSPAGE_MAPPED
170
171kpm_shlk	KPMSHLK_SIZE KPMSHLK_SHIFT
172	kshl_lock	KPMSHLK_LOCK
173
174memseg		MEMSEG_SIZE
175	pages		MEMSEG_PAGES
176	epages		MEMSEG_EPAGES
177	pages_base	MEMSEG_PAGES_BASE
178	pages_end	MEMSEG_PAGES_END
179	next		MEMSEG_NEXT
180	lnext		MEMSEG_LNEXT
181	nextpa		MEMSEG_NEXTPA
182	pagespa		MEMSEG_PAGESPA
183	epagespa	MEMSEG_EPAGESPA
184	kpm_pbase	MEMSEG_KPM_PBASE
185	kpm_nkpmpgs	MEMSEG_KPM_NKPMPGS
186	mseg_un
187	kpm_pagespa	MEMSEG_KPM_PAGESPA
188
189\#define	MEMSEG_KPM_PAGES	(MSEG_UN)
190\#define	MEMSEG_KPM_SPAGES	(MSEG_UN)
191
192page		PAGE_SIZE
193	p_pagenum	PAGE_PAGENUM
194
195tsb_info	TSBINFO_SIZE
196	tsb_tte		TSBINFO_TTE
197	tsb_va		TSBINFO_VADDR
198	tsb_pa		TSBINFO_PADDR
199	tsb_szc		TSBINFO_SZCODE
200	tsb_next	TSBINFO_NEXTPTR
201
202cpu_node	CPU_NODE_SIZE
203	implementation
204	version
205	nodeid
206	clock_freq
207	tick_nsec_scale
208	ecache_size	ECACHE_SIZE
209	ecache_linesize	ECACHE_LINESIZE
210	device_id	DEVICE_ID
211	itlb_size	ITLB_SIZE
212	dtlb_size	DTLB_SIZE
213
214spitfire_scrub_misc_t
215	ec_scrub_outstanding
216
217spitfire_private_t
218	sfpr_scrub_misc
219	sfpr_scrub_afsr
220
221cheetah_private_t
222	chpr_icache_size
223	chpr_icache_linesize
224	chpr_tl1_err_data
225	chpr_scrub_misc
226	chpr_fecctl0_logout
227	chpr_cecc_logout
228	chpr_async_logout
229	chpr_tlb_logout
230	chpr_fpras_timestamp
231
232ch_scrub_misc_t
233	chsm_outstanding
234
235ch_cpu_logout_t		CH_CPU_LOGOUT_SIZE
236	clo_flags	CH_CLO_FLAGS
237	clo_nest_cnt	CH_CLO_NEST_CNT
238	clo_data	CH_CLO_DATA
239	clo_sdw_data	CH_CLO_SDW_DATA
240
241ch_err_tl1_data_t	CH_ERR_TL1_DATA_SIZE
242	ch_err_tl1_g1
243	ch_err_tl1_g2
244	ch_err_tl1_g3
245	ch_err_tl1_g4
246	ch_err_tl1_g5
247	ch_err_tl1_g6
248	ch_err_tl1_g7
249	ch_err_tl1_tpc
250	ch_err_tl1_flags
251	ch_err_tl1_tmp
252	ch_err_tl1_logout
253
254ch_cpu_errors_t         CH_CPU_ERROR_SIZE
255	afsr		CH_CPU_ERRORS_AFSR
256	afar		CH_CPU_ERRORS_AFAR
257	shadow_afsr	CH_CPU_ERRORS_SHADOW_AFSR
258	shadow_afar	CH_CPU_ERRORS_SHADOW_AFAR
259	afsr_ext	CH_CPU_ERRORS_AFSR_EXT
260	shadow_afsr_ext	CH_CPU_ERRORS_SHADOW_AFSR_EXT
261	afar2		CH_CPU_ERRORS_AFAR2
262
263ch_diag_data_t		CH_DIAG_DATA_SIZE
264	chd_afar	CH_CHD_AFAR
265	chd_afar2	CH_CHD_AFAR2
266	chd_afsr	CH_CHD_AFSR
267	chd_afsr_ext	CH_CHD_AFSR_EXT
268	chd_ec_data	CH_CHD_EC_DATA
269	chd_l2_data	CH_CHD_L2_DATA
270	chd_dc_data	CH_CHD_DC_DATA
271	chd_ic_data	CH_CHD_IC_DATA
272
273ch_ec_data_t		CH_EC_DATA_SIZE
274	ec_idx		CH_EC_IDX
275	ec_tag		CH_EC_TAG
276	ec_tag_ecc	CH_EC_TAG_ECC
277	ec_data		CH_EC_DATA
278
279ch_dc_data		CH_DC_DATA_SIZE
280	dc_idx		CH_DC_IDX
281	dc_way		CH_DC_WAY
282	dc_tag		CH_DC_TAG
283	dc_utag		CH_DC_UTAG
284	dc_sntag	CH_DC_SNTAG
285	dc_data		CH_DC_DATA
286	dc_pn_data_parity	CH_DC_PN_DATA_PARITY
287
288ch_ic_data		CH_IC_DATA_SIZE
289	ic_idx		CH_IC_IDX
290	ic_way		CH_IC_WAY
291	ic_patag	CH_IC_PATAG
292	ic_utag		CH_IC_UTAG
293	ic_upper	CH_IC_UPPER
294	ic_lower	CH_IC_LOWER
295	ic_sntag	CH_IC_SNTAG
296	ic_data		CH_IC_DATA
297
298fpras_chkfn		FPRAS_CHKFN_SIZE FPRAS_CHKFN_SIZE_SHIFT
299	fpras_blk0
300
301fpras_chkfngrp		FPRAS_CHKFNGRP_SIZE FPRAS_CHKFNGRP_SIZE_SHIFT
302
303ch_pc_data		CH_PC_DATA_SIZE
304	pc_idx		CH_PC_IDX
305	pc_way		CH_PC_WAY
306	pc_status	CH_PC_STATUS
307	pc_tag		CH_PC_TAG
308	pc_sntag	CH_PC_SNTAG
309	pc_data		CH_PC_DATA
310
311pn_tlb_logout		PN_TLO_SIZE
312	tlo_info	PN_TLO_INFO
313	tlo_addr	PN_TLO_ADDR
314	tlo_pc		PN_TLO_PC
315	tlo_itlb_tte	PN_TLO_ITLB_TTE
316	tlo_dtlb_tte	PN_TLO_DTLB_TTE
317
318ch_tte_entry		CH_TLO_TTE_SIZE
319	ch_tte_tag	CH_TLO_TTE_TAG
320	ch_tte_data	CH_TLO_TTE_DATA
321
322ptl1_regs
323	ptl1_trap_regs
324	ptl1_g1
325	ptl1_g2
326	ptl1_g3
327	ptl1_g4
328	ptl1_g5
329	ptl1_g6
330	ptl1_g7
331	ptl1_tick
332	ptl1_dmmu_sfar
333	ptl1_dmmu_sfsr
334	ptl1_dmmu_tag_access
335	ptl1_immu_sfsr
336	ptl1_immu_tag_access
337	ptl1_rwindow
338	ptl1_softint
339	ptl1_pstate
340	ptl1_pil
341	ptl1_cwp
342	ptl1_wstate
343	ptl1_otherwin
344	ptl1_cleanwin
345	ptl1_cansave
346	ptl1_canrestore
347
348