1 \ offsets.in: input file to produce assym.h using the stabs program
2 \ Copyright 2009 Sun Microsystems, Inc. All rights reserved.
3 \ Use is subject to license terms.
7 \ The contents of this file are subject to the terms of the
8 \ Common Development and Distribution License (the "License").
9 \ You may not use this file except in compliance with the License.
11 \ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12 \ or http://www.opensolaris.org/os/licensing.
13 \ See the License for the specific language governing permissions
14 \ and limitations under the License.
16 \ When distributing Covered Code, include this CDDL HEADER in each
17 \ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18 \ If applicable, add the following below this CDDL HEADER, with the
19 \ fields enclosed by brackets "[]" replaced with your own identifying
20 \ information: Portions Copyright [yyyy] [name of copyright owner]
28 \ A blank line is required between structure/union/intrinsic names.
30 \ The general form is:
32 \ name size_define [shift_define]
33 \ member_name [offset_define]
36 \ If offset_define is not specified then the member_name is
37 \ converted to all caps and used instead. If the size of an item is
38 \ a power of two then an optional shift count may be output using
39 \ shift_define as the name but only if shift_define was specified.
41 \ Arrays cause stabs to automatically output the per-array-item increment
42 \ in addition to the base address:
49 \ #define FOO_ARRAY 0x0
50 \ #define FOO_ARRAY_INCR 0x4
52 \ which allows \#define's to be used to specify array items:
54 \ #define FOO_0 (FOO_ARRAY + (0 * FOO_ARRAY_INCR))
55 \ #define FOO_1 (FOO_ARRAY + (1 * FOO_ARRAY_INCR))
57 \ #define FOO_n (FOO_ARRAY + (n * FOO_ARRAY_INCR))
59 \ There are several examples below (search for _INCR).
61 \ There is currently no manner in which to identify "anonymous"
62 \ structures or unions so if they are to be used in assembly code
63 \ they must be given names.
65 \ When specifying the offsets of nested structures/unions each nested
66 \ structure or union must be listed separately then use the
67 \ "\#define" escapes to add the offsets from the base structure/union
68 \ and all of the nested structures/unions together. See the many
69 \ examples already in this file.
77 #include <sys/vmmeter.h>
78 #include <sys/mutex_impl.h>
79 #include <sys/lockstat.h>
80 #include <sys/ddi_isa.h>
81 #include <sys/ivintr.h>
82 #include <sys/ddi_impldefs.h>
83 #include <vm/hat_sfmmu.h>
84 #include <sys/avintr.h>
85 #include <sys/strsubr.h>
87 #include <sys/fpu/fpu_simulator.h>
88 #include <sys/ontrap.h>
90 #include <sys/ddifm_impl.h>
91 #include <sys/brand.h>
115 \#define P_UTRAP4 (UT_ILLTRAP_INSTRUCTION * CPTRSIZE)
116 \#define P_UTRAP7 (UT_FP_DISABLED * CPTRSIZE)
117 \#define P_UTRAP8 (UT_FP_EXCEPTION_IEEE_754 * CPTRSIZE)
118 \#define P_UTRAP10 (UT_TAG_OVERFLOW * CPTRSIZE)
119 \#define P_UTRAP11 (UT_DIVISION_BY_ZERO * CPTRSIZE)
120 \#define P_UTRAP15 (UT_MEM_ADDRESS_NOT_ALIGNED * CPTRSIZE)
121 \#define P_UTRAP16 (UT_PRIVILEGED_ACTION * CPTRSIZE)
163 _tu._t_post_sys_ast T_POST_SYS_AST
164 _tu._ts._t_astflag T_ASTFLAG
165 _tu._ts._t_sig_check T_SIG_CHECK
166 _tu._ts._t_post_sys T_POST_SYS
167 _tu._ts._t_trapret T_TRAPRET
173 _tdu._tds._t_dtrace_on T_DTRACE_ON
174 _tdu._tds._t_dtrace_step T_DTRACE_STEP
175 _tdu._tds._t_dtrace_ret T_DTRACE_RET
176 _tdu._tds._t_dtrace_ast T_DTRACE_AST
177 _tdu._t_dtrace_ft T_DTRACE_FT
181 \#define L_PC (0 * LABEL_VAL_INCR)
182 \#define L_SP (1 * LABEL_VAL_INCR)
184 \#define T_PC (T_PCB + L_PC)
185 \#define T_SP (T_PCB + L_SP)
187 sysent SYSENT_SIZE SYSENT_SHIFT
195 hmehash_bucket HMEBUCK_SIZE
197 hmeh_nextpa HMEBUCK_NEXTPA
198 hmeh_listlock HMEBUCK_LOCK
206 iblk_nextpa IBLK_NEXTPA
210 imap_vb_shift IMAP_VB_SHIFT
212 imap_hatflags IMAP_HATFLAGS
213 imap_sz_mask IMAP_SZ_MASK
214 imap_ismhat IMAP_ISMHAT
221 tagints.inthi TSBTAG_INTHI
222 tagints.intlo TSBTAG_INTLO
225 hblk_next HMEBLK_NEXT
227 hblk_misc HMEBLK_MISC
229 hblk_nextpa HMEBLK_NEXTPA
232 mmu_gnum MMU_CTX_GNUM
233 mmu_cnum MMU_CTX_CNUM
234 mmu_nctxs MMU_CTX_NCTXS
236 sfmmu_ctx SFMMU_MMU_CTX_SIZE SFMMU_MMU_CTX_SHIFT
237 gnum SFMMU_MMU_GC_NUM
249 lwp_ru.sysc LWP_RU_SYSC
251 lwp_mstate.ms_start LWP_MS_START
252 lwp_mstate.ms_prev LWP_MS_PREV
253 lwp_mstate.ms_state_start LWP_STATE_START
254 lwp_mstate.ms_acct LWP_MS_ACCT
255 lwp_pcb.pcb_flags PCB_FLAGS
256 lwp_pcb.pcb_trap0addr PCB_TRAP0
257 lwp_pcb.pcb_step PCB_STEP
258 lwp_pcb.pcb_tracepc PCB_TRACEPC
267 \#define LWP_ACCT_USER (LWP_MS_ACCT + (LMS_USER * LWP_MS_ACCT_INCR))
268 \#define LWP_ACCT_SYSTEM (LWP_MS_ACCT + (LMS_SYSTEM * LWP_MS_ACCT_INCR))
270 rwindow32 RWIN32SIZE RWIN32SHIFT
274 rwindow64 RWIN64SIZE RWIN64SHIFT
291 \#define MPCB_RWIN0 (MPCB_RWIN + (0 * MPCB_RWIN_INCR))
292 \#define MPCB_RWIN1 (MPCB_RWIN + (1 * MPCB_RWIN_INCR))
293 \#define MPCB_RSP0 (MPCB_RSP + (0 * MPCB_RSP_INCR))
294 \#define MPCB_RSP1 (MPCB_RSP + (1 * MPCB_RSP_INCR))
297 fpu_fr.fpu_regs FPU_REGS
304 \#define FPU_GSR KFPUSIZE
327 \ XXX - doesn't preserve case up above
328 \#define nPC_OFF NPC_OFF
355 cpu_stats.sys.cpumigrate CPU_STATS_SYS_CPUMIGRATE
356 cpu_stats.sys.intr CPU_STATS_SYS_INTR
357 cpu_stats.sys.intrunpin CPU_STATS_SYS_INTRUNPIN
358 cpu_stats.sys.intrblk CPU_STATS_SYS_INTRBLK
359 cpu_stats.sys.syscall CPU_STATS_SYS_SYSCALL
363 cpu_ftrace.ftd_state CPU_FTRACE_STATE
369 cpu_m.divisor CPU_DIVISOR
370 cpu_m.intrstat CPU_INTRSTAT
371 cpu_m.pil_high_start CPU_PIL_HIGH_START
372 cpu_m.intr_tail INTR_TAIL
373 cpu_m.intr_head INTR_HEAD
374 cpu_m.tl1_hdlr CPU_TL1_HDLR
375 cpu_m.intrcnt CPU_INTRCNT
384 cpu_m.cpu_private CPU_PRIVATE
385 cpu_m.cpu_mmu_idx CPU_MMU_IDX
386 cpu_m.cpu_mmu_ctxp CPU_MMU_CTXP
387 cpu_m.ptl1_state CPU_PTL1
389 cpu_core_t CPU_CORE_SIZE CPU_CORE_SHIFT
395 ptl1_state PTL1_STATE_SIZE
424 dmv_disp DMV_DISP_SIZE DMV_DISP_SHIFT
431 i_ndi_err NDI_ERR_SIZE
436 ddi_acc_impl DDI_ACC_IMPL_SIZE
480 bus_dma_allochdl OPS_ALLOCHDL
481 bus_dma_freehdl OPS_FREEHDL
482 bus_dma_bindhdl OPS_BINDHDL
483 bus_dma_unbindhdl OPS_UNBINDHDL
484 bus_dma_flush OPS_FLUSH
490 devo_bus_ops DEVI_BUS_OPS
493 devi_ops DEVI_DEV_OPS
495 devi_bus_dma_allochdl
498 devi_bus_dma_unbindhdl
500 devi_bus_dma_unbindfunc
507 wlentime KSTAT_IO_WLENTIME
508 wlastupdate KSTAT_IO_WLASTUPDATE
510 rlentime KSTAT_IO_RLENTIME
511 rlastupdate KSTAT_IO_RLASTUPDATE
516 dmai_rflags DMA_HANDLE_RFLAGS
517 dmai_rdip DMA_HANDLE_RDIP
528 fpustat_kstat FPUSTAT_KSTAT_SIZE
529 fpu_unfinished_traps.value FPUSTAT_UNFIN_KSTAT
531 fpuinfo_kstat FPUINFO_KSTAT_SIZE
532 fpu_sim_fitos.value FPUINFO_FITOS_KSTAT
534 mod_stub_info MODS_SIZE
535 mods_func_adr MODS_INSTFCN
536 mods_errfcn MODS_RETFCN