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