1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47#ifndef MPI2_TOOL_H
48#define MPI2_TOOL_H
49
50
51
52
53
54
55
56
57#define MPI2_TOOLBOX_CLEAN_TOOL (0x00)
58#define MPI2_TOOLBOX_MEMORY_MOVE_TOOL (0x01)
59#define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL (0x02)
60#define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)
61#define MPI2_TOOLBOX_BEACON_TOOL (0x05)
62#define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL (0x06)
63#define MPI2_TOOLBOX_TEXT_DISPLAY_TOOL (0x07)
64#define MPI26_TOOLBOX_BACKEND_PCIE_LANE_MARGIN (0x08)
65
66
67
68
69
70typedef struct _MPI2_TOOLBOX_REPLY {
71 U8 Tool;
72 U8 Reserved1;
73 U8 MsgLength;
74 U8 Function;
75 U16 Reserved2;
76 U8 Reserved3;
77 U8 MsgFlags;
78 U8 VP_ID;
79 U8 VF_ID;
80 U16 Reserved4;
81 U16 Reserved5;
82 U16 IOCStatus;
83 U32 IOCLogInfo;
84} MPI2_TOOLBOX_REPLY, *PTR_MPI2_TOOLBOX_REPLY,
85 Mpi2ToolboxReply_t, *pMpi2ToolboxReply_t;
86
87
88
89
90
91typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST {
92 U8 Tool;
93 U8 Reserved1;
94 U8 ChainOffset;
95 U8 Function;
96 U16 Reserved2;
97 U8 Reserved3;
98 U8 MsgFlags;
99 U8 VP_ID;
100 U8 VF_ID;
101 U16 Reserved4;
102 U32 Flags;
103} MPI2_TOOLBOX_CLEAN_REQUEST, *PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
104 Mpi2ToolboxCleanRequest_t, *pMpi2ToolboxCleanRequest_t;
105
106
107#define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES (0x80000000)
108#define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES (0x40000000)
109#define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES (0x20000000)
110#define MPI2_TOOLBOX_CLEAN_FW_CURRENT (0x10000000)
111#define MPI2_TOOLBOX_CLEAN_FW_BACKUP (0x08000000)
112#define MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC (0x04000000)
113#define MPI2_TOOLBOX_CLEAN_MEGARAID (0x02000000)
114#define MPI2_TOOLBOX_CLEAN_INITIALIZATION (0x01000000)
115#define MPI2_TOOLBOX_CLEAN_SBR (0x00800000)
116#define MPI2_TOOLBOX_CLEAN_SBR_BACKUP (0x00400000)
117#define MPI2_TOOLBOX_CLEAN_HIIM (0x00200000)
118#define MPI2_TOOLBOX_CLEAN_HIIA (0x00100000)
119#define MPI2_TOOLBOX_CLEAN_CTLR (0x00080000)
120#define MPI2_TOOLBOX_CLEAN_IMR_FIRMWARE (0x00040000)
121#define MPI2_TOOLBOX_CLEAN_MR_NVDATA (0x00020000)
122#define MPI2_TOOLBOX_CLEAN_RESERVED_5_16 (0x0001FFE0)
123#define MPI2_TOOLBOX_CLEAN_ALL_BUT_MPB (0x00000010)
124#define MPI2_TOOLBOX_CLEAN_ENTIRE_FLASH (0x00000008)
125#define MPI2_TOOLBOX_CLEAN_FLASH (0x00000004)
126#define MPI2_TOOLBOX_CLEAN_SEEPROM (0x00000002)
127#define MPI2_TOOLBOX_CLEAN_NVSRAM (0x00000001)
128
129
130
131
132
133typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST {
134 U8 Tool;
135 U8 Reserved1;
136 U8 ChainOffset;
137 U8 Function;
138 U16 Reserved2;
139 U8 Reserved3;
140 U8 MsgFlags;
141 U8 VP_ID;
142 U8 VF_ID;
143 U16 Reserved4;
144 MPI2_SGE_SIMPLE_UNION SGL;
145} MPI2_TOOLBOX_MEM_MOVE_REQUEST, *PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
146 Mpi2ToolboxMemMoveRequest_t, *pMpi2ToolboxMemMoveRequest_t;
147
148
149
150
151
152typedef struct _MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST {
153 U8 Tool;
154 U8 Reserved1;
155 U8 ChainOffset;
156 U8 Function;
157 U16 Reserved2;
158 U8 Reserved3;
159 U8 MsgFlags;
160 U8 VP_ID;
161 U8 VF_ID;
162 U16 Reserved4;
163 U8 SGLFlags;
164 U8 Reserved5;
165 U16 Reserved6;
166 U32 Flags;
167 U32 DataLength;
168 MPI2_SGE_SIMPLE_UNION SGL;
169} MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
170 *PTR_MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
171 Mpi2ToolboxDiagDataUploadRequest_t,
172 *pMpi2ToolboxDiagDataUploadRequest_t;
173
174
175
176typedef struct _MPI2_DIAG_DATA_UPLOAD_HEADER {
177 U32 DiagDataLength;
178 U8 FormatCode;
179 U8 Reserved1;
180 U16 Reserved2;
181} MPI2_DIAG_DATA_UPLOAD_HEADER, *PTR_MPI2_DIAG_DATA_UPLOAD_HEADER,
182 Mpi2DiagDataUploadHeader_t, *pMpi2DiagDataUploadHeader_t;
183
184
185
186
187
188
189typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST {
190 U8 Tool;
191 U8 Reserved1;
192 U8 ChainOffset;
193 U8 Function;
194 U16 Reserved2;
195 U8 Reserved3;
196 U8 MsgFlags;
197 U8 VP_ID;
198 U8 VF_ID;
199 U16 Reserved4;
200 U32 Reserved5;
201 U32 Reserved6;
202 U8 DevIndex;
203 U8 Action;
204 U8 SGLFlags;
205 U8 Flags;
206 U16 TxDataLength;
207 U16 RxDataLength;
208 U32 Reserved8;
209 U32 Reserved9;
210 U32 Reserved10;
211 U32 Reserved11;
212 U32 Reserved12;
213 MPI2_SGE_SIMPLE_UNION SGL;
214} MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
215 *PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
216 Mpi2ToolboxIstwiReadWriteRequest_t,
217 *pMpi2ToolboxIstwiReadWriteRequest_t;
218
219
220#define MPI2_TOOL_ISTWI_ACTION_READ_DATA (0x01)
221#define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA (0x02)
222#define MPI2_TOOL_ISTWI_ACTION_SEQUENCE (0x03)
223#define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS (0x10)
224#define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS (0x11)
225#define MPI2_TOOL_ISTWI_ACTION_RESET (0x12)
226
227
228
229
230#define MPI2_TOOL_ISTWI_FLAG_AUTO_RESERVE_RELEASE (0x80)
231#define MPI2_TOOL_ISTWI_FLAG_PAGE_ADDR_MASK (0x07)
232
233
234#define MPI26_TOOL_ISTWI_MSGFLG_ADDR_MASK (0x01)
235
236#define MPI26_TOOL_ISTWI_MSGFLG_ADDR_INDEX (0x00)
237
238#define MPI26_TOOL_ISTWI_MSGFLG_ADDR_INFO (0x01)
239
240
241typedef struct _MPI2_TOOLBOX_ISTWI_REPLY {
242 U8 Tool;
243 U8 Reserved1;
244 U8 MsgLength;
245 U8 Function;
246 U16 Reserved2;
247 U8 Reserved3;
248 U8 MsgFlags;
249 U8 VP_ID;
250 U8 VF_ID;
251 U16 Reserved4;
252 U16 Reserved5;
253 U16 IOCStatus;
254 U32 IOCLogInfo;
255 U8 DevIndex;
256 U8 Action;
257 U8 IstwiStatus;
258 U8 Reserved6;
259 U16 TxDataCount;
260 U16 RxDataCount;
261} MPI2_TOOLBOX_ISTWI_REPLY, *PTR_MPI2_TOOLBOX_ISTWI_REPLY,
262 Mpi2ToolboxIstwiReply_t, *pMpi2ToolboxIstwiReply_t;
263
264
265
266
267
268typedef struct _MPI2_TOOLBOX_BEACON_REQUEST {
269 U8 Tool;
270 U8 Reserved1;
271 U8 ChainOffset;
272 U8 Function;
273 U16 Reserved2;
274 U8 Reserved3;
275 U8 MsgFlags;
276 U8 VP_ID;
277 U8 VF_ID;
278 U16 Reserved4;
279 U8 Reserved5;
280 U8 PhysicalPort;
281 U8 Reserved6;
282 U8 Flags;
283} MPI2_TOOLBOX_BEACON_REQUEST, *PTR_MPI2_TOOLBOX_BEACON_REQUEST,
284 Mpi2ToolboxBeaconRequest_t, *pMpi2ToolboxBeaconRequest_t;
285
286
287#define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF (0x00)
288#define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON (0x01)
289
290
291
292
293
294#define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH (0x5C)
295
296
297typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
298 U8 Tool;
299 U8 Reserved1;
300 U8 ChainOffset;
301 U8 Function;
302 U16 Reserved2;
303 U8 Reserved3;
304 U8 MsgFlags;
305 U8 VP_ID;
306 U8 VF_ID;
307 U16 Reserved4;
308 U8 SGLFlags;
309 U8 Reserved5;
310 U16 Reserved6;
311 U32 DataLength;
312 U8 DiagnosticCliCommand[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH];
313 MPI2_MPI_SGE_IO_UNION SGL;
314} MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
315 *PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
316 Mpi2ToolboxDiagnosticCliRequest_t,
317 *pMpi2ToolboxDiagnosticCliRequest_t;
318
319
320
321
322typedef struct _MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
323 U8 Tool;
324 U8 Reserved1;
325 U8 ChainOffset;
326 U8 Function;
327 U16 Reserved2;
328 U8 Reserved3;
329 U8 MsgFlags;
330 U8 VP_ID;
331 U8 VF_ID;
332 U16 Reserved4;
333 U32 Reserved5;
334 U32 DataLength;
335 U8 DiagnosticCliCommand[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH];
336 MPI25_SGE_IO_UNION SGL;
337} MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
338 *PTR_MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
339 Mpi25ToolboxDiagnosticCliRequest_t,
340 *pMpi25ToolboxDiagnosticCliRequest_t;
341
342
343typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY {
344 U8 Tool;
345 U8 Reserved1;
346 U8 MsgLength;
347 U8 Function;
348 U16 Reserved2;
349 U8 Reserved3;
350 U8 MsgFlags;
351 U8 VP_ID;
352 U8 VF_ID;
353 U16 Reserved4;
354 U16 Reserved5;
355 U16 IOCStatus;
356 U32 IOCLogInfo;
357 U32 ReturnedDataLength;
358} MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
359 *PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
360 Mpi2ToolboxDiagnosticCliReply_t,
361 *pMpi2ToolboxDiagnosticCliReply_t;
362
363
364
365
366
367
368
369typedef struct _MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST {
370 U8 Tool;
371 U8 Reserved1;
372 U8 ChainOffset;
373 U8 Function;
374 U16 Reserved2;
375 U8 Reserved3;
376 U8 MsgFlags;
377 U8 VP_ID;
378 U8 VF_ID;
379 U16 Reserved4;
380 U8 Console;
381 U8 Flags;
382 U16 Reserved6;
383 U8 TextToDisplay[4];
384} MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
385*PTR_MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
386Mpi2ToolboxTextDisplayRequest_t,
387*pMpi2ToolboxTextDisplayRequest_t;
388
389
390#define MPI2_TOOLBOX_CONSOLE_TYPE_MASK (0xF0)
391#define MPI2_TOOLBOX_CONSOLE_TYPE_DEFAULT (0x00)
392#define MPI2_TOOLBOX_CONSOLE_TYPE_UART (0x10)
393#define MPI2_TOOLBOX_CONSOLE_TYPE_ETHERNET (0x20)
394
395#define MPI2_TOOLBOX_CONSOLE_NUMBER_MASK (0x0F)
396
397
398#define MPI2_TOOLBOX_CONSOLE_FLAG_TIMESTAMP (0x01)
399
400
401
402
403
404
405
406
407typedef struct _MPI26_TOOLBOX_LANE_MARGIN_REQUEST {
408 U8 Tool;
409 U8 Reserved1;
410 U8 ChainOffset;
411 U8 Function;
412 U16 Reserved2;
413 U8 Reserved3;
414 U8 MsgFlags;
415 U8 VP_ID;
416 U8 VF_ID;
417 U16 Reserved4;
418 U8 Command;
419 U8 SwitchPort;
420 U16 DevHandle;
421 U8 RegisterOffset;
422 U8 Reserved5;
423 U16 DataLength;
424 MPI25_SGE_IO_UNION SGL;
425} MPI26_TOOLBOX_LANE_MARGINING_REQUEST,
426 *PTR_MPI2_TOOLBOX_LANE_MARGINING_REQUEST,
427 Mpi26ToolboxLaneMarginingRequest_t,
428 *pMpi2ToolboxLaneMarginingRequest_t;
429
430
431#define MPI26_TOOL_MARGIN_COMMAND_ENTER_MARGIN_MODE (0x01)
432#define MPI26_TOOL_MARGIN_COMMAND_READ_REGISTER_DATA (0x02)
433#define MPI26_TOOL_MARGIN_COMMAND_WRITE_REGISTER_DATA (0x03)
434#define MPI26_TOOL_MARGIN_COMMAND_EXIT_MARGIN_MODE (0x04)
435
436
437
438typedef struct _MPI26_TOOLBOX_LANE_MARGIN_REPLY {
439 U8 Tool;
440 U8 Reserved1;
441 U8 MsgLength;
442 U8 Function;
443 U16 Reserved2;
444 U8 Reserved3;
445 U8 MsgFlags;
446 U8 VP_ID;
447 U8 VF_ID;
448 U16 Reserved4;
449 U16 Reserved5;
450 U16 IOCStatus;
451 U32 IOCLogInfo;
452 U16 ReturnedDataLength;
453 U16 Reserved6;
454} MPI26_TOOLBOX_LANE_MARGINING_REPLY,
455 *PTR_MPI26_TOOLBOX_LANE_MARGINING_REPLY,
456 Mpi26ToolboxLaneMarginingReply_t,
457 *pMpi26ToolboxLaneMarginingReply_t;
458
459
460
461
462
463
464
465
466
467
468
469
470typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST {
471 U8 ExtendedType;
472 U8 BufferType;
473 U8 ChainOffset;
474 U8 Function;
475 U16 Reserved2;
476 U8 Reserved3;
477 U8 MsgFlags;
478 U8 VP_ID;
479 U8 VF_ID;
480 U16 Reserved4;
481 U64 BufferAddress;
482 U32 BufferLength;
483 U32 Reserved5;
484 U32 Reserved6;
485 U32 Flags;
486 U32 ProductSpecific[23];
487} MPI2_DIAG_BUFFER_POST_REQUEST, *PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
488 Mpi2DiagBufferPostRequest_t, *pMpi2DiagBufferPostRequest_t;
489
490
491#define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION (0x02)
492
493
494#define MPI2_DIAG_BUF_TYPE_TRACE (0x00)
495#define MPI2_DIAG_BUF_TYPE_SNAPSHOT (0x01)
496#define MPI2_DIAG_BUF_TYPE_EXTENDED (0x02)
497
498#define MPI2_DIAG_BUF_TYPE_COUNT (0x03)
499
500
501#define MPI2_DIAG_BUF_FLAG_RELEASE_ON_FULL (0x00000002)
502#define MPI2_DIAG_BUF_FLAG_IMMEDIATE_RELEASE (0x00000001)
503
504
505
506
507
508typedef struct _MPI2_DIAG_BUFFER_POST_REPLY {
509 U8 ExtendedType;
510 U8 BufferType;
511 U8 MsgLength;
512 U8 Function;
513 U16 Reserved2;
514 U8 Reserved3;
515 U8 MsgFlags;
516 U8 VP_ID;
517 U8 VF_ID;
518 U16 Reserved4;
519 U16 Reserved5;
520 U16 IOCStatus;
521 U32 IOCLogInfo;
522 U32 TransferLength;
523} MPI2_DIAG_BUFFER_POST_REPLY, *PTR_MPI2_DIAG_BUFFER_POST_REPLY,
524 Mpi2DiagBufferPostReply_t, *pMpi2DiagBufferPostReply_t;
525
526
527
528
529
530typedef struct _MPI2_DIAG_RELEASE_REQUEST {
531 U8 Reserved1;
532 U8 BufferType;
533 U8 ChainOffset;
534 U8 Function;
535 U16 Reserved2;
536 U8 Reserved3;
537 U8 MsgFlags;
538 U8 VP_ID;
539 U8 VF_ID;
540 U16 Reserved4;
541} MPI2_DIAG_RELEASE_REQUEST, *PTR_MPI2_DIAG_RELEASE_REQUEST,
542 Mpi2DiagReleaseRequest_t, *pMpi2DiagReleaseRequest_t;
543
544
545
546
547
548typedef struct _MPI2_DIAG_RELEASE_REPLY {
549 U8 Reserved1;
550 U8 BufferType;
551 U8 MsgLength;
552 U8 Function;
553 U16 Reserved2;
554 U8 Reserved3;
555 U8 MsgFlags;
556 U8 VP_ID;
557 U8 VF_ID;
558 U16 Reserved4;
559 U16 Reserved5;
560 U16 IOCStatus;
561 U32 IOCLogInfo;
562} MPI2_DIAG_RELEASE_REPLY, *PTR_MPI2_DIAG_RELEASE_REPLY,
563 Mpi2DiagReleaseReply_t, *pMpi2DiagReleaseReply_t;
564
565#endif
566