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