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.11
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 * --------------------------------------------------------------------------
39 /*****************************************************************************
43 *****************************************************************************/
45 /* defines for the Tools */
46 #define MPI2_TOOLBOX_CLEAN_TOOL (0x00)
47 #define MPI2_TOOLBOX_MEMORY_MOVE_TOOL (0x01)
48 #define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL (0x02)
49 #define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)
50 #define MPI2_TOOLBOX_BEACON_TOOL (0x05)
51 #define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL (0x06)
52 #define MPI2_TOOLBOX_TEXT_DISPLAY_TOOL (0x07)
55 /****************************************************************************
57 ****************************************************************************/
59 typedef struct _MPI2_TOOLBOX_REPLY
62 U8 Reserved1; /* 0x01 */
63 U8 MsgLength; /* 0x02 */
64 U8 Function; /* 0x03 */
65 U16 Reserved2; /* 0x04 */
66 U8 Reserved3; /* 0x06 */
67 U8 MsgFlags; /* 0x07 */
70 U16 Reserved4; /* 0x0A */
71 U16 Reserved5; /* 0x0C */
72 U16 IOCStatus; /* 0x0E */
73 U32 IOCLogInfo; /* 0x10 */
74 } MPI2_TOOLBOX_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_REPLY,
75 Mpi2ToolboxReply_t, MPI2_POINTER pMpi2ToolboxReply_t;
78 /****************************************************************************
79 * Toolbox Clean Tool request
80 ****************************************************************************/
82 typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST
85 U8 Reserved1; /* 0x01 */
86 U8 ChainOffset; /* 0x02 */
87 U8 Function; /* 0x03 */
88 U16 Reserved2; /* 0x04 */
89 U8 Reserved3; /* 0x06 */
90 U8 MsgFlags; /* 0x07 */
93 U16 Reserved4; /* 0x0A */
95 } MPI2_TOOLBOX_CLEAN_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
96 Mpi2ToolboxCleanRequest_t, MPI2_POINTER pMpi2ToolboxCleanRequest_t;
98 /* values for the Flags field */
99 #define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES (0x80000000)
100 #define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES (0x40000000)
101 #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES (0x20000000)
102 #define MPI2_TOOLBOX_CLEAN_FW_CURRENT (0x10000000)
103 #define MPI2_TOOLBOX_CLEAN_FW_BACKUP (0x08000000)
104 #define MPI2_TOOLBOX_CLEAN_MEGARAID (0x02000000)
105 #define MPI2_TOOLBOX_CLEAN_INITIALIZATION (0x01000000)
106 #define MPI2_TOOLBOX_CLEAN_FLASH (0x00000004)
107 #define MPI2_TOOLBOX_CLEAN_SEEPROM (0x00000002)
108 #define MPI2_TOOLBOX_CLEAN_NVSRAM (0x00000001)
111 /****************************************************************************
112 * Toolbox Memory Move request
113 ****************************************************************************/
115 typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST {
117 U8 Reserved1; /* 0x01 */
118 U8 ChainOffset; /* 0x02 */
119 U8 Function; /* 0x03 */
120 U16 Reserved2; /* 0x04 */
121 U8 Reserved3; /* 0x06 */
122 U8 MsgFlags; /* 0x07 */
125 U16 Reserved4; /* 0x0A */
126 MPI2_SGE_SIMPLE_UNION SGL; /* 0x0C */
127 } MPI2_TOOLBOX_MEM_MOVE_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
128 Mpi2ToolboxMemMoveRequest_t, MPI2_POINTER pMpi2ToolboxMemMoveRequest_t;
131 /****************************************************************************
132 * Toolbox Diagnostic Data Upload request
133 ****************************************************************************/
135 typedef struct _MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST {
137 U8 Reserved1; /* 0x01 */
138 U8 ChainOffset; /* 0x02 */
139 U8 Function; /* 0x03 */
140 U16 Reserved2; /* 0x04 */
141 U8 Reserved3; /* 0x06 */
142 U8 MsgFlags; /* 0x07 */
145 U16 Reserved4; /* 0x0A */
146 U8 SGLFlags; /* 0x0C */
147 U8 Reserved5; /* 0x0D */
148 U16 Reserved6; /* 0x0E */
149 U32 Flags; /* 0x10 */
150 U32 DataLength; /* 0x14 */
151 MPI2_SGE_SIMPLE_UNION SGL; /* 0x18 */
152 } MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
153 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
154 Mpi2ToolboxDiagDataUploadRequest_t,
155 MPI2_POINTER pMpi2ToolboxDiagDataUploadRequest_t;
157 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
160 typedef struct _MPI2_DIAG_DATA_UPLOAD_HEADER {
161 U32 DiagDataLength; /* 00h */
162 U8 FormatCode; /* 04h */
163 U8 Reserved1; /* 05h */
164 U16 Reserved2; /* 06h */
165 } MPI2_DIAG_DATA_UPLOAD_HEADER, MPI2_POINTER PTR_MPI2_DIAG_DATA_UPLOAD_HEADER,
166 Mpi2DiagDataUploadHeader_t, MPI2_POINTER pMpi2DiagDataUploadHeader_t;
169 /****************************************************************************
170 * Toolbox ISTWI Read Write Tool
171 ****************************************************************************/
173 /* Toolbox ISTWI Read Write Tool request message */
174 typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST {
176 U8 Reserved1; /* 0x01 */
177 U8 ChainOffset; /* 0x02 */
178 U8 Function; /* 0x03 */
179 U16 Reserved2; /* 0x04 */
180 U8 Reserved3; /* 0x06 */
181 U8 MsgFlags; /* 0x07 */
184 U16 Reserved4; /* 0x0A */
185 U32 Reserved5; /* 0x0C */
186 U32 Reserved6; /* 0x10 */
187 U8 DevIndex; /* 0x14 */
188 U8 Action; /* 0x15 */
189 U8 SGLFlags; /* 0x16 */
191 U16 TxDataLength; /* 0x18 */
192 U16 RxDataLength; /* 0x1A */
193 U32 Reserved8; /* 0x1C */
194 U32 Reserved9; /* 0x20 */
195 U32 Reserved10; /* 0x24 */
196 U32 Reserved11; /* 0x28 */
197 U32 Reserved12; /* 0x2C */
198 MPI2_SGE_SIMPLE_UNION SGL; /* 0x30 */
199 } MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
200 MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
201 Mpi2ToolboxIstwiReadWriteRequest_t,
202 MPI2_POINTER pMpi2ToolboxIstwiReadWriteRequest_t;
204 /* values for the Action field */
205 #define MPI2_TOOL_ISTWI_ACTION_READ_DATA (0x01)
206 #define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA (0x02)
207 #define MPI2_TOOL_ISTWI_ACTION_SEQUENCE (0x03)
208 #define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS (0x10)
209 #define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS (0x11)
210 #define MPI2_TOOL_ISTWI_ACTION_RESET (0x12)
212 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
214 /* values for the Flags field */
215 #define MPI2_TOOL_ISTWI_FLAG_AUTO_RESERVE_RELEASE (0x80)
216 #define MPI2_TOOL_ISTWI_FLAG_PAGE_ADDR_MASK (0x07)
218 /* Toolbox ISTWI Read Write Tool reply message */
219 typedef struct _MPI2_TOOLBOX_ISTWI_REPLY {
221 U8 Reserved1; /* 0x01 */
222 U8 MsgLength; /* 0x02 */
223 U8 Function; /* 0x03 */
224 U16 Reserved2; /* 0x04 */
225 U8 Reserved3; /* 0x06 */
226 U8 MsgFlags; /* 0x07 */
229 U16 Reserved4; /* 0x0A */
230 U16 Reserved5; /* 0x0C */
231 U16 IOCStatus; /* 0x0E */
232 U32 IOCLogInfo; /* 0x10 */
233 U8 DevIndex; /* 0x14 */
234 U8 Action; /* 0x15 */
235 U8 IstwiStatus; /* 0x16 */
236 U8 Reserved6; /* 0x17 */
237 U16 TxDataCount; /* 0x18 */
238 U16 RxDataCount; /* 0x1A */
239 } MPI2_TOOLBOX_ISTWI_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_REPLY,
240 Mpi2ToolboxIstwiReply_t, MPI2_POINTER pMpi2ToolboxIstwiReply_t;
243 /****************************************************************************
244 * Toolbox Beacon Tool request
245 ****************************************************************************/
247 typedef struct _MPI2_TOOLBOX_BEACON_REQUEST
250 U8 Reserved1; /* 0x01 */
251 U8 ChainOffset; /* 0x02 */
252 U8 Function; /* 0x03 */
253 U16 Reserved2; /* 0x04 */
254 U8 Reserved3; /* 0x06 */
255 U8 MsgFlags; /* 0x07 */
258 U16 Reserved4; /* 0x0A */
259 U8 Reserved5; /* 0x0C */
260 U8 PhysicalPort; /* 0x0D */
261 U8 Reserved6; /* 0x0E */
263 } MPI2_TOOLBOX_BEACON_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_BEACON_REQUEST,
264 Mpi2ToolboxBeaconRequest_t, MPI2_POINTER pMpi2ToolboxBeaconRequest_t;
266 /* values for the Flags field */
267 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF (0x00)
268 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON (0x01)
271 /****************************************************************************
272 * Toolbox Diagnostic CLI Tool
273 ****************************************************************************/
275 #define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH (0x5C)
277 /* MPI v2.0 Toolbox Diagnostic CLI Tool request message */
278 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
280 U8 Reserved1; /* 0x01 */
281 U8 ChainOffset; /* 0x02 */
282 U8 Function; /* 0x03 */
283 U16 Reserved2; /* 0x04 */
284 U8 Reserved3; /* 0x06 */
285 U8 MsgFlags; /* 0x07 */
288 U16 Reserved4; /* 0x0A */
289 U8 SGLFlags; /* 0x0C */
290 U8 Reserved5; /* 0x0D */
291 U16 Reserved6; /* 0x0E */
292 U32 DataLength; /* 0x10 */
293 U8 DiagnosticCliCommand
294 [MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH]; /* 0x14 */
295 MPI2_MPI_SGE_IO_UNION SGL; /* 0x70 */
296 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
297 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
298 Mpi2ToolboxDiagnosticCliRequest_t,
299 MPI2_POINTER pMpi2ToolboxDiagnosticCliRequest_t;
301 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
304 /* Toolbox Diagnostic CLI Tool reply message */
305 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY {
307 U8 Reserved1; /* 0x01 */
308 U8 MsgLength; /* 0x02 */
309 U8 Function; /* 0x03 */
310 U16 Reserved2; /* 0x04 */
311 U8 Reserved3; /* 0x06 */
312 U8 MsgFlags; /* 0x07 */
315 U16 Reserved4; /* 0x0A */
316 U16 Reserved5; /* 0x0C */
317 U16 IOCStatus; /* 0x0E */
318 U32 IOCLogInfo; /* 0x10 */
319 U32 ReturnedDataLength; /* 0x14 */
320 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
321 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
322 Mpi2ToolboxDiagnosticCliReply_t,
323 MPI2_POINTER pMpi2ToolboxDiagnosticCliReply_t;
326 /****************************************************************************
327 * Toolbox Console Text Display Tool
328 ****************************************************************************/
330 /* Toolbox Console Text Display Tool request message */
331 typedef struct _MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST {
333 U8 Reserved1; /* 0x01 */
334 U8 ChainOffset; /* 0x02 */
335 U8 Function; /* 0x03 */
336 U16 Reserved2; /* 0x04 */
337 U8 Reserved3; /* 0x06 */
338 U8 MsgFlags; /* 0x07 */
341 U16 Reserved4; /* 0x0A */
342 U8 Console; /* 0x0C */
344 U16 Reserved6; /* 0x0E */
345 U8 TextToDisplay[4]; /* 0x10 */
346 } MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
347 MPI2_POINTER PTR_MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
348 Mpi2ToolboxTextDisplayRequest_t,
349 MPI2_POINTER pMpi2ToolboxTextDisplayRequest_t;
351 /* defines for the Console field */
352 #define MPI2_TOOLBOX_CONSOLE_TYPE_MASK (0xF0)
353 #define MPI2_TOOLBOX_CONSOLE_TYPE_DEFAULT (0x00)
354 #define MPI2_TOOLBOX_CONSOLE_TYPE_UART (0x10)
355 #define MPI2_TOOLBOX_CONSOLE_TYPE_ETHERNET (0x20)
357 #define MPI2_TOOLBOX_CONSOLE_NUMBER_MASK (0x0F)
359 /* defines for the Flags field */
360 #define MPI2_TOOLBOX_CONSOLE_FLAG_TIMESTAMP (0x01)
364 /*****************************************************************************
366 * Diagnostic Buffer Messages
368 *****************************************************************************/
371 /****************************************************************************
372 * Diagnostic Buffer Post request
373 ****************************************************************************/
375 typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST
377 U8 ExtendedType; /* 0x00 */
378 U8 BufferType; /* 0x01 */
379 U8 ChainOffset; /* 0x02 */
380 U8 Function; /* 0x03 */
381 U16 Reserved2; /* 0x04 */
382 U8 Reserved3; /* 0x06 */
383 U8 MsgFlags; /* 0x07 */
386 U16 Reserved4; /* 0x0A */
387 U64 BufferAddress; /* 0x0C */
388 U32 BufferLength; /* 0x14 */
389 U32 Reserved5; /* 0x18 */
390 U32 Reserved6; /* 0x1C */
391 U32 Flags; /* 0x20 */
392 U32 ProductSpecific[23]; /* 0x24 */
393 } MPI2_DIAG_BUFFER_POST_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
394 Mpi2DiagBufferPostRequest_t, MPI2_POINTER pMpi2DiagBufferPostRequest_t;
396 /* values for the ExtendedType field */
397 #define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION (0x02)
399 /* values for the BufferType field */
400 #define MPI2_DIAG_BUF_TYPE_TRACE (0x00)
401 #define MPI2_DIAG_BUF_TYPE_SNAPSHOT (0x01)
402 #define MPI2_DIAG_BUF_TYPE_EXTENDED (0x02)
403 /* count of the number of buffer types */
404 #define MPI2_DIAG_BUF_TYPE_COUNT (0x03)
406 /* values for the Flags field */
407 #define MPI2_DIAG_BUF_FLAG_RELEASE_ON_FULL (0x00000002)
408 #define MPI2_DIAG_BUF_FLAG_IMMEDIATE_RELEASE (0x00000001)
411 /****************************************************************************
412 * Diagnostic Buffer Post reply
413 ****************************************************************************/
415 typedef struct _MPI2_DIAG_BUFFER_POST_REPLY
417 U8 ExtendedType; /* 0x00 */
418 U8 BufferType; /* 0x01 */
419 U8 MsgLength; /* 0x02 */
420 U8 Function; /* 0x03 */
421 U16 Reserved2; /* 0x04 */
422 U8 Reserved3; /* 0x06 */
423 U8 MsgFlags; /* 0x07 */
426 U16 Reserved4; /* 0x0A */
427 U16 Reserved5; /* 0x0C */
428 U16 IOCStatus; /* 0x0E */
429 U32 IOCLogInfo; /* 0x10 */
430 U32 TransferLength; /* 0x14 */
431 } MPI2_DIAG_BUFFER_POST_REPLY, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REPLY,
432 Mpi2DiagBufferPostReply_t, MPI2_POINTER pMpi2DiagBufferPostReply_t;
435 /****************************************************************************
436 * Diagnostic Release request
437 ****************************************************************************/
439 typedef struct _MPI2_DIAG_RELEASE_REQUEST
441 U8 Reserved1; /* 0x00 */
442 U8 BufferType; /* 0x01 */
443 U8 ChainOffset; /* 0x02 */
444 U8 Function; /* 0x03 */
445 U16 Reserved2; /* 0x04 */
446 U8 Reserved3; /* 0x06 */
447 U8 MsgFlags; /* 0x07 */
450 U16 Reserved4; /* 0x0A */
451 } MPI2_DIAG_RELEASE_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REQUEST,
452 Mpi2DiagReleaseRequest_t, MPI2_POINTER pMpi2DiagReleaseRequest_t;
455 /****************************************************************************
456 * Diagnostic Buffer Post reply
457 ****************************************************************************/
459 typedef struct _MPI2_DIAG_RELEASE_REPLY
461 U8 Reserved1; /* 0x00 */
462 U8 BufferType; /* 0x01 */
463 U8 MsgLength; /* 0x02 */
464 U8 Function; /* 0x03 */
465 U16 Reserved2; /* 0x04 */
466 U8 Reserved3; /* 0x06 */
467 U8 MsgFlags; /* 0x07 */
470 U16 Reserved4; /* 0x0A */
471 U16 Reserved5; /* 0x0C */
472 U16 IOCStatus; /* 0x0E */
473 U32 IOCLogInfo; /* 0x10 */
474 } MPI2_DIAG_RELEASE_REPLY, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REPLY,
475 Mpi2DiagReleaseReply_t, MPI2_POINTER pMpi2DiagReleaseReply_t;