sbd_ioctl.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SBD_IOCTL_H
#define _SBD_IOCTL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/processor.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
typedef enum {
SBD_STAT_NONE = 0,
} sbd_state_t;
typedef enum {
SBD_COND_UNKNOWN = 0,
} sbd_cond_t;
typedef int sbd_busy_t;
#define SBD_MAX_UNSAFE 16
#define SBD_TYPE_LEN 12
#define SBD_NULL_UNIT -1
typedef struct {
int c_unit;
char c_name[OBP_MAXPROPNAME];
typedef struct {
typedef struct {
int cs_isbootproc;
int cs_speed;
int cs_ecache;
typedef struct {
int ms_interleave;
int ms_cage_enabled;
int ms_peer_is_target; /* else peer is source */
typedef struct {
int is_referenced;
int is_unsafe_count;
int is_unsafe_list[SBD_MAX_UNSAFE];
char is_pathname[MAXPATHLEN];
#define SBD_MAX_CORES_PER_CMP 2
typedef struct {
int ps_ncores;
int ps_speed;
int ps_ecache;
typedef union {
#define SBD_MAX_INFO 64
typedef struct {
int s_board;
char s_type[SBD_TYPE_LEN];
char s_info[SBD_MAX_INFO];
int s_nstat;
} sbd_stat_t;
typedef struct {
int c_len;
} sbd_cm_cmd_t;
typedef struct {
int g_ncm;
typedef struct {
int s_nbytes;
typedef union {
} sbd_cmd_t;
typedef struct {
int e_code;
char e_rsc[MAXPATHLEN];
} sbd_error_t;
typedef struct {
typedef struct {
int t_base;
int t_bnd;
char **t_text;
} sbd_etab_t;
#define SBD_FLAG_FORCE 0x1
#define SBD_FLAG_ALLCMP 0x2
#define SBD_FLAG_QUIESCE_OKAY 0x4
#if defined(_SYSCALL32)
typedef struct {
char c_name[OBP_MAXPROPNAME];
typedef struct {
typedef struct {
typedef struct {
char ms_peer_ap_id[MAXPATHLEN];
typedef struct {
char is_pathname[MAXPATHLEN];
typedef struct {
typedef union {
typedef struct {
char s_type[SBD_TYPE_LEN];
char s_info[SBD_MAX_INFO];
} sbd_stat32_t;
typedef struct {
char e_rsc[MAXPATHLEN];
typedef struct {
typedef struct {
typedef struct {
typedef union {
} sbd_cmd32_t;
typedef struct {
typedef struct {
char **t_text;
} sbd_etab32_t;
#endif /* _SYSCALL32 */
/* Common error codes */
#define ESBD_NOERROR 0 /* no error */
#define ESBD_QUIESCE_REQD 33
/* Operator confirmation for quiesce is required */
#define ESBD_MEMINTLV 34
/* Memory is interleaved across boards */
#define ESBD_CPUONLINE 35
/* Can't config memory if not all cpus are online */
/* Starcat error codes */
#define ESTC_CONFIGBUSY 1003
/* Cannot proceed; Board is configured or busy */
#define ESTC_NOTID 1013
/* drmach parameter is not a valid ID */
#define ESTC_INAPPROP 1014
/* drmach parameter is inappropriate for operation */
#define ESTC_MBXRQST 1016
/* Mailbox framework failure: outgoing */
#define ESTC_MBXRPLY 1017
/* Mailbox framework failure: incoming */
#define ESTC_TESTING_BUSY 1024
/* Wait: All SC test resources are in use */
#define ESTC_MBOX_UNKNOWN 1027
/* Unknown error type received from SC */
#define ESTC_TEST_STATUS_UNKNOWN 1028
/* Test completed with unknown status */
#define ESTC_TEST_RESULT_UNKNOWN 1029
/* Unknown test result returned by SC */
#define ESTC_TEST_FAILED 1030
/* SMS hpost reported error, see POST log for details */
#define ESTC_IOSWITCH 1033
/* Cannot unconfigure I/O board: tunnel switch failed */
#define ESTC_IOCAGE_NO_CPU_AVAIL 1034
/* No CPU available for I/O cage test. */
#define ESTC_SMS_ERR_RECOVERABLE 1035
/* SMS reported recoverable error: check SMS status and Retry */
#define ESTC_SMS_ERR_UNRECOVERABLE 1036
/* SMS reported unrecoverable error: Board is Unusable */
#define ESTC_NWSWITCH 1037
/* Cannot unconfigure I/O board: network switch failed */
/* Starfire error codes */
#define ESTF_CONFIGBUSY 2004
/* Cannot proceed; Board is configured or busy */
#define ESTF_HASSIGB 2010
/* Cannot disconnect CPU; SIGB is currently assigned */
#define ESTF_SETCPUVAL 2013
/* Must specify a CPU on the given board */
#define ESTF_INTERBOARD 2015
/* Memory configured with inter-board interleaving */
#define ESTF_INAPPROP 2018
/* drmach parameter is inappropriate for operation */
/* Daktari error codes */
#define EDAK_NONDR_BOARD 3003
/* DR is not supported on this board type */
/* Serengeti error codes */
/* Serengeti SC return codes */
#ifdef __cplusplus
}
#endif
#endif /* _SBD_IOCTL_H */