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