opcio.h revision 25cf1a301a396c38e8adf52c15f537b80d2483f7
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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
*/
/*
* All Rights Reserved, Copyright (c) FUJITSU LIMITED 2006
*/
#ifndef _SYS_OPCIO_H
#define _SYS_OPCIO_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* ioctl
*/
/*
* ioctl
*/
/* SCFIOCOPECALL */
/* SCFIOCCLEARLCD */
#define SCF_CLRLCD_SEQ 0
/* SCFIOCWRLCD */
typedef struct scfwrlcd {
int lcd_type;
int length;
unsigned char *string;
} scfwrlcd_t;
/* for lcd_type field */
#define SCF_WRLCD_SEQ 0
#define SCF_WRLCD_MAX 32
/* SCFIOCREPORTSTAT */
#define SCF_SHUTDOWN_START 0
#define SCF_SYSTEM_RUNNING 1
#define SCF_RE_REPORT 9
/* SCFIOCHAC */
typedef struct scfhac {
unsigned char sbuf[64];
unsigned char rbuf[64];
unsigned char sub_command;
} scfhac_t;
/* for sub_command field */
#define SCF_SUB_REMOTE_POWCTL_SET 0x10
/* SCFIOCAUTOPWRSET, SCFIOCAUTOPWRGET, SCFIOCAUTOPWRFPOFF */
typedef struct scfautopwrtime {
int pon_year; /* 1970 - 9999 */
int pon_month; /* 1 - 12 */
int pon_date; /* 1 - 31 */
int pon_hour; /* 0 - 23 */
int pon_minute; /* 0 - 59 */
int poff_year; /* 1970 - 9999 */
int poff_month; /* 1 - 12 */
int poff_date; /* 1 - 31 */
int poff_hour; /* 0 - 23 */
int poff_minute; /* 0 - 59 */
int flag;
int sarea;
typedef struct scfautopwr {
int valid_entries;
} scfautopwr_t;
/* SCFIOCAUTOPWREXSET, SCFIOCAUTOPWREXGET */
typedef struct scfautopwrex {
int rpwr_mode;
int rpwr_time; /* minutes */
int w_time; /* minutes */
int a_time; /* minutes */
/* for rpwr_mode field */
#define AUTOPWREX_RESTORE 0x00
#define AUTOPWREX_NOPON 0x01
#define AUTOPWREX_AUTOPON 0x80
/* SCFIOCRCIPWR */
typedef struct scfrcipwr {
int sub_cmd;
unsigned int rci_addr;
} scfrcipwr_t;
/* for sub_cmd field */
#define RCI_PWR_ON 0x80
#define RCI_PWR_OFF 0x40
#define RCI_SYS_RESET 0x20
#define RCI_PFCTR 0x00
#define RCI_PWR_NOR_OFF 0x41
/* SCFIOCGETREPORT */
typedef struct scfreport {
int flag;
unsigned int rci_addr;
unsigned char report_sense[4];
} scfreport_t;
/* for flag field */
#define GETREPORT_WAIT 1
#define GETREPORT_NOWAIT 2
#define GETREPORT_WAIT_AND_RCIDWN 3
/* SCFIOCRDCLISTX */
typedef struct scfrdclistx {
unsigned int rci_addr;
unsigned char status;
unsigned short dev_class;
unsigned char sub_class;
/* SCFIOCRDCTRL */
typedef struct scfrdctrl {
unsigned char sub_cmd;
unsigned char scount;
unsigned char sbuf[64];
unsigned char sense[64];
} scfrdctrl_t;
/* for sub_cmd field */
#define SCF_SUB_DEVICE_STATUS_RPT 0x71
/* SCFIOCDR */
typedef struct scfdr {
unsigned char sbuf[16];
unsigned char sub_command;
} scfdr_t;
/* for sub_command field */
/* SCFIOCEVENTLIST */
#define SCF_EVENTLIST_MAX 128
typedef struct scfeventlist {
int listcnt;
unsigned char codelist[SCF_EVENTLIST_MAX];
/* SCFIOCGETEVENT */
typedef struct scfevent {
int flag;
unsigned int rci_addr;
unsigned char code;
unsigned char size;
unsigned char rsv[2];
unsigned char event_sense[24];
} scfevent_t;
/* for flag field */
#define GETEVENT_WAIT 1
#define GETEVENT_NOWAIT 2
/* SCFIOCOPTIONDISP */
typedef struct scfoption {
unsigned char rbuf[16];
} scfoption_t;
/* SCFIOCPARMSET, SCFIOCPARMGET */
typedef struct scfparam {
int parm;
int value;
} scfparam_t;
/* for parm field */
#define SCF_PARM_RDCTRL_TIMER 0x00000001
#define SCF_DISK_LED_PATH_MAX 512
typedef struct scfiocgetdiskled {
unsigned char path[SCF_DISK_LED_PATH_MAX];
unsigned char led;
/* for led field */
#define SCF_DISK_LED_ON 0x01
#define SCF_DISK_LED_BLINK 0x02
#define SCF_DISK_LED_OFF 0x04
/* SCFIOCGETSDOWNREASON */
/* SCFIOCGETPCICONFIG */
typedef struct scfiocgetpciconfig {
unsigned char sbuf[16];
unsigned char rbuf[65536];
/* SCFIOCSETMADMEVENT */
typedef struct scfiocsetmadmevent {
unsigned char buf[65536];
unsigned int size;
/* SCFIOCREMCSCMD */
typedef struct scfiocremcscmd {
unsigned char buf[16];
unsigned int size;
unsigned char sub_command;
/* for sub_command field */
#define SUB_CMD_EX_REMCS 0x01
/* SCFIOCREMCSFILE */
typedef struct scfiocremcsfile {
unsigned char buf[65536];
unsigned int size;
unsigned char sub_command;
/* for sub_command field */
#define SUB_FILEUP_READY 0x10
#define SUB_FILEUP_SET 0x20
#define SUB_TRANSFER_STOP 0x40
/* SCFIOCSPARECMD */
typedef struct scfiocsparecmd {
unsigned char buf[65536];
unsigned int size;
unsigned char command;
unsigned char sub_command;
unsigned char spare_sub_command;
/* for sub_command field */
/* SCFIOCSETPHPINFO */
typedef struct scfsetphpinfo {
unsigned char buf[65536];
unsigned int size;
/* SCFIOCPCIRESETREQ */
typedef struct scfpciresetreq {
unsigned char sbuf[65536];
unsigned char rbuf[16];
unsigned int size;
#ifdef __cplusplus
}
#endif
#endif /* _SYS_OPCIO_H */