1 /* $FreeBSD: src/sys/dev/asr/i2odpt.h,v 1.1.2.1 2000/09/21 20:33:50 msmith Exp $ */
2 /* $DragonFly: src/sys/dev/raid/asr/i2odpt.h,v 1.2 2003/06/17 04:28:22 dillon Exp $ */
3 /****************************************************************
4 * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
5 * Copyright (c) 2000 Adaptec Corporation.
8 ****************************************************************/
10 #if !defined(I2O_DPT_HDR)
13 #define DPT_ORGANIZATION_ID 0x1B /* For Private Messages */
16 * PrivateMessageFrame.StdMessageFrame.Function = I2O_PRIVATE_MESSAGE
17 * PrivateMessageFrame.XFunctionCode = I2O_SCSI_SCB_EXEC
20 typedef struct _PRIVATE_SCSI_SCB_EXECUTE_MESSAGE {
21 I2O_PRIVATE_MESSAGE_FRAME PrivateMessageFrame;
22 # if (defined(sparc) || defined(_DPT_BIG_ENDIAN))
23 U32 TID; /* Upper four bits currently are zero */
25 BF TID:16; /* Upper four bits currently are zero */
26 /* Command is interpreted by the host */
28 /* if TRUE, deal with Physical Firmware Array information */
34 I2O_SCB_FLAGS SCBFlags;
35 U8 CDB[ I2O_SCSI_CDB_LENGTH ];
38 } PRIVATE_SCSI_SCB_EXECUTE_MESSAGE, * PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE;
41 * Flash access and programming messages
42 * PrivateMessageFrame.StdMessageFrame.Function = I2O_PRIVATE_MESSAGE
43 * PrivateMessageFrame.XFunctionCode = PRIVATE_FLAGS_REGION_*
45 * SIZE returns the total size of a region of flash
46 * READ copies a region (or portion thereof) into the buffer specified
48 * WRITE writes a region (or portion thereof) using the data specified
53 * 0 operational-mode firmware
54 * 1 software (bios/utility)
55 * 2 oem nvram defaults
57 * 4 boot-mode firmware
59 * Any combination of RegionOffset and ByteCount can be specified providing
60 * they fit within the size of the specified region.
62 * Flash messages should be targeted to the Executive TID 0x000
65 #define PRIVATE_FLASH_REGION_SIZE 0x0100
66 #define PRIVATE_FLASH_REGION_READ 0x0101
67 #define PRIVATE_FLASH_REGION_WRITE 0x0102
68 #define PRIVATE_FLASH_REGION_CRC 0x0103
70 typedef struct _PRIVATE_FLASH_REGION_MESSAGE {
71 I2O_PRIVATE_MESSAGE_FRAME PrivateMessageFrame;
76 } PRIVATE_FLASH_REGION_MESSAGE, * PPRIVATE_FLASH_REGION_MESSAGE;
78 /* DPT Driver Printf message */
80 #define PRIVATE_DRIVER_PRINTF 0x0200
83 #define FW_FIRMWARE_FLAGS_NO_HEADER_B 0x00000001 /* Remove date header */
85 typedef struct _PRIVATE_DRIVER_PRINTF_MESSAGE {
87 I2O_PRIVATE_MESSAGE_FRAME PrivateMessageFrame;
89 /* total bytes in PrintBuffer, including header */
90 U32 PrintBufferByteCount;
91 /* exact data to be copied into the serial PrintBuffer */
94 } PRIVATE_DRIVER_PRINTF_MESSAGE, * PPRIVATE_DRIVER_PRINTF_MESSAGE;
96 /* DPT Enable Diagnostics message 0x0201 */
98 #define PRIVATE_DIAG_ENABLE 0x0201
100 typedef struct _PRIVATE_DIAG_ENABLE_MESSAGE {
101 I2O_PRIVATE_MESSAGE_FRAME PrivateMessageFrame;
102 } PRIVATE_DIAG_MESSAGE_FRAME, * PPRIVATE_DIAG_MESSAGE_FRAME;
104 /* DPT Driver Get/Put message */
106 #define PRIVATE_DRIVER_GET 0x300
107 #define PRIVATE_DRIVER_PUT 0x301
109 typedef struct _PRIVATE_DRIVER_GETPUT_MESSAGE
111 I2O_PRIVATE_MESSAGE_FRAME PrivateMessageFrame;
115 } PRIVATE_DRIVER_GETPUT_MESSAGE, * PPRIVATE_DRIVER_GETPUT_MESSAGE;
117 /****************************************************************************/
119 /* DPT Peripheral Device Parameter Groups */
121 /****************************************************************************/
123 /* DPT Configuration and Operating Structures and Defines */
125 #define I2O_DPT_DEVICE_INFO_GROUP_NO 0x8000
127 /* - 8000h - DPT Device Information Parameters Group defines */
131 #define I2O_DPT_DEVICE_TYPE_DIRECT I2O_SCSI_DEVICE_TYPE_DIRECT
132 #define I2O_DPT_DEVICE_TYPE_SEQUENTIAL I2O_SCSI_DEVICE_TYPE_SEQUENTIAL
133 #define I2O_DPT_DEVICE_TYPE_PRINTER I2O_SCSI_DEVICE_TYPE_PRINTER
134 #define I2O_DPT_DEVICE_TYPE_PROCESSOR I2O_SCSI_DEVICE_TYPE_PROCESSOR
135 #define I2O_DPT_DEVICE_TYPE_WORM I2O_SCSI_DEVICE_TYPE_WORM
136 #define I2O_DPT_DEVICE_TYPE_CDROM I2O_SCSI_DEVICE_TYPE_CDROM
137 #define I2O_DPT_DEVICE_TYPE_SCANNER I2O_SCSI_DEVICE_TYPE_SCANNER
138 #define I2O_DPT_DEVICE_TYPE_OPTICAL I2O_SCSI_DEVICE_TYPE_OPTICAL
139 #define I2O_DPT_DEVICE_TYPE_MEDIA_CHANGER I2O_SCSI_DEVICE_TYPE_MEDIA_CHANGER
140 #define I2O_DPT_DEVICE_TYPE_COMM I2O_SCSI_DEVICE_TYPE_COMM
141 #define I2O_DPT_DEVICE_GRAPHICS_1 I2O_SCSI_DEVICE_GRAPHICS_1
142 #define I2O_DPT_DEVICE_GRAPHICS_2 I2O_SCSI_DEVICE_GRAPHICS_2
143 #define I2O_DPT_DEVICE_TYPE_ARRAY_CONT I2O_SCSI_DEVICE_TYPE_ARRAY_CONT
144 #define I2O_DPT_DEVICE_TYPE_UNKNOWN I2O_SCSI_DEVICE_TYPE_UNKNOWN
148 #define I2O_DPT_PERIPHERAL_TYPE_FLAG I2O_SCSI_PERIPHERAL_TYPE_FLAG
149 #define I2O_DPT_PERIPHERAL_TYPE_PARALLEL I2O_SCSI_PERIPHERAL_TYPE_PARALLEL
150 #define I2O_DPT_PERIPHERAL_TYPE_SERIAL I2O_SCSI_PERIPHERAL_TYPE_SERIAL
152 #define I2O_DPT_RESERVED_FLAG I2O_SCSI_RESERVED_FLAG
154 #define I2O_DPT_DISCONNECT_FLAG I2O_SCSI_DISCONNECT_FLAG
155 #define I2O_DPT_DISABLE_DISCONNECT I2O_SCSI_DISABLE_DISCONNECT
156 #define I2O_DPT_ENABLE_DISCONNECT I2O_SCSI_ENABLE_DISCONNECT
158 #define I2O_DPT_MODE_MASK I2O_SCSI_MODE_MASK
159 #define I2O_DPT_MODE_SET_DATA I2O_SCSI_MODE_SET_DATA
160 #define I2O_DPT_MODE_SET_DEFAULT I2O_SCSI_MODE_SET_DEFAULT
161 #define I2O_DPT_MODE_SET_SAFEST I2O_SCSI_MODE_SET_SAFEST
163 #define I2O_DPT_DATA_WIDTH_MASK I2O_SCSI_DATA_WIDTH_MASK
164 #define I2O_DPT_DATA_WIDTH_8 I2O_SCSI_DATA_WIDTH_8
165 #define I2O_DPT_DATA_WIDTH_16 I2O_SCSI_DATA_WIDTH_16
166 #define I2O_DPT_DATA_WIDTH_32 I2O_SCSI_DATA_WIDTH_32
168 #define I2O_DPT_SYNC_NEGOTIATION_FLAG I2O_SCSI_SYNC_NEGOTIATION_FLAG
169 #define I2O_DPT_DISABLE_SYNC_NEGOTIATION I2O_SCSI_DISABLE_SYNC_NEGOTIATION
170 #define I2O_DPT_ENABLE_SYNC_NEGOTIATION I2O_SCSI_ENABLE_SYNC_NEGOTIATION
172 /* DPT Device Group 8000h - Device Information Parameter Group */
174 typedef struct _I2O_DPT_DEVICE_INFO_SCALAR {
175 U8 DeviceType; /* Identical to I2O_SCSI_DEVICE_INFO SCALAR */
176 U8 Flags; /* Identical to I2O_SCSI_DEVICE_INFO SCALAR */
179 U8 LunInfo[8]; /* SCSI-2 8-bit scalar LUN goes into offset 1 */
181 } I2O_DPT_DEVICE_INFO_SCALAR, *PI2O_DPT_DEVICE_INFO_SCALAR;
183 #define I2O_DPT_EXEC_IOP_BUFFERS_GROUP_NO 0x8000
185 /* DPT Exec Iop Buffers Group 8000h */
187 typedef struct _I2O_DPT_EXEC_IOP_BUFFERS_SCALAR {
188 U32 SerialOutputOffset; /* offset from base address to header */
189 U32 SerialOutputSize; /* size of data buffer in bytes */
190 U32 SerialHeaderSize; /* size of data buffer header in bytes */
191 U32 SerialFlagsSupported; /* Mask of debug flags supported */
193 } I2O_DPT_EXEC_IOP_BUFFERS_SCALAR, *PI2O_DPT_EXEC_IOP_BUFFERS_SCALAR;
196 #endif /* I2O_DPT_HDR */