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