2 * Copyright 2000-2014 Avago Technologies. All rights reserved.
6 * Title: MPI diagnostic tool structures and definitions
7 * Creation Date: March 26, 2007
9 * mpi2_tool.h Version: 02.00.13
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 * 11-18-11 02.00.08 Incorporating additions for MPI v2.5.
31 * 07-10-12 02.00.09 Add MPI v2.5 Toolbox Diagnostic CLI Tool Request
33 * 07-26-12 02.00.10 Modified MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST so that
34 * it uses MPI Chain SGE as well as MPI Simple SGE.
35 * 08-19-13 02.00.11 Added MPI2_TOOLBOX_TEXT_DISPLAY_TOOL and related info.
36 * 01-08-14 02.00.12 Added MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC.
37 * 11-18-14 02.00.13 Updated copyright information.
38 * --------------------------------------------------------------------------
44 /*****************************************************************************
48 *****************************************************************************/
50 /*defines for the Tools */
51 #define MPI2_TOOLBOX_CLEAN_TOOL (0x00)
52 #define MPI2_TOOLBOX_MEMORY_MOVE_TOOL (0x01)
53 #define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL (0x02)
54 #define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)
55 #define MPI2_TOOLBOX_BEACON_TOOL (0x05)
56 #define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL (0x06)
57 #define MPI2_TOOLBOX_TEXT_DISPLAY_TOOL (0x07)
59 /****************************************************************************
61 ****************************************************************************/
63 typedef struct _MPI2_TOOLBOX_REPLY
{
65 U8 Reserved1
; /*0x01 */
66 U8 MsgLength
; /*0x02 */
67 U8 Function
; /*0x03 */
68 U16 Reserved2
; /*0x04 */
69 U8 Reserved3
; /*0x06 */
70 U8 MsgFlags
; /*0x07 */
73 U16 Reserved4
; /*0x0A */
74 U16 Reserved5
; /*0x0C */
75 U16 IOCStatus
; /*0x0E */
76 U32 IOCLogInfo
; /*0x10 */
77 } MPI2_TOOLBOX_REPLY
, *PTR_MPI2_TOOLBOX_REPLY
,
78 Mpi2ToolboxReply_t
, *pMpi2ToolboxReply_t
;
80 /****************************************************************************
81 * Toolbox Clean Tool request
82 ****************************************************************************/
84 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
, *PTR_MPI2_TOOLBOX_CLEAN_REQUEST
,
97 Mpi2ToolboxCleanRequest_t
, *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)
112 /****************************************************************************
113 * Toolbox Memory Move request
114 ****************************************************************************/
116 typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST
{
118 U8 Reserved1
; /*0x01 */
119 U8 ChainOffset
; /*0x02 */
120 U8 Function
; /*0x03 */
121 U16 Reserved2
; /*0x04 */
122 U8 Reserved3
; /*0x06 */
123 U8 MsgFlags
; /*0x07 */
126 U16 Reserved4
; /*0x0A */
127 MPI2_SGE_SIMPLE_UNION SGL
; /*0x0C */
128 } MPI2_TOOLBOX_MEM_MOVE_REQUEST
, *PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST
,
129 Mpi2ToolboxMemMoveRequest_t
, *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 */
150 U32 DataLength
; /*0x14 */
151 MPI2_SGE_SIMPLE_UNION SGL
; /*0x18 */
152 } MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST
,
153 *PTR_MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST
,
154 Mpi2ToolboxDiagDataUploadRequest_t
,
155 *pMpi2ToolboxDiagDataUploadRequest_t
;
157 /*use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
159 typedef struct _MPI2_DIAG_DATA_UPLOAD_HEADER
{
160 U32 DiagDataLength
; /*00h */
161 U8 FormatCode
; /*04h */
162 U8 Reserved1
; /*05h */
163 U16 Reserved2
; /*06h */
164 } MPI2_DIAG_DATA_UPLOAD_HEADER
, *PTR_MPI2_DIAG_DATA_UPLOAD_HEADER
,
165 Mpi2DiagDataUploadHeader_t
, *pMpi2DiagDataUploadHeader_t
;
167 /****************************************************************************
168 * Toolbox ISTWI Read Write Tool
169 ****************************************************************************/
171 /*Toolbox ISTWI Read Write Tool request message */
172 typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST
{
174 U8 Reserved1
; /*0x01 */
175 U8 ChainOffset
; /*0x02 */
176 U8 Function
; /*0x03 */
177 U16 Reserved2
; /*0x04 */
178 U8 Reserved3
; /*0x06 */
179 U8 MsgFlags
; /*0x07 */
182 U16 Reserved4
; /*0x0A */
183 U32 Reserved5
; /*0x0C */
184 U32 Reserved6
; /*0x10 */
185 U8 DevIndex
; /*0x14 */
187 U8 SGLFlags
; /*0x16 */
189 U16 TxDataLength
; /*0x18 */
190 U16 RxDataLength
; /*0x1A */
191 U32 Reserved8
; /*0x1C */
192 U32 Reserved9
; /*0x20 */
193 U32 Reserved10
; /*0x24 */
194 U32 Reserved11
; /*0x28 */
195 U32 Reserved12
; /*0x2C */
196 MPI2_SGE_SIMPLE_UNION SGL
; /*0x30 */
197 } MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST
,
198 *PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST
,
199 Mpi2ToolboxIstwiReadWriteRequest_t
,
200 *pMpi2ToolboxIstwiReadWriteRequest_t
;
202 /*values for the Action field */
203 #define MPI2_TOOL_ISTWI_ACTION_READ_DATA (0x01)
204 #define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA (0x02)
205 #define MPI2_TOOL_ISTWI_ACTION_SEQUENCE (0x03)
206 #define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS (0x10)
207 #define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS (0x11)
208 #define MPI2_TOOL_ISTWI_ACTION_RESET (0x12)
210 /*use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
212 /*values for the Flags field */
213 #define MPI2_TOOL_ISTWI_FLAG_AUTO_RESERVE_RELEASE (0x80)
214 #define MPI2_TOOL_ISTWI_FLAG_PAGE_ADDR_MASK (0x07)
216 /*Toolbox ISTWI Read Write Tool reply message */
217 typedef struct _MPI2_TOOLBOX_ISTWI_REPLY
{
219 U8 Reserved1
; /*0x01 */
220 U8 MsgLength
; /*0x02 */
221 U8 Function
; /*0x03 */
222 U16 Reserved2
; /*0x04 */
223 U8 Reserved3
; /*0x06 */
224 U8 MsgFlags
; /*0x07 */
227 U16 Reserved4
; /*0x0A */
228 U16 Reserved5
; /*0x0C */
229 U16 IOCStatus
; /*0x0E */
230 U32 IOCLogInfo
; /*0x10 */
231 U8 DevIndex
; /*0x14 */
233 U8 IstwiStatus
; /*0x16 */
234 U8 Reserved6
; /*0x17 */
235 U16 TxDataCount
; /*0x18 */
236 U16 RxDataCount
; /*0x1A */
237 } MPI2_TOOLBOX_ISTWI_REPLY
, *PTR_MPI2_TOOLBOX_ISTWI_REPLY
,
238 Mpi2ToolboxIstwiReply_t
, *pMpi2ToolboxIstwiReply_t
;
240 /****************************************************************************
241 * Toolbox Beacon Tool request
242 ****************************************************************************/
244 typedef struct _MPI2_TOOLBOX_BEACON_REQUEST
{
246 U8 Reserved1
; /*0x01 */
247 U8 ChainOffset
; /*0x02 */
248 U8 Function
; /*0x03 */
249 U16 Reserved2
; /*0x04 */
250 U8 Reserved3
; /*0x06 */
251 U8 MsgFlags
; /*0x07 */
254 U16 Reserved4
; /*0x0A */
255 U8 Reserved5
; /*0x0C */
256 U8 PhysicalPort
; /*0x0D */
257 U8 Reserved6
; /*0x0E */
259 } MPI2_TOOLBOX_BEACON_REQUEST
, *PTR_MPI2_TOOLBOX_BEACON_REQUEST
,
260 Mpi2ToolboxBeaconRequest_t
, *pMpi2ToolboxBeaconRequest_t
;
262 /*values for the Flags field */
263 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF (0x00)
264 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON (0x01)
266 /****************************************************************************
267 * Toolbox Diagnostic CLI Tool
268 ****************************************************************************/
270 #define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH (0x5C)
272 /*MPI v2.0 Toolbox Diagnostic CLI Tool request message */
273 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
{
275 U8 Reserved1
; /*0x01 */
276 U8 ChainOffset
; /*0x02 */
277 U8 Function
; /*0x03 */
278 U16 Reserved2
; /*0x04 */
279 U8 Reserved3
; /*0x06 */
280 U8 MsgFlags
; /*0x07 */
283 U16 Reserved4
; /*0x0A */
284 U8 SGLFlags
; /*0x0C */
285 U8 Reserved5
; /*0x0D */
286 U16 Reserved6
; /*0x0E */
287 U32 DataLength
; /*0x10 */
288 U8 DiagnosticCliCommand
[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH
];/*0x14 */
289 MPI2_MPI_SGE_IO_UNION SGL
; /*0x70 */
290 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
,
291 *PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
,
292 Mpi2ToolboxDiagnosticCliRequest_t
,
293 *pMpi2ToolboxDiagnosticCliRequest_t
;
295 /*use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
297 /*MPI v2.5 Toolbox Diagnostic CLI Tool request message */
298 typedef struct _MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
{
300 U8 Reserved1
; /*0x01 */
301 U8 ChainOffset
; /*0x02 */
302 U8 Function
; /*0x03 */
303 U16 Reserved2
; /*0x04 */
304 U8 Reserved3
; /*0x06 */
305 U8 MsgFlags
; /*0x07 */
308 U16 Reserved4
; /*0x0A */
309 U32 Reserved5
; /*0x0C */
310 U32 DataLength
; /*0x10 */
311 U8 DiagnosticCliCommand
[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH
];/*0x14 */
312 MPI25_SGE_IO_UNION SGL
; /* 0x70 */
313 } MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
,
314 *PTR_MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
,
315 Mpi25ToolboxDiagnosticCliRequest_t
,
316 *pMpi25ToolboxDiagnosticCliRequest_t
;
318 /*Toolbox Diagnostic CLI Tool reply message */
319 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY
{
321 U8 Reserved1
; /*0x01 */
322 U8 MsgLength
; /*0x02 */
323 U8 Function
; /*0x03 */
324 U16 Reserved2
; /*0x04 */
325 U8 Reserved3
; /*0x06 */
326 U8 MsgFlags
; /*0x07 */
329 U16 Reserved4
; /*0x0A */
330 U16 Reserved5
; /*0x0C */
331 U16 IOCStatus
; /*0x0E */
332 U32 IOCLogInfo
; /*0x10 */
333 U32 ReturnedDataLength
; /*0x14 */
334 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY
,
335 *PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY
,
336 Mpi2ToolboxDiagnosticCliReply_t
,
337 *pMpi2ToolboxDiagnosticCliReply_t
;
340 /****************************************************************************
341 * Toolbox Console Text Display Tool
342 ****************************************************************************/
344 /* Toolbox Console Text Display Tool request message */
345 typedef struct _MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST
{
347 U8 Reserved1
; /* 0x01 */
348 U8 ChainOffset
; /* 0x02 */
349 U8 Function
; /* 0x03 */
350 U16 Reserved2
; /* 0x04 */
351 U8 Reserved3
; /* 0x06 */
352 U8 MsgFlags
; /* 0x07 */
355 U16 Reserved4
; /* 0x0A */
356 U8 Console
; /* 0x0C */
358 U16 Reserved6
; /* 0x0E */
359 U8 TextToDisplay
[4]; /* 0x10 */
360 } MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST
,
361 *PTR_MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST
,
362 Mpi2ToolboxTextDisplayRequest_t
,
363 *pMpi2ToolboxTextDisplayRequest_t
;
365 /* defines for the Console field */
366 #define MPI2_TOOLBOX_CONSOLE_TYPE_MASK (0xF0)
367 #define MPI2_TOOLBOX_CONSOLE_TYPE_DEFAULT (0x00)
368 #define MPI2_TOOLBOX_CONSOLE_TYPE_UART (0x10)
369 #define MPI2_TOOLBOX_CONSOLE_TYPE_ETHERNET (0x20)
371 #define MPI2_TOOLBOX_CONSOLE_NUMBER_MASK (0x0F)
373 /* defines for the Flags field */
374 #define MPI2_TOOLBOX_CONSOLE_FLAG_TIMESTAMP (0x01)
378 /*****************************************************************************
380 * Diagnostic Buffer Messages
382 *****************************************************************************/
384 /****************************************************************************
385 * Diagnostic Buffer Post request
386 ****************************************************************************/
388 typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST
{
389 U8 ExtendedType
; /*0x00 */
390 U8 BufferType
; /*0x01 */
391 U8 ChainOffset
; /*0x02 */
392 U8 Function
; /*0x03 */
393 U16 Reserved2
; /*0x04 */
394 U8 Reserved3
; /*0x06 */
395 U8 MsgFlags
; /*0x07 */
398 U16 Reserved4
; /*0x0A */
399 U64 BufferAddress
; /*0x0C */
400 U32 BufferLength
; /*0x14 */
401 U32 Reserved5
; /*0x18 */
402 U32 Reserved6
; /*0x1C */
404 U32 ProductSpecific
[23]; /*0x24 */
405 } MPI2_DIAG_BUFFER_POST_REQUEST
, *PTR_MPI2_DIAG_BUFFER_POST_REQUEST
,
406 Mpi2DiagBufferPostRequest_t
, *pMpi2DiagBufferPostRequest_t
;
408 /*values for the ExtendedType field */
409 #define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION (0x02)
411 /*values for the BufferType field */
412 #define MPI2_DIAG_BUF_TYPE_TRACE (0x00)
413 #define MPI2_DIAG_BUF_TYPE_SNAPSHOT (0x01)
414 #define MPI2_DIAG_BUF_TYPE_EXTENDED (0x02)
415 /*count of the number of buffer types */
416 #define MPI2_DIAG_BUF_TYPE_COUNT (0x03)
418 /*values for the Flags field */
419 #define MPI2_DIAG_BUF_FLAG_RELEASE_ON_FULL (0x00000002)
420 #define MPI2_DIAG_BUF_FLAG_IMMEDIATE_RELEASE (0x00000001)
422 /****************************************************************************
423 * Diagnostic Buffer Post reply
424 ****************************************************************************/
426 typedef struct _MPI2_DIAG_BUFFER_POST_REPLY
{
427 U8 ExtendedType
; /*0x00 */
428 U8 BufferType
; /*0x01 */
429 U8 MsgLength
; /*0x02 */
430 U8 Function
; /*0x03 */
431 U16 Reserved2
; /*0x04 */
432 U8 Reserved3
; /*0x06 */
433 U8 MsgFlags
; /*0x07 */
436 U16 Reserved4
; /*0x0A */
437 U16 Reserved5
; /*0x0C */
438 U16 IOCStatus
; /*0x0E */
439 U32 IOCLogInfo
; /*0x10 */
440 U32 TransferLength
; /*0x14 */
441 } MPI2_DIAG_BUFFER_POST_REPLY
, *PTR_MPI2_DIAG_BUFFER_POST_REPLY
,
442 Mpi2DiagBufferPostReply_t
, *pMpi2DiagBufferPostReply_t
;
444 /****************************************************************************
445 * Diagnostic Release request
446 ****************************************************************************/
448 typedef struct _MPI2_DIAG_RELEASE_REQUEST
{
449 U8 Reserved1
; /*0x00 */
450 U8 BufferType
; /*0x01 */
451 U8 ChainOffset
; /*0x02 */
452 U8 Function
; /*0x03 */
453 U16 Reserved2
; /*0x04 */
454 U8 Reserved3
; /*0x06 */
455 U8 MsgFlags
; /*0x07 */
458 U16 Reserved4
; /*0x0A */
459 } MPI2_DIAG_RELEASE_REQUEST
, *PTR_MPI2_DIAG_RELEASE_REQUEST
,
460 Mpi2DiagReleaseRequest_t
, *pMpi2DiagReleaseRequest_t
;
462 /****************************************************************************
463 * Diagnostic Buffer Post reply
464 ****************************************************************************/
466 typedef struct _MPI2_DIAG_RELEASE_REPLY
{
467 U8 Reserved1
; /*0x00 */
468 U8 BufferType
; /*0x01 */
469 U8 MsgLength
; /*0x02 */
470 U8 Function
; /*0x03 */
471 U16 Reserved2
; /*0x04 */
472 U8 Reserved3
; /*0x06 */
473 U8 MsgFlags
; /*0x07 */
476 U16 Reserved4
; /*0x0A */
477 U16 Reserved5
; /*0x0C */
478 U16 IOCStatus
; /*0x0E */
479 U32 IOCLogInfo
; /*0x10 */
480 } MPI2_DIAG_RELEASE_REPLY
, *PTR_MPI2_DIAG_RELEASE_REPLY
,
481 Mpi2DiagReleaseReply_t
, *pMpi2DiagReleaseReply_t
;