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.06
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 * --------------------------------------------------------------------------
34 /*****************************************************************************
38 *****************************************************************************/
40 /* defines for the Tools */
41 #define MPI2_TOOLBOX_CLEAN_TOOL (0x00)
42 #define MPI2_TOOLBOX_MEMORY_MOVE_TOOL (0x01)
43 #define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL (0x02)
44 #define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)
45 #define MPI2_TOOLBOX_BEACON_TOOL (0x05)
46 #define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL (0x06)
49 /****************************************************************************
51 ****************************************************************************/
53 typedef struct _MPI2_TOOLBOX_REPLY
56 U8 Reserved1
; /* 0x01 */
57 U8 MsgLength
; /* 0x02 */
58 U8 Function
; /* 0x03 */
59 U16 Reserved2
; /* 0x04 */
60 U8 Reserved3
; /* 0x06 */
61 U8 MsgFlags
; /* 0x07 */
64 U16 Reserved4
; /* 0x0A */
65 U16 Reserved5
; /* 0x0C */
66 U16 IOCStatus
; /* 0x0E */
67 U32 IOCLogInfo
; /* 0x10 */
68 } MPI2_TOOLBOX_REPLY
, MPI2_POINTER PTR_MPI2_TOOLBOX_REPLY
,
69 Mpi2ToolboxReply_t
, MPI2_POINTER pMpi2ToolboxReply_t
;
72 /****************************************************************************
73 * Toolbox Clean Tool request
74 ****************************************************************************/
76 typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST
79 U8 Reserved1
; /* 0x01 */
80 U8 ChainOffset
; /* 0x02 */
81 U8 Function
; /* 0x03 */
82 U16 Reserved2
; /* 0x04 */
83 U8 Reserved3
; /* 0x06 */
84 U8 MsgFlags
; /* 0x07 */
87 U16 Reserved4
; /* 0x0A */
89 } MPI2_TOOLBOX_CLEAN_REQUEST
, MPI2_POINTER PTR_MPI2_TOOLBOX_CLEAN_REQUEST
,
90 Mpi2ToolboxCleanRequest_t
, MPI2_POINTER pMpi2ToolboxCleanRequest_t
;
92 /* values for the Flags field */
93 #define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES (0x80000000)
94 #define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES (0x40000000)
95 #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES (0x20000000)
96 #define MPI2_TOOLBOX_CLEAN_FW_CURRENT (0x10000000)
97 #define MPI2_TOOLBOX_CLEAN_FW_BACKUP (0x08000000)
98 #define MPI2_TOOLBOX_CLEAN_MEGARAID (0x02000000)
99 #define MPI2_TOOLBOX_CLEAN_INITIALIZATION (0x01000000)
100 #define MPI2_TOOLBOX_CLEAN_FLASH (0x00000004)
101 #define MPI2_TOOLBOX_CLEAN_SEEPROM (0x00000002)
102 #define MPI2_TOOLBOX_CLEAN_NVSRAM (0x00000001)
105 /****************************************************************************
106 * Toolbox Memory Move request
107 ****************************************************************************/
109 typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST
{
111 U8 Reserved1
; /* 0x01 */
112 U8 ChainOffset
; /* 0x02 */
113 U8 Function
; /* 0x03 */
114 U16 Reserved2
; /* 0x04 */
115 U8 Reserved3
; /* 0x06 */
116 U8 MsgFlags
; /* 0x07 */
119 U16 Reserved4
; /* 0x0A */
120 MPI2_SGE_SIMPLE_UNION SGL
; /* 0x0C */
121 } MPI2_TOOLBOX_MEM_MOVE_REQUEST
, MPI2_POINTER PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST
,
122 Mpi2ToolboxMemMoveRequest_t
, MPI2_POINTER pMpi2ToolboxMemMoveRequest_t
;
125 /****************************************************************************
126 * Toolbox Diagnostic Data Upload request
127 ****************************************************************************/
129 typedef struct _MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST
{
131 U8 Reserved1
; /* 0x01 */
132 U8 ChainOffset
; /* 0x02 */
133 U8 Function
; /* 0x03 */
134 U16 Reserved2
; /* 0x04 */
135 U8 Reserved3
; /* 0x06 */
136 U8 MsgFlags
; /* 0x07 */
139 U16 Reserved4
; /* 0x0A */
140 U8 SGLFlags
; /* 0x0C */
141 U8 Reserved5
; /* 0x0D */
142 U16 Reserved6
; /* 0x0E */
143 U32 Flags
; /* 0x10 */
144 U32 DataLength
; /* 0x14 */
145 MPI2_SGE_SIMPLE_UNION SGL
; /* 0x18 */
146 } MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST
,
147 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST
,
148 Mpi2ToolboxDiagDataUploadRequest_t
,
149 MPI2_POINTER pMpi2ToolboxDiagDataUploadRequest_t
;
151 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
154 typedef struct _MPI2_DIAG_DATA_UPLOAD_HEADER
{
155 U32 DiagDataLength
; /* 00h */
156 U8 FormatCode
; /* 04h */
157 U8 Reserved1
; /* 05h */
158 U16 Reserved2
; /* 06h */
159 } MPI2_DIAG_DATA_UPLOAD_HEADER
, MPI2_POINTER PTR_MPI2_DIAG_DATA_UPLOAD_HEADER
,
160 Mpi2DiagDataUploadHeader_t
, MPI2_POINTER pMpi2DiagDataUploadHeader_t
;
163 /****************************************************************************
164 * Toolbox ISTWI Read Write Tool
165 ****************************************************************************/
167 /* Toolbox ISTWI Read Write Tool request message */
168 typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST
{
170 U8 Reserved1
; /* 0x01 */
171 U8 ChainOffset
; /* 0x02 */
172 U8 Function
; /* 0x03 */
173 U16 Reserved2
; /* 0x04 */
174 U8 Reserved3
; /* 0x06 */
175 U8 MsgFlags
; /* 0x07 */
178 U16 Reserved4
; /* 0x0A */
179 U32 Reserved5
; /* 0x0C */
180 U32 Reserved6
; /* 0x10 */
181 U8 DevIndex
; /* 0x14 */
182 U8 Action
; /* 0x15 */
183 U8 SGLFlags
; /* 0x16 */
184 U8 Reserved7
; /* 0x17 */
185 U16 TxDataLength
; /* 0x18 */
186 U16 RxDataLength
; /* 0x1A */
187 U32 Reserved8
; /* 0x1C */
188 U32 Reserved9
; /* 0x20 */
189 U32 Reserved10
; /* 0x24 */
190 U32 Reserved11
; /* 0x28 */
191 U32 Reserved12
; /* 0x2C */
192 MPI2_SGE_SIMPLE_UNION SGL
; /* 0x30 */
193 } MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST
,
194 MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST
,
195 Mpi2ToolboxIstwiReadWriteRequest_t
,
196 MPI2_POINTER pMpi2ToolboxIstwiReadWriteRequest_t
;
198 /* values for the Action field */
199 #define MPI2_TOOL_ISTWI_ACTION_READ_DATA (0x01)
200 #define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA (0x02)
201 #define MPI2_TOOL_ISTWI_ACTION_SEQUENCE (0x03)
202 #define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS (0x10)
203 #define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS (0x11)
204 #define MPI2_TOOL_ISTWI_ACTION_RESET (0x12)
206 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
209 /* Toolbox ISTWI Read Write Tool reply message */
210 typedef struct _MPI2_TOOLBOX_ISTWI_REPLY
{
212 U8 Reserved1
; /* 0x01 */
213 U8 MsgLength
; /* 0x02 */
214 U8 Function
; /* 0x03 */
215 U16 Reserved2
; /* 0x04 */
216 U8 Reserved3
; /* 0x06 */
217 U8 MsgFlags
; /* 0x07 */
220 U16 Reserved4
; /* 0x0A */
221 U16 Reserved5
; /* 0x0C */
222 U16 IOCStatus
; /* 0x0E */
223 U32 IOCLogInfo
; /* 0x10 */
224 U8 DevIndex
; /* 0x14 */
225 U8 Action
; /* 0x15 */
226 U8 IstwiStatus
; /* 0x16 */
227 U8 Reserved6
; /* 0x17 */
228 U16 TxDataCount
; /* 0x18 */
229 U16 RxDataCount
; /* 0x1A */
230 } MPI2_TOOLBOX_ISTWI_REPLY
, MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_REPLY
,
231 Mpi2ToolboxIstwiReply_t
, MPI2_POINTER pMpi2ToolboxIstwiReply_t
;
234 /****************************************************************************
235 * Toolbox Beacon Tool request
236 ****************************************************************************/
238 typedef struct _MPI2_TOOLBOX_BEACON_REQUEST
241 U8 Reserved1
; /* 0x01 */
242 U8 ChainOffset
; /* 0x02 */
243 U8 Function
; /* 0x03 */
244 U16 Reserved2
; /* 0x04 */
245 U8 Reserved3
; /* 0x06 */
246 U8 MsgFlags
; /* 0x07 */
249 U16 Reserved4
; /* 0x0A */
250 U8 Reserved5
; /* 0x0C */
251 U8 PhysicalPort
; /* 0x0D */
252 U8 Reserved6
; /* 0x0E */
254 } MPI2_TOOLBOX_BEACON_REQUEST
, MPI2_POINTER PTR_MPI2_TOOLBOX_BEACON_REQUEST
,
255 Mpi2ToolboxBeaconRequest_t
, MPI2_POINTER pMpi2ToolboxBeaconRequest_t
;
257 /* values for the Flags field */
258 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF (0x00)
259 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON (0x01)
262 /****************************************************************************
263 * Toolbox Diagnostic CLI Tool
264 ****************************************************************************/
266 #define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH (0x5C)
268 /* Toolbox Diagnostic CLI Tool request message */
269 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
{
271 U8 Reserved1
; /* 0x01 */
272 U8 ChainOffset
; /* 0x02 */
273 U8 Function
; /* 0x03 */
274 U16 Reserved2
; /* 0x04 */
275 U8 Reserved3
; /* 0x06 */
276 U8 MsgFlags
; /* 0x07 */
279 U16 Reserved4
; /* 0x0A */
280 U8 SGLFlags
; /* 0x0C */
281 U8 Reserved5
; /* 0x0D */
282 U16 Reserved6
; /* 0x0E */
283 U32 DataLength
; /* 0x10 */
284 U8 DiagnosticCliCommand
285 [MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH
]; /* 0x14 */
286 MPI2_SGE_SIMPLE_UNION SGL
; /* 0x70 */
287 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
,
288 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
,
289 Mpi2ToolboxDiagnosticCliRequest_t
,
290 MPI2_POINTER pMpi2ToolboxDiagnosticCliRequest_t
;
292 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
295 /* Toolbox Diagnostic CLI Tool reply message */
296 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY
{
298 U8 Reserved1
; /* 0x01 */
299 U8 MsgLength
; /* 0x02 */
300 U8 Function
; /* 0x03 */
301 U16 Reserved2
; /* 0x04 */
302 U8 Reserved3
; /* 0x06 */
303 U8 MsgFlags
; /* 0x07 */
306 U16 Reserved4
; /* 0x0A */
307 U16 Reserved5
; /* 0x0C */
308 U16 IOCStatus
; /* 0x0E */
309 U32 IOCLogInfo
; /* 0x10 */
310 U32 ReturnedDataLength
; /* 0x14 */
311 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY
,
312 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY
,
313 Mpi2ToolboxDiagnosticCliReply_t
,
314 MPI2_POINTER pMpi2ToolboxDiagnosticCliReply_t
;
317 /*****************************************************************************
319 * Diagnostic Buffer Messages
321 *****************************************************************************/
324 /****************************************************************************
325 * Diagnostic Buffer Post request
326 ****************************************************************************/
328 typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST
330 U8 ExtendedType
; /* 0x00 */
331 U8 BufferType
; /* 0x01 */
332 U8 ChainOffset
; /* 0x02 */
333 U8 Function
; /* 0x03 */
334 U16 Reserved2
; /* 0x04 */
335 U8 Reserved3
; /* 0x06 */
336 U8 MsgFlags
; /* 0x07 */
339 U16 Reserved4
; /* 0x0A */
340 U64 BufferAddress
; /* 0x0C */
341 U32 BufferLength
; /* 0x14 */
342 U32 Reserved5
; /* 0x18 */
343 U32 Reserved6
; /* 0x1C */
344 U32 Flags
; /* 0x20 */
345 U32 ProductSpecific
[23]; /* 0x24 */
346 } MPI2_DIAG_BUFFER_POST_REQUEST
, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REQUEST
,
347 Mpi2DiagBufferPostRequest_t
, MPI2_POINTER pMpi2DiagBufferPostRequest_t
;
349 /* values for the ExtendedType field */
350 #define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION (0x02)
352 /* values for the BufferType field */
353 #define MPI2_DIAG_BUF_TYPE_TRACE (0x00)
354 #define MPI2_DIAG_BUF_TYPE_SNAPSHOT (0x01)
355 #define MPI2_DIAG_BUF_TYPE_EXTENDED (0x02)
356 /* count of the number of buffer types */
357 #define MPI2_DIAG_BUF_TYPE_COUNT (0x03)
359 /* values for the Flags field */
360 #define MPI2_DIAG_BUF_FLAG_RELEASE_ON_FULL (0x00000002)
361 #define MPI2_DIAG_BUF_FLAG_IMMEDIATE_RELEASE (0x00000001)
364 /****************************************************************************
365 * Diagnostic Buffer Post reply
366 ****************************************************************************/
368 typedef struct _MPI2_DIAG_BUFFER_POST_REPLY
370 U8 ExtendedType
; /* 0x00 */
371 U8 BufferType
; /* 0x01 */
372 U8 MsgLength
; /* 0x02 */
373 U8 Function
; /* 0x03 */
374 U16 Reserved2
; /* 0x04 */
375 U8 Reserved3
; /* 0x06 */
376 U8 MsgFlags
; /* 0x07 */
379 U16 Reserved4
; /* 0x0A */
380 U16 Reserved5
; /* 0x0C */
381 U16 IOCStatus
; /* 0x0E */
382 U32 IOCLogInfo
; /* 0x10 */
383 U32 TransferLength
; /* 0x14 */
384 } MPI2_DIAG_BUFFER_POST_REPLY
, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REPLY
,
385 Mpi2DiagBufferPostReply_t
, MPI2_POINTER pMpi2DiagBufferPostReply_t
;
388 /****************************************************************************
389 * Diagnostic Release request
390 ****************************************************************************/
392 typedef struct _MPI2_DIAG_RELEASE_REQUEST
394 U8 Reserved1
; /* 0x00 */
395 U8 BufferType
; /* 0x01 */
396 U8 ChainOffset
; /* 0x02 */
397 U8 Function
; /* 0x03 */
398 U16 Reserved2
; /* 0x04 */
399 U8 Reserved3
; /* 0x06 */
400 U8 MsgFlags
; /* 0x07 */
403 U16 Reserved4
; /* 0x0A */
404 } MPI2_DIAG_RELEASE_REQUEST
, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REQUEST
,
405 Mpi2DiagReleaseRequest_t
, MPI2_POINTER pMpi2DiagReleaseRequest_t
;
408 /****************************************************************************
409 * Diagnostic Buffer Post reply
410 ****************************************************************************/
412 typedef struct _MPI2_DIAG_RELEASE_REPLY
414 U8 Reserved1
; /* 0x00 */
415 U8 BufferType
; /* 0x01 */
416 U8 MsgLength
; /* 0x02 */
417 U8 Function
; /* 0x03 */
418 U16 Reserved2
; /* 0x04 */
419 U8 Reserved3
; /* 0x06 */
420 U8 MsgFlags
; /* 0x07 */
423 U16 Reserved4
; /* 0x0A */
424 U16 Reserved5
; /* 0x0C */
425 U16 IOCStatus
; /* 0x0E */
426 U32 IOCLogInfo
; /* 0x10 */
427 } MPI2_DIAG_RELEASE_REPLY
, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REPLY
,
428 Mpi2DiagReleaseReply_t
, MPI2_POINTER pMpi2DiagReleaseReply_t
;