1*3c6bd2f3Smarco /* $OpenBSD: gdtreg.h,v 1.4 2006/05/07 23:18:59 marco Exp $ */ 2eb5bbc58Sniklas 3eb5bbc58Sniklas /* 4eb5bbc58Sniklas * Copyright (c) 1999, 2000 Niklas Hallqvist. All rights reserved. 5eb5bbc58Sniklas * 6eb5bbc58Sniklas * Redistribution and use in source and binary forms, with or without 7eb5bbc58Sniklas * modification, are permitted provided that the following conditions 8eb5bbc58Sniklas * are met: 9eb5bbc58Sniklas * 1. Redistributions of source code must retain the above copyright 10eb5bbc58Sniklas * notice, this list of conditions and the following disclaimer. 11eb5bbc58Sniklas * 2. Redistributions in binary form must reproduce the above copyright 12eb5bbc58Sniklas * notice, this list of conditions and the following disclaimer in the 13eb5bbc58Sniklas * documentation and/or other materials provided with the distribution. 14eb5bbc58Sniklas * 15eb5bbc58Sniklas * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16eb5bbc58Sniklas * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17eb5bbc58Sniklas * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18eb5bbc58Sniklas * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19eb5bbc58Sniklas * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20eb5bbc58Sniklas * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21eb5bbc58Sniklas * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22eb5bbc58Sniklas * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23eb5bbc58Sniklas * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24eb5bbc58Sniklas * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25eb5bbc58Sniklas */ 26eb5bbc58Sniklas 27eb5bbc58Sniklas /* 28eb5bbc58Sniklas * This driver would not have written if it was not for the hardware donations 29eb5bbc58Sniklas * from both ICP-Vortex and �ko.neT. I want to thank them for their support. 30eb5bbc58Sniklas */ 31eb5bbc58Sniklas 32eb5bbc58Sniklas #define GDT_MAXBUS 6 /* XXX Why not 5? */ 33eb5bbc58Sniklas #define GDT_MAX_HDRIVES 35 /* 5 busses * 7 targets XXX correct? */ 34eb5bbc58Sniklas #define GDT_MAXID 127 /* Fibre-channel maximum ID */ 35eb5bbc58Sniklas #define GDT_MAXOFFSETS 128 36eb5bbc58Sniklas #define GDT_MAXSG 128 /* Max. s/g elements */ 37eb5bbc58Sniklas #define GDT_PROTOCOL_VERSION 1 38eb5bbc58Sniklas #define GDT_LINUX_OS 8 /* Used for cache optimization */ 39eb5bbc58Sniklas #define GDT_SCATTER_GATHER 1 /* s/g feature */ 40eb5bbc58Sniklas #define GDT_SECS32 0x1f /* round capacity */ 41eb5bbc58Sniklas #define GDT_LOCALBOARD 0 /* Board node always 0 */ 42eb5bbc58Sniklas #define GDT_MAXCMDS 124 43eb5bbc58Sniklas #define GDT_SECTOR_SIZE 0x200 /* Always 512 bytes for cache devs */ 44eb5bbc58Sniklas 45eb5bbc58Sniklas /* DPMEM constants */ 46eb5bbc58Sniklas #define GDT_MPR_MAGIC 0xc0ffee11 47eb5bbc58Sniklas #define GDT_IC_HEADER_BYTES 48 48eb5bbc58Sniklas #define GDT_IC_QUEUE_BYTES 4 49eb5bbc58Sniklas #define GDT_DPMEM_COMMAND_OFFSET \ 50eb5bbc58Sniklas (GDT_IC_HEADER_BYTES + GDT_IC_QUEUE_BYTES * GDT_MAXOFFSETS) 51eb5bbc58Sniklas 52eb5bbc58Sniklas #if 1 53eb5bbc58Sniklas /* Geometry constants. XXX probably not needed. */ 54eb5bbc58Sniklas #define GDT_MAXCYLS 1024 55eb5bbc58Sniklas #define GDT_HEADS 64 56eb5bbc58Sniklas #define GDT_SECS 32 /* mapping 64*32 */ 57eb5bbc58Sniklas #define GDT_MEDHEADS 127 58eb5bbc58Sniklas #define GDT_MEDSECS 63 /* mapping 127*63 */ 59eb5bbc58Sniklas #define GDT_BIGHEADS 255 60eb5bbc58Sniklas #define GDT_BIGSECS 63 /* mapping 255*63 */ 61eb5bbc58Sniklas #endif 62eb5bbc58Sniklas 63eb5bbc58Sniklas /* Cache/raw service commands */ 64eb5bbc58Sniklas #define GDT_INIT 0 /* service initialization */ 65eb5bbc58Sniklas #define GDT_READ 1 /* read command */ 66eb5bbc58Sniklas #define GDT_WRITE 2 /* write command */ 67eb5bbc58Sniklas #define GDT_INFO 3 /* information about devices */ 68eb5bbc58Sniklas #define GDT_FLUSH 4 /* flush dirty cache buffers */ 69eb5bbc58Sniklas #define GDT_IOCTL 5 /* ioctl command */ 70eb5bbc58Sniklas #define GDT_DEVTYPE 9 /* additional information */ 71eb5bbc58Sniklas #define GDT_MOUNT 10 /* mount cache device */ 72eb5bbc58Sniklas #define GDT_UNMOUNT 11 /* unmount cache device */ 73eb5bbc58Sniklas #define GDT_SET_FEAT 12 /* set features (scatter/gather) */ 74eb5bbc58Sniklas #define GDT_GET_FEAT 13 /* get features */ 75eb5bbc58Sniklas #define GDT_WRITE_THR 16 /* write through */ 76eb5bbc58Sniklas #define GDT_READ_THR 17 /* read through */ 77eb5bbc58Sniklas #define GDT_EXT_INFO 18 /* extended info */ 78eb5bbc58Sniklas #define GDT_RESET 19 /* controller reset */ 79eb5bbc58Sniklas 80eb5bbc58Sniklas /* Additional raw service commands */ 81eb5bbc58Sniklas #define GDT_RESERVE 14 /* reserve device to raw service */ 82eb5bbc58Sniklas #define GDT_RELEASE 15 /* release device */ 83eb5bbc58Sniklas #define GDT_RESERVE_ALL 16 /* reserve all devices */ 84eb5bbc58Sniklas #define GDT_RELEASE_ALL 17 /* release all devices */ 85eb5bbc58Sniklas #define GDT_RESET_BUS 18 /* reset bus */ 86eb5bbc58Sniklas #define GDT_SCAN_START 19 /* start device scan */ 87eb5bbc58Sniklas #define GDT_SCAN_END 20 /* stop device scan */ 88eb5bbc58Sniklas 89eb5bbc58Sniklas /* IOCTL command defines */ 90eb5bbc58Sniklas #define GDT_SCSI_DR_INFO 0x00 /* SCSI drive info */ 91eb5bbc58Sniklas #define GDT_SCSI_CHAN_CNT 0x05 /* SCSI channel count */ 92eb5bbc58Sniklas #define GDT_SCSI_DR_LIST 0x06 /* SCSI drive list */ 93eb5bbc58Sniklas #define GDT_SCSI_DEF_CNT 0x15 /* grown/primary defects */ 94eb5bbc58Sniklas #define GDT_DSK_STATISTICS 0x4b /* SCSI disk statistics */ 95eb5bbc58Sniklas #define GDT_IOCHAN_DESC 0x5d /* description of IO channel */ 96eb5bbc58Sniklas #define GDT_IOCHAN_RAW_DESC 0x5e /* description of raw IO channel */ 97eb5bbc58Sniklas 98*3c6bd2f3Smarco #define GDT_L_CTRL_PATTERN 0x20000000L /* SCSI IOCTL mask */ 99eb5bbc58Sniklas #define GDT_ARRAY_INFO 0x12 /* array drive info */ 100eb5bbc58Sniklas #define GDT_ARRAY_DRV_LIST 0x0f /* array drive list */ 101*3c6bd2f3Smarco #define GDT_LA_CTRL_PATTERN 0x10000000L /* array IOCTL mask */ 102eb5bbc58Sniklas #define GDT_CACHE_DRV_CNT 0x01 /* cache drive count */ 103eb5bbc58Sniklas #define GDT_CACHE_DRV_LIST 0x02 /* cache drive list */ 104eb5bbc58Sniklas #define GDT_CACHE_INFO 0x04 /* cache info */ 105eb5bbc58Sniklas #define GDT_CACHE_CONFIG 0x05 /* cache configuration */ 106eb5bbc58Sniklas #define GDT_CACHE_DRV_INFO 0x07 /* cache drive info */ 107eb5bbc58Sniklas #define GDT_BOARD_FEATURES 0x15 /* controller features */ 108eb5bbc58Sniklas #define GDT_BOARD_INFO 0x28 /* controller info */ 109*3c6bd2f3Smarco #define GDT_HOST_GET 0x10001L /* get host drive list */ 110*3c6bd2f3Smarco #define GDT_IO_CHANNEL 0x20000L /* default IO channel */ 111*3c6bd2f3Smarco #define GDT_INVALID_CHANNEL 0xffffL /* invalid channel */ 112eb5bbc58Sniklas 113aada8966Sniklas /* XXX not belonging here */ 114eb5bbc58Sniklas /* IOCTLs */ 115eb5bbc58Sniklas #define GDTIOCTL_MASK ('J' << 8) 116eb5bbc58Sniklas #define GDTIOCTL_GENERAL (GDTIOCTL_MASK | 0) /* general IOCTL */ 117eb5bbc58Sniklas #define GDTIOCTL_DRVERS (GDTIOCTL_MASK | 1) /* get driver version */ 118eb5bbc58Sniklas #define GDTIOCTL_CTRTYPE (GDTIOCTL_MASK | 2) /* get controller type */ 119eb5bbc58Sniklas #define GDTIOCTL_CTRCNT (GDTIOCTL_MASK | 5) /* get controller count */ 120eb5bbc58Sniklas #define GDTIOCTL_LOCKDRV (GDTIOCTL_MASK | 6) /* lock host drive */ 121eb5bbc58Sniklas #define GDTIOCTL_LOCKCHN (GDTIOCTL_MASK | 7) /* lock channel */ 122eb5bbc58Sniklas #define GDTIOCTL_EVENT (GDTIOCTL_MASK | 8) /* read controller events */ 123eb5bbc58Sniklas 124eb5bbc58Sniklas /* Service errors */ 125eb5bbc58Sniklas #define GDT_S_OK 1 /* no error */ 126eb5bbc58Sniklas #define GDT_S_BSY 7 /* controller busy */ 127eb5bbc58Sniklas #define GDT_S_RAW_SCSI 12 /* raw service: target error */ 128eb5bbc58Sniklas #define GDT_S_RAW_ILL 0xff /* raw service: illegal */ 129eb5bbc58Sniklas #define GDT_S_NO_STATUS 0x1000 /* got no status (driver-generated) */ 130eb5bbc58Sniklas 131eb5bbc58Sniklas /* Controller services */ 132eb5bbc58Sniklas #define GDT_SCSIRAWSERVICE 3 133eb5bbc58Sniklas #define GDT_CACHESERVICE 9 134eb5bbc58Sniklas #define GDT_SCREENSERVICE 11 135eb5bbc58Sniklas 136eb5bbc58Sniklas /* Scatter/gather element */ 137eb5bbc58Sniklas #define GDT_SG_PTR 0x00 /* u_int32_t, address */ 138eb5bbc58Sniklas #define GDT_SG_LEN 0x04 /* u_int32_t, length */ 139eb5bbc58Sniklas #define GDT_SG_SZ 0x08 140eb5bbc58Sniklas 141eb5bbc58Sniklas /* Cache service command */ 142eb5bbc58Sniklas #define GDT_CACHE_DEVICENO 0x00 /* u_int16_t, number of cache drive */ 143eb5bbc58Sniklas #define GDT_CACHE_BLOCKNO 0x02 /* u_int32_t, block number */ 144eb5bbc58Sniklas #define GDT_CACHE_BLOCKCNT 0x06 /* u_int32_t, block count */ 145eb5bbc58Sniklas #define GDT_CACHE_DESTADDR 0x0a /* u_int32_t, dest. addr. (-1: s/g) */ 146eb5bbc58Sniklas #define GDT_CACHE_SG_CANZ 0x0e /* u_int32_t, s/g element count */ 147eb5bbc58Sniklas #define GDT_CACHE_SG_LST 0x12 /* [GDT_MAXSG], s/g list */ 148eb5bbc58Sniklas #define GDT_CACHE_SZ (0x12 + GDT_MAXSG * GDT_SG_SZ) 149eb5bbc58Sniklas 150eb5bbc58Sniklas /* Ioctl command */ 151eb5bbc58Sniklas #define GDT_IOCTL_PARAM_SIZE 0x00 /* u_int16_t, size of buffer */ 152eb5bbc58Sniklas #define GDT_IOCTL_SUBFUNC 0x02 /* u_int32_t, ioctl function */ 153eb5bbc58Sniklas #define GDT_IOCTL_CHANNEL 0x06 /* u_int32_t, device */ 154eb5bbc58Sniklas #define GDT_IOCTL_P_PARAM 0x0a /* u_int32_t, buffer */ 155eb5bbc58Sniklas #define GDT_IOCTL_SZ 0x0e 156eb5bbc58Sniklas 157eb5bbc58Sniklas /* Screen service command */ 158eb5bbc58Sniklas #define GDT_SCREEN_MSG_HANDLE 0x02 /* u_int32_t, message handle */ 159eb5bbc58Sniklas #define GDT_SCREEN_MSG_ADDR 0x06 /* u_int32_t, message buffer address */ 160eb5bbc58Sniklas #define GDT_SCREEN_SZ 0x0a 161eb5bbc58Sniklas 162eb5bbc58Sniklas /* Raw service command */ 163eb5bbc58Sniklas #define GDT_RAW_DIRECTION 0x02 /* u_int32_t, data direction */ 164eb5bbc58Sniklas #define GDT_RAW_MDISC_TIME 0x06 /* u_int32_t, disc. time (0: none) */ 165eb5bbc58Sniklas #define GDT_RAW_MCON_TIME 0x0a /* u_int32_t, conn. time (0: none) */ 166eb5bbc58Sniklas #define GDT_RAW_SDATA 0x0e /* u_int32_t, dest. addr. (-1: s/g) */ 167eb5bbc58Sniklas #define GDT_RAW_SDLEN 0x12 /* u_int32_t, data length */ 168eb5bbc58Sniklas #define GDT_RAW_CLEN 0x16 /* u_int32_t, SCSI cmd len (6/10/12) */ 169eb5bbc58Sniklas #define GDT_RAW_CMD 0x1a /* u_int8_t [12], SCSI command */ 170eb5bbc58Sniklas #define GDT_RAW_TARGET 0x26 /* u_int8_t, target ID */ 171eb5bbc58Sniklas #define GDT_RAW_LUN 0x27 /* u_int8_t, LUN */ 172eb5bbc58Sniklas #define GDT_RAW_BUS 0x28 /* u_int8_t, SCSI bus number */ 173eb5bbc58Sniklas #define GDT_RAW_PRIORITY 0x29 /* u_int8_t, only 0 used */ 174eb5bbc58Sniklas #define GDT_RAW_SENSE_LEN 0x2a /* u_int32_t, sense data length */ 175eb5bbc58Sniklas #define GDT_RAW_SENSE_DATA 0x2e /* u_int32_t, sense data address */ 176eb5bbc58Sniklas #define GDT_RAW_SG_RANZ 0x36 /* u_int32_t, s/g element count */ 177eb5bbc58Sniklas #define GDT_RAW_SG_LST 0x3a /* [GDT_MAXSG], s/g list */ 178eb5bbc58Sniklas #define GDT_RAW_SZ (0x3e + GDT_MAXSG * GDT_SG_SZ) 179eb5bbc58Sniklas 180eb5bbc58Sniklas /* Command structure */ 181eb5bbc58Sniklas #define GDT_CMD_BOARDNODE 0x00 /* u_int32_t, board node (always 0) */ 182eb5bbc58Sniklas #define GDT_CMD_COMMANDINDEX 0x04 /* u_int32_t, command number */ 183eb5bbc58Sniklas #define GDT_CMD_OPCODE 0x08 /* u_int16_t, opcode (READ, ...) */ 184eb5bbc58Sniklas #define GDT_CMD_UNION 0x0a /* cache/screen/raw service command */ 185eb5bbc58Sniklas #define GDT_CMD_UNION_SZ GDT_RAW_SZ 186eb5bbc58Sniklas #define GDT_CMD_SZ (0x0a + GDT_CMD_UNION_SZ) 187eb5bbc58Sniklas 188eb5bbc58Sniklas /* Command queue entries */ 189eb5bbc58Sniklas #define GDT_OFFSET 0x00 /* u_int16_t, command offset in the DP RAM */ 190eb5bbc58Sniklas #define GDT_SERV_ID 0x02 /* u_int16_t, service */ 191eb5bbc58Sniklas #define GDT_COMM_Q_SZ 0x04 192eb5bbc58Sniklas 193eb5bbc58Sniklas /* Interface area */ 194eb5bbc58Sniklas #define GDT_S_CMD_INDX 0x00 /* u_int8_t, special command */ 195eb5bbc58Sniklas #define GDT_S_STATUS 0x01 /* volatile u_int8_t, status special command */ 196eb5bbc58Sniklas #define GDT_S_INFO 0x04 /* u_int32_t [4], add. info special command */ 197eb5bbc58Sniklas #define GDT_SEMA0 0x14 /* volatile u_int8_t, command semaphore */ 198eb5bbc58Sniklas #define GDT_CMD_INDEX 0x18 /* u_int8_t, command number */ 199eb5bbc58Sniklas #define GDT_STATUS 0x1c /* volatile u_int16_t, command status */ 200eb5bbc58Sniklas #define GDT_SERVICE 0x1e /* u_int16_t, service (for asynch. events) */ 201eb5bbc58Sniklas #define GDT_DPR_INFO 0x20 /* u_int32_t [2], additional info */ 202eb5bbc58Sniklas #define GDT_COMM_QUEUE 0x28 /* command queue */ 203eb5bbc58Sniklas #define GDT_DPR_CMD (0x30 + GDT_MAXOFFSETS * GDT_COMM_Q_SZ) 204eb5bbc58Sniklas /* u_int8_t [], commands */ 205eb5bbc58Sniklas #define GDT_DPR_IF_SZ GDT_DPR_CMD 206eb5bbc58Sniklas 207eb5bbc58Sniklas /* I/O channel header */ 208eb5bbc58Sniklas #define GDT_IOC_VERSION 0x00 /* u_int32_t, version (~0: newest) */ 209eb5bbc58Sniklas #define GDT_IOC_LIST_ENTRIES 0x04 /* u_int8_t, list entry count */ 210eb5bbc58Sniklas #define GDT_IOC_FIRST_CHAN 0x05 /* u_int8_t, first channel number */ 211eb5bbc58Sniklas #define GDT_IOC_LAST_CHAN 0x06 /* u_int8_t, last channel number */ 212eb5bbc58Sniklas #define GDT_IOC_CHAN_COUNT 0x07 /* u_int8_t, (R) channel count */ 213eb5bbc58Sniklas #define GDT_IOC_LIST_OFFSET 0x08 /* u_int32_t, offset of list[0] */ 214eb5bbc58Sniklas #define GDT_IOC_HDR_SZ 0x0c 215eb5bbc58Sniklas 216eb5bbc58Sniklas #define GDT_IOC_NEWEST 0xffffffff /* goes into GDT_IOC_VERSION */ 217eb5bbc58Sniklas 218eb5bbc58Sniklas /* Get I/O channel description */ 219eb5bbc58Sniklas #define GDT_IOC_ADDRESS 0x00 /* u_int32_t, channel address */ 220eb5bbc58Sniklas #define GDT_IOC_TYPE 0x04 /* u_int8_t, type (SCSI/FCSL) */ 221eb5bbc58Sniklas #define GDT_IOC_LOCAL_NO 0x05 /* u_int8_t, local number */ 222eb5bbc58Sniklas #define GDT_IOC_FEATURES 0x06 /* u_int16_t, channel features */ 223eb5bbc58Sniklas #define GDT_IOC_SZ 0x08 224eb5bbc58Sniklas 225eb5bbc58Sniklas /* Get raw I/O channel description */ 226eb5bbc58Sniklas #define GDT_RAWIOC_PROC_ID 0x00 /* u_int8_t, processor id */ 227eb5bbc58Sniklas #define GDT_RAWIOC_PROC_DEFECT 0x01 /* u_int8_t, defect? */ 228eb5bbc58Sniklas #define GDT_RAWIOC_SZ 0x04 229eb5bbc58Sniklas 230eb5bbc58Sniklas /* Get SCSI channel count */ 231eb5bbc58Sniklas #define GDT_GETCH_CHANNEL_NO 0x00 /* u_int32_t, channel number */ 232eb5bbc58Sniklas #define GDT_GETCH_DRIVE_CNT 0x04 /* u_int32_t, drive count */ 233eb5bbc58Sniklas #define GDT_GETCH_SIOP_ID 0x08 /* u_int8_t, SCSI processor ID */ 234eb5bbc58Sniklas #define GDT_GETCH_SIOP_STATE 0x09 /* u_int8_t, SCSI processor state */ 235eb5bbc58Sniklas #define GDT_GETCH_SZ 0x0a 236eb5bbc58Sniklas 237*3c6bd2f3Smarco /* Get SCSI drive numbers */ 238*3c6bd2f3Smarco #define GDT_GETSCSI_CHAN 0x00 /* u_int32_t, scsi channel number */ 239*3c6bd2f3Smarco #define GDT_GETSCSI_CNT 0x04 /* u_int32_t, nr of entries */ 240*3c6bd2f3Smarco #define GDT_GETSCSI_LIST 0x08 /* u_int32_t, minor device nr */ 241*3c6bd2f3Smarco #define GDT_GETSCSI_LIST_SZ 0x04 242*3c6bd2f3Smarco #define GDT_GETSCSI_SZ (GDT_GETSCSI_LIST_SZ * GDT_MAXID) 243*3c6bd2f3Smarco 244eb5bbc58Sniklas /* Cache info/config IOCTL structures */ 245eb5bbc58Sniklas #define GDT_CPAR_VERSION 0x00 /* u_int32_t, firmware version */ 246eb5bbc58Sniklas #define GDT_CPAR_STATE 0x04 /* u_int16_t, cache state (on/off) */ 247eb5bbc58Sniklas #define GDT_CPAR_STRATEGY 0x06 /* u_int16_t, cache strategy */ 248eb5bbc58Sniklas #define GDT_CPAR_WRITE_BACK 0x08 /* u_int16_t, write back (on/off) */ 249eb5bbc58Sniklas #define GDT_CPAR_BLOCK_SIZE 0x0a /* u_int16_t, cache block size */ 250eb5bbc58Sniklas #define GDT_CPAR_SZ 0x0c 251eb5bbc58Sniklas 252eb5bbc58Sniklas #define GDT_CSTAT_CSIZE 0x00 /* u_int32_t, cache size */ 253eb5bbc58Sniklas #define GDT_CSTAT_READ_CNT 0x04 /* u_int32_t, read counter */ 254eb5bbc58Sniklas #define GDT_CSTAT_WRITE_CNT 0x08 /* u_int32_t, write counter */ 255eb5bbc58Sniklas #define GDT_CSTAT_TR_HITS 0x0c /* u_int32_t, track hits */ 256eb5bbc58Sniklas #define GDT_CSTAT_SEC_HITS 0x10 /* u_int32_t, sector hits */ 257eb5bbc58Sniklas #define GDT_CSTAT_SEC_MISS 0x14 /* u_int32_t, sector misses */ 258eb5bbc58Sniklas #define GDT_CSTAT_SZ 0x18 259eb5bbc58Sniklas 260eb5bbc58Sniklas /* Get cache info */ 261eb5bbc58Sniklas #define GDT_CINFO_CPAR 0x00 262eb5bbc58Sniklas #define GDT_CINFO_CSTAT GDT_CPAR_SZ 263eb5bbc58Sniklas #define GDT_CINFO_SZ (GDT_CPAR_SZ + GDT_CSTAT_SZ) 264eb5bbc58Sniklas 265eb5bbc58Sniklas /* Get board info */ 266eb5bbc58Sniklas #define GDT_BINFO_SER_NO 0x00 /* u_int32_t, serial number */ 267eb5bbc58Sniklas #define GDT_BINFO_OEM_ID 0x04 /* u_int8_t [2], OEM ID */ 268eb5bbc58Sniklas #define GDT_BINFO_EP_FLAGS 0x06 /* u_int16_t, eprom flags */ 269eb5bbc58Sniklas #define GDT_BINFO_PROC_ID 0x08 /* u_int32_t, processor ID */ 270eb5bbc58Sniklas #define GDT_BINFO_MEMSIZE 0x0c /* u_int32_t, memory size (bytes) */ 271eb5bbc58Sniklas #define GDT_BINFO_MEM_BANKS 0x10 /* u_int8_t, memory banks */ 272eb5bbc58Sniklas #define GDT_BINFO_CHAN_TYPE 0x11 /* u_int8_t, channel type */ 273eb5bbc58Sniklas #define GDT_BINFO_CHAN_COUNT 0x12 /* u_int8_t, channel count */ 274eb5bbc58Sniklas #define GDT_BINFO_RDONGLE_PRES 0x13 /* u_int8_t, dongle present */ 275eb5bbc58Sniklas #define GDT_BINFO_EPR_FW_VER 0x14 /* u_int32_t, (eprom) firmware ver */ 276eb5bbc58Sniklas #define GDT_BINFO_UPD_FW_VER 0x18 /* u_int32_t, (update) firmware ver */ 277eb5bbc58Sniklas #define GDT_BINFO_UPD_REVISION 0x1c /* u_int32_t, update revision */ 278eb5bbc58Sniklas #define GDT_BINFO_TYPE_STRING 0x20 /* char [16], controller name */ 279eb5bbc58Sniklas #define GDT_BINFO_RAID_STRING 0x30 /* char [16], RAID firmware name */ 280eb5bbc58Sniklas #define GDT_BINFO_UPDATE_PRES 0x40 /* u_int8_t, update present? */ 281eb5bbc58Sniklas #define GDT_BINFO_XOR_PRES 0x41 /* u_int8_t, XOR engine present */ 282eb5bbc58Sniklas #define GDT_BINFO_PROM_TYPE 0x42 /* u_int8_t, ROM type (eprom/flash) */ 283eb5bbc58Sniklas #define GDT_BINFO_PROM_COUNT 0x43 /* u_int8_t, number of ROM devices */ 284eb5bbc58Sniklas #define GDT_BINFO_DUP_PRES 0x44 /* u_int32_t, duplexing module pres? */ 285eb5bbc58Sniklas #define GDT_BINFO_CHAN_PRES 0x48 /* u_int32_t, # of exp. channels */ 286eb5bbc58Sniklas #define GDT_BINFO_MEM_PRES 0x4c /* u_int32_t, memory expansion inst? */ 287eb5bbc58Sniklas #define GDT_BINFO_FT_BUS_SYSTEM 0x50 /* u_int8_t, fault bus supported? */ 288eb5bbc58Sniklas #define GDT_BINFO_SUBTYPE_VALID 0x51 /* u_int8_t, board_subtype valid */ 289eb5bbc58Sniklas #define GDT_BINFO_BOARD_SUBTYPE 0x52 /* u_int8_t, subtype/hardware level */ 290eb5bbc58Sniklas #define GDT_BINFO_RAMPAR_PRES 0x53 /* u_int8_t, RAM parity check hw? */ 291eb5bbc58Sniklas #define GDT_BINFO_SZ 0x54 292eb5bbc58Sniklas 293eb5bbc58Sniklas /* Get board features */ 294eb5bbc58Sniklas #define GDT_BFEAT_CHAINING 0x00 /* u_int8_t, chaining supported */ 295eb5bbc58Sniklas #define GDT_BFEAT_STRIPING 0x01 /* u_int8_t, striping (RAID-0) supp. */ 296eb5bbc58Sniklas #define GDT_BFEAT_MIRRORING 0x02 /* u_int8_t, mirroring (RAID-1) supp */ 297eb5bbc58Sniklas #define GDT_BFEAT_RAID 0x03 /* u_int8_t, RAID-4/5/10 supported */ 298eb5bbc58Sniklas #define GDT_BFEAT_SZ 0x04 299eb5bbc58Sniklas 300eb5bbc58Sniklas /* Other defines */ 301eb5bbc58Sniklas #define GDT_ASYNCINDEX 0 /* command index asynchronous event */ 302eb5bbc58Sniklas #define GDT_SPEZINDEX 1 /* command index unknown service */ 303