blob: f796aac40b0a59f3662cb9de43fa6e05cd11ac82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
/*
* 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
* or http://www.opensolaris.org/os/licensing.
* 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 2000 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _MONTERCARLO_SYS_SCSBIOCTL_H
#define _MONTERCARLO_SYS_SCSBIOCTL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* SCB HW information, which is needed in scsb.h for scsb.c.
* there are 32 data registers on the system controller board
* most are used in P1.0, all are used in P1.5
*/
#define SCSB_DATA_REGISTERS 48
#define _SCSBIOC ('s' << 8)
#define SCSBIOC_GET_STATUS (_SCSBIOC | 1) /* Internal */
#define SCSBIOC_I2C_XFER (_SCSBIOC | 2) /* Internal */
#define SCSBIOC_ALL_LEDS_ON (_SCSBIOC | 3) /* Diagnostics */
#define SCSBIOC_ALL_LEDS_OFF (_SCSBIOC | 4) /* Diagnostics */
#define SCSBIOC_FREEZE (_SCSBIOC | 5) /* Internal */
#define SCSBIOC_RESTORE (_SCSBIOC | 6) /* Internal */
#define SCSBIOC_LED_NOK_SET (_SCSBIOC | 7) /* Diagnostics */
#define SCSBIOC_LED_NOK_GET (_SCSBIOC | 8) /* Diagnostics */
#define SCSBIOC_LED_OK_SET (_SCSBIOC | 9) /* Diagnostics */
#define SCSBIOC_LED_OK_GET (_SCSBIOC | 10) /* Diagnostics */
#define SCSBIOC_GET_FAN_STATUS (_SCSBIOC | 11) /* Internal */
#define SCSBIOC_RESET_UNIT (_SCSBIOC | 12) /* Diagnostics */
#define SCSBIOC_FAKE_INTR (_SCSBIOC | 13) /* Internal */
#define SCSBIOC_BSELECT_SET (_SCSBIOC | 14) /* Internal */
#define SCSBIOC_BSELECT_GET (_SCSBIOC | 15) /* Internal */
#define SCSBIOC_BHEALTHY_SET (_SCSBIOC | 16) /* Internal */
#define SCSBIOC_BHEALTHY_GET (_SCSBIOC | 17) /* Internal */
#define SCSBIOC_GET_INTR_ARRAY (_SCSBIOC | 18) /* Internal */
#define ENVC_IOC_ACQUIRE_SLOT_LED_CTRL (_SCSBIOC | 21) /* EnvMon */
#define ENVC_IOC_RELEASE_SLOT_LED_CTRL (_SCSBIOC | 22) /* EnvMon */
#define ENVC_IOC_SETFSP (_SCSBIOC | 23) /* EnvMon */
#define ENVC_IOC_GETDSKLED (_SCSBIOC | 24) /* EnvMon */
#define ENVC_IOC_SETDSKLED (_SCSBIOC | 25) /* EnvMon */
#define ENVC_IOC_REGISTER_PID (_SCSBIOC | 26) /* EnvMon */
#define ENVC_IOC_UNREGISTER_PID (_SCSBIOC | 27) /* EnvMon */
#define ENVC_IOC_ACCONF_RESTORED (_SCSBIOC | 28) /* EnvMon */
#define ENVC_IOC_ACCONF_STORED (_SCSBIOC | 29) /* EnvMon */
#define SCSBIOC_REG_READ (_SCSBIOC | 31) /* Diagnostic */
#define SCSBIOC_REG_WRITE (_SCSBIOC | 32) /* Diagnostic */
#define SCSBIOC_GET_VERSIONS (_SCSBIOC | 33) /* Diagnostic */
/* these are for debug/testing and may be temporary */
#define SCSBIOC_SHUTDOWN_POLL (_SCSBIOC | 41) /* Internal */
#define SCSBIOC_SLOT_OCCUPANCY (_SCSBIOC | 42) /* Internal */
#define SCSBIOC_INTEVENT_POLL (_SCSBIOC | 43) /* Internal */
#define SCSBIOC_TOPOLOGY_DUMP (_SCSBIOC | 44) /* Internal */
#define SCSBIOC_VALUE_MODE (_SCSBIOC | 45) /* Internal */
#define SCSBIOC_GET_SLOT_INFO (_SCSBIOC | 46) /* Internal */
#define SCSBIOC_DEBUG_MODE (_SCSBIOC | 52) /* Internal */
/*
* SCSBIOC_GET_VERSIONS structure
*/
#define SCSB_MODSTR_LEN 64
#define SCSB_VERSTR_LEN 12
typedef struct scsb_ids {
char modldrv_string[SCSB_MODSTR_LEN];
char scsb_version[SCSB_VERSTR_LEN];
uint8_t promid;
uint8_t pad[3];
} scsb_ids_t;
typedef enum {
GET = 0,
SET = 1
} scsb_op_t;
typedef enum {
NOK = 0,
OK = 1,
NOUSE = 2
} scsb_led_t;
#define SCSB_LED_TYPES 2
typedef enum {
OFF = 0,
ON = 1,
BLINK = 2
} scsb_ustate_t;
typedef struct {
scsb_unum_t unit_number;
scsb_utype_t unit_type;
scsb_ustate_t unit_state;
scsb_led_t led_type;
} scsb_uinfo_t;
/* SCSBIOC_GET_STATUS data */
typedef struct {
uchar_t scsb_reg[SCSB_DATA_REGISTERS];
} scsb_status_t;
/* SCSBIOC_REG_READ / SCSBIOC_REG_WRITE data */
typedef struct {
int16_t ioc_result; /* O: return value */
uint16_t ioc_resio; /* O: bytes not transfered */
uint16_t ioc_wlen; /* I: length of write buffer */
uint16_t ioc_rlen; /* I: length of read buffer */
uchar_t ioc_rbuf[64];
uchar_t ioc_wbuf[64];
uchar_t ioc_regindex;
} scsb_ioc_rdwr_t;
#ifdef __cplusplus
}
#endif
#endif /* _MONTERCARLO_SYS_SCSBIOCTL_H */
|