2 * Copyright (c) 2000-2009 LSI Corporation.
6 * Title: MPI diagnostic tool structures and definitions
7 * Creation Date: March 26, 2007
9 * mpi2_tool.h Version: 02.00.03
14 * Date Version Description
15 * -------- -------- ------------------------------------------------------
16 * 04-30-07 02.00.00 Corresponds to Fusion-MPT MPI Specification Rev A.
17 * 12-18-07 02.00.01 Added Diagnostic Buffer Post and Diagnostic Release
18 * structures and defines.
19 * 02-29-08 02.00.02 Modified various names to make them 32-character unique.
20 * 05-06-09 02.00.03 Added ISTWI Read Write Tool and Diagnostic CLI Tool.
21 * --------------------------------------------------------------------------
27 /*****************************************************************************
31 *****************************************************************************/
33 /* defines for the Tools */
34 #define MPI2_TOOLBOX_CLEAN_TOOL (0x00)
35 #define MPI2_TOOLBOX_MEMORY_MOVE_TOOL (0x01)
36 #define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)
37 #define MPI2_TOOLBOX_BEACON_TOOL (0x05)
38 #define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL (0x06)
41 /****************************************************************************
43 ****************************************************************************/
45 typedef struct _MPI2_TOOLBOX_REPLY
48 U8 Reserved1
; /* 0x01 */
49 U8 MsgLength
; /* 0x02 */
50 U8 Function
; /* 0x03 */
51 U16 Reserved2
; /* 0x04 */
52 U8 Reserved3
; /* 0x06 */
53 U8 MsgFlags
; /* 0x07 */
56 U16 Reserved4
; /* 0x0A */
57 U16 Reserved5
; /* 0x0C */
58 U16 IOCStatus
; /* 0x0E */
59 U32 IOCLogInfo
; /* 0x10 */
60 } MPI2_TOOLBOX_REPLY
, MPI2_POINTER PTR_MPI2_TOOLBOX_REPLY
,
61 Mpi2ToolboxReply_t
, MPI2_POINTER pMpi2ToolboxReply_t
;
64 /****************************************************************************
65 * Toolbox Clean Tool request
66 ****************************************************************************/
68 typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST
71 U8 Reserved1
; /* 0x01 */
72 U8 ChainOffset
; /* 0x02 */
73 U8 Function
; /* 0x03 */
74 U16 Reserved2
; /* 0x04 */
75 U8 Reserved3
; /* 0x06 */
76 U8 MsgFlags
; /* 0x07 */
79 U16 Reserved4
; /* 0x0A */
81 } MPI2_TOOLBOX_CLEAN_REQUEST
, MPI2_POINTER PTR_MPI2_TOOLBOX_CLEAN_REQUEST
,
82 Mpi2ToolboxCleanRequest_t
, MPI2_POINTER pMpi2ToolboxCleanRequest_t
;
84 /* values for the Flags field */
85 #define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES (0x80000000)
86 #define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES (0x40000000)
87 #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES (0x20000000)
88 #define MPI2_TOOLBOX_CLEAN_FW_CURRENT (0x10000000)
89 #define MPI2_TOOLBOX_CLEAN_FW_BACKUP (0x08000000)
90 #define MPI2_TOOLBOX_CLEAN_MEGARAID (0x02000000)
91 #define MPI2_TOOLBOX_CLEAN_INITIALIZATION (0x01000000)
92 #define MPI2_TOOLBOX_CLEAN_FLASH (0x00000004)
93 #define MPI2_TOOLBOX_CLEAN_SEEPROM (0x00000002)
94 #define MPI2_TOOLBOX_CLEAN_NVSRAM (0x00000001)
97 /****************************************************************************
98 * Toolbox Memory Move request
99 ****************************************************************************/
101 typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST
104 U8 Reserved1
; /* 0x01 */
105 U8 ChainOffset
; /* 0x02 */
106 U8 Function
; /* 0x03 */
107 U16 Reserved2
; /* 0x04 */
108 U8 Reserved3
; /* 0x06 */
109 U8 MsgFlags
; /* 0x07 */
112 U16 Reserved4
; /* 0x0A */
113 MPI2_SGE_SIMPLE_UNION SGL
; /* 0x0C */
114 } MPI2_TOOLBOX_MEM_MOVE_REQUEST
, MPI2_POINTER PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST
,
115 Mpi2ToolboxMemMoveRequest_t
, MPI2_POINTER pMpi2ToolboxMemMoveRequest_t
;
118 /****************************************************************************
119 * Toolbox ISTWI Read Write Tool
120 ****************************************************************************/
122 /* Toolbox ISTWI Read Write Tool request message */
123 typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST
{
125 U8 Reserved1
; /* 0x01 */
126 U8 ChainOffset
; /* 0x02 */
127 U8 Function
; /* 0x03 */
128 U16 Reserved2
; /* 0x04 */
129 U8 Reserved3
; /* 0x06 */
130 U8 MsgFlags
; /* 0x07 */
133 U16 Reserved4
; /* 0x0A */
134 U32 Reserved5
; /* 0x0C */
135 U32 Reserved6
; /* 0x10 */
136 U8 DevIndex
; /* 0x14 */
137 U8 Action
; /* 0x15 */
138 U8 SGLFlags
; /* 0x16 */
139 U8 Reserved7
; /* 0x17 */
140 U16 TxDataLength
; /* 0x18 */
141 U16 RxDataLength
; /* 0x1A */
142 U32 Reserved8
; /* 0x1C */
143 U32 Reserved9
; /* 0x20 */
144 U32 Reserved10
; /* 0x24 */
145 U32 Reserved11
; /* 0x28 */
146 U32 Reserved12
; /* 0x2C */
147 MPI2_SGE_SIMPLE_UNION SGL
; /* 0x30 */
148 } MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST
,
149 MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST
,
150 Mpi2ToolboxIstwiReadWriteRequest_t
,
151 MPI2_POINTER pMpi2ToolboxIstwiReadWriteRequest_t
;
153 /* values for the Action field */
154 #define MPI2_TOOL_ISTWI_ACTION_READ_DATA (0x01)
155 #define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA (0x02)
156 #define MPI2_TOOL_ISTWI_ACTION_SEQUENCE (0x03)
157 #define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS (0x10)
158 #define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS (0x11)
159 #define MPI2_TOOL_ISTWI_ACTION_RESET (0x12)
161 /* values for SGLFlags field are in the SGL section of mpi2.h */
164 /* Toolbox ISTWI Read Write Tool reply message */
165 typedef struct _MPI2_TOOLBOX_ISTWI_REPLY
{
167 U8 Reserved1
; /* 0x01 */
168 U8 MsgLength
; /* 0x02 */
169 U8 Function
; /* 0x03 */
170 U16 Reserved2
; /* 0x04 */
171 U8 Reserved3
; /* 0x06 */
172 U8 MsgFlags
; /* 0x07 */
175 U16 Reserved4
; /* 0x0A */
176 U16 Reserved5
; /* 0x0C */
177 U16 IOCStatus
; /* 0x0E */
178 U32 IOCLogInfo
; /* 0x10 */
179 U8 DevIndex
; /* 0x14 */
180 U8 Action
; /* 0x15 */
181 U8 IstwiStatus
; /* 0x16 */
182 U8 Reserved6
; /* 0x17 */
183 U16 TxDataCount
; /* 0x18 */
184 U16 RxDataCount
; /* 0x1A */
185 } MPI2_TOOLBOX_ISTWI_REPLY
, MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_REPLY
,
186 Mpi2ToolboxIstwiReply_t
, MPI2_POINTER pMpi2ToolboxIstwiReply_t
;
189 /****************************************************************************
190 * Toolbox Beacon Tool request
191 ****************************************************************************/
193 typedef struct _MPI2_TOOLBOX_BEACON_REQUEST
196 U8 Reserved1
; /* 0x01 */
197 U8 ChainOffset
; /* 0x02 */
198 U8 Function
; /* 0x03 */
199 U16 Reserved2
; /* 0x04 */
200 U8 Reserved3
; /* 0x06 */
201 U8 MsgFlags
; /* 0x07 */
204 U16 Reserved4
; /* 0x0A */
205 U8 Reserved5
; /* 0x0C */
206 U8 PhysicalPort
; /* 0x0D */
207 U8 Reserved6
; /* 0x0E */
209 } MPI2_TOOLBOX_BEACON_REQUEST
, MPI2_POINTER PTR_MPI2_TOOLBOX_BEACON_REQUEST
,
210 Mpi2ToolboxBeaconRequest_t
, MPI2_POINTER pMpi2ToolboxBeaconRequest_t
;
212 /* values for the Flags field */
213 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF (0x00)
214 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON (0x01)
217 /****************************************************************************
218 * Toolbox Diagnostic CLI Tool
219 ****************************************************************************/
221 #define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH (0x5C)
223 /* Toolbox Diagnostic CLI Tool request message */
224 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
{
226 U8 Reserved1
; /* 0x01 */
227 U8 ChainOffset
; /* 0x02 */
228 U8 Function
; /* 0x03 */
229 U16 Reserved2
; /* 0x04 */
230 U8 Reserved3
; /* 0x06 */
231 U8 MsgFlags
; /* 0x07 */
234 U16 Reserved4
; /* 0x0A */
235 U8 SGLFlags
; /* 0x0C */
236 U8 Reserved5
; /* 0x0D */
237 U16 Reserved6
; /* 0x0E */
238 U32 DataLength
; /* 0x10 */
239 U8 DiagnosticCliCommand
240 [MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH
]; /* 0x14 */
241 MPI2_SGE_SIMPLE_UNION SGL
; /* 0x70 */
242 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
,
243 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
,
244 Mpi2ToolboxDiagnosticCliRequest_t
,
245 MPI2_POINTER pMpi2ToolboxDiagnosticCliRequest_t
;
247 /* values for SGLFlags field are in the SGL section of mpi2.h */
250 /* Toolbox Diagnostic CLI Tool reply message */
251 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY
{
253 U8 Reserved1
; /* 0x01 */
254 U8 MsgLength
; /* 0x02 */
255 U8 Function
; /* 0x03 */
256 U16 Reserved2
; /* 0x04 */
257 U8 Reserved3
; /* 0x06 */
258 U8 MsgFlags
; /* 0x07 */
261 U16 Reserved4
; /* 0x0A */
262 U16 Reserved5
; /* 0x0C */
263 U16 IOCStatus
; /* 0x0E */
264 U32 IOCLogInfo
; /* 0x10 */
265 U32 ReturnedDataLength
; /* 0x14 */
266 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY
,
267 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY
,
268 Mpi2ToolboxDiagnosticCliReply_t
,
269 MPI2_POINTER pMpi2ToolboxDiagnosticCliReply_t
;
272 /*****************************************************************************
274 * Diagnostic Buffer Messages
276 *****************************************************************************/
279 /****************************************************************************
280 * Diagnostic Buffer Post request
281 ****************************************************************************/
283 typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST
285 U8 Reserved1
; /* 0x00 */
286 U8 BufferType
; /* 0x01 */
287 U8 ChainOffset
; /* 0x02 */
288 U8 Function
; /* 0x03 */
289 U16 Reserved2
; /* 0x04 */
290 U8 Reserved3
; /* 0x06 */
291 U8 MsgFlags
; /* 0x07 */
294 U16 Reserved4
; /* 0x0A */
295 U64 BufferAddress
; /* 0x0C */
296 U32 BufferLength
; /* 0x14 */
297 U32 Reserved5
; /* 0x18 */
298 U32 Reserved6
; /* 0x1C */
299 U32 Flags
; /* 0x20 */
300 U32 ProductSpecific
[23]; /* 0x24 */
301 } MPI2_DIAG_BUFFER_POST_REQUEST
, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REQUEST
,
302 Mpi2DiagBufferPostRequest_t
, MPI2_POINTER pMpi2DiagBufferPostRequest_t
;
304 /* values for the BufferType field */
305 #define MPI2_DIAG_BUF_TYPE_TRACE (0x00)
306 #define MPI2_DIAG_BUF_TYPE_SNAPSHOT (0x01)
307 /* count of the number of buffer types */
308 #define MPI2_DIAG_BUF_TYPE_COUNT (0x02)
311 /****************************************************************************
312 * Diagnostic Buffer Post reply
313 ****************************************************************************/
315 typedef struct _MPI2_DIAG_BUFFER_POST_REPLY
317 U8 Reserved1
; /* 0x00 */
318 U8 BufferType
; /* 0x01 */
319 U8 MsgLength
; /* 0x02 */
320 U8 Function
; /* 0x03 */
321 U16 Reserved2
; /* 0x04 */
322 U8 Reserved3
; /* 0x06 */
323 U8 MsgFlags
; /* 0x07 */
326 U16 Reserved4
; /* 0x0A */
327 U16 Reserved5
; /* 0x0C */
328 U16 IOCStatus
; /* 0x0E */
329 U32 IOCLogInfo
; /* 0x10 */
330 U32 TransferLength
; /* 0x14 */
331 } MPI2_DIAG_BUFFER_POST_REPLY
, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REPLY
,
332 Mpi2DiagBufferPostReply_t
, MPI2_POINTER pMpi2DiagBufferPostReply_t
;
335 /****************************************************************************
336 * Diagnostic Release request
337 ****************************************************************************/
339 typedef struct _MPI2_DIAG_RELEASE_REQUEST
341 U8 Reserved1
; /* 0x00 */
342 U8 BufferType
; /* 0x01 */
343 U8 ChainOffset
; /* 0x02 */
344 U8 Function
; /* 0x03 */
345 U16 Reserved2
; /* 0x04 */
346 U8 Reserved3
; /* 0x06 */
347 U8 MsgFlags
; /* 0x07 */
350 U16 Reserved4
; /* 0x0A */
351 } MPI2_DIAG_RELEASE_REQUEST
, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REQUEST
,
352 Mpi2DiagReleaseRequest_t
, MPI2_POINTER pMpi2DiagReleaseRequest_t
;
355 /****************************************************************************
356 * Diagnostic Buffer Post reply
357 ****************************************************************************/
359 typedef struct _MPI2_DIAG_RELEASE_REPLY
361 U8 Reserved1
; /* 0x00 */
362 U8 BufferType
; /* 0x01 */
363 U8 MsgLength
; /* 0x02 */
364 U8 Function
; /* 0x03 */
365 U16 Reserved2
; /* 0x04 */
366 U8 Reserved3
; /* 0x06 */
367 U8 MsgFlags
; /* 0x07 */
370 U16 Reserved4
; /* 0x0A */
371 U16 Reserved5
; /* 0x0C */
372 U16 IOCStatus
; /* 0x0E */
373 U32 IOCLogInfo
; /* 0x10 */
374 } MPI2_DIAG_RELEASE_REPLY
, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REPLY
,
375 Mpi2DiagReleaseReply_t
, MPI2_POINTER pMpi2DiagReleaseReply_t
;