xref: /illumos-gate/usr/src/uts/sun4u/sys/sbd_ioctl.h (revision 7c478bd95313f5f23a4c958a745db2134aa0324)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate #ifndef	_SBD_IOCTL_H
28*7c478bd9Sstevel@tonic-gate #define	_SBD_IOCTL_H
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*7c478bd9Sstevel@tonic-gate 
32*7c478bd9Sstevel@tonic-gate #include <sys/types.h>
33*7c478bd9Sstevel@tonic-gate #include <sys/obpdefs.h>
34*7c478bd9Sstevel@tonic-gate #include <sys/processor.h>
35*7c478bd9Sstevel@tonic-gate #include <sys/param.h>
36*7c478bd9Sstevel@tonic-gate 
37*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
38*7c478bd9Sstevel@tonic-gate extern "C" {
39*7c478bd9Sstevel@tonic-gate #endif
40*7c478bd9Sstevel@tonic-gate 
41*7c478bd9Sstevel@tonic-gate typedef enum {
42*7c478bd9Sstevel@tonic-gate 	SBD_COMP_NONE,
43*7c478bd9Sstevel@tonic-gate 	SBD_COMP_CPU,
44*7c478bd9Sstevel@tonic-gate 	SBD_COMP_MEM,
45*7c478bd9Sstevel@tonic-gate 	SBD_COMP_IO,
46*7c478bd9Sstevel@tonic-gate 	SBD_COMP_CMP,
47*7c478bd9Sstevel@tonic-gate 	SBD_COMP_UNKNOWN
48*7c478bd9Sstevel@tonic-gate } sbd_comp_type_t;
49*7c478bd9Sstevel@tonic-gate 
50*7c478bd9Sstevel@tonic-gate typedef enum {
51*7c478bd9Sstevel@tonic-gate 	SBD_STAT_NONE = 0,
52*7c478bd9Sstevel@tonic-gate 	SBD_STAT_EMPTY,
53*7c478bd9Sstevel@tonic-gate 	SBD_STAT_DISCONNECTED,
54*7c478bd9Sstevel@tonic-gate 	SBD_STAT_CONNECTED,
55*7c478bd9Sstevel@tonic-gate 	SBD_STAT_UNCONFIGURED,
56*7c478bd9Sstevel@tonic-gate 	SBD_STAT_CONFIGURED
57*7c478bd9Sstevel@tonic-gate } sbd_state_t;
58*7c478bd9Sstevel@tonic-gate 
59*7c478bd9Sstevel@tonic-gate typedef enum {
60*7c478bd9Sstevel@tonic-gate 	SBD_COND_UNKNOWN = 0,
61*7c478bd9Sstevel@tonic-gate 	SBD_COND_OK,
62*7c478bd9Sstevel@tonic-gate 	SBD_COND_FAILING,
63*7c478bd9Sstevel@tonic-gate 	SBD_COND_FAILED,
64*7c478bd9Sstevel@tonic-gate 	SBD_COND_UNUSABLE
65*7c478bd9Sstevel@tonic-gate } sbd_cond_t;
66*7c478bd9Sstevel@tonic-gate 
67*7c478bd9Sstevel@tonic-gate typedef	int	sbd_busy_t;
68*7c478bd9Sstevel@tonic-gate 
69*7c478bd9Sstevel@tonic-gate #define	SBD_MAX_UNSAFE		16
70*7c478bd9Sstevel@tonic-gate #define	SBD_TYPE_LEN		12
71*7c478bd9Sstevel@tonic-gate #define	SBD_NULL_UNIT		-1
72*7c478bd9Sstevel@tonic-gate 
73*7c478bd9Sstevel@tonic-gate typedef struct {
74*7c478bd9Sstevel@tonic-gate 	sbd_comp_type_t	c_type;
75*7c478bd9Sstevel@tonic-gate 	int		c_unit;
76*7c478bd9Sstevel@tonic-gate 	char		c_name[OBP_MAXPROPNAME];
77*7c478bd9Sstevel@tonic-gate } sbd_comp_id_t;
78*7c478bd9Sstevel@tonic-gate 
79*7c478bd9Sstevel@tonic-gate typedef struct {
80*7c478bd9Sstevel@tonic-gate 	sbd_comp_id_t	c_id;
81*7c478bd9Sstevel@tonic-gate 	sbd_state_t	c_ostate;
82*7c478bd9Sstevel@tonic-gate 	sbd_cond_t	c_cond;
83*7c478bd9Sstevel@tonic-gate 	sbd_busy_t	c_busy;
84*7c478bd9Sstevel@tonic-gate 	uint_t		c_sflags;
85*7c478bd9Sstevel@tonic-gate 	time_t		c_time;
86*7c478bd9Sstevel@tonic-gate } sbd_cm_stat_t;
87*7c478bd9Sstevel@tonic-gate 
88*7c478bd9Sstevel@tonic-gate #define	ci_type		c_id.c_type
89*7c478bd9Sstevel@tonic-gate #define	ci_unit		c_id.c_unit
90*7c478bd9Sstevel@tonic-gate #define	ci_name		c_id.c_name
91*7c478bd9Sstevel@tonic-gate 
92*7c478bd9Sstevel@tonic-gate typedef struct {
93*7c478bd9Sstevel@tonic-gate 	sbd_cm_stat_t	cs_cm;
94*7c478bd9Sstevel@tonic-gate 	int		cs_isbootproc;
95*7c478bd9Sstevel@tonic-gate 	processorid_t	cs_cpuid;
96*7c478bd9Sstevel@tonic-gate 	int		cs_speed;
97*7c478bd9Sstevel@tonic-gate 	int		cs_ecache;
98*7c478bd9Sstevel@tonic-gate } sbd_cpu_stat_t;
99*7c478bd9Sstevel@tonic-gate 
100*7c478bd9Sstevel@tonic-gate #define	cs_type		cs_cm.ci_type
101*7c478bd9Sstevel@tonic-gate #define	cs_unit		cs_cm.ci_unit
102*7c478bd9Sstevel@tonic-gate #define	cs_name		cs_cm.ci_name
103*7c478bd9Sstevel@tonic-gate #define	cs_ostate	cs_cm.c_ostate
104*7c478bd9Sstevel@tonic-gate #define	cs_cond		cs_cm.c_cond
105*7c478bd9Sstevel@tonic-gate #define	cs_busy		cs_cm.c_busy
106*7c478bd9Sstevel@tonic-gate #define	cs_suspend	cs_cm.c_sflags
107*7c478bd9Sstevel@tonic-gate #define	cs_time		cs_cm.c_time
108*7c478bd9Sstevel@tonic-gate 
109*7c478bd9Sstevel@tonic-gate typedef struct {
110*7c478bd9Sstevel@tonic-gate 	sbd_cm_stat_t	ms_cm;
111*7c478bd9Sstevel@tonic-gate 	int		ms_interleave;
112*7c478bd9Sstevel@tonic-gate 	pfn_t		ms_basepfn;
113*7c478bd9Sstevel@tonic-gate 	pgcnt_t		ms_totpages;
114*7c478bd9Sstevel@tonic-gate 	pgcnt_t		ms_detpages;
115*7c478bd9Sstevel@tonic-gate 	pgcnt_t		ms_pageslost;
116*7c478bd9Sstevel@tonic-gate 	pgcnt_t		ms_managed_pages;
117*7c478bd9Sstevel@tonic-gate 	pgcnt_t		ms_noreloc_pages;
118*7c478bd9Sstevel@tonic-gate 	pgcnt_t		ms_noreloc_first;
119*7c478bd9Sstevel@tonic-gate 	pgcnt_t		ms_noreloc_last;
120*7c478bd9Sstevel@tonic-gate 	int		ms_cage_enabled;
121*7c478bd9Sstevel@tonic-gate 	int		ms_peer_is_target;	/* else peer is source */
122*7c478bd9Sstevel@tonic-gate 	char		ms_peer_ap_id[MAXPATHLEN];	/* board's AP name */
123*7c478bd9Sstevel@tonic-gate } sbd_mem_stat_t;
124*7c478bd9Sstevel@tonic-gate 
125*7c478bd9Sstevel@tonic-gate #define	ms_type		ms_cm.ci_type
126*7c478bd9Sstevel@tonic-gate #define	ms_unit		ms_cm.ci_unit
127*7c478bd9Sstevel@tonic-gate #define	ms_name		ms_cm.ci_name
128*7c478bd9Sstevel@tonic-gate #define	ms_ostate	ms_cm.c_ostate
129*7c478bd9Sstevel@tonic-gate #define	ms_cond		ms_cm.c_cond
130*7c478bd9Sstevel@tonic-gate #define	ms_busy		ms_cm.c_busy
131*7c478bd9Sstevel@tonic-gate #define	ms_suspend	ms_cm.c_sflags
132*7c478bd9Sstevel@tonic-gate #define	ms_time		ms_cm.c_time
133*7c478bd9Sstevel@tonic-gate 
134*7c478bd9Sstevel@tonic-gate typedef struct {
135*7c478bd9Sstevel@tonic-gate 	sbd_cm_stat_t	is_cm;
136*7c478bd9Sstevel@tonic-gate 	int		is_referenced;
137*7c478bd9Sstevel@tonic-gate 	int		is_unsafe_count;
138*7c478bd9Sstevel@tonic-gate 	int		is_unsafe_list[SBD_MAX_UNSAFE];
139*7c478bd9Sstevel@tonic-gate 	char		is_pathname[MAXPATHLEN];
140*7c478bd9Sstevel@tonic-gate } sbd_io_stat_t;
141*7c478bd9Sstevel@tonic-gate 
142*7c478bd9Sstevel@tonic-gate #define	is_type		is_cm.ci_type
143*7c478bd9Sstevel@tonic-gate #define	is_unit		is_cm.ci_unit
144*7c478bd9Sstevel@tonic-gate #define	is_name		is_cm.ci_name
145*7c478bd9Sstevel@tonic-gate #define	is_ostate	is_cm.c_ostate
146*7c478bd9Sstevel@tonic-gate #define	is_cond		is_cm.c_cond
147*7c478bd9Sstevel@tonic-gate #define	is_busy		is_cm.c_busy
148*7c478bd9Sstevel@tonic-gate #define	is_suspend	is_cm.c_sflags
149*7c478bd9Sstevel@tonic-gate #define	is_time		is_cm.c_time
150*7c478bd9Sstevel@tonic-gate 
151*7c478bd9Sstevel@tonic-gate #define	SBD_MAX_CORES_PER_CMP	2
152*7c478bd9Sstevel@tonic-gate 
153*7c478bd9Sstevel@tonic-gate typedef struct {
154*7c478bd9Sstevel@tonic-gate 	sbd_cm_stat_t	ps_cm;
155*7c478bd9Sstevel@tonic-gate 	processorid_t	ps_cpuid[SBD_MAX_CORES_PER_CMP];
156*7c478bd9Sstevel@tonic-gate 	int		ps_ncores;
157*7c478bd9Sstevel@tonic-gate 	int		ps_speed;
158*7c478bd9Sstevel@tonic-gate 	int		ps_ecache;
159*7c478bd9Sstevel@tonic-gate } sbd_cmp_stat_t;
160*7c478bd9Sstevel@tonic-gate 
161*7c478bd9Sstevel@tonic-gate #define	ps_type		ps_cm.ci_type
162*7c478bd9Sstevel@tonic-gate #define	ps_unit		ps_cm.ci_unit
163*7c478bd9Sstevel@tonic-gate #define	ps_name		ps_cm.ci_name
164*7c478bd9Sstevel@tonic-gate #define	ps_ostate	ps_cm.c_ostate
165*7c478bd9Sstevel@tonic-gate #define	ps_cond		ps_cm.c_cond
166*7c478bd9Sstevel@tonic-gate #define	ps_busy		ps_cm.c_busy
167*7c478bd9Sstevel@tonic-gate #define	ps_suspend	ps_cm.c_sflags
168*7c478bd9Sstevel@tonic-gate #define	ps_time		ps_cm.c_time
169*7c478bd9Sstevel@tonic-gate 
170*7c478bd9Sstevel@tonic-gate typedef union {
171*7c478bd9Sstevel@tonic-gate 	sbd_cm_stat_t	d_cm;
172*7c478bd9Sstevel@tonic-gate 	sbd_cpu_stat_t	d_cpu;
173*7c478bd9Sstevel@tonic-gate 	sbd_mem_stat_t	d_mem;
174*7c478bd9Sstevel@tonic-gate 	sbd_io_stat_t	d_io;
175*7c478bd9Sstevel@tonic-gate 	sbd_cmp_stat_t	d_cmp;
176*7c478bd9Sstevel@tonic-gate } sbd_dev_stat_t;
177*7c478bd9Sstevel@tonic-gate 
178*7c478bd9Sstevel@tonic-gate #define	ds_type		d_cm.ci_type
179*7c478bd9Sstevel@tonic-gate #define	ds_unit		d_cm.ci_unit
180*7c478bd9Sstevel@tonic-gate #define	ds_name		d_cm.ci_name
181*7c478bd9Sstevel@tonic-gate #define	ds_ostate	d_cm.c_ostate
182*7c478bd9Sstevel@tonic-gate #define	ds_cond		d_cm.c_cond
183*7c478bd9Sstevel@tonic-gate #define	ds_busy		d_cm.c_busy
184*7c478bd9Sstevel@tonic-gate #define	ds_suspend	d_cm.c_sflags
185*7c478bd9Sstevel@tonic-gate #define	ds_time		d_cm.c_time
186*7c478bd9Sstevel@tonic-gate 
187*7c478bd9Sstevel@tonic-gate #define	SBD_MAX_INFO	64
188*7c478bd9Sstevel@tonic-gate 
189*7c478bd9Sstevel@tonic-gate typedef struct {
190*7c478bd9Sstevel@tonic-gate 	int		s_board;
191*7c478bd9Sstevel@tonic-gate 	char		s_type[SBD_TYPE_LEN];
192*7c478bd9Sstevel@tonic-gate 	char		s_info[SBD_MAX_INFO];
193*7c478bd9Sstevel@tonic-gate 	sbd_state_t	s_rstate;
194*7c478bd9Sstevel@tonic-gate 	sbd_state_t	s_ostate;
195*7c478bd9Sstevel@tonic-gate 	sbd_cond_t	s_cond;
196*7c478bd9Sstevel@tonic-gate 	sbd_busy_t	s_busy;
197*7c478bd9Sstevel@tonic-gate 	time_t		s_time;
198*7c478bd9Sstevel@tonic-gate 	uint_t		s_power:1;
199*7c478bd9Sstevel@tonic-gate 	uint_t		s_assigned:1;
200*7c478bd9Sstevel@tonic-gate 	uint_t		s_platopts;
201*7c478bd9Sstevel@tonic-gate 	int		s_nstat;
202*7c478bd9Sstevel@tonic-gate 	sbd_dev_stat_t	s_stat[1];
203*7c478bd9Sstevel@tonic-gate } sbd_stat_t;
204*7c478bd9Sstevel@tonic-gate 
205*7c478bd9Sstevel@tonic-gate typedef struct {
206*7c478bd9Sstevel@tonic-gate 	sbd_comp_id_t	c_id;
207*7c478bd9Sstevel@tonic-gate 	uint_t		c_flags;
208*7c478bd9Sstevel@tonic-gate 	int		c_len;
209*7c478bd9Sstevel@tonic-gate 	caddr_t		c_opts;
210*7c478bd9Sstevel@tonic-gate } sbd_cm_cmd_t;
211*7c478bd9Sstevel@tonic-gate 
212*7c478bd9Sstevel@tonic-gate typedef struct {
213*7c478bd9Sstevel@tonic-gate 	sbd_cm_cmd_t	g_cm;
214*7c478bd9Sstevel@tonic-gate 	int		g_ncm;
215*7c478bd9Sstevel@tonic-gate } sbd_getncm_cmd_t;
216*7c478bd9Sstevel@tonic-gate 
217*7c478bd9Sstevel@tonic-gate typedef struct {
218*7c478bd9Sstevel@tonic-gate 	sbd_cm_cmd_t	s_cm;
219*7c478bd9Sstevel@tonic-gate 	int		s_nbytes;
220*7c478bd9Sstevel@tonic-gate 	caddr_t		s_statp;
221*7c478bd9Sstevel@tonic-gate } sbd_stat_cmd_t;
222*7c478bd9Sstevel@tonic-gate 
223*7c478bd9Sstevel@tonic-gate typedef union {
224*7c478bd9Sstevel@tonic-gate 	sbd_cm_cmd_t		cmd_cm;
225*7c478bd9Sstevel@tonic-gate 	sbd_getncm_cmd_t	cmd_getncm;
226*7c478bd9Sstevel@tonic-gate 	sbd_stat_cmd_t		cmd_stat;
227*7c478bd9Sstevel@tonic-gate } sbd_cmd_t;
228*7c478bd9Sstevel@tonic-gate 
229*7c478bd9Sstevel@tonic-gate typedef struct {
230*7c478bd9Sstevel@tonic-gate 	int		e_code;
231*7c478bd9Sstevel@tonic-gate 	char		e_rsc[MAXPATHLEN];
232*7c478bd9Sstevel@tonic-gate } sbd_error_t;
233*7c478bd9Sstevel@tonic-gate 
234*7c478bd9Sstevel@tonic-gate typedef struct {
235*7c478bd9Sstevel@tonic-gate 	sbd_cmd_t	i_cmd;
236*7c478bd9Sstevel@tonic-gate 	sbd_error_t	i_err;
237*7c478bd9Sstevel@tonic-gate } sbd_ioctl_arg_t;
238*7c478bd9Sstevel@tonic-gate 
239*7c478bd9Sstevel@tonic-gate typedef struct {
240*7c478bd9Sstevel@tonic-gate 	int		t_base;
241*7c478bd9Sstevel@tonic-gate 	int		t_bnd;
242*7c478bd9Sstevel@tonic-gate 	char		**t_text;
243*7c478bd9Sstevel@tonic-gate } sbd_etab_t;
244*7c478bd9Sstevel@tonic-gate 
245*7c478bd9Sstevel@tonic-gate #define	i_flags		i_cmd.cmd_cm.c_flags
246*7c478bd9Sstevel@tonic-gate #define	i_len		i_cmd.cmd_cm.c_len
247*7c478bd9Sstevel@tonic-gate #define	i_opts		i_cmd.cmd_cm.c_opts
248*7c478bd9Sstevel@tonic-gate #define	ic_type		i_cmd.cmd_cm.ci_type
249*7c478bd9Sstevel@tonic-gate #define	ic_name		i_cmd.cmd_cm.ci_name
250*7c478bd9Sstevel@tonic-gate #define	ic_unit		i_cmd.cmd_cm.ci_unit
251*7c478bd9Sstevel@tonic-gate #define	ie_code		i_err.e_code
252*7c478bd9Sstevel@tonic-gate #define	ie_rsc		i_err.e_rsc
253*7c478bd9Sstevel@tonic-gate 
254*7c478bd9Sstevel@tonic-gate #define	_SBD_IOC		(('D' << 16) | ('R' << 8))
255*7c478bd9Sstevel@tonic-gate 
256*7c478bd9Sstevel@tonic-gate #define	SBD_CMD_ASSIGN		(_SBD_IOC | 0x01)
257*7c478bd9Sstevel@tonic-gate #define	SBD_CMD_UNASSIGN	(_SBD_IOC | 0x02)
258*7c478bd9Sstevel@tonic-gate #define	SBD_CMD_POWERON		(_SBD_IOC | 0x03)
259*7c478bd9Sstevel@tonic-gate #define	SBD_CMD_POWEROFF	(_SBD_IOC | 0x04)
260*7c478bd9Sstevel@tonic-gate #define	SBD_CMD_TEST		(_SBD_IOC | 0x05)
261*7c478bd9Sstevel@tonic-gate #define	SBD_CMD_CONNECT		(_SBD_IOC | 0x06)
262*7c478bd9Sstevel@tonic-gate #define	SBD_CMD_CONFIGURE	(_SBD_IOC | 0x07)
263*7c478bd9Sstevel@tonic-gate #define	SBD_CMD_UNCONFIGURE	(_SBD_IOC | 0x08)
264*7c478bd9Sstevel@tonic-gate #define	SBD_CMD_DISCONNECT	(_SBD_IOC | 0x09)
265*7c478bd9Sstevel@tonic-gate #define	SBD_CMD_STATUS		(_SBD_IOC | 0x0a)
266*7c478bd9Sstevel@tonic-gate #define	SBD_CMD_GETNCM		(_SBD_IOC | 0x0b)
267*7c478bd9Sstevel@tonic-gate #define	SBD_CMD_PASSTHRU	(_SBD_IOC | 0x0c)
268*7c478bd9Sstevel@tonic-gate 
269*7c478bd9Sstevel@tonic-gate #define	SBD_CHECK_SUSPEND(cmd, c_sflags) \
270*7c478bd9Sstevel@tonic-gate 		(((c_sflags) >> (((cmd) & 0xf) - 1)) & 0x01)
271*7c478bd9Sstevel@tonic-gate 
272*7c478bd9Sstevel@tonic-gate #define	SBD_SET_SUSPEND(cmd, c_sflags) \
273*7c478bd9Sstevel@tonic-gate 		((c_sflags) |= (0x01 << (((cmd) & 0xf) - 1)))
274*7c478bd9Sstevel@tonic-gate 
275*7c478bd9Sstevel@tonic-gate #define	SBD_CHECK_PLATOPTS(cmd, c_platopts) \
276*7c478bd9Sstevel@tonic-gate 		(((c_platopts) >> (((cmd) & 0xf) - 1)) & 0x01)
277*7c478bd9Sstevel@tonic-gate 
278*7c478bd9Sstevel@tonic-gate #define	SBD_SET_PLATOPTS(cmd, c_platopts) \
279*7c478bd9Sstevel@tonic-gate 		((c_platopts) &= ~(0x01 << (((cmd) & 0xf) - 1)))
280*7c478bd9Sstevel@tonic-gate 
281*7c478bd9Sstevel@tonic-gate #define	SBD_FLAG_FORCE		0x1
282*7c478bd9Sstevel@tonic-gate #define	SBD_FLAG_ALLCMP		0x2
283*7c478bd9Sstevel@tonic-gate #define	SBD_FLAG_QUIESCE_OKAY	0x4
284*7c478bd9Sstevel@tonic-gate 
285*7c478bd9Sstevel@tonic-gate #if defined(_SYSCALL32)
286*7c478bd9Sstevel@tonic-gate 
287*7c478bd9Sstevel@tonic-gate typedef struct {
288*7c478bd9Sstevel@tonic-gate 	int32_t		c_type;
289*7c478bd9Sstevel@tonic-gate 	int32_t		c_unit;
290*7c478bd9Sstevel@tonic-gate 	char		c_name[OBP_MAXPROPNAME];
291*7c478bd9Sstevel@tonic-gate } sbd_comp_id32_t;
292*7c478bd9Sstevel@tonic-gate 
293*7c478bd9Sstevel@tonic-gate typedef struct {
294*7c478bd9Sstevel@tonic-gate 	sbd_comp_id32_t	c_id;
295*7c478bd9Sstevel@tonic-gate 	int32_t		c_ostate;
296*7c478bd9Sstevel@tonic-gate 	int32_t		c_cond;
297*7c478bd9Sstevel@tonic-gate 	int32_t		c_busy;
298*7c478bd9Sstevel@tonic-gate 	uint32_t	c_sflags;
299*7c478bd9Sstevel@tonic-gate 	time32_t	c_time;
300*7c478bd9Sstevel@tonic-gate } sbd_cm_stat32_t;
301*7c478bd9Sstevel@tonic-gate 
302*7c478bd9Sstevel@tonic-gate typedef struct {
303*7c478bd9Sstevel@tonic-gate 	sbd_cm_stat32_t	cs_cm;
304*7c478bd9Sstevel@tonic-gate 	int32_t		cs_isbootproc;
305*7c478bd9Sstevel@tonic-gate 	int32_t		cs_cpuid;
306*7c478bd9Sstevel@tonic-gate 	int32_t		cs_speed;
307*7c478bd9Sstevel@tonic-gate 	int32_t		cs_ecache;
308*7c478bd9Sstevel@tonic-gate } sbd_cpu_stat32_t;
309*7c478bd9Sstevel@tonic-gate 
310*7c478bd9Sstevel@tonic-gate typedef struct {
311*7c478bd9Sstevel@tonic-gate 	sbd_cm_stat32_t	ms_cm;
312*7c478bd9Sstevel@tonic-gate 	int32_t		ms_interleave;
313*7c478bd9Sstevel@tonic-gate 	uint32_t	ms_basepfn;
314*7c478bd9Sstevel@tonic-gate 	uint32_t	ms_totpages;
315*7c478bd9Sstevel@tonic-gate 	uint32_t	ms_detpages;
316*7c478bd9Sstevel@tonic-gate 	int32_t		ms_pageslost;
317*7c478bd9Sstevel@tonic-gate 	uint32_t	ms_managed_pages;
318*7c478bd9Sstevel@tonic-gate 	uint32_t	ms_noreloc_pages;
319*7c478bd9Sstevel@tonic-gate 	uint32_t	ms_noreloc_first;
320*7c478bd9Sstevel@tonic-gate 	uint32_t	ms_noreloc_last;
321*7c478bd9Sstevel@tonic-gate 	int32_t		ms_cage_enabled;
322*7c478bd9Sstevel@tonic-gate 	int32_t		ms_peer_is_target;
323*7c478bd9Sstevel@tonic-gate 	char		ms_peer_ap_id[MAXPATHLEN];
324*7c478bd9Sstevel@tonic-gate } sbd_mem_stat32_t;
325*7c478bd9Sstevel@tonic-gate 
326*7c478bd9Sstevel@tonic-gate typedef struct {
327*7c478bd9Sstevel@tonic-gate 	sbd_cm_stat32_t	is_cm;
328*7c478bd9Sstevel@tonic-gate 	int32_t		is_referenced;
329*7c478bd9Sstevel@tonic-gate 	int32_t		is_unsafe_count;
330*7c478bd9Sstevel@tonic-gate 	int32_t		is_unsafe_list[SBD_MAX_UNSAFE];
331*7c478bd9Sstevel@tonic-gate 	char		is_pathname[MAXPATHLEN];
332*7c478bd9Sstevel@tonic-gate } sbd_io_stat32_t;
333*7c478bd9Sstevel@tonic-gate 
334*7c478bd9Sstevel@tonic-gate typedef struct {
335*7c478bd9Sstevel@tonic-gate 	sbd_cm_stat32_t	ps_cm;
336*7c478bd9Sstevel@tonic-gate 	int32_t		ps_cpuid[SBD_MAX_CORES_PER_CMP];
337*7c478bd9Sstevel@tonic-gate 	int32_t		ps_ncores;
338*7c478bd9Sstevel@tonic-gate 	int32_t		ps_speed;
339*7c478bd9Sstevel@tonic-gate 	int32_t		ps_ecache;
340*7c478bd9Sstevel@tonic-gate } sbd_cmp_stat32_t;
341*7c478bd9Sstevel@tonic-gate 
342*7c478bd9Sstevel@tonic-gate typedef union {
343*7c478bd9Sstevel@tonic-gate 	sbd_cm_stat32_t		d_cm;
344*7c478bd9Sstevel@tonic-gate 	sbd_cpu_stat32_t	d_cpu;
345*7c478bd9Sstevel@tonic-gate 	sbd_mem_stat32_t	d_mem;
346*7c478bd9Sstevel@tonic-gate 	sbd_io_stat32_t		d_io;
347*7c478bd9Sstevel@tonic-gate 	sbd_cmp_stat32_t	d_cmp;
348*7c478bd9Sstevel@tonic-gate } sbd_dev_stat32_t;
349*7c478bd9Sstevel@tonic-gate 
350*7c478bd9Sstevel@tonic-gate typedef struct {
351*7c478bd9Sstevel@tonic-gate 	int32_t			s_board;
352*7c478bd9Sstevel@tonic-gate 	char			s_type[SBD_TYPE_LEN];
353*7c478bd9Sstevel@tonic-gate 	char			s_info[SBD_MAX_INFO];
354*7c478bd9Sstevel@tonic-gate 	int32_t			s_rstate;
355*7c478bd9Sstevel@tonic-gate 	int32_t			s_ostate;
356*7c478bd9Sstevel@tonic-gate 	int32_t			s_cond;
357*7c478bd9Sstevel@tonic-gate 	int32_t			s_busy;
358*7c478bd9Sstevel@tonic-gate 	time32_t		s_time;
359*7c478bd9Sstevel@tonic-gate 	uint32_t		s_power:1;
360*7c478bd9Sstevel@tonic-gate 	uint32_t		s_assigned:1;
361*7c478bd9Sstevel@tonic-gate 	uint32_t		s_platopts;
362*7c478bd9Sstevel@tonic-gate 	int32_t			s_nstat;
363*7c478bd9Sstevel@tonic-gate 	sbd_dev_stat32_t	s_stat[1];
364*7c478bd9Sstevel@tonic-gate } sbd_stat32_t;
365*7c478bd9Sstevel@tonic-gate 
366*7c478bd9Sstevel@tonic-gate typedef struct {
367*7c478bd9Sstevel@tonic-gate 	int32_t			e_code;
368*7c478bd9Sstevel@tonic-gate 	char			e_rsc[MAXPATHLEN];
369*7c478bd9Sstevel@tonic-gate } sbd_error32_t;
370*7c478bd9Sstevel@tonic-gate 
371*7c478bd9Sstevel@tonic-gate typedef struct {
372*7c478bd9Sstevel@tonic-gate 	sbd_comp_id32_t		c_id;
373*7c478bd9Sstevel@tonic-gate 	uint32_t		c_flags;
374*7c478bd9Sstevel@tonic-gate 	int32_t			c_len;
375*7c478bd9Sstevel@tonic-gate 	caddr32_t		c_opts;
376*7c478bd9Sstevel@tonic-gate } sbd_cm_cmd32_t;
377*7c478bd9Sstevel@tonic-gate 
378*7c478bd9Sstevel@tonic-gate typedef struct {
379*7c478bd9Sstevel@tonic-gate 	sbd_cm_cmd32_t	g_cm;
380*7c478bd9Sstevel@tonic-gate 	int32_t		g_ncm;
381*7c478bd9Sstevel@tonic-gate } sbd_getncm_cmd32_t;
382*7c478bd9Sstevel@tonic-gate 
383*7c478bd9Sstevel@tonic-gate typedef struct {
384*7c478bd9Sstevel@tonic-gate 	sbd_cm_cmd32_t	s_cm;
385*7c478bd9Sstevel@tonic-gate 	int32_t		s_nbytes;
386*7c478bd9Sstevel@tonic-gate 	caddr32_t	s_statp;
387*7c478bd9Sstevel@tonic-gate } sbd_stat_cmd32_t;
388*7c478bd9Sstevel@tonic-gate 
389*7c478bd9Sstevel@tonic-gate typedef union {
390*7c478bd9Sstevel@tonic-gate 	sbd_cm_cmd32_t		cmd_cm;
391*7c478bd9Sstevel@tonic-gate 	sbd_getncm_cmd32_t	cmd_getncm;
392*7c478bd9Sstevel@tonic-gate 	sbd_stat_cmd32_t	cmd_stat;
393*7c478bd9Sstevel@tonic-gate } sbd_cmd32_t;
394*7c478bd9Sstevel@tonic-gate 
395*7c478bd9Sstevel@tonic-gate typedef struct {
396*7c478bd9Sstevel@tonic-gate 	sbd_cmd32_t		i_cmd;
397*7c478bd9Sstevel@tonic-gate 	sbd_error32_t		i_err;
398*7c478bd9Sstevel@tonic-gate } sbd_ioctl_arg32_t;
399*7c478bd9Sstevel@tonic-gate 
400*7c478bd9Sstevel@tonic-gate typedef struct {
401*7c478bd9Sstevel@tonic-gate 	int32_t			t_base;
402*7c478bd9Sstevel@tonic-gate 	int32_t			t_bnd;
403*7c478bd9Sstevel@tonic-gate 	char			**t_text;
404*7c478bd9Sstevel@tonic-gate } sbd_etab32_t;
405*7c478bd9Sstevel@tonic-gate 
406*7c478bd9Sstevel@tonic-gate #endif	/* _SYSCALL32 */
407*7c478bd9Sstevel@tonic-gate 
408*7c478bd9Sstevel@tonic-gate /* Common error codes */
409*7c478bd9Sstevel@tonic-gate 
410*7c478bd9Sstevel@tonic-gate #define	ESBD_NOERROR		0	/* no error */
411*7c478bd9Sstevel@tonic-gate #define	ESBD_INTERNAL		1	/* Internal error */
412*7c478bd9Sstevel@tonic-gate #define	ESBD_NOMEM		2	/* Insufficient memory */
413*7c478bd9Sstevel@tonic-gate #define	ESBD_PROTO		3	/* Protocol error */
414*7c478bd9Sstevel@tonic-gate #define	ESBD_BUSY		4	/* Device busy */
415*7c478bd9Sstevel@tonic-gate #define	ESBD_NODEV		5	/* No such device */
416*7c478bd9Sstevel@tonic-gate #define	ESBD_ALREADY		6	/* Operation already in progress */
417*7c478bd9Sstevel@tonic-gate #define	ESBD_IO			7	/* I/O error */
418*7c478bd9Sstevel@tonic-gate #define	ESBD_FAULT		8	/* Bad address */
419*7c478bd9Sstevel@tonic-gate #define	ESBD_EMPTY_BD		9	/* No device(s) on board */
420*7c478bd9Sstevel@tonic-gate #define	ESBD_INVAL		10	/* Invalid argument */
421*7c478bd9Sstevel@tonic-gate #define	ESBD_STATE		11	/* Invalid state transition */
422*7c478bd9Sstevel@tonic-gate #define	ESBD_FATAL_STATE	12	/* Device in fatal state */
423*7c478bd9Sstevel@tonic-gate #define	ESBD_OUTSTANDING	13	/* Outstanding error */
424*7c478bd9Sstevel@tonic-gate #define	ESBD_SUSPEND		14	/* Device failed to suspend */
425*7c478bd9Sstevel@tonic-gate #define	ESBD_RESUME		15	/* Device failed to resume */
426*7c478bd9Sstevel@tonic-gate #define	ESBD_UTHREAD		16	/* Cannot stop user thread */
427*7c478bd9Sstevel@tonic-gate #define	ESBD_RTTHREAD		17	/* Cannot quiesce realtime thread */
428*7c478bd9Sstevel@tonic-gate #define	ESBD_KTHREAD		18	/* Cannot stop kernel thread  */
429*7c478bd9Sstevel@tonic-gate #define	ESBD_OFFLINE		19	/* Failed to off-line */
430*7c478bd9Sstevel@tonic-gate #define	ESBD_ONLINE		20	/* Failed to on-line */
431*7c478bd9Sstevel@tonic-gate #define	ESBD_CPUSTART		21	/* Failed to start CPU */
432*7c478bd9Sstevel@tonic-gate #define	ESBD_CPUSTOP		22	/* Failed to stop CPU */
433*7c478bd9Sstevel@tonic-gate #define	ESBD_INVAL_COMP		23	/* Invalid component type */
434*7c478bd9Sstevel@tonic-gate #define	ESBD_KCAGE_OFF		24	/* Kernel cage is disabled */
435*7c478bd9Sstevel@tonic-gate #define	ESBD_NO_TARGET		25	/* No available memory target */
436*7c478bd9Sstevel@tonic-gate #define	ESBD_HW_PROGRAM		26	/* Hardware programming error */
437*7c478bd9Sstevel@tonic-gate #define	ESBD_MEM_NOTVIABLE	27	/* VM viability test failed */
438*7c478bd9Sstevel@tonic-gate #define	ESBD_MEM_REFUSED	28	/* Memory operation refused */
439*7c478bd9Sstevel@tonic-gate #define	ESBD_MEM_NONRELOC	29	/* Non-relocatable pages in span */
440*7c478bd9Sstevel@tonic-gate #define	ESBD_MEM_CANCELLED	30	/* Memory operation cancelled */
441*7c478bd9Sstevel@tonic-gate #define	ESBD_MEMFAIL		31	/* Memory operation failed */
442*7c478bd9Sstevel@tonic-gate #define	ESBD_MEMONLINE		32	/* Can't unconfig cpu if mem online */
443*7c478bd9Sstevel@tonic-gate #define	ESBD_QUIESCE_REQD	33
444*7c478bd9Sstevel@tonic-gate 	/* Operator confirmation for quiesce is required */
445*7c478bd9Sstevel@tonic-gate #define	ESBD_MEMINTLV		34
446*7c478bd9Sstevel@tonic-gate 	/* Memory is interleaved across boards */
447*7c478bd9Sstevel@tonic-gate #define	ESBD_CPUONLINE		35
448*7c478bd9Sstevel@tonic-gate 	/* Can't config memory if not all cpus are online */
449*7c478bd9Sstevel@tonic-gate #define	ESBD_UNSAFE		36	/* Unsafe driver present */
450*7c478bd9Sstevel@tonic-gate #define	ESBD_INVAL_OPT		37	/* option invalid */
451*7c478bd9Sstevel@tonic-gate 
452*7c478bd9Sstevel@tonic-gate /* Starcat error codes */
453*7c478bd9Sstevel@tonic-gate 
454*7c478bd9Sstevel@tonic-gate #define	ESTC_NONE		1000	/* No error */
455*7c478bd9Sstevel@tonic-gate #define	ESTC_GETPROP		1001	/* Cannot read property value */
456*7c478bd9Sstevel@tonic-gate #define	ESTC_BNUM		1002	/* Invalid board number */
457*7c478bd9Sstevel@tonic-gate #define	ESTC_CONFIGBUSY		1003
458*7c478bd9Sstevel@tonic-gate 	/* Cannot proceed; Board is configured or busy */
459*7c478bd9Sstevel@tonic-gate #define	ESTC_PROBE		1004	/* Solaris failed to probe */
460*7c478bd9Sstevel@tonic-gate #define	ESTC_DEPROBE		1005	/* Solaris failed to deprobe */
461*7c478bd9Sstevel@tonic-gate #define	ESTC_MOVESIGB		1006	/* Firmware move-cpu0 failed */
462*7c478bd9Sstevel@tonic-gate #define	ESTC_SUPPORT		1007	/* Operation not supported */
463*7c478bd9Sstevel@tonic-gate #define	ESTC_DRVFAIL		1008	/* Device driver failure */
464*7c478bd9Sstevel@tonic-gate #define	ESTC_UNKPTCMD		1012	/* Unrecognized platform command */
465*7c478bd9Sstevel@tonic-gate #define	ESTC_NOTID		1013
466*7c478bd9Sstevel@tonic-gate 	/* drmach parameter is not a valid ID */
467*7c478bd9Sstevel@tonic-gate #define	ESTC_INAPPROP		1014
468*7c478bd9Sstevel@tonic-gate 	/* drmach parameter is inappropriate for operation */
469*7c478bd9Sstevel@tonic-gate #define	ESTC_INTERNAL		1015	/* Unexpected internal condition */
470*7c478bd9Sstevel@tonic-gate #define	ESTC_MBXRQST		1016
471*7c478bd9Sstevel@tonic-gate 	/* Mailbox framework failure: outgoing */
472*7c478bd9Sstevel@tonic-gate #define	ESTC_MBXRPLY		1017
473*7c478bd9Sstevel@tonic-gate 	/* Mailbox framework failure: incoming */
474*7c478bd9Sstevel@tonic-gate #define	ESTC_NOACL		1018	/* Board is not in domain ACL */
475*7c478bd9Sstevel@tonic-gate #define	ESTC_NOT_ASSIGNED	1019	/* Board is not assigned to domain */
476*7c478bd9Sstevel@tonic-gate #define	ESTC_NOT_ACTIVE		1020	/* Board is not active */
477*7c478bd9Sstevel@tonic-gate #define	ESTC_EMPTY_SLOT		1021	/* Slot is empty */
478*7c478bd9Sstevel@tonic-gate #define	ESTC_POWER_OFF		1022	/* Board is powered off */
479*7c478bd9Sstevel@tonic-gate #define	ESTC_TEST_IN_PROGRESS	1023	/* Board is already being tested */
480*7c478bd9Sstevel@tonic-gate #define	ESTC_TESTING_BUSY	1024
481*7c478bd9Sstevel@tonic-gate 	/* Wait: All SC test resources are in use */
482*7c478bd9Sstevel@tonic-gate #define	ESTC_TEST_REQUIRED	1025	/* Board requires test prior to use */
483*7c478bd9Sstevel@tonic-gate #define	ESTC_TEST_ABORTED	1026	/* Board test has been aborted */
484*7c478bd9Sstevel@tonic-gate #define	ESTC_MBOX_UNKNOWN	1027
485*7c478bd9Sstevel@tonic-gate 	/* Unknown error type received from SC */
486*7c478bd9Sstevel@tonic-gate #define	ESTC_TEST_STATUS_UNKNOWN	1028
487*7c478bd9Sstevel@tonic-gate 	/* Test completed with unknown status */
488*7c478bd9Sstevel@tonic-gate #define	ESTC_TEST_RESULT_UNKNOWN	1029
489*7c478bd9Sstevel@tonic-gate 	/* Unknown test result returned by SC */
490*7c478bd9Sstevel@tonic-gate #define	ESTC_TEST_FAILED	1030
491*7c478bd9Sstevel@tonic-gate 	/* SMS hpost reported error, see POST log for details */
492*7c478bd9Sstevel@tonic-gate #define	ESTC_UNAVAILABLE	1031	/* Slot is unavailable to the domain */
493*7c478bd9Sstevel@tonic-gate #define	ESTC_NZ_LPA		1032	/* Nonzero LPA not yet supported */
494*7c478bd9Sstevel@tonic-gate #define	ESTC_IOSWITCH		1033
495*7c478bd9Sstevel@tonic-gate 	/* Cannot unconfigure I/O board: tunnel switch failed */
496*7c478bd9Sstevel@tonic-gate #define	ESTC_IOCAGE_NO_CPU_AVAIL	1034
497*7c478bd9Sstevel@tonic-gate 	/* No CPU available for I/O cage test. */
498*7c478bd9Sstevel@tonic-gate #define	ESTC_SMS_ERR_RECOVERABLE	1035
499*7c478bd9Sstevel@tonic-gate 	/* SMS reported recoverable error: check SMS status and Retry */
500*7c478bd9Sstevel@tonic-gate #define	ESTC_SMS_ERR_UNRECOVERABLE	1036
501*7c478bd9Sstevel@tonic-gate 	/* SMS reported unrecoverable error: Board is Unusable */
502*7c478bd9Sstevel@tonic-gate #define	ESTC_NWSWITCH		1037
503*7c478bd9Sstevel@tonic-gate 	/* Cannot unconfigure I/O board: network switch failed */
504*7c478bd9Sstevel@tonic-gate 
505*7c478bd9Sstevel@tonic-gate /* Starfire error codes */
506*7c478bd9Sstevel@tonic-gate 
507*7c478bd9Sstevel@tonic-gate #define	ESTF_NONE		2000	/* No error */
508*7c478bd9Sstevel@tonic-gate #define	ESTF_GETPROP		2001	/* Cannot read property value */
509*7c478bd9Sstevel@tonic-gate #define	ESTF_GETPROPLEN		2002	/* Cannot determine property length */
510*7c478bd9Sstevel@tonic-gate #define	ESTF_BNUM		2003	/* Invalid board number */
511*7c478bd9Sstevel@tonic-gate #define	ESTF_CONFIGBUSY		2004
512*7c478bd9Sstevel@tonic-gate 	/* Cannot proceed; Board is configured or busy */
513*7c478bd9Sstevel@tonic-gate #define	ESTF_NOCPUID		2005	/* No CPU specified for connect */
514*7c478bd9Sstevel@tonic-gate #define	ESTF_PROBE		2006	/* Firmware probe failed */
515*7c478bd9Sstevel@tonic-gate #define	ESTF_DEPROBE		2007	/* Firmware deprobe failed */
516*7c478bd9Sstevel@tonic-gate #define	ESTF_MOVESIGB		2008	/* Firmware move-cpu0 failed */
517*7c478bd9Sstevel@tonic-gate #define	ESTF_JUGGLE		2009	/* Cannot move SIGB assignment */
518*7c478bd9Sstevel@tonic-gate #define	ESTF_HASSIGB		2010
519*7c478bd9Sstevel@tonic-gate 	/* Cannot disconnect CPU; SIGB is currently assigned */
520*7c478bd9Sstevel@tonic-gate #define	ESTF_SUPPORT		2011	/* Operation not supported */
521*7c478bd9Sstevel@tonic-gate #define	ESTF_DRVFAIL		2012	/* Device driver failure */
522*7c478bd9Sstevel@tonic-gate #define	ESTF_SETCPUVAL		2013
523*7c478bd9Sstevel@tonic-gate 	/* Must specify a CPU on the given board */
524*7c478bd9Sstevel@tonic-gate #define	ESTF_NODEV		2014	/* No such device */
525*7c478bd9Sstevel@tonic-gate #define	ESTF_INTERBOARD		2015
526*7c478bd9Sstevel@tonic-gate 	/* Memory configured with inter-board interleaving */
527*7c478bd9Sstevel@tonic-gate #define	ESTF_UNKPTCMD		2016	/* Unrecognized platform command */
528*7c478bd9Sstevel@tonic-gate #define	ESTF_NOTID		2017	/* drmach parameter is not a valid ID */
529*7c478bd9Sstevel@tonic-gate #define	ESTF_INAPPROP		2018
530*7c478bd9Sstevel@tonic-gate 	/* drmach parameter is inappropriate for operation */
531*7c478bd9Sstevel@tonic-gate #define	ESTF_INTERNAL		2019	/* Unexpected internal condition */
532*7c478bd9Sstevel@tonic-gate 
533*7c478bd9Sstevel@tonic-gate /* Daktari error codes */
534*7c478bd9Sstevel@tonic-gate 
535*7c478bd9Sstevel@tonic-gate #define	EDAK_NONE		3000	/* no error */
536*7c478bd9Sstevel@tonic-gate #define	EDAK_INTERNAL		3001	/* Internal error */
537*7c478bd9Sstevel@tonic-gate #define	EDAK_NOFRUINFO		3002	/* Didn't receive fru info */
538*7c478bd9Sstevel@tonic-gate #define	EDAK_NONDR_BOARD	3003
539*7c478bd9Sstevel@tonic-gate 	/* DR is not supported on this board type */
540*7c478bd9Sstevel@tonic-gate #define	EDAK_POWERON		3004	/* Power on request failed */
541*7c478bd9Sstevel@tonic-gate #define	EDAK_POWEROK		3005	/* Failed to power on */
542*7c478bd9Sstevel@tonic-gate #define	EDAK_INTERRUPTED	3006	/* Operation interrupted */
543*7c478bd9Sstevel@tonic-gate #define	EDAK_BOARDINIT		3007	/* Board initialization failed */
544*7c478bd9Sstevel@tonic-gate #define	EDAK_CPUINIT		3008	/* CPU intialization failed */
545*7c478bd9Sstevel@tonic-gate #define	EDAK_MEMFAIL		3009	/* Memory operation failed */
546*7c478bd9Sstevel@tonic-gate 
547*7c478bd9Sstevel@tonic-gate /* Serengeti error codes */
548*7c478bd9Sstevel@tonic-gate 
549*7c478bd9Sstevel@tonic-gate #define	ESGT_NONE		4000	/* no error */
550*7c478bd9Sstevel@tonic-gate #define	ESGT_INTERNAL		4001	/* Internal error */
551*7c478bd9Sstevel@tonic-gate #define	ESGT_INVAL		4002	/* Invalid argument */
552*7c478bd9Sstevel@tonic-gate #define	ESGT_MEMFAIL		4003	/* Memory operation failed */
553*7c478bd9Sstevel@tonic-gate #define	ESGT_PROBE		4004	/* Board probe failed */
554*7c478bd9Sstevel@tonic-gate #define	ESGT_DEPROBE		4005	/* Board deprobe failed */
555*7c478bd9Sstevel@tonic-gate #define	ESGT_JUGGLE_BOOTPROC	4006	/* Failed to juggle bootproc */
556*7c478bd9Sstevel@tonic-gate #define	ESGT_NOT_CPUTYPE	4007	/* Not a cpu device */
557*7c478bd9Sstevel@tonic-gate #define	ESGT_NO_DEV_TYPE	4008	/* Cannot find device type */
558*7c478bd9Sstevel@tonic-gate #define	ESGT_BAD_PORTID		4009	/* Bad port id */
559*7c478bd9Sstevel@tonic-gate #define	ESGT_RESUME		4010	/* Failed to resume device */
560*7c478bd9Sstevel@tonic-gate #define	ESGT_SUSPEND		4011	/* Failed to suspend device */
561*7c478bd9Sstevel@tonic-gate #define	ESGT_KTHREAD		4012	/* failed to stop kernel thd */
562*7c478bd9Sstevel@tonic-gate #define	ESGT_UNSAFE		4013	/* unsafe */
563*7c478bd9Sstevel@tonic-gate #define	ESGT_RTTHREAD		4014	/* real time threads */
564*7c478bd9Sstevel@tonic-gate #define	ESGT_UTHREAD		4015	/* failed to stop user thd */
565*7c478bd9Sstevel@tonic-gate #define	ESGT_PROM_ATTACH	4016	/* prom failed attach board */
566*7c478bd9Sstevel@tonic-gate #define	ESGT_PROM_DETACH	4017	/* prom failed detach board */
567*7c478bd9Sstevel@tonic-gate #define	ESGT_SC_ERR		4018	/* sc return a failure */
568*7c478bd9Sstevel@tonic-gate #define	ESGT_GET_BOARD_STAT	4019	/* Failed to obtain board information */
569*7c478bd9Sstevel@tonic-gate #define	ESGT_WAKEUPCPU		4020	/* Failed to wake up cpu */
570*7c478bd9Sstevel@tonic-gate #define	ESGT_STOPCPU		4021	/* Failed to stop cpu */
571*7c478bd9Sstevel@tonic-gate /* Serengeti SC return codes */
572*7c478bd9Sstevel@tonic-gate #define	ESGT_HW_FAIL		4022	/* Hardware Failure */
573*7c478bd9Sstevel@tonic-gate #define	ESGT_BD_ACCESS		4023	/* Board access denied */
574*7c478bd9Sstevel@tonic-gate #define	ESGT_STALE_CMP		4024	/* Stale components */
575*7c478bd9Sstevel@tonic-gate #define	ESGT_STALE_OBJ		4025	/* Stale objects */
576*7c478bd9Sstevel@tonic-gate #define	ESGT_NO_SEPROM_SPACE	4026	/* No SEPROM space */
577*7c478bd9Sstevel@tonic-gate #define	ESGT_NOT_SUPP		4027	/* Operation not supported */
578*7c478bd9Sstevel@tonic-gate #define	ESGT_NO_MEM		4028	/* No Memory */
579*7c478bd9Sstevel@tonic-gate 
580*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
581*7c478bd9Sstevel@tonic-gate }
582*7c478bd9Sstevel@tonic-gate #endif
583*7c478bd9Sstevel@tonic-gate 
584*7c478bd9Sstevel@tonic-gate #endif	/* _SBD_IOCTL_H */
585