icpreg.h revision 1.1 1 1.1 ad /* $NetBSD: icpreg.h,v 1.1 2002/04/22 21:05:21 ad Exp $ */
2 1.1 ad
3 1.1 ad /*-
4 1.1 ad * Copyright (c) 2002 The NetBSD Foundation, Inc.
5 1.1 ad * All rights reserved.
6 1.1 ad *
7 1.1 ad * This code is derived from software contributed to The NetBSD Foundation
8 1.1 ad * by Andrew Doran.
9 1.1 ad *
10 1.1 ad * Redistribution and use in source and binary forms, with or without
11 1.1 ad * modification, are permitted provided that the following conditions
12 1.1 ad * are met:
13 1.1 ad * 1. Redistributions of source code must retain the above copyright
14 1.1 ad * notice, this list of conditions and the following disclaimer.
15 1.1 ad * 2. Redistributions in binary form must reproduce the above copyright
16 1.1 ad * notice, this list of conditions and the following disclaimer in the
17 1.1 ad * documentation and/or other materials provided with the distribution.
18 1.1 ad * 3. All advertising materials mentioning features or use of this software
19 1.1 ad * must display the following acknowledgement:
20 1.1 ad * This product includes software developed by the NetBSD
21 1.1 ad * Foundation, Inc. and its contributors.
22 1.1 ad * 4. Neither the name of The NetBSD Foundation nor the names of its
23 1.1 ad * contributors may be used to endorse or promote products derived
24 1.1 ad * from this software without specific prior written permission.
25 1.1 ad *
26 1.1 ad * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 1.1 ad * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 1.1 ad * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 1.1 ad * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 1.1 ad * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 1.1 ad * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 1.1 ad * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 1.1 ad * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 1.1 ad * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 1.1 ad * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 1.1 ad * POSSIBILITY OF SUCH DAMAGE.
37 1.1 ad */
38 1.1 ad
39 1.1 ad /*
40 1.1 ad * Copyright (c) 1999, 2000 Niklas Hallqvist. All rights reserved.
41 1.1 ad *
42 1.1 ad * Redistribution and use in source and binary forms, with or without
43 1.1 ad * modification, are permitted provided that the following conditions
44 1.1 ad * are met:
45 1.1 ad * 1. Redistributions of source code must retain the above copyright
46 1.1 ad * notice, this list of conditions and the following disclaimer.
47 1.1 ad * 2. Redistributions in binary form must reproduce the above copyright
48 1.1 ad * notice, this list of conditions and the following disclaimer in the
49 1.1 ad * documentation and/or other materials provided with the distribution.
50 1.1 ad * 3. All advertising materials mentioning features or use of this software
51 1.1 ad * must display the following acknowledgement:
52 1.1 ad * This product includes software developed by Niklas Hallqvist.
53 1.1 ad * 4. The name of the author may not be used to endorse or promote products
54 1.1 ad * derived from this software without specific prior written permission.
55 1.1 ad *
56 1.1 ad * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
57 1.1 ad * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
58 1.1 ad * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
59 1.1 ad * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
60 1.1 ad * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
61 1.1 ad * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
62 1.1 ad * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
63 1.1 ad * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
64 1.1 ad * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
65 1.1 ad * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
66 1.1 ad *
67 1.1 ad * from OpenBSD: gdtreg.h,v 1.1 2000/02/07 00:33:03 niklas Exp
68 1.1 ad */
69 1.1 ad
70 1.1 ad #ifndef _IC_ICPREG_H_
71 1.1 ad #define _IC_ICPREG_H_
72 1.1 ad
73 1.1 ad #define ICP_MAXBUS 6 /* XXX Why not 5? */
74 1.1 ad #define ICP_MAX_HDRIVES 35 /* 5 busses * 7 targets XXX correct? */
75 1.1 ad #define ICP_MAXID_FC 127 /* Fibre-channel maximum ID */
76 1.1 ad #define ICP_MAXOFFSETS 128
77 1.1 ad #define ICP_MAXSG 17 /* Max. s/g elements; actually 128 */
78 1.1 ad #define ICP_PROTOCOL_VERSION 1
79 1.1 ad #define ICP_LINUX_OS 8 /* Used for cache optimization */
80 1.1 ad #define ICP_SCATTER_GATHER 1 /* s/g feature */
81 1.1 ad #define ICP_SECS32 0x1f /* round capacity */
82 1.1 ad #define ICP_LOCALBOARD 0 /* Board node always 0 */
83 1.1 ad #define ICP_MAX_CMDS 124
84 1.1 ad #define ICP_SECTOR_SIZE 0x200 /* Always 512 bytes for cache devs */
85 1.1 ad
86 1.1 ad /* DPMEM constants */
87 1.1 ad #define ICP_MPR_MAGIC 0xc0ffee11
88 1.1 ad #define ICP_IC_HEADER_BYTES 48
89 1.1 ad #define ICP_IC_QUEUE_BYTES 4
90 1.1 ad
91 1.1 ad /* Cache/raw service commands */
92 1.1 ad #define ICP_INIT 0 /* service initialization */
93 1.1 ad #define ICP_READ 1 /* read command */
94 1.1 ad #define ICP_WRITE 2 /* write command */
95 1.1 ad #define ICP_INFO 3 /* information about devices */
96 1.1 ad #define ICP_FLUSH 4 /* flush dirty cache buffers */
97 1.1 ad #define ICP_IOCTL 5 /* ioctl command */
98 1.1 ad #define ICP_DEVTYPE 9 /* additional information */
99 1.1 ad #define ICP_MOUNT 10 /* mount cache device */
100 1.1 ad #define ICP_UNMOUNT 11 /* unmount cache device */
101 1.1 ad #define ICP_SET_FEAT 12 /* set features (scatter/gather) */
102 1.1 ad #define ICP_GET_FEAT 13 /* get features */
103 1.1 ad #define ICP_WRITE_THR 16 /* write through */
104 1.1 ad #define ICP_READ_THR 17 /* read through */
105 1.1 ad #define ICP_EXT_INFO 18 /* extended info */
106 1.1 ad #define ICP_RESET 19 /* controller reset */
107 1.1 ad #define ICP_FREEZE_IO 25 /* freeze all IOs */
108 1.1 ad #define ICP_UNFREEZE_IO 26 /* unfreeze all IOs */
109 1.1 ad
110 1.1 ad /* Additional raw service commands */
111 1.1 ad #define ICP_RESERVE 14 /* reserve device to raw service */
112 1.1 ad #define ICP_RELEASE 15 /* release device */
113 1.1 ad #define ICP_RESERVE_ALL 16 /* reserve all devices */
114 1.1 ad #define ICP_RELEASE_ALL 17 /* release all devices */
115 1.1 ad #define ICP_RESET_BUS 18 /* reset bus */
116 1.1 ad #define ICP_SCAN_START 19 /* start device scan */
117 1.1 ad #define ICP_SCAN_END 20 /* stop device scan */
118 1.1 ad
119 1.1 ad /* IOCTL command defines */
120 1.1 ad #define ICP_SCSI_DR_INFO 0x00 /* SCSI drive info */
121 1.1 ad #define ICP_SCSI_CHAN_CNT 0x05 /* SCSI channel count */
122 1.1 ad #define ICP_SCSI_DR_LIST 0x06 /* SCSI drive list */
123 1.1 ad #define ICP_SCSI_DEF_CNT 0x15 /* grown/primary defects */
124 1.1 ad #define ICP_DSK_STATISTICS 0x4b /* SCSI disk statistics */
125 1.1 ad #define ICP_IOCHAN_DESC 0x5d /* description of IO channel */
126 1.1 ad #define ICP_IOCHAN_RAW_DESC 0x5e /* description of raw IO channel */
127 1.1 ad
128 1.1 ad #define ICP_L_CTRL_PATTERN 0x20000000 /* SCSI IOCTL mask */
129 1.1 ad #define ICP_ARRAY_INFO 0x12 /* array drive info */
130 1.1 ad #define ICP_ARRAY_DRV_LIST 0x0f /* array drive list */
131 1.1 ad #define ICP_LA_CTRL_PATTERN 0x10000000 /* array IOCTL mask */
132 1.1 ad #define ICP_CACHE_DRV_CNT 0x01 /* cache drive count */
133 1.1 ad #define ICP_CACHE_DRV_LIST 0x02 /* cache drive list */
134 1.1 ad #define ICP_CACHE_INFO 0x04 /* cache info */
135 1.1 ad #define ICP_CACHE_CONFIG 0x05 /* cache configuration */
136 1.1 ad #define ICP_CACHE_DRV_INFO 0x07 /* cache drive info */
137 1.1 ad #define ICP_BOARD_FEATURES 0x15 /* controller features */
138 1.1 ad #define ICP_BOARD_INFO 0x28 /* controller info */
139 1.1 ad #define ICP_HOST_GET 0x10001 /* get host drive list */
140 1.1 ad #define ICP_IO_CHANNEL 0x20000 /* default IO channel */
141 1.1 ad #define ICP_INVALID_CHANNEL 0xffff /* invalid channel */
142 1.1 ad
143 1.1 ad /* IOCTLs */
144 1.1 ad #define ICPIOCTL_MASK ('J' << 8)
145 1.1 ad #define ICPIOCTL_GENERAL (ICPIOCTL_MASK | 0) /* general IOCTL */
146 1.1 ad #define ICPIOCTL_DRVERS (ICPIOCTL_MASK | 1) /* get driver version */
147 1.1 ad #define ICPIOCTL_CTRTYPE (ICPIOCTL_MASK | 2) /* get controller type */
148 1.1 ad #define ICPIOCTL_CTRCNT (ICPIOCTL_MASK | 5) /* get controller count */
149 1.1 ad #define ICPIOCTL_LOCKDRV (ICPIOCTL_MASK | 6) /* lock host drive */
150 1.1 ad #define ICPIOCTL_LOCKCHN (ICPIOCTL_MASK | 7) /* lock channel */
151 1.1 ad #define ICPIOCTL_EVENT (ICPIOCTL_MASK | 8) /* read controller events */
152 1.1 ad
153 1.1 ad /* Service errors */
154 1.1 ad #define ICP_S_OK 1 /* no error */
155 1.1 ad #define ICP_S_BSY 7 /* controller busy */
156 1.1 ad #define ICP_S_RAW_SCSI 12 /* raw service: target error */
157 1.1 ad #define ICP_S_RAW_ILL 0xff /* raw service: illegal */
158 1.1 ad #define ICP_S_NO_STATUS 0x1000 /* got no status (driver-generated) */
159 1.1 ad
160 1.1 ad /* Controller services */
161 1.1 ad #define ICP_SCSIRAWSERVICE 3
162 1.1 ad #define ICP_CACHESERVICE 9
163 1.1 ad #define ICP_SCREENSERVICE 11
164 1.1 ad
165 1.1 ad /* Data direction raw service. */
166 1.1 ad #define ICP_DATA_IN 0x01000000
167 1.1 ad #define ICP_DATA_OUT 0x00000000
168 1.1 ad
169 1.1 ad /* Command queue entries */
170 1.1 ad #define ICP_OFFSET 0x00 /* u_int16_t, command offset in the DP RAM */
171 1.1 ad #define ICP_SERV_ID 0x02 /* u_int16_t, service */
172 1.1 ad #define ICP_COMM_Q_SZ 0x04
173 1.1 ad
174 1.1 ad /* Interface area */
175 1.1 ad #define ICP_S_CMD_INDX 0x00 /* u_int8_t, special command */
176 1.1 ad #define ICP_S_STATUS 0x01 /* volatile u_int8_t, status special command */
177 1.1 ad #define ICP_S_INFO 0x04 /* u_int32_t [4], add. info special command */
178 1.1 ad #define ICP_SEMA0 0x14 /* volatile u_int8_t, command semaphore */
179 1.1 ad #define ICP_CMD_INDEX 0x18 /* u_int8_t, command number */
180 1.1 ad #define ICP_STATUS 0x1c /* volatile u_int16_t, command status */
181 1.1 ad #define ICP_SERVICE 0x1e /* u_int16_t, service (for asynch. events) */
182 1.1 ad #define ICP_DPR_INFO 0x20 /* u_int32_t [2], additional info */
183 1.1 ad #define ICP_COMM_QUEUE 0x28 /* command queue */
184 1.1 ad #define ICP_DPR_CMD (0x30 + ICP_MAXOFFSETS * ICP_COMM_Q_SZ)
185 1.1 ad /* u_int8_t [], commands */
186 1.1 ad #define ICP_DPR_IF_SZ ICP_DPR_CMD
187 1.1 ad
188 1.1 ad /* Get cache info */
189 1.1 ad #define ICP_CINFO_CPAR 0x00
190 1.1 ad #define ICP_CINFO_CSTAT 0x0c
191 1.1 ad
192 1.1 ad /* Other defines */
193 1.1 ad #define ICP_ASYNCINDEX 0 /* command index asynchronous event */
194 1.1 ad #define ICP_SPEZINDEX 1 /* command index unknown service */
195 1.1 ad
196 1.1 ad /* I/O channel header */
197 1.1 ad struct icp_ioc_version {
198 1.1 ad u_int32_t iv_version; /* version (~0: newest) */
199 1.1 ad u_int8_t iv_listents; /* list entry count */
200 1.1 ad u_int8_t iv_firstchan; /* first channel number */
201 1.1 ad u_int8_t iv_lastchan; /* last channel number */
202 1.1 ad u_int8_t iv_chancount; /* channel count */
203 1.1 ad u_int32_t iv_listoffset; /* offset of list[0] */
204 1.1 ad } __attribute__ ((__packed__));
205 1.1 ad
206 1.1 ad #define ICP_IOC_NEWEST 0xffffffff
207 1.1 ad
208 1.1 ad /* Get I/O channel description */
209 1.1 ad struct icp_ioc {
210 1.1 ad u_int32_t io_addr; /* channel address */
211 1.1 ad u_int8_t io_type; /* type (SCSI/FCAL) */
212 1.1 ad u_int8_t io_localno; /* local number */
213 1.1 ad u_int16_t io_features; /* channel features */
214 1.1 ad } __attribute__ ((__packed__));
215 1.1 ad
216 1.1 ad /* Get raw I/O channel description */
217 1.1 ad struct icp_rawioc {
218 1.1 ad u_int8_t ri_procid; /* processor ID */
219 1.1 ad u_int8_t ri_defect; /* defect? */
220 1.1 ad u_int16_t ri_padding;
221 1.1 ad } __attribute__ ((__packed__));
222 1.1 ad
223 1.1 ad /* Get SCSI channel count */
224 1.1 ad struct icp_getch {
225 1.1 ad u_int32_t gc_channo; /* channel number */
226 1.1 ad u_int32_t gc_drivecnt; /* drive count */
227 1.1 ad u_int8_t gc_scsiid; /* SCSI initiator ID */
228 1.1 ad u_int8_t gc_scsistate; /* SCSI processor state */
229 1.1 ad } __attribute__ ((__packed__));
230 1.1 ad
231 1.1 ad /* Cache info/config IOCTL structures */
232 1.1 ad struct icp_cpar {
233 1.1 ad u_int32_t cp_version; /* firmware version */
234 1.1 ad u_int16_t cp_state; /* cache state (on/off) */
235 1.1 ad u_int16_t cp_strategy; /* cache strategy */
236 1.1 ad u_int16_t cp_write_back; /* write back (on/off) */
237 1.1 ad u_int16_t cp_block_size; /* cache block size */
238 1.1 ad } __attribute__ ((__packed__));
239 1.1 ad
240 1.1 ad struct icp_cstat {
241 1.1 ad u_int32_t cs_size; /* cache size */
242 1.1 ad u_int32_t cs_readcnt; /* read counter */
243 1.1 ad u_int32_t cs_writecnt; /* write counter */
244 1.1 ad u_int32_t cs_trhits; /* track hits */
245 1.1 ad u_int32_t cs_sechits; /* sector hits */
246 1.1 ad u_int32_t cs_secmiss; /* sector misses */
247 1.1 ad } __attribute__ ((__packed__));
248 1.1 ad
249 1.1 ad /* Board information. */
250 1.1 ad struct icp_binfo {
251 1.1 ad u_int32_t bi_ser_no; /* serial number */
252 1.1 ad u_int8_t bi_oem_id[2]; /* OEM ID */
253 1.1 ad u_int16_t bi_ep_flags; /* eprom flags */
254 1.1 ad u_int32_t bi_proc_id; /* processor ID */
255 1.1 ad u_int32_t bi_memsize; /* memory size (bytes) */
256 1.1 ad u_int8_t bi_mem_banks; /* memory banks */
257 1.1 ad u_int8_t bi_chan_type; /* channel type */
258 1.1 ad u_int8_t bi_chan_count; /* channel count */
259 1.1 ad u_int8_t bi_rdongle_pres; /* dongle present */
260 1.1 ad u_int32_t bi_epr_fw_ver; /* (eprom) firmware ver */
261 1.1 ad u_int32_t bi_upd_fw_ver; /* (update) firmware ver */
262 1.1 ad u_int32_t bi_upd_revision; /* update revision */
263 1.1 ad char bi_type_string[16]; /* char controller name */
264 1.1 ad char bi_raid_string[16]; /* char RAID firmware name */
265 1.1 ad u_int8_t bi_update_pres; /* update present? */
266 1.1 ad u_int8_t bi_xor_pres; /* XOR engine present */
267 1.1 ad u_int8_t bi_prom_type; /* ROM type (eprom/flash) */
268 1.1 ad u_int8_t bi_prom_count; /* number of ROM devices */
269 1.1 ad u_int32_t bi_dup_pres; /* duplexing module pres? */
270 1.1 ad u_int32_t bi_chan_pres; /* # of exp. channels */
271 1.1 ad u_int32_t bi_mem_pres; /* memory expansion inst? */
272 1.1 ad u_int8_t bi_ft_bus_system; /* fault bus supported? */
273 1.1 ad u_int8_t bi_subtype_valid; /* board_subtype valid */
274 1.1 ad u_int8_t bi_board_subtype; /* subtype/hardware level */
275 1.1 ad u_int8_t bi_rampar_pres; /* RAM parity check hw? */
276 1.1 ad } __attribute__ ((__packed__));
277 1.1 ad
278 1.1 ad /* Board features. */
279 1.1 ad struct icp_bfeat {
280 1.1 ad u_int8_t bf_chaining; /* chaining supported */
281 1.1 ad u_int8_t bf_striping; /* striping (RAID-0) supported */
282 1.1 ad u_int8_t bf_mirroring; /* mirroring (RAID-1) supported */
283 1.1 ad u_int8_t bf_raid; /* RAID-4/5/10 supported */
284 1.1 ad } __attribute__ ((__packed__));
285 1.1 ad
286 1.1 ad /* Cache drive information. */
287 1.1 ad struct icp_cdevinfo {
288 1.1 ad char cd_name[8];
289 1.1 ad u_int32_t cd_devtype;
290 1.1 ad u_int32_t cd_ldcnt;
291 1.1 ad u_int32_t cd_last_error;
292 1.1 ad u_int8_t cd_initialized;
293 1.1 ad u_int8_t cd_removable;
294 1.1 ad u_int8_t cd_write_protected;
295 1.1 ad u_int8_t cd_flags;
296 1.1 ad u_int32_t ld_blkcnt;
297 1.1 ad u_int32_t ld_blksize;
298 1.1 ad u_int32_t ld_dcnt;
299 1.1 ad u_int32_t ld_slave;
300 1.1 ad u_int32_t ld_dtype;
301 1.1 ad u_int32_t ld_last_error;
302 1.1 ad char ld_name[8];
303 1.1 ad u_int8_t ld_error;
304 1.1 ad } __attribute__ ((__packed__));
305 1.1 ad
306 1.1 ad struct icp_sg {
307 1.1 ad u_int32_t sg_addr;
308 1.1 ad u_int32_t sg_len;
309 1.1 ad } __attribute__ ((__packed__));
310 1.1 ad
311 1.1 ad struct icp_cachecmd {
312 1.1 ad u_int16_t cc_deviceno;
313 1.1 ad u_int32_t cc_blockno;
314 1.1 ad u_int32_t cc_blockcnt;
315 1.1 ad u_int32_t cc_addr; /* ~0 == s/g */
316 1.1 ad u_int32_t cc_nsgent;
317 1.1 ad struct icp_sg cc_sg[ICP_MAXSG];
318 1.1 ad } __attribute__ ((__packed__));
319 1.1 ad
320 1.1 ad struct icp_ioctlcmd {
321 1.1 ad u_int16_t ic_bufsize;
322 1.1 ad u_int32_t ic_subfunc;
323 1.1 ad u_int32_t ic_channel;
324 1.1 ad u_int32_t ic_addr;
325 1.1 ad } __attribute__ ((__packed__));
326 1.1 ad
327 1.1 ad struct icp_screencmd {
328 1.1 ad u_int32_t sc_msghandle;
329 1.1 ad u_int32_t sc_msgaddr;
330 1.1 ad } __attribute__ ((__packed__));
331 1.1 ad
332 1.1 ad struct icp_rawcmd {
333 1.1 ad u_int16_t rc_padding0; /* unused */
334 1.1 ad u_int32_t rc_direction; /* data direction */
335 1.1 ad u_int32_t rc_mdisc_time; /* disc. time (0: none) */
336 1.1 ad u_int32_t rc_mcon_time; /* conn. time (0: none) */
337 1.1 ad u_int32_t rc_sdata; /* dest address */
338 1.1 ad u_int32_t rc_sdlen; /* data length */
339 1.1 ad u_int32_t rc_clen; /* CDB length */
340 1.1 ad u_int8_t rc_cdb[12]; /* SCSI CDB */
341 1.1 ad u_int8_t rc_target; /* target ID */
342 1.1 ad u_int8_t rc_lun; /* LUN */
343 1.1 ad u_int8_t rc_bus; /* channel */
344 1.1 ad u_int8_t rc_priority; /* priority; 0 only */
345 1.1 ad u_int32_t rc_sense_len; /* sense length */
346 1.1 ad u_int32_t rc_sense_addr; /* sense address */
347 1.1 ad u_int32_t rc_padding1; /* unused */
348 1.1 ad u_int32_t rc_nsgent; /* s/g element count */
349 1.1 ad struct icp_sg rc_sg[ICP_MAXSG]; /* s/g list */
350 1.1 ad } __attribute__ ((__packed__));
351 1.1 ad
352 1.1 ad struct icp_cmdhdr {
353 1.1 ad u_int32_t cmd_boardnode; /* always 0 */
354 1.1 ad u_int32_t cmd_cmdindex; /* command identifier */
355 1.1 ad u_int16_t cmd_opcode;
356 1.1 ad } __attribute__ ((__packed__));
357 1.1 ad
358 1.1 ad struct icp_cmd {
359 1.1 ad u_int32_t cmd_boardnode; /* always 0 */
360 1.1 ad u_int32_t cmd_cmdindex; /* command identifier */
361 1.1 ad u_int16_t cmd_opcode;
362 1.1 ad
363 1.1 ad union {
364 1.1 ad struct icp_rawcmd rc;
365 1.1 ad struct icp_screencmd sc;
366 1.1 ad struct icp_ioctlcmd ic;
367 1.1 ad struct icp_cachecmd cc;
368 1.1 ad } cmd_packet;
369 1.1 ad } __attribute__ ((__packed__));
370 1.1 ad
371 1.1 ad #endif /* !_IC_ICPREG_H_ */
372