2 * Copyright (c) 2000-2010 LSI Corporation.
6 * Title: MPI diagnostic tool structures and definitions
7 * Creation Date: March 26, 2007
9 * mpi2_tool.h Version: 02.00.05
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 * 07-30-09 02.00.04 Added ExtendedType field to DiagnosticBufferPost request
23 * Added MPI2_DIAG_BUF_TYPE_EXTENDED.
24 * Incremented MPI2_DIAG_BUF_TYPE_COUNT.
25 * 05-12-10 02.00.05 Added Diagnostic Data Upload tool.
26 * --------------------------------------------------------------------------
32 /*****************************************************************************
36 *****************************************************************************/
38 /* defines for the Tools */
39 #define MPI2_TOOLBOX_CLEAN_TOOL (0x00)
40 #define MPI2_TOOLBOX_MEMORY_MOVE_TOOL (0x01)
41 #define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL (0x02)
42 #define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)
43 #define MPI2_TOOLBOX_BEACON_TOOL (0x05)
44 #define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL (0x06)
47 /****************************************************************************
49 ****************************************************************************/
51 typedef struct _MPI2_TOOLBOX_REPLY
54 U8 Reserved1; /* 0x01 */
55 U8 MsgLength; /* 0x02 */
56 U8 Function; /* 0x03 */
57 U16 Reserved2; /* 0x04 */
58 U8 Reserved3; /* 0x06 */
59 U8 MsgFlags; /* 0x07 */
62 U16 Reserved4; /* 0x0A */
63 U16 Reserved5; /* 0x0C */
64 U16 IOCStatus; /* 0x0E */
65 U32 IOCLogInfo; /* 0x10 */
66 } MPI2_TOOLBOX_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_REPLY,
67 Mpi2ToolboxReply_t, MPI2_POINTER pMpi2ToolboxReply_t;
70 /****************************************************************************
71 * Toolbox Clean Tool request
72 ****************************************************************************/
74 typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST
77 U8 Reserved1; /* 0x01 */
78 U8 ChainOffset; /* 0x02 */
79 U8 Function; /* 0x03 */
80 U16 Reserved2; /* 0x04 */
81 U8 Reserved3; /* 0x06 */
82 U8 MsgFlags; /* 0x07 */
85 U16 Reserved4; /* 0x0A */
87 } MPI2_TOOLBOX_CLEAN_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
88 Mpi2ToolboxCleanRequest_t, MPI2_POINTER pMpi2ToolboxCleanRequest_t;
90 /* values for the Flags field */
91 #define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES (0x80000000)
92 #define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES (0x40000000)
93 #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES (0x20000000)
94 #define MPI2_TOOLBOX_CLEAN_FW_CURRENT (0x10000000)
95 #define MPI2_TOOLBOX_CLEAN_FW_BACKUP (0x08000000)
96 #define MPI2_TOOLBOX_CLEAN_MEGARAID (0x02000000)
97 #define MPI2_TOOLBOX_CLEAN_INITIALIZATION (0x01000000)
98 #define MPI2_TOOLBOX_CLEAN_FLASH (0x00000004)
99 #define MPI2_TOOLBOX_CLEAN_SEEPROM (0x00000002)
100 #define MPI2_TOOLBOX_CLEAN_NVSRAM (0x00000001)
103 /****************************************************************************
104 * Toolbox Memory Move request
105 ****************************************************************************/
107 typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST {
109 U8 Reserved1; /* 0x01 */
110 U8 ChainOffset; /* 0x02 */
111 U8 Function; /* 0x03 */
112 U16 Reserved2; /* 0x04 */
113 U8 Reserved3; /* 0x06 */
114 U8 MsgFlags; /* 0x07 */
117 U16 Reserved4; /* 0x0A */
118 MPI2_SGE_SIMPLE_UNION SGL; /* 0x0C */
119 } MPI2_TOOLBOX_MEM_MOVE_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
120 Mpi2ToolboxMemMoveRequest_t, MPI2_POINTER pMpi2ToolboxMemMoveRequest_t;
123 /****************************************************************************
124 * Toolbox Diagnostic Data Upload request
125 ****************************************************************************/
127 typedef struct _MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST {
129 U8 Reserved1; /* 0x01 */
130 U8 ChainOffset; /* 0x02 */
131 U8 Function; /* 0x03 */
132 U16 Reserved2; /* 0x04 */
133 U8 Reserved3; /* 0x06 */
134 U8 MsgFlags; /* 0x07 */
137 U16 Reserved4; /* 0x0A */
138 U8 SGLFlags; /* 0x0C */
139 U8 Reserved5; /* 0x0D */
140 U16 Reserved6; /* 0x0E */
141 U32 Flags; /* 0x10 */
142 U32 DataLength; /* 0x14 */
143 MPI2_SGE_SIMPLE_UNION SGL; /* 0x18 */
144 } MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
145 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
146 Mpi2ToolboxDiagDataUploadRequest_t,
147 MPI2_POINTER pMpi2ToolboxDiagDataUploadRequest_t;
149 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
152 typedef struct _MPI2_DIAG_DATA_UPLOAD_HEADER {
153 U32 DiagDataLength; /* 00h */
154 U8 FormatCode; /* 04h */
155 U8 Reserved1; /* 05h */
156 U16 Reserved2; /* 06h */
157 } MPI2_DIAG_DATA_UPLOAD_HEADER, MPI2_POINTER PTR_MPI2_DIAG_DATA_UPLOAD_HEADER,
158 Mpi2DiagDataUploadHeader_t, MPI2_POINTER pMpi2DiagDataUploadHeader_t;
161 /****************************************************************************
162 * Toolbox ISTWI Read Write Tool
163 ****************************************************************************/
165 /* Toolbox ISTWI Read Write Tool request message */
166 typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST {
168 U8 Reserved1; /* 0x01 */
169 U8 ChainOffset; /* 0x02 */
170 U8 Function; /* 0x03 */
171 U16 Reserved2; /* 0x04 */
172 U8 Reserved3; /* 0x06 */
173 U8 MsgFlags; /* 0x07 */
176 U16 Reserved4; /* 0x0A */
177 U32 Reserved5; /* 0x0C */
178 U32 Reserved6; /* 0x10 */
179 U8 DevIndex; /* 0x14 */
180 U8 Action; /* 0x15 */
181 U8 SGLFlags; /* 0x16 */
182 U8 Reserved7; /* 0x17 */
183 U16 TxDataLength; /* 0x18 */
184 U16 RxDataLength; /* 0x1A */
185 U32 Reserved8; /* 0x1C */
186 U32 Reserved9; /* 0x20 */
187 U32 Reserved10; /* 0x24 */
188 U32 Reserved11; /* 0x28 */
189 U32 Reserved12; /* 0x2C */
190 MPI2_SGE_SIMPLE_UNION SGL; /* 0x30 */
191 } MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
192 MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
193 Mpi2ToolboxIstwiReadWriteRequest_t,
194 MPI2_POINTER pMpi2ToolboxIstwiReadWriteRequest_t;
196 /* values for the Action field */
197 #define MPI2_TOOL_ISTWI_ACTION_READ_DATA (0x01)
198 #define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA (0x02)
199 #define MPI2_TOOL_ISTWI_ACTION_SEQUENCE (0x03)
200 #define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS (0x10)
201 #define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS (0x11)
202 #define MPI2_TOOL_ISTWI_ACTION_RESET (0x12)
204 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
207 /* Toolbox ISTWI Read Write Tool reply message */
208 typedef struct _MPI2_TOOLBOX_ISTWI_REPLY {
210 U8 Reserved1; /* 0x01 */
211 U8 MsgLength; /* 0x02 */
212 U8 Function; /* 0x03 */
213 U16 Reserved2; /* 0x04 */
214 U8 Reserved3; /* 0x06 */
215 U8 MsgFlags; /* 0x07 */
218 U16 Reserved4; /* 0x0A */
219 U16 Reserved5; /* 0x0C */
220 U16 IOCStatus; /* 0x0E */
221 U32 IOCLogInfo; /* 0x10 */
222 U8 DevIndex; /* 0x14 */
223 U8 Action; /* 0x15 */
224 U8 IstwiStatus; /* 0x16 */
225 U8 Reserved6; /* 0x17 */
226 U16 TxDataCount; /* 0x18 */
227 U16 RxDataCount; /* 0x1A */
228 } MPI2_TOOLBOX_ISTWI_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_REPLY,
229 Mpi2ToolboxIstwiReply_t, MPI2_POINTER pMpi2ToolboxIstwiReply_t;
232 /****************************************************************************
233 * Toolbox Beacon Tool request
234 ****************************************************************************/
236 typedef struct _MPI2_TOOLBOX_BEACON_REQUEST
239 U8 Reserved1; /* 0x01 */
240 U8 ChainOffset; /* 0x02 */
241 U8 Function; /* 0x03 */
242 U16 Reserved2; /* 0x04 */
243 U8 Reserved3; /* 0x06 */
244 U8 MsgFlags; /* 0x07 */
247 U16 Reserved4; /* 0x0A */
248 U8 Reserved5; /* 0x0C */
249 U8 PhysicalPort; /* 0x0D */
250 U8 Reserved6; /* 0x0E */
252 } MPI2_TOOLBOX_BEACON_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_BEACON_REQUEST,
253 Mpi2ToolboxBeaconRequest_t, MPI2_POINTER pMpi2ToolboxBeaconRequest_t;
255 /* values for the Flags field */
256 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF (0x00)
257 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON (0x01)
260 /****************************************************************************
261 * Toolbox Diagnostic CLI Tool
262 ****************************************************************************/
264 #define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH (0x5C)
266 /* Toolbox Diagnostic CLI Tool request message */
267 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
269 U8 Reserved1; /* 0x01 */
270 U8 ChainOffset; /* 0x02 */
271 U8 Function; /* 0x03 */
272 U16 Reserved2; /* 0x04 */
273 U8 Reserved3; /* 0x06 */
274 U8 MsgFlags; /* 0x07 */
277 U16 Reserved4; /* 0x0A */
278 U8 SGLFlags; /* 0x0C */
279 U8 Reserved5; /* 0x0D */
280 U16 Reserved6; /* 0x0E */
281 U32 DataLength; /* 0x10 */
282 U8 DiagnosticCliCommand
283 [MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH]; /* 0x14 */
284 MPI2_SGE_SIMPLE_UNION SGL; /* 0x70 */
285 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
286 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
287 Mpi2ToolboxDiagnosticCliRequest_t,
288 MPI2_POINTER pMpi2ToolboxDiagnosticCliRequest_t;
290 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
293 /* Toolbox Diagnostic CLI Tool reply message */
294 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY {
296 U8 Reserved1; /* 0x01 */
297 U8 MsgLength; /* 0x02 */
298 U8 Function; /* 0x03 */
299 U16 Reserved2; /* 0x04 */
300 U8 Reserved3; /* 0x06 */
301 U8 MsgFlags; /* 0x07 */
304 U16 Reserved4; /* 0x0A */
305 U16 Reserved5; /* 0x0C */
306 U16 IOCStatus; /* 0x0E */
307 U32 IOCLogInfo; /* 0x10 */
308 U32 ReturnedDataLength; /* 0x14 */
309 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
310 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
311 Mpi2ToolboxDiagnosticCliReply_t,
312 MPI2_POINTER pMpi2ToolboxDiagnosticCliReply_t;
315 /*****************************************************************************
317 * Diagnostic Buffer Messages
319 *****************************************************************************/
322 /****************************************************************************
323 * Diagnostic Buffer Post request
324 ****************************************************************************/
326 typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST
328 U8 ExtendedType; /* 0x00 */
329 U8 BufferType; /* 0x01 */
330 U8 ChainOffset; /* 0x02 */
331 U8 Function; /* 0x03 */
332 U16 Reserved2; /* 0x04 */
333 U8 Reserved3; /* 0x06 */
334 U8 MsgFlags; /* 0x07 */
337 U16 Reserved4; /* 0x0A */
338 U64 BufferAddress; /* 0x0C */
339 U32 BufferLength; /* 0x14 */
340 U32 Reserved5; /* 0x18 */
341 U32 Reserved6; /* 0x1C */
342 U32 Flags; /* 0x20 */
343 U32 ProductSpecific[23]; /* 0x24 */
344 } MPI2_DIAG_BUFFER_POST_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
345 Mpi2DiagBufferPostRequest_t, MPI2_POINTER pMpi2DiagBufferPostRequest_t;
347 /* values for the ExtendedType field */
348 #define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION (0x02)
350 /* values for the BufferType field */
351 #define MPI2_DIAG_BUF_TYPE_TRACE (0x00)
352 #define MPI2_DIAG_BUF_TYPE_SNAPSHOT (0x01)
353 #define MPI2_DIAG_BUF_TYPE_EXTENDED (0x02)
354 /* count of the number of buffer types */
355 #define MPI2_DIAG_BUF_TYPE_COUNT (0x03)
358 /****************************************************************************
359 * Diagnostic Buffer Post reply
360 ****************************************************************************/
362 typedef struct _MPI2_DIAG_BUFFER_POST_REPLY
364 U8 ExtendedType; /* 0x00 */
365 U8 BufferType; /* 0x01 */
366 U8 MsgLength; /* 0x02 */
367 U8 Function; /* 0x03 */
368 U16 Reserved2; /* 0x04 */
369 U8 Reserved3; /* 0x06 */
370 U8 MsgFlags; /* 0x07 */
373 U16 Reserved4; /* 0x0A */
374 U16 Reserved5; /* 0x0C */
375 U16 IOCStatus; /* 0x0E */
376 U32 IOCLogInfo; /* 0x10 */
377 U32 TransferLength; /* 0x14 */
378 } MPI2_DIAG_BUFFER_POST_REPLY, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REPLY,
379 Mpi2DiagBufferPostReply_t, MPI2_POINTER pMpi2DiagBufferPostReply_t;
382 /****************************************************************************
383 * Diagnostic Release request
384 ****************************************************************************/
386 typedef struct _MPI2_DIAG_RELEASE_REQUEST
388 U8 Reserved1; /* 0x00 */
389 U8 BufferType; /* 0x01 */
390 U8 ChainOffset; /* 0x02 */
391 U8 Function; /* 0x03 */
392 U16 Reserved2; /* 0x04 */
393 U8 Reserved3; /* 0x06 */
394 U8 MsgFlags; /* 0x07 */
397 U16 Reserved4; /* 0x0A */
398 } MPI2_DIAG_RELEASE_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REQUEST,
399 Mpi2DiagReleaseRequest_t, MPI2_POINTER pMpi2DiagReleaseRequest_t;
402 /****************************************************************************
403 * Diagnostic Buffer Post reply
404 ****************************************************************************/
406 typedef struct _MPI2_DIAG_RELEASE_REPLY
408 U8 Reserved1; /* 0x00 */
409 U8 BufferType; /* 0x01 */
410 U8 MsgLength; /* 0x02 */
411 U8 Function; /* 0x03 */
412 U16 Reserved2; /* 0x04 */
413 U8 Reserved3; /* 0x06 */
414 U8 MsgFlags; /* 0x07 */
417 U16 Reserved4; /* 0x0A */
418 U16 Reserved5; /* 0x0C */
419 U16 IOCStatus; /* 0x0E */
420 U32 IOCLogInfo; /* 0x10 */
421 } MPI2_DIAG_RELEASE_REPLY, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REPLY,
422 Mpi2DiagReleaseReply_t, MPI2_POINTER pMpi2DiagReleaseReply_t;