1c6c9aed4Sab /*
2c6c9aed4Sab  * CDDL HEADER START
3c6c9aed4Sab  *
4c6c9aed4Sab  * The contents of this file are subject to the terms of the
5c6c9aed4Sab  * Common Development and Distribution License (the "License").
6c6c9aed4Sab  * You may not use this file except in compliance with the License.
7c6c9aed4Sab  *
8c6c9aed4Sab  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9c6c9aed4Sab  * or http://www.opensolaris.org/os/licensing.
10c6c9aed4Sab  * See the License for the specific language governing permissions
11c6c9aed4Sab  * and limitations under the License.
12c6c9aed4Sab  *
13c6c9aed4Sab  * When distributing Covered Code, include this CDDL HEADER in each
14c6c9aed4Sab  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15c6c9aed4Sab  * If applicable, add the following below this CDDL HEADER, with the
16c6c9aed4Sab  * fields enclosed by brackets "[]" replaced with your own identifying
17c6c9aed4Sab  * information: Portions Copyright [yyyy] [name of copyright owner]
18c6c9aed4Sab  *
19c6c9aed4Sab  * CDDL HEADER END
20c6c9aed4Sab  */
21c6c9aed4Sab 
22c6c9aed4Sab /*
23c6c9aed4Sab  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24c6c9aed4Sab  * Use is subject to license terms.
25c6c9aed4Sab  */
2634bdffbfSGarrett D'Amore /*
2734bdffbfSGarrett D'Amore  * Copyright 2012 DEY Storage Systems, Inc.  All rights reserved.
28ab618543SJohn Levon  * Copyright 2018 Joyent, Inc.
29a02120c4SAndy Fiddaman  * Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
3034bdffbfSGarrett D'Amore  */
31ab618543SJohn Levon 
32c6c9aed4Sab #include <struct_layout.h>
33c6c9aed4Sab 
34c6c9aed4Sab 
35c6c9aed4Sab static const sl_auxv_layout_t auxv_layout = {
36c6c9aed4Sab 	{ 0,	8,	0,	0 },		/* sizeof (auxv_t) */
37c6c9aed4Sab 	{ 0,	4,	0,	1 },		/* a_type */
38c6c9aed4Sab 	{ 4,	4,	0,	1 },		/* a_un.a_val */
39c6c9aed4Sab 	{ 4,	4,	0,	0 },		/* a_un.a_ptr */
40c6c9aed4Sab 	{ 4,	4,	0,	0 },		/* a_un.a_fcn */
41c6c9aed4Sab };
42c6c9aed4Sab 
43c6c9aed4Sab 
44c6c9aed4Sab static const sl_prgregset_layout_t prgregset_layout = {
45c6c9aed4Sab 	{ 0,	152,	0,	0 },		/* sizeof (prgregset_t) */
46c6c9aed4Sab 	{ 0,	4,	38,	0 },		/* elt0 */
47c6c9aed4Sab };
48c6c9aed4Sab 
49c6c9aed4Sab 
50c6c9aed4Sab static const sl_lwpstatus_layout_t lwpstatus_layout = {
51c6c9aed4Sab 	{ 0,	896,	0,	0 },		/* sizeof (lwpstatus_t) */
52c6c9aed4Sab 	{ 0,	4,	0,	0 },		/* pr_flags */
53c6c9aed4Sab 	{ 4,	4,	0,	0 },		/* pr_lwpid */
54c6c9aed4Sab 	{ 8,	2,	0,	0 },		/* pr_why */
55c6c9aed4Sab 	{ 10,	2,	0,	0 },		/* pr_what */
56c6c9aed4Sab 	{ 12,	2,	0,	0 },		/* pr_cursig */
57c6c9aed4Sab 	{ 16,	128,	0,	0 },		/* pr_info */
58c6c9aed4Sab 	{ 144,	16,	0,	0 },		/* pr_lwppend */
59c6c9aed4Sab 	{ 160,	16,	0,	0 },		/* pr_lwphold */
60c6c9aed4Sab 	{ 176,	32,	0,	0 },		/* pr_action */
61c6c9aed4Sab 	{ 208,	12,	0,	0 },		/* pr_altstack */
62c6c9aed4Sab 	{ 220,	4,	0,	0 },		/* pr_oldcontext */
63c6c9aed4Sab 	{ 224,	2,	0,	0 },		/* pr_syscall */
64c6c9aed4Sab 	{ 226,	2,	0,	0 },		/* pr_nsysarg */
65c6c9aed4Sab 	{ 228,	4,	0,	0 },		/* pr_errno */
66c6c9aed4Sab 	{ 232,	4,	8,	0 },		/* pr_sysarg[] */
67c6c9aed4Sab 	{ 264,	4,	0,	0 },		/* pr_rval1 */
68c6c9aed4Sab 	{ 268,	4,	0,	0 },		/* pr_rval2 */
69c6c9aed4Sab 	{ 272,	1,	8,	0 },		/* pr_clname[] */
70c6c9aed4Sab 	{ 280,	8,	0,	0 },		/* pr_tstamp */
71c6c9aed4Sab 	{ 288,	8,	0,	0 },		/* pr_utime */
72c6c9aed4Sab 	{ 296,	8,	0,	0 },		/* pr_stime */
73c6c9aed4Sab 	{ 332,	4,	0,	0 },		/* pr_errpriv */
74c6c9aed4Sab 	{ 336,	4,	0,	0 },		/* pr_ustack */
75c6c9aed4Sab 	{ 340,	4,	0,	0 },		/* pr_instr */
76c6c9aed4Sab 	{ 344,	152,	0,	0 },		/* pr_reg */
77c6c9aed4Sab 	{ 496,	400,	0,	0 },		/* pr_fpreg */
78c6c9aed4Sab };
79c6c9aed4Sab 
80c6c9aed4Sab 
81c6c9aed4Sab static const sl_pstatus_layout_t pstatus_layout = {
82c6c9aed4Sab 	{ 0,	1232,	0,	0 },		/* sizeof (pstatus_t) */
83c6c9aed4Sab 	{ 0,	4,	0,	1 },		/* pr_flags */
84c6c9aed4Sab 	{ 4,	4,	0,	1 },		/* pr_nlwp */
85c6c9aed4Sab 	{ 8,	4,	0,	0 },		/* pr_pid */
86c6c9aed4Sab 	{ 12,	4,	0,	0 },		/* pr_ppid */
87c6c9aed4Sab 	{ 16,	4,	0,	0 },		/* pr_pgid */
88c6c9aed4Sab 	{ 20,	4,	0,	0 },		/* pr_sid */
89c6c9aed4Sab 	{ 24,	4,	0,	1 },		/* pr_aslwpid */
90c6c9aed4Sab 	{ 28,	4,	0,	1 },		/* pr_agentid */
91c6c9aed4Sab 	{ 32,	16,	0,	0 },		/* pr_sigpend */
92c6c9aed4Sab 	{ 48,	4,	0,	0 },		/* pr_brkbase */
93c6c9aed4Sab 	{ 52,	4,	0,	0 },		/* pr_brksize */
94c6c9aed4Sab 	{ 56,	4,	0,	0 },		/* pr_stkbase */
95c6c9aed4Sab 	{ 60,	4,	0,	0 },		/* pr_stksize */
96c6c9aed4Sab 	{ 64,	8,	0,	0 },		/* pr_utime */
97c6c9aed4Sab 	{ 72,	8,	0,	0 },		/* pr_stime */
98c6c9aed4Sab 	{ 80,	8,	0,	0 },		/* pr_cutime */
99c6c9aed4Sab 	{ 88,	8,	0,	0 },		/* pr_cstime */
100c6c9aed4Sab 	{ 96,	16,	0,	0 },		/* pr_sigtrace */
101c6c9aed4Sab 	{ 112,	16,	0,	0 },		/* pr_flttrace */
102c6c9aed4Sab 	{ 128,	64,	0,	0 },		/* pr_sysentry */
103c6c9aed4Sab 	{ 192,	64,	0,	0 },		/* pr_sysexit */
104c6c9aed4Sab 	{ 256,	1,	0,	0 },		/* pr_dmodel */
105c6c9aed4Sab 	{ 260,	4,	0,	1 },		/* pr_taskid */
106c6c9aed4Sab 	{ 264,	4,	0,	1 },		/* pr_projid */
107c6c9aed4Sab 	{ 268,	4,	0,	1 },		/* pr_nzomb */
108c6c9aed4Sab 	{ 272,	4,	0,	1 },		/* pr_zoneid */
109c6c9aed4Sab 	{ 336,	896,	0,	0 },		/* pr_lwp */
110c6c9aed4Sab };
111c6c9aed4Sab 
112c6c9aed4Sab 
113c6c9aed4Sab static const sl_prstatus_layout_t prstatus_layout = {
114c6c9aed4Sab 	{ 0,	508,	0,	0 },		/* sizeof (prstatus_t) */
115c6c9aed4Sab 	{ 0,	4,	0,	1 },		/* pr_flags */
116c6c9aed4Sab 	{ 4,	2,	0,	1 },		/* pr_why */
117c6c9aed4Sab 	{ 6,	2,	0,	1 },		/* pr_what */
118c6c9aed4Sab 	{ 8,	128,	0,	0 },		/* pr_info */
119c6c9aed4Sab 	{ 136,	2,	0,	1 },		/* pr_cursig */
120c6c9aed4Sab 	{ 138,	2,	0,	0 },		/* pr_nlwp */
121c6c9aed4Sab 	{ 140,	16,	0,	0 },		/* pr_sigpend */
122c6c9aed4Sab 	{ 156,	16,	0,	0 },		/* pr_sighold */
123c6c9aed4Sab 	{ 172,	12,	0,	0 },		/* pr_altstack */
124c6c9aed4Sab 	{ 184,	32,	0,	0 },		/* pr_action */
125c6c9aed4Sab 	{ 216,	4,	0,	0 },		/* pr_pid */
126c6c9aed4Sab 	{ 220,	4,	0,	0 },		/* pr_ppid */
127c6c9aed4Sab 	{ 224,	4,	0,	0 },		/* pr_pgrp */
128c6c9aed4Sab 	{ 228,	4,	0,	0 },		/* pr_sid */
129c6c9aed4Sab 	{ 232,	8,	0,	0 },		/* pr_utime */
130c6c9aed4Sab 	{ 240,	8,	0,	0 },		/* pr_stime */
131c6c9aed4Sab 	{ 248,	8,	0,	0 },		/* pr_cutime */
132c6c9aed4Sab 	{ 256,	8,	0,	0 },		/* pr_cstime */
133c6c9aed4Sab 	{ 264,	1,	8,	0 },		/* pr_clname[] */
134c6c9aed4Sab 	{ 272,	2,	0,	1 },		/* pr_syscall */
135c6c9aed4Sab 	{ 274,	2,	0,	1 },		/* pr_nsysarg */
136c6c9aed4Sab 	{ 276,	4,	8,	1 },		/* pr_sysarg[] */
137c6c9aed4Sab 	{ 308,	4,	0,	0 },		/* pr_who */
138c6c9aed4Sab 	{ 312,	16,	0,	0 },		/* pr_lwppend */
139c6c9aed4Sab 	{ 328,	4,	0,	0 },		/* pr_oldcontext */
140c6c9aed4Sab 	{ 332,	4,	0,	0 },		/* pr_brkbase */
141c6c9aed4Sab 	{ 336,	4,	0,	0 },		/* pr_brksize */
142c6c9aed4Sab 	{ 340,	4,	0,	0 },		/* pr_stkbase */
143c6c9aed4Sab 	{ 344,	4,	0,	0 },		/* pr_stksize */
144c6c9aed4Sab 	{ 348,	2,	0,	1 },		/* pr_processor */
145c6c9aed4Sab 	{ 350,	2,	0,	1 },		/* pr_bind */
146c6c9aed4Sab 	{ 352,	4,	0,	1 },		/* pr_instr */
147c6c9aed4Sab 	{ 356,	152,	0,	0 },		/* pr_reg */
148c6c9aed4Sab };
149c6c9aed4Sab 
150c6c9aed4Sab 
151c6c9aed4Sab static const sl_psinfo_layout_t psinfo_layout = {
152c6c9aed4Sab 	{ 0,	336,	0,	0 },		/* sizeof (psinfo_t) */
153c6c9aed4Sab 	{ 0,	4,	0,	1 },		/* pr_flag */
154c6c9aed4Sab 	{ 4,	4,	0,	1 },		/* pr_nlwp */
155c6c9aed4Sab 	{ 8,	4,	0,	0 },		/* pr_pid */
156c6c9aed4Sab 	{ 12,	4,	0,	0 },		/* pr_ppid */
157c6c9aed4Sab 	{ 16,	4,	0,	0 },		/* pr_pgid */
158c6c9aed4Sab 	{ 20,	4,	0,	0 },		/* pr_sid */
159c6c9aed4Sab 	{ 24,	4,	0,	0 },		/* pr_uid */
160c6c9aed4Sab 	{ 28,	4,	0,	0 },		/* pr_euid */
161c6c9aed4Sab 	{ 32,	4,	0,	0 },		/* pr_gid */
162c6c9aed4Sab 	{ 36,	4,	0,	0 },		/* pr_egid */
163c6c9aed4Sab 	{ 40,	4,	0,	0 },		/* pr_addr */
164c6c9aed4Sab 	{ 44,	4,	0,	0 },		/* pr_size */
165c6c9aed4Sab 	{ 48,	4,	0,	0 },		/* pr_rssize */
166c6c9aed4Sab 	{ 56,	4,	0,	0 },		/* pr_ttydev */
167c6c9aed4Sab 	{ 60,	2,	0,	0 },		/* pr_pctcpu */
168c6c9aed4Sab 	{ 62,	2,	0,	0 },		/* pr_pctmem */
169c6c9aed4Sab 	{ 64,	8,	0,	0 },		/* pr_start */
170c6c9aed4Sab 	{ 72,	8,	0,	0 },		/* pr_time */
171c6c9aed4Sab 	{ 80,	8,	0,	0 },		/* pr_ctime */
172c6c9aed4Sab 	{ 88,	1,	16,	0 },		/* pr_fname[] */
173c6c9aed4Sab 	{ 104,	1,	80,	0 },		/* pr_psargs[] */
174c6c9aed4Sab 	{ 184,	4,	0,	1 },		/* pr_wstat */
175c6c9aed4Sab 	{ 188,	4,	0,	1 },		/* pr_argc */
176c6c9aed4Sab 	{ 192,	4,	0,	0 },		/* pr_argv */
177c6c9aed4Sab 	{ 196,	4,	0,	0 },		/* pr_envp */
178c6c9aed4Sab 	{ 200,	1,	0,	0 },		/* pr_dmodel */
179c6c9aed4Sab 	{ 204,	4,	0,	0 },		/* pr_taskid */
180c6c9aed4Sab 	{ 208,	4,	0,	0 },		/* pr_projid */
181c6c9aed4Sab 	{ 212,	4,	0,	1 },		/* pr_nzomb */
182c6c9aed4Sab 	{ 216,	4,	0,	0 },		/* pr_poolid */
183c6c9aed4Sab 	{ 220,	4,	0,	0 },		/* pr_zoneid */
184c6c9aed4Sab 	{ 224,	4,	0,	0 },		/* pr_contract */
185c6c9aed4Sab 	{ 232,	104,	0,	0 },		/* pr_lwp */
186c6c9aed4Sab };
187c6c9aed4Sab 
188c6c9aed4Sab 
189c6c9aed4Sab static const sl_prpsinfo_layout_t prpsinfo_layout = {
190c6c9aed4Sab 	{ 0,	260,	0,	0 },		/* sizeof (prpsinfo_t) */
191c6c9aed4Sab 	{ 0,	1,	0,	0 },		/* pr_state */
192c6c9aed4Sab 	{ 1,	1,	0,	0 },		/* pr_sname */
193c6c9aed4Sab 	{ 2,	1,	0,	0 },		/* pr_zomb */
194c6c9aed4Sab 	{ 3,	1,	0,	0 },		/* pr_nice */
195c6c9aed4Sab 	{ 4,	4,	0,	0 },		/* pr_flag */
196c6c9aed4Sab 	{ 8,	4,	0,	0 },		/* pr_uid */
197c6c9aed4Sab 	{ 12,	4,	0,	0 },		/* pr_gid */
198c6c9aed4Sab 	{ 16,	4,	0,	0 },		/* pr_pid */
199c6c9aed4Sab 	{ 20,	4,	0,	0 },		/* pr_ppid */
200c6c9aed4Sab 	{ 24,	4,	0,	0 },		/* pr_pgrp */
201c6c9aed4Sab 	{ 28,	4,	0,	0 },		/* pr_sid */
202c6c9aed4Sab 	{ 32,	4,	0,	0 },		/* pr_addr */
203c6c9aed4Sab 	{ 36,	4,	0,	0 },		/* pr_size */
204c6c9aed4Sab 	{ 40,	4,	0,	0 },		/* pr_rssize */
205c6c9aed4Sab 	{ 44,	4,	0,	0 },		/* pr_wchan */
206c6c9aed4Sab 	{ 48,	8,	0,	0 },		/* pr_start */
207c6c9aed4Sab 	{ 56,	8,	0,	0 },		/* pr_time */
208c6c9aed4Sab 	{ 64,	4,	0,	1 },		/* pr_pri */
209c6c9aed4Sab 	{ 68,	1,	0,	0 },		/* pr_oldpri */
210c6c9aed4Sab 	{ 69,	1,	0,	0 },		/* pr_cpu */
211c6c9aed4Sab 	{ 70,	2,	0,	0 },		/* pr_ottydev */
212c6c9aed4Sab 	{ 72,	4,	0,	0 },		/* pr_lttydev */
213c6c9aed4Sab 	{ 76,	1,	8,	0 },		/* pr_clname[] */
214c6c9aed4Sab 	{ 84,	1,	16,	0 },		/* pr_fname[] */
215c6c9aed4Sab 	{ 100,	1,	80,	0 },		/* pr_psargs[] */
216c6c9aed4Sab 	{ 180,	2,	0,	1 },		/* pr_syscall */
217c6c9aed4Sab 	{ 184,	8,	0,	0 },		/* pr_ctime */
218c6c9aed4Sab 	{ 192,	4,	0,	0 },		/* pr_bysize */
219c6c9aed4Sab 	{ 196,	4,	0,	0 },		/* pr_byrssize */
220c6c9aed4Sab 	{ 200,	4,	0,	1 },		/* pr_argc */
221c6c9aed4Sab 	{ 204,	4,	0,	0 },		/* pr_argv */
222c6c9aed4Sab 	{ 208,	4,	0,	0 },		/* pr_envp */
223c6c9aed4Sab 	{ 212,	4,	0,	1 },		/* pr_wstat */
224c6c9aed4Sab 	{ 216,	2,	0,	0 },		/* pr_pctcpu */
225c6c9aed4Sab 	{ 218,	2,	0,	0 },		/* pr_pctmem */
226c6c9aed4Sab 	{ 220,	4,	0,	0 },		/* pr_euid */
227c6c9aed4Sab 	{ 224,	4,	0,	0 },		/* pr_egid */
228c6c9aed4Sab 	{ 228,	4,	0,	0 },		/* pr_aslwpid */
229c6c9aed4Sab 	{ 232,	1,	0,	0 },		/* pr_dmodel */
230c6c9aed4Sab };
231c6c9aed4Sab 
232c6c9aed4Sab 
233c6c9aed4Sab static const sl_lwpsinfo_layout_t lwpsinfo_layout = {
234c6c9aed4Sab 	{ 0,	104,	0,	0 },		/* sizeof (lwpsinfo_t) */
235c6c9aed4Sab 	{ 0,	4,	0,	1 },		/* pr_flag */
236c6c9aed4Sab 	{ 4,	4,	0,	0 },		/* pr_lwpid */
237c6c9aed4Sab 	{ 8,	4,	0,	0 },		/* pr_addr */
238c6c9aed4Sab 	{ 12,	4,	0,	0 },		/* pr_wchan */
239c6c9aed4Sab 	{ 16,	1,	0,	0 },		/* pr_stype */
240c6c9aed4Sab 	{ 17,	1,	0,	0 },		/* pr_state */
241c6c9aed4Sab 	{ 18,	1,	0,	0 },		/* pr_sname */
242c6c9aed4Sab 	{ 19,	1,	0,	0 },		/* pr_nice */
243c6c9aed4Sab 	{ 20,	2,	0,	0 },		/* pr_syscall */
244c6c9aed4Sab 	{ 22,	1,	0,	0 },		/* pr_oldpri */
245c6c9aed4Sab 	{ 23,	1,	0,	0 },		/* pr_cpu */
246c6c9aed4Sab 	{ 24,	4,	0,	1 },		/* pr_pri */
247c6c9aed4Sab 	{ 28,	2,	0,	0 },		/* pr_pctcpu */
248c6c9aed4Sab 	{ 32,	8,	0,	0 },		/* pr_start */
249c6c9aed4Sab 	{ 40,	8,	0,	0 },		/* pr_time */
250c6c9aed4Sab 	{ 48,	1,	8,	0 },		/* pr_clname[] */
251c6c9aed4Sab 	{ 56,	1,	16,	0 },		/* pr_name[] */
252c6c9aed4Sab 	{ 72,	4,	0,	1 },		/* pr_onpro */
253c6c9aed4Sab 	{ 76,	4,	0,	1 },		/* pr_bindpro */
254c6c9aed4Sab 	{ 80,	4,	0,	1 },		/* pr_bindpset */
255c6c9aed4Sab 	{ 84,	4,	0,	1 },		/* pr_lgrp */
256c6c9aed4Sab };
257c6c9aed4Sab 
258c6c9aed4Sab 
259c6c9aed4Sab static const sl_prcred_layout_t prcred_layout = {
260c6c9aed4Sab 	{ 0,	32,	0,	0 },		/* sizeof (prcred_t) */
261c6c9aed4Sab 	{ 0,	4,	0,	0 },		/* pr_euid */
262c6c9aed4Sab 	{ 4,	4,	0,	0 },		/* pr_ruid */
263c6c9aed4Sab 	{ 8,	4,	0,	0 },		/* pr_suid */
264c6c9aed4Sab 	{ 12,	4,	0,	0 },		/* pr_egid */
265c6c9aed4Sab 	{ 16,	4,	0,	0 },		/* pr_rgid */
266c6c9aed4Sab 	{ 20,	4,	0,	0 },		/* pr_sgid */
267c6c9aed4Sab 	{ 24,	4,	0,	1 },		/* pr_ngroups */
268c6c9aed4Sab 	{ 28,	4,	1,	0 },		/* pr_groups[] */
269c6c9aed4Sab };
270c6c9aed4Sab 
271c6c9aed4Sab 
272c6c9aed4Sab static const sl_prpriv_layout_t prpriv_layout = {
273c6c9aed4Sab 	{ 0,	16,	0,	0 },		/* sizeof (prpriv_t) */
274c6c9aed4Sab 	{ 0,	4,	0,	0 },		/* pr_nsets */
275c6c9aed4Sab 	{ 4,	4,	0,	0 },		/* pr_setsize */
276c6c9aed4Sab 	{ 8,	4,	0,	0 },		/* pr_infosize */
277c6c9aed4Sab 	{ 12,	4,	1,	0 },		/* pr_sets[] */
278c6c9aed4Sab };
279c6c9aed4Sab 
280c6c9aed4Sab 
281c6c9aed4Sab static const sl_priv_impl_info_layout_t priv_impl_info_layout = {
282c6c9aed4Sab 	{ 0,	28,	0,	0 },		/* sizeof (priv_impl_info_t) */
283c6c9aed4Sab 	{ 0,	4,	0,	0 },		/* priv_headersize */
284c6c9aed4Sab 	{ 4,	4,	0,	0 },		/* priv_flags */
285c6c9aed4Sab 	{ 8,	4,	0,	0 },		/* priv_nsets */
286c6c9aed4Sab 	{ 12,	4,	0,	0 },		/* priv_setsize */
287c6c9aed4Sab 	{ 16,	4,	0,	0 },		/* priv_max */
288c6c9aed4Sab 	{ 20,	4,	0,	0 },		/* priv_infosize */
289c6c9aed4Sab 	{ 24,	4,	0,	0 },		/* priv_globalinfosize */
290c6c9aed4Sab };
291c6c9aed4Sab 
292c6c9aed4Sab 
293c6c9aed4Sab static const sl_fltset_layout_t fltset_layout = {
294c6c9aed4Sab 	{ 0,	16,	0,	0 },		/* sizeof (fltset_t) */
295c6c9aed4Sab 	{ 0,	4,	4,	0 },		/* word[] */
296c6c9aed4Sab };
297c6c9aed4Sab 
298c6c9aed4Sab 
299c6c9aed4Sab static const sl_siginfo_layout_t siginfo_layout = {
300c6c9aed4Sab 	{ 0,	128,	0,	0 },		/* sizeof (siginfo_t) */
301c6c9aed4Sab 	{ 0,	4,	0,	0 },		/* si_signo */
302c6c9aed4Sab 	{ 8,	4,	0,	0 },		/* si_errno */
303c6c9aed4Sab 	{ 4,	4,	0,	1 },		/* si_code */
304c6c9aed4Sab 	{ 20,	4,	0,	0 },		/* si_value.sival_int */
305c6c9aed4Sab 	{ 20,	4,	0,	0 },		/* si_value.sival_ptr */
306c6c9aed4Sab 	{ 12,	4,	0,	0 },		/* si_pid */
307c6c9aed4Sab 	{ 16,	4,	0,	0 },		/* si_uid */
308c6c9aed4Sab 	{ 28,	4,	0,	0 },		/* si_ctid */
309c6c9aed4Sab 	{ 32,	4,	0,	0 },		/* si_zoneid */
310c6c9aed4Sab 	{ 12,	4,	0,	0 },		/* si_entity */
311c6c9aed4Sab 	{ 12,	4,	0,	0 },		/* si_addr */
312c6c9aed4Sab 	{ 20,	4,	0,	0 },		/* si_status */
313c6c9aed4Sab 	{ 16,	4,	0,	0 },		/* si_band */
314c6c9aed4Sab };
315c6c9aed4Sab 
316c6c9aed4Sab 
317c6c9aed4Sab static const sl_sigset_layout_t sigset_layout = {
318c6c9aed4Sab 	{ 0,	16,	0,	0 },		/* sizeof (sigset_t) */
319c6c9aed4Sab 	{ 0,	4,	4,	0 },		/* __sigbits[] */
320c6c9aed4Sab };
321c6c9aed4Sab 
322c6c9aed4Sab 
323c6c9aed4Sab static const sl_sigaction_layout_t sigaction_layout = {
324c6c9aed4Sab 	{ 0,	32,	0,	0 },		/* sizeof (struct sigaction) */
325c6c9aed4Sab 	{ 0,	4,	0,	0 },		/* sa_flags */
326c6c9aed4Sab 	{ 4,	4,	0,	0 },		/* sa_handler */
327c6c9aed4Sab 	{ 4,	4,	0,	0 },		/* sa_sigaction */
328c6c9aed4Sab 	{ 8,	16,	0,	0 },		/* sa_mask */
329c6c9aed4Sab };
330c6c9aed4Sab 
331c6c9aed4Sab 
332c6c9aed4Sab static const sl_stack_layout_t stack_layout = {
333c6c9aed4Sab 	{ 0,	12,	0,	0 },		/* sizeof (stack_t) */
334c6c9aed4Sab 	{ 0,	4,	0,	0 },		/* ss_sp */
335c6c9aed4Sab 	{ 4,	4,	0,	0 },		/* ss_size */
336c6c9aed4Sab 	{ 8,	4,	0,	0 },		/* ss_flags */
337c6c9aed4Sab };
338c6c9aed4Sab 
339c6c9aed4Sab 
340c6c9aed4Sab static const sl_sysset_layout_t sysset_layout = {
341c6c9aed4Sab 	{ 0,	64,	0,	0 },		/* sizeof (sysset_t) */
342c6c9aed4Sab 	{ 0,	4,	16,	0 },		/* word[] */
343c6c9aed4Sab };
344c6c9aed4Sab 
345c6c9aed4Sab 
346c6c9aed4Sab static const sl_timestruc_layout_t timestruc_layout = {
347c6c9aed4Sab 	{ 0,	8,	0,	0 },		/* sizeof (timestruc_t) */
348c6c9aed4Sab 	{ 0,	4,	0,	0 },		/* tv_sec */
349c6c9aed4Sab 	{ 4,	4,	0,	0 },		/* tv_nsec */
350c6c9aed4Sab };
351c6c9aed4Sab 
352c6c9aed4Sab 
353c6c9aed4Sab static const sl_utsname_layout_t utsname_layout = {
354c6c9aed4Sab 	{ 0,	1285,	0,	0 },		/* sizeof (struct utsname) */
355c6c9aed4Sab 	{ 0,	1,	257,	0 },		/* sysname[] */
356c6c9aed4Sab 	{ 257,	1,	257,	0 },		/* nodename[] */
357c6c9aed4Sab 	{ 514,	1,	257,	0 },		/* release[] */
358c6c9aed4Sab 	{ 771,	1,	257,	0 },		/* version[] */
359c6c9aed4Sab 	{ 1028,	1,	257,	0 },		/* machine[] */
360c6c9aed4Sab };
361c6c9aed4Sab 
362c6c9aed4Sab 
36334bdffbfSGarrett D'Amore static const sl_prfdinfo_layout_t prfdinfo_layout = {
364a02120c4SAndy Fiddaman 	{ 0,	1088,	0,	0 },		/* sizeof (prfdinfo_core_t) */
36534bdffbfSGarrett D'Amore 	{ 0,	4,	0,	0 },		/* pr_fd */
36634bdffbfSGarrett D'Amore 	{ 4,	4,	0,	0 },		/* pr_mode */
36734bdffbfSGarrett D'Amore 	{ 8,	4,	0,	0 },		/* pr_uid */
36834bdffbfSGarrett D'Amore 	{ 12,	4,	0,	0 },		/* pr_gid */
36934bdffbfSGarrett D'Amore 	{ 16,	4,	0,	0 },		/* pr_major */
37034bdffbfSGarrett D'Amore 	{ 20,	4,	0,	0 },		/* pr_minor */
37134bdffbfSGarrett D'Amore 	{ 24,	4,	0,	0 },		/* pr_rmajor */
37234bdffbfSGarrett D'Amore 	{ 28,	4,	0,	0 },		/* pr_rminor */
37334bdffbfSGarrett D'Amore 	{ 32,	8,	0,	0 },		/* pr_ino */
37434bdffbfSGarrett D'Amore 	{ 40,	8,	0,	0 },		/* pr_offset */
37534bdffbfSGarrett D'Amore 	{ 48,	8,	0,	0 },		/* pr_size */
376894fa7baSRichard Lowe 	{ 56,	4,	0,	0 },		/* pr_fileflags */
37734bdffbfSGarrett D'Amore 	{ 60,	4,	0,	0 },		/* pr_fdflags */
378894fa7baSRichard Lowe 	{ 64,	1,	1024,	0 },		/* pr_path[] */
37934bdffbfSGarrett D'Amore };
380c6c9aed4Sab 
381c6c9aed4Sab 
382d2a70789SRichard Lowe static const sl_prsecflags_layout_t prsecflags_layout = {
38328b83f21SOlaf Bohlen 	{ 0,	40,	0,	0 },		/* sizeof (prsecflags_t) */
38428b83f21SOlaf Bohlen 	{ 0,	4,	0,	0 },		/* pr_version */
38528b83f21SOlaf Bohlen 	{ 8,	8,	0,	0 },		/* pr_effective */
38628b83f21SOlaf Bohlen 	{ 16,	8,	0,	0 },		/* pr_inherit */
38728b83f21SOlaf Bohlen 	{ 24,	8,	0,	0 },		/* pr_lower */
38828b83f21SOlaf Bohlen 	{ 32,	8,	0,	0 },		/* pr_upper */
389d2a70789SRichard Lowe };
390d2a70789SRichard Lowe 
391d2a70789SRichard Lowe 
392ab618543SJohn Levon static const sl_prlwpname_layout_t prlwpname_layout = {
393ab618543SJohn Levon 	{ 0,	40,	0,	0 },		/* sizeof (prlwpname_t) */
394ab618543SJohn Levon 	{ 0,	8,	0,	0 },		/* pr_lwpid */
395ab618543SJohn Levon 	{ 8,	1,	32,	0 },		/* pr_lwpname[] */
396ab618543SJohn Levon };
397ab618543SJohn Levon 
398ab618543SJohn Levon 
399*350ffdd5SRobert Mustacchi static const sl_prupanic_layout_t prupanic_layout = {
400*350ffdd5SRobert Mustacchi 	{ 0,	1032,	0,	0 },		/* sizeof (prupanic_t) */
401*350ffdd5SRobert Mustacchi 	{ 0,	4,	0,	0 },		/* pru_version */
402*350ffdd5SRobert Mustacchi 	{ 4,	4,	0,	0 },		/* pru_flags */
403*350ffdd5SRobert Mustacchi 	{ 8,	1,	1024,	0 },		/* pru_data[] */
404*350ffdd5SRobert Mustacchi };
405*350ffdd5SRobert Mustacchi 
406*350ffdd5SRobert Mustacchi 
4071886f67eSGordon Ross 
4081886f67eSGordon Ross 
409c6c9aed4Sab static const sl_arch_layout_t layout_sparc = {
410c6c9aed4Sab 	&auxv_layout,
411c6c9aed4Sab 	&fltset_layout,
412c6c9aed4Sab 	&lwpsinfo_layout,
413c6c9aed4Sab 	&lwpstatus_layout,
414c6c9aed4Sab 	&prcred_layout,
415c6c9aed4Sab 	&priv_impl_info_layout,
416c6c9aed4Sab 	&prpriv_layout,
417c6c9aed4Sab 	&psinfo_layout,
418c6c9aed4Sab 	&pstatus_layout,
419c6c9aed4Sab 	&prgregset_layout,
420c6c9aed4Sab 	&prpsinfo_layout,
421c6c9aed4Sab 	&prstatus_layout,
422c6c9aed4Sab 	&sigaction_layout,
423c6c9aed4Sab 	&siginfo_layout,
424c6c9aed4Sab 	&sigset_layout,
425c6c9aed4Sab 	&stack_layout,
426c6c9aed4Sab 	&sysset_layout,
427c6c9aed4Sab 	&timestruc_layout,
428c6c9aed4Sab 	&utsname_layout,
42934bdffbfSGarrett D'Amore 	&prfdinfo_layout,
430d2a70789SRichard Lowe 	&prsecflags_layout,
431ab618543SJohn Levon 	&prlwpname_layout,
432*350ffdd5SRobert Mustacchi 	&prupanic_layout,
433c6c9aed4Sab };
434c6c9aed4Sab 
435c6c9aed4Sab 
436c6c9aed4Sab const sl_arch_layout_t *
struct_layout_sparc(void)437c6c9aed4Sab struct_layout_sparc(void)
438c6c9aed4Sab {
439c6c9aed4Sab 	return (&layout_sparc);
440c6c9aed4Sab }
441