2 * Copyright (c) 2000-2014 LSI Corporation.
6 * Title: MPI diagnostic tool structures and definitions
7 * Creation Date: March 26, 2007
9 * mpi2_tool.h Version: 02.00.12
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 * 08-11-10 02.00.06 Added defines that were missing for Diagnostic Buffer
28 * 05-25-11 02.00.07 Added Flags field and related defines to
29 * MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST.
30 * 07-26-12 02.00.10 Modified MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST so that
31 * it uses MPI Chain SGE as well as MPI Simple SGE.
32 * 08-19-13 02.00.11 Added MPI2_TOOLBOX_TEXT_DISPLAY_TOOL and related info.
33 * 01-08-14 02.00.12 Added MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC.
34 * --------------------------------------------------------------------------
40 /*****************************************************************************
44 *****************************************************************************/
46 /* defines for the Tools */
47 #define MPI2_TOOLBOX_CLEAN_TOOL (0x00)
48 #define MPI2_TOOLBOX_MEMORY_MOVE_TOOL (0x01)
49 #define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL (0x02)
50 #define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)
51 #define MPI2_TOOLBOX_BEACON_TOOL (0x05)
52 #define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL (0x06)
53 #define MPI2_TOOLBOX_TEXT_DISPLAY_TOOL (0x07)
56 /****************************************************************************
58 ****************************************************************************/
60 typedef struct _MPI2_TOOLBOX_REPLY
63 U8 Reserved1; /* 0x01 */
64 U8 MsgLength; /* 0x02 */
65 U8 Function; /* 0x03 */
66 U16 Reserved2; /* 0x04 */
67 U8 Reserved3; /* 0x06 */
68 U8 MsgFlags; /* 0x07 */
71 U16 Reserved4; /* 0x0A */
72 U16 Reserved5; /* 0x0C */
73 U16 IOCStatus; /* 0x0E */
74 U32 IOCLogInfo; /* 0x10 */
75 } MPI2_TOOLBOX_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_REPLY,
76 Mpi2ToolboxReply_t, MPI2_POINTER pMpi2ToolboxReply_t;
79 /****************************************************************************
80 * Toolbox Clean Tool request
81 ****************************************************************************/
83 typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST
86 U8 Reserved1; /* 0x01 */
87 U8 ChainOffset; /* 0x02 */
88 U8 Function; /* 0x03 */
89 U16 Reserved2; /* 0x04 */
90 U8 Reserved3; /* 0x06 */
91 U8 MsgFlags; /* 0x07 */
94 U16 Reserved4; /* 0x0A */
96 } MPI2_TOOLBOX_CLEAN_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
97 Mpi2ToolboxCleanRequest_t, MPI2_POINTER pMpi2ToolboxCleanRequest_t;
99 /* values for the Flags field */
100 #define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES (0x80000000)
101 #define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES (0x40000000)
102 #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES (0x20000000)
103 #define MPI2_TOOLBOX_CLEAN_FW_CURRENT (0x10000000)
104 #define MPI2_TOOLBOX_CLEAN_FW_BACKUP (0x08000000)
105 #define MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC (0x04000000)
106 #define MPI2_TOOLBOX_CLEAN_MEGARAID (0x02000000)
107 #define MPI2_TOOLBOX_CLEAN_INITIALIZATION (0x01000000)
108 #define MPI2_TOOLBOX_CLEAN_FLASH (0x00000004)
109 #define MPI2_TOOLBOX_CLEAN_SEEPROM (0x00000002)
110 #define MPI2_TOOLBOX_CLEAN_NVSRAM (0x00000001)
113 /****************************************************************************
114 * Toolbox Memory Move request
115 ****************************************************************************/
117 typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST {
119 U8 Reserved1; /* 0x01 */
120 U8 ChainOffset; /* 0x02 */
121 U8 Function; /* 0x03 */
122 U16 Reserved2; /* 0x04 */
123 U8 Reserved3; /* 0x06 */
124 U8 MsgFlags; /* 0x07 */
127 U16 Reserved4; /* 0x0A */
128 MPI2_SGE_SIMPLE_UNION SGL; /* 0x0C */
129 } MPI2_TOOLBOX_MEM_MOVE_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
130 Mpi2ToolboxMemMoveRequest_t, MPI2_POINTER pMpi2ToolboxMemMoveRequest_t;
133 /****************************************************************************
134 * Toolbox Diagnostic Data Upload request
135 ****************************************************************************/
137 typedef struct _MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST {
139 U8 Reserved1; /* 0x01 */
140 U8 ChainOffset; /* 0x02 */
141 U8 Function; /* 0x03 */
142 U16 Reserved2; /* 0x04 */
143 U8 Reserved3; /* 0x06 */
144 U8 MsgFlags; /* 0x07 */
147 U16 Reserved4; /* 0x0A */
148 U8 SGLFlags; /* 0x0C */
149 U8 Reserved5; /* 0x0D */
150 U16 Reserved6; /* 0x0E */
151 U32 Flags; /* 0x10 */
152 U32 DataLength; /* 0x14 */
153 MPI2_SGE_SIMPLE_UNION SGL; /* 0x18 */
154 } MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
155 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
156 Mpi2ToolboxDiagDataUploadRequest_t,
157 MPI2_POINTER pMpi2ToolboxDiagDataUploadRequest_t;
159 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
162 typedef struct _MPI2_DIAG_DATA_UPLOAD_HEADER {
163 U32 DiagDataLength; /* 00h */
164 U8 FormatCode; /* 04h */
165 U8 Reserved1; /* 05h */
166 U16 Reserved2; /* 06h */
167 } MPI2_DIAG_DATA_UPLOAD_HEADER, MPI2_POINTER PTR_MPI2_DIAG_DATA_UPLOAD_HEADER,
168 Mpi2DiagDataUploadHeader_t, MPI2_POINTER pMpi2DiagDataUploadHeader_t;
171 /****************************************************************************
172 * Toolbox ISTWI Read Write Tool
173 ****************************************************************************/
175 /* Toolbox ISTWI Read Write Tool request message */
176 typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST {
178 U8 Reserved1; /* 0x01 */
179 U8 ChainOffset; /* 0x02 */
180 U8 Function; /* 0x03 */
181 U16 Reserved2; /* 0x04 */
182 U8 Reserved3; /* 0x06 */
183 U8 MsgFlags; /* 0x07 */
186 U16 Reserved4; /* 0x0A */
187 U32 Reserved5; /* 0x0C */
188 U32 Reserved6; /* 0x10 */
189 U8 DevIndex; /* 0x14 */
190 U8 Action; /* 0x15 */
191 U8 SGLFlags; /* 0x16 */
193 U16 TxDataLength; /* 0x18 */
194 U16 RxDataLength; /* 0x1A */
195 U32 Reserved8; /* 0x1C */
196 U32 Reserved9; /* 0x20 */
197 U32 Reserved10; /* 0x24 */
198 U32 Reserved11; /* 0x28 */
199 U32 Reserved12; /* 0x2C */
200 MPI2_SGE_SIMPLE_UNION SGL; /* 0x30 */
201 } MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
202 MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
203 Mpi2ToolboxIstwiReadWriteRequest_t,
204 MPI2_POINTER pMpi2ToolboxIstwiReadWriteRequest_t;
206 /* values for the Action field */
207 #define MPI2_TOOL_ISTWI_ACTION_READ_DATA (0x01)
208 #define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA (0x02)
209 #define MPI2_TOOL_ISTWI_ACTION_SEQUENCE (0x03)
210 #define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS (0x10)
211 #define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS (0x11)
212 #define MPI2_TOOL_ISTWI_ACTION_RESET (0x12)
214 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
216 /* values for the Flags field */
217 #define MPI2_TOOL_ISTWI_FLAG_AUTO_RESERVE_RELEASE (0x80)
218 #define MPI2_TOOL_ISTWI_FLAG_PAGE_ADDR_MASK (0x07)
220 /* Toolbox ISTWI Read Write Tool reply message */
221 typedef struct _MPI2_TOOLBOX_ISTWI_REPLY {
223 U8 Reserved1; /* 0x01 */
224 U8 MsgLength; /* 0x02 */
225 U8 Function; /* 0x03 */
226 U16 Reserved2; /* 0x04 */
227 U8 Reserved3; /* 0x06 */
228 U8 MsgFlags; /* 0x07 */
231 U16 Reserved4; /* 0x0A */
232 U16 Reserved5; /* 0x0C */
233 U16 IOCStatus; /* 0x0E */
234 U32 IOCLogInfo; /* 0x10 */
235 U8 DevIndex; /* 0x14 */
236 U8 Action; /* 0x15 */
237 U8 IstwiStatus; /* 0x16 */
238 U8 Reserved6; /* 0x17 */
239 U16 TxDataCount; /* 0x18 */
240 U16 RxDataCount; /* 0x1A */
241 } MPI2_TOOLBOX_ISTWI_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_REPLY,
242 Mpi2ToolboxIstwiReply_t, MPI2_POINTER pMpi2ToolboxIstwiReply_t;
245 /****************************************************************************
246 * Toolbox Beacon Tool request
247 ****************************************************************************/
249 typedef struct _MPI2_TOOLBOX_BEACON_REQUEST
252 U8 Reserved1; /* 0x01 */
253 U8 ChainOffset; /* 0x02 */
254 U8 Function; /* 0x03 */
255 U16 Reserved2; /* 0x04 */
256 U8 Reserved3; /* 0x06 */
257 U8 MsgFlags; /* 0x07 */
260 U16 Reserved4; /* 0x0A */
261 U8 Reserved5; /* 0x0C */
262 U8 PhysicalPort; /* 0x0D */
263 U8 Reserved6; /* 0x0E */
265 } MPI2_TOOLBOX_BEACON_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_BEACON_REQUEST,
266 Mpi2ToolboxBeaconRequest_t, MPI2_POINTER pMpi2ToolboxBeaconRequest_t;
268 /* values for the Flags field */
269 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF (0x00)
270 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON (0x01)
273 /****************************************************************************
274 * Toolbox Diagnostic CLI Tool
275 ****************************************************************************/
277 #define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH (0x5C)
279 /* MPI v2.0 Toolbox Diagnostic CLI Tool request message */
280 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
282 U8 Reserved1; /* 0x01 */
283 U8 ChainOffset; /* 0x02 */
284 U8 Function; /* 0x03 */
285 U16 Reserved2; /* 0x04 */
286 U8 Reserved3; /* 0x06 */
287 U8 MsgFlags; /* 0x07 */
290 U16 Reserved4; /* 0x0A */
291 U8 SGLFlags; /* 0x0C */
292 U8 Reserved5; /* 0x0D */
293 U16 Reserved6; /* 0x0E */
294 U32 DataLength; /* 0x10 */
295 U8 DiagnosticCliCommand
296 [MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH]; /* 0x14 */
297 MPI2_MPI_SGE_IO_UNION SGL; /* 0x70 */
298 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
299 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
300 Mpi2ToolboxDiagnosticCliRequest_t,
301 MPI2_POINTER pMpi2ToolboxDiagnosticCliRequest_t;
303 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
306 /* Toolbox Diagnostic CLI Tool reply message */
307 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY {
309 U8 Reserved1; /* 0x01 */
310 U8 MsgLength; /* 0x02 */
311 U8 Function; /* 0x03 */
312 U16 Reserved2; /* 0x04 */
313 U8 Reserved3; /* 0x06 */
314 U8 MsgFlags; /* 0x07 */
317 U16 Reserved4; /* 0x0A */
318 U16 Reserved5; /* 0x0C */
319 U16 IOCStatus; /* 0x0E */
320 U32 IOCLogInfo; /* 0x10 */
321 U32 ReturnedDataLength; /* 0x14 */
322 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
323 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
324 Mpi2ToolboxDiagnosticCliReply_t,
325 MPI2_POINTER pMpi2ToolboxDiagnosticCliReply_t;
328 /****************************************************************************
329 * Toolbox Console Text Display Tool
330 ****************************************************************************/
332 /* Toolbox Console Text Display Tool request message */
333 typedef struct _MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST {
335 U8 Reserved1; /* 0x01 */
336 U8 ChainOffset; /* 0x02 */
337 U8 Function; /* 0x03 */
338 U16 Reserved2; /* 0x04 */
339 U8 Reserved3; /* 0x06 */
340 U8 MsgFlags; /* 0x07 */
343 U16 Reserved4; /* 0x0A */
344 U8 Console; /* 0x0C */
346 U16 Reserved6; /* 0x0E */
347 U8 TextToDisplay[4]; /* 0x10 */
348 } MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
349 MPI2_POINTER PTR_MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
350 Mpi2ToolboxTextDisplayRequest_t,
351 MPI2_POINTER pMpi2ToolboxTextDisplayRequest_t;
353 /* defines for the Console field */
354 #define MPI2_TOOLBOX_CONSOLE_TYPE_MASK (0xF0)
355 #define MPI2_TOOLBOX_CONSOLE_TYPE_DEFAULT (0x00)
356 #define MPI2_TOOLBOX_CONSOLE_TYPE_UART (0x10)
357 #define MPI2_TOOLBOX_CONSOLE_TYPE_ETHERNET (0x20)
359 #define MPI2_TOOLBOX_CONSOLE_NUMBER_MASK (0x0F)
361 /* defines for the Flags field */
362 #define MPI2_TOOLBOX_CONSOLE_FLAG_TIMESTAMP (0x01)
366 /*****************************************************************************
368 * Diagnostic Buffer Messages
370 *****************************************************************************/
373 /****************************************************************************
374 * Diagnostic Buffer Post request
375 ****************************************************************************/
377 typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST
379 U8 ExtendedType; /* 0x00 */
380 U8 BufferType; /* 0x01 */
381 U8 ChainOffset; /* 0x02 */
382 U8 Function; /* 0x03 */
383 U16 Reserved2; /* 0x04 */
384 U8 Reserved3; /* 0x06 */
385 U8 MsgFlags; /* 0x07 */
388 U16 Reserved4; /* 0x0A */
389 U64 BufferAddress; /* 0x0C */
390 U32 BufferLength; /* 0x14 */
391 U32 Reserved5; /* 0x18 */
392 U32 Reserved6; /* 0x1C */
393 U32 Flags; /* 0x20 */
394 U32 ProductSpecific[23]; /* 0x24 */
395 } MPI2_DIAG_BUFFER_POST_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
396 Mpi2DiagBufferPostRequest_t, MPI2_POINTER pMpi2DiagBufferPostRequest_t;
398 /* values for the ExtendedType field */
399 #define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION (0x02)
401 /* values for the BufferType field */
402 #define MPI2_DIAG_BUF_TYPE_TRACE (0x00)
403 #define MPI2_DIAG_BUF_TYPE_SNAPSHOT (0x01)
404 #define MPI2_DIAG_BUF_TYPE_EXTENDED (0x02)
405 /* count of the number of buffer types */
406 #define MPI2_DIAG_BUF_TYPE_COUNT (0x03)
408 /* values for the Flags field */
409 #define MPI2_DIAG_BUF_FLAG_RELEASE_ON_FULL (0x00000002)
410 #define MPI2_DIAG_BUF_FLAG_IMMEDIATE_RELEASE (0x00000001)
413 /****************************************************************************
414 * Diagnostic Buffer Post reply
415 ****************************************************************************/
417 typedef struct _MPI2_DIAG_BUFFER_POST_REPLY
419 U8 ExtendedType; /* 0x00 */
420 U8 BufferType; /* 0x01 */
421 U8 MsgLength; /* 0x02 */
422 U8 Function; /* 0x03 */
423 U16 Reserved2; /* 0x04 */
424 U8 Reserved3; /* 0x06 */
425 U8 MsgFlags; /* 0x07 */
428 U16 Reserved4; /* 0x0A */
429 U16 Reserved5; /* 0x0C */
430 U16 IOCStatus; /* 0x0E */
431 U32 IOCLogInfo; /* 0x10 */
432 U32 TransferLength; /* 0x14 */
433 } MPI2_DIAG_BUFFER_POST_REPLY, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REPLY,
434 Mpi2DiagBufferPostReply_t, MPI2_POINTER pMpi2DiagBufferPostReply_t;
437 /****************************************************************************
438 * Diagnostic Release request
439 ****************************************************************************/
441 typedef struct _MPI2_DIAG_RELEASE_REQUEST
443 U8 Reserved1; /* 0x00 */
444 U8 BufferType; /* 0x01 */
445 U8 ChainOffset; /* 0x02 */
446 U8 Function; /* 0x03 */
447 U16 Reserved2; /* 0x04 */
448 U8 Reserved3; /* 0x06 */
449 U8 MsgFlags; /* 0x07 */
452 U16 Reserved4; /* 0x0A */
453 } MPI2_DIAG_RELEASE_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REQUEST,
454 Mpi2DiagReleaseRequest_t, MPI2_POINTER pMpi2DiagReleaseRequest_t;
457 /****************************************************************************
458 * Diagnostic Buffer Post reply
459 ****************************************************************************/
461 typedef struct _MPI2_DIAG_RELEASE_REPLY
463 U8 Reserved1; /* 0x00 */
464 U8 BufferType; /* 0x01 */
465 U8 MsgLength; /* 0x02 */
466 U8 Function; /* 0x03 */
467 U16 Reserved2; /* 0x04 */
468 U8 Reserved3; /* 0x06 */
469 U8 MsgFlags; /* 0x07 */
472 U16 Reserved4; /* 0x0A */
473 U16 Reserved5; /* 0x0C */
474 U16 IOCStatus; /* 0x0E */
475 U32 IOCLogInfo; /* 0x10 */
476 } MPI2_DIAG_RELEASE_REPLY, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REPLY,
477 Mpi2DiagReleaseReply_t, MPI2_POINTER pMpi2DiagReleaseReply_t;