xref: /illumos-gate/usr/src/uts/sun4u/ml/mach_offsets.in (revision 69b1fd3f24d0ee2e682883606201c61f52085805)
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 2008 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#ifndef	_GENASSYM
74#define	_GENASSYM
75#endif
76
77#include <vm/hat_sfmmu.h>
78#include <sys/spitregs.h>
79#include <sys/cheetahregs.h>
80#include <sys/fpras_impl.h>
81#include <sys/traptrace.h>
82
83machcpu
84	intrstat		MCPU_INTRSTAT
85	pil_high_start		MCPU_PIL_HIGH_START
86
87trap_trace_record	TRAP_ENT_SIZE
88	tt_tl		TRAP_ENT_TL
89	tt_tt		TRAP_ENT_TT
90	tt_tpc		TRAP_ENT_TPC
91	tt_tstate	TRAP_ENT_TSTATE
92	tt_tick		TRAP_ENT_TICK
93	tt_sp		TRAP_ENT_SP
94	tt_tr		TRAP_ENT_TR
95	tt_f1		TRAP_ENT_F1
96	tt_f2		TRAP_ENT_F2
97	tt_f3		TRAP_ENT_F3
98	tt_f4		TRAP_ENT_F4
99
100hat     HAT_SIZE
101        sfmmu_cpusran
102        sfmmu_tsb
103        sfmmu_ismblkpa
104        sfmmu_tteflags
105        sfmmu_rtteflags
106        sfmmu_srdp
107        sfmmu_region_map.h_rmap_s.hmeregion_map SFMMU_HMERMAP
108        sfmmu_scdp
109        sfmmu_cext
110        sfmmu_ctx_lock
111        sfmmu_ctxs
112
113sf_scd SCD_SIZE
114        scd_sfmmup
115        scd_region_map.h_rmap_s.hmeregion_map   SCD_HMERMAP
116
117sfmmu_global_stat HATSTAT_SIZE
118        sf_pagefaults           HATSTAT_PAGEFAULT
119        sf_uhash_searches       HATSTAT_UHASH_SEARCH
120        sf_uhash_links          HATSTAT_UHASH_LINKS
121        sf_khash_searches       HATSTAT_KHASH_SEARCH
122        sf_khash_links          HATSTAT_KHASH_LINKS
123
124sf_hment        SFHME_SIZE      SFHME_SHIFT
125        hme_tte         SFHME_TTE
126
127tsbmiss         TSBMISS_SIZE
128        ksfmmup         TSBMISS_KHATID
129        usfmmup         TSBMISS_UHATID
130        usrdp           TSBMISS_SHARED_UHATID
131        tsbptr          TSBMISS_TSBPTR
132        tsbptr4m        TSBMISS_TSBPTR4M
133        tsbscdptr       TSBMISS_TSBSCDPTR
134        tsbscdptr4m     TSBMISS_TSBSCDPTR4M
135        ismblkpa        TSBMISS_ISMBLKPA
136        khashstart      TSBMISS_KHASHSTART
137        uhashstart      TSBMISS_UHASHSTART
138        khashsz         TSBMISS_KHASHSZ
139        uhashsz         TSBMISS_UHASHSZ
140	dcache_line_mask TSBMISS_DMASK
141        uhat_tteflags   TSBMISS_UTTEFLAGS
142        uhat_rtteflags  TSBMISS_URTTEFLAGS
143        utsb_misses     TSBMISS_UTSBMISS
144        ktsb_misses     TSBMISS_KTSBMISS
145        uprot_traps     TSBMISS_UPROTS
146        kprot_traps     TSBMISS_KPROTS
147        scratch         TSBMISS_SCRATCH
148        shmermap        TSBMISS_SHMERMAP
149        scd_shmermap    TSBMISS_SCDSHMERMAP
150
151\#define        TSB_TAGACC      (0 * TSBMISS_SCRATCH_INCR)
152\#define        TSBMISS_HMEBP   (1 * TSBMISS_SCRATCH_INCR)
153\#define        TSBMISS_HATID   (2 * TSBMISS_SCRATCH_INCR)
154
155kpmtsbm		KPMTSBM_SIZE KPMTSBM_SHIFT
156	vbase		KPMTSBM_VBASE
157	vend		KPMTSBM_VEND
158	flags		KPMTSBM_FLAGS
159	sz_shift	KPMTSBM_SZSHIFT
160	kpmp_shift	KPMTSBM_KPMPSHIFT
161	kpmp2pshft	KPMTSBM_KPMP2PSHFT
162	kpmp_table_sz	KPMTSBM_KPMPTABLESZ
163	kpmp_tablepa	KPMTSBM_KPMPTABLEPA
164	msegphashpa	KPMTSBM_MSEGPHASHPA
165	tsbptr		KPMTSBM_TSBPTR
166	kpm_dtlb_misses	KPMTSBM_DTLBMISS
167	kpm_tsb_misses	KPMTSBM_TSBMISS
168
169kpm_page	KPMPAGE_SIZE KPMPAGE_SHIFT
170	kp_refcnt	KPMPAGE_REFCNT
171	kp_refcnta	KPMPAGE_REFCNTA
172	kp_refcntc	KPMPAGE_REFCNTC
173	kp_refcnts	KPMPAGE_REFCNTS
174
175kpm_hlk		KPMHLK_SIZE KPMHLK_SHIFT
176	khl_mutex	KPMHLK_MUTEX
177	khl_lock	KPMHLK_LOCK
178
179kpm_spage	KPMSPAGE_SIZE KPMSPAGE_SHIFT
180	kp_mapped_flag	KPMSPAGE_MAPPED
181
182kpm_shlk	KPMSHLK_SIZE KPMSHLK_SHIFT
183	kshl_lock	KPMSHLK_LOCK
184
185memseg		MEMSEG_SIZE
186	pages		MEMSEG_PAGES
187	epages		MEMSEG_EPAGES
188	pages_base	MEMSEG_PAGES_BASE
189	pages_end	MEMSEG_PAGES_END
190	next		MEMSEG_NEXT
191	lnext		MEMSEG_LNEXT
192	nextpa		MEMSEG_NEXTPA
193	pagespa		MEMSEG_PAGESPA
194	epagespa	MEMSEG_EPAGESPA
195	kpm_pbase	MEMSEG_KPM_PBASE
196	kpm_nkpmpgs	MEMSEG_KPM_NKPMPGS
197	mseg_un
198	kpm_pagespa	MEMSEG_KPM_PAGESPA
199
200\#define	MEMSEG_KPM_PAGES	(MSEG_UN)
201\#define	MEMSEG_KPM_SPAGES	(MSEG_UN)
202
203page		PAGE_SIZE
204	p_pagenum	PAGE_PAGENUM
205
206tsb_info	TSBINFO_SIZE
207	tsb_tte		TSBINFO_TTE
208	tsb_va		TSBINFO_VADDR
209	tsb_pa		TSBINFO_PADDR
210	tsb_szc		TSBINFO_SZCODE
211	tsb_next	TSBINFO_NEXTPTR
212
213cpu_node	CPU_NODE_SIZE
214	implementation
215	version
216	nodeid
217	clock_freq
218	tick_nsec_scale
219	ecache_size	ECACHE_SIZE
220	ecache_linesize	ECACHE_LINESIZE
221	device_id	DEVICE_ID
222	itlb_size	ITLB_SIZE
223	dtlb_size	DTLB_SIZE
224
225spitfire_scrub_misc_t
226	ec_scrub_outstanding
227
228spitfire_private_t
229	sfpr_scrub_misc
230	sfpr_scrub_afsr
231
232cheetah_private_t
233	chpr_icache_size
234	chpr_icache_linesize
235	chpr_tl1_err_data
236	chpr_scrub_misc
237	chpr_fecctl0_logout
238	chpr_cecc_logout
239	chpr_async_logout
240	chpr_tlb_logout
241	chpr_fpras_timestamp
242
243ch_scrub_misc_t
244	chsm_outstanding
245
246ch_cpu_logout_t		CH_CPU_LOGOUT_SIZE
247	clo_flags	CH_CLO_FLAGS
248	clo_nest_cnt	CH_CLO_NEST_CNT
249	clo_data	CH_CLO_DATA
250	clo_sdw_data	CH_CLO_SDW_DATA
251
252ch_err_tl1_data_t	CH_ERR_TL1_DATA_SIZE
253	ch_err_tl1_g1
254	ch_err_tl1_g2
255	ch_err_tl1_g3
256	ch_err_tl1_g4
257	ch_err_tl1_g5
258	ch_err_tl1_g6
259	ch_err_tl1_g7
260	ch_err_tl1_tpc
261	ch_err_tl1_flags
262	ch_err_tl1_tmp
263	ch_err_tl1_logout
264
265ch_cpu_errors_t         CH_CPU_ERROR_SIZE
266	afsr		CH_CPU_ERRORS_AFSR
267	afar		CH_CPU_ERRORS_AFAR
268	shadow_afsr	CH_CPU_ERRORS_SHADOW_AFSR
269	shadow_afar	CH_CPU_ERRORS_SHADOW_AFAR
270	afsr_ext	CH_CPU_ERRORS_AFSR_EXT
271	shadow_afsr_ext	CH_CPU_ERRORS_SHADOW_AFSR_EXT
272	afar2		CH_CPU_ERRORS_AFAR2
273
274ch_diag_data_t		CH_DIAG_DATA_SIZE
275	chd_afar	CH_CHD_AFAR
276	chd_afar2	CH_CHD_AFAR2
277	chd_afsr	CH_CHD_AFSR
278	chd_afsr_ext	CH_CHD_AFSR_EXT
279	chd_ec_data	CH_CHD_EC_DATA
280	chd_l2_data	CH_CHD_L2_DATA
281	chd_dc_data	CH_CHD_DC_DATA
282	chd_ic_data	CH_CHD_IC_DATA
283
284ch_ec_data_t		CH_EC_DATA_SIZE
285	ec_idx		CH_EC_IDX
286	ec_tag		CH_EC_TAG
287	ec_tag_ecc	CH_EC_TAG_ECC
288	ec_data		CH_EC_DATA
289
290ch_dc_data		CH_DC_DATA_SIZE
291	dc_idx		CH_DC_IDX
292	dc_way		CH_DC_WAY
293	dc_tag		CH_DC_TAG
294	dc_utag		CH_DC_UTAG
295	dc_sntag	CH_DC_SNTAG
296	dc_data		CH_DC_DATA
297	dc_pn_data_parity	CH_DC_PN_DATA_PARITY
298
299ch_ic_data		CH_IC_DATA_SIZE
300	ic_idx		CH_IC_IDX
301	ic_way		CH_IC_WAY
302	ic_patag	CH_IC_PATAG
303	ic_utag		CH_IC_UTAG
304	ic_upper	CH_IC_UPPER
305	ic_lower	CH_IC_LOWER
306	ic_sntag	CH_IC_SNTAG
307	ic_data		CH_IC_DATA
308
309fpras_chkfn		FPRAS_CHKFN_SIZE FPRAS_CHKFN_SIZE_SHIFT
310	fpras_blk0
311
312fpras_chkfngrp		FPRAS_CHKFNGRP_SIZE FPRAS_CHKFNGRP_SIZE_SHIFT
313
314ch_pc_data		CH_PC_DATA_SIZE
315	pc_idx		CH_PC_IDX
316	pc_way		CH_PC_WAY
317	pc_status	CH_PC_STATUS
318	pc_tag		CH_PC_TAG
319	pc_sntag	CH_PC_SNTAG
320	pc_data		CH_PC_DATA
321
322pn_tlb_logout		PN_TLO_SIZE
323	tlo_info	PN_TLO_INFO
324	tlo_addr	PN_TLO_ADDR
325	tlo_pc		PN_TLO_PC
326	tlo_itlb_tte	PN_TLO_ITLB_TTE
327	tlo_dtlb_tte	PN_TLO_DTLB_TTE
328
329ch_tte_entry		CH_TLO_TTE_SIZE
330	ch_tte_tag	CH_TLO_TTE_TAG
331	ch_tte_data	CH_TLO_TTE_DATA
332
333ptl1_regs
334	ptl1_trap_regs
335	ptl1_g1
336	ptl1_g2
337	ptl1_g3
338	ptl1_g4
339	ptl1_g5
340	ptl1_g6
341	ptl1_g7
342	ptl1_tick
343	ptl1_dmmu_sfar
344	ptl1_dmmu_sfsr
345	ptl1_dmmu_tag_access
346	ptl1_immu_sfsr
347	ptl1_immu_tag_access
348	ptl1_rwindow
349	ptl1_softint
350	ptl1_pstate
351	ptl1_pil
352	ptl1_cwp
353	ptl1_wstate
354	ptl1_otherwin
355	ptl1_cleanwin
356	ptl1_cansave
357	ptl1_canrestore
358
359