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#ifndef MPI2_TOOL_H
40#define MPI2_TOOL_H
41
42
43
44
45
46
47
48
49#define MPI2_TOOLBOX_CLEAN_TOOL (0x00)
50#define MPI2_TOOLBOX_MEMORY_MOVE_TOOL (0x01)
51#define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL (0x02)
52#define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)
53#define MPI2_TOOLBOX_BEACON_TOOL (0x05)
54#define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL (0x06)
55#define MPI2_TOOLBOX_TEXT_DISPLAY_TOOL (0x07)
56
57
58
59
60
61typedef struct _MPI2_TOOLBOX_REPLY {
62 U8 Tool;
63 U8 Reserved1;
64 U8 MsgLength;
65 U8 Function;
66 U16 Reserved2;
67 U8 Reserved3;
68 U8 MsgFlags;
69 U8 VP_ID;
70 U8 VF_ID;
71 U16 Reserved4;
72 U16 Reserved5;
73 U16 IOCStatus;
74 U32 IOCLogInfo;
75} MPI2_TOOLBOX_REPLY, *PTR_MPI2_TOOLBOX_REPLY,
76 Mpi2ToolboxReply_t, *pMpi2ToolboxReply_t;
77
78
79
80
81
82typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST {
83 U8 Tool;
84 U8 Reserved1;
85 U8 ChainOffset;
86 U8 Function;
87 U16 Reserved2;
88 U8 Reserved3;
89 U8 MsgFlags;
90 U8 VP_ID;
91 U8 VF_ID;
92 U16 Reserved4;
93 U32 Flags;
94} MPI2_TOOLBOX_CLEAN_REQUEST, *PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
95 Mpi2ToolboxCleanRequest_t, *pMpi2ToolboxCleanRequest_t;
96
97
98#define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES (0x80000000)
99#define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES (0x40000000)
100#define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES (0x20000000)
101#define MPI2_TOOLBOX_CLEAN_FW_CURRENT (0x10000000)
102#define MPI2_TOOLBOX_CLEAN_FW_BACKUP (0x08000000)
103#define MPI2_TOOLBOX_CLEAN_MEGARAID (0x02000000)
104#define MPI2_TOOLBOX_CLEAN_INITIALIZATION (0x01000000)
105#define MPI2_TOOLBOX_CLEAN_FLASH (0x00000004)
106#define MPI2_TOOLBOX_CLEAN_SEEPROM (0x00000002)
107#define MPI2_TOOLBOX_CLEAN_NVSRAM (0x00000001)
108
109
110
111
112
113typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST {
114 U8 Tool;
115 U8 Reserved1;
116 U8 ChainOffset;
117 U8 Function;
118 U16 Reserved2;
119 U8 Reserved3;
120 U8 MsgFlags;
121 U8 VP_ID;
122 U8 VF_ID;
123 U16 Reserved4;
124 MPI2_SGE_SIMPLE_UNION SGL;
125} MPI2_TOOLBOX_MEM_MOVE_REQUEST, *PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
126 Mpi2ToolboxMemMoveRequest_t, *pMpi2ToolboxMemMoveRequest_t;
127
128
129
130
131
132typedef struct _MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST {
133 U8 Tool;
134 U8 Reserved1;
135 U8 ChainOffset;
136 U8 Function;
137 U16 Reserved2;
138 U8 Reserved3;
139 U8 MsgFlags;
140 U8 VP_ID;
141 U8 VF_ID;
142 U16 Reserved4;
143 U8 SGLFlags;
144 U8 Reserved5;
145 U16 Reserved6;
146 U32 Flags;
147 U32 DataLength;
148 MPI2_SGE_SIMPLE_UNION SGL;
149} MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
150 *PTR_MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
151 Mpi2ToolboxDiagDataUploadRequest_t,
152 *pMpi2ToolboxDiagDataUploadRequest_t;
153
154
155
156typedef struct _MPI2_DIAG_DATA_UPLOAD_HEADER {
157 U32 DiagDataLength;
158 U8 FormatCode;
159 U8 Reserved1;
160 U16 Reserved2;
161} MPI2_DIAG_DATA_UPLOAD_HEADER, *PTR_MPI2_DIAG_DATA_UPLOAD_HEADER,
162 Mpi2DiagDataUploadHeader_t, *pMpi2DiagDataUploadHeader_t;
163
164
165
166
167
168
169typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST {
170 U8 Tool;
171 U8 Reserved1;
172 U8 ChainOffset;
173 U8 Function;
174 U16 Reserved2;
175 U8 Reserved3;
176 U8 MsgFlags;
177 U8 VP_ID;
178 U8 VF_ID;
179 U16 Reserved4;
180 U32 Reserved5;
181 U32 Reserved6;
182 U8 DevIndex;
183 U8 Action;
184 U8 SGLFlags;
185 U8 Flags;
186 U16 TxDataLength;
187 U16 RxDataLength;
188 U32 Reserved8;
189 U32 Reserved9;
190 U32 Reserved10;
191 U32 Reserved11;
192 U32 Reserved12;
193 MPI2_SGE_SIMPLE_UNION SGL;
194} MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
195 *PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
196 Mpi2ToolboxIstwiReadWriteRequest_t,
197 *pMpi2ToolboxIstwiReadWriteRequest_t;
198
199
200#define MPI2_TOOL_ISTWI_ACTION_READ_DATA (0x01)
201#define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA (0x02)
202#define MPI2_TOOL_ISTWI_ACTION_SEQUENCE (0x03)
203#define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS (0x10)
204#define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS (0x11)
205#define MPI2_TOOL_ISTWI_ACTION_RESET (0x12)
206
207
208
209
210#define MPI2_TOOL_ISTWI_FLAG_AUTO_RESERVE_RELEASE (0x80)
211#define MPI2_TOOL_ISTWI_FLAG_PAGE_ADDR_MASK (0x07)
212
213
214typedef struct _MPI2_TOOLBOX_ISTWI_REPLY {
215 U8 Tool;
216 U8 Reserved1;
217 U8 MsgLength;
218 U8 Function;
219 U16 Reserved2;
220 U8 Reserved3;
221 U8 MsgFlags;
222 U8 VP_ID;
223 U8 VF_ID;
224 U16 Reserved4;
225 U16 Reserved5;
226 U16 IOCStatus;
227 U32 IOCLogInfo;
228 U8 DevIndex;
229 U8 Action;
230 U8 IstwiStatus;
231 U8 Reserved6;
232 U16 TxDataCount;
233 U16 RxDataCount;
234} MPI2_TOOLBOX_ISTWI_REPLY, *PTR_MPI2_TOOLBOX_ISTWI_REPLY,
235 Mpi2ToolboxIstwiReply_t, *pMpi2ToolboxIstwiReply_t;
236
237
238
239
240
241typedef struct _MPI2_TOOLBOX_BEACON_REQUEST {
242 U8 Tool;
243 U8 Reserved1;
244 U8 ChainOffset;
245 U8 Function;
246 U16 Reserved2;
247 U8 Reserved3;
248 U8 MsgFlags;
249 U8 VP_ID;
250 U8 VF_ID;
251 U16 Reserved4;
252 U8 Reserved5;
253 U8 PhysicalPort;
254 U8 Reserved6;
255 U8 Flags;
256} MPI2_TOOLBOX_BEACON_REQUEST, *PTR_MPI2_TOOLBOX_BEACON_REQUEST,
257 Mpi2ToolboxBeaconRequest_t, *pMpi2ToolboxBeaconRequest_t;
258
259
260#define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF (0x00)
261#define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON (0x01)
262
263
264
265
266
267#define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH (0x5C)
268
269
270typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
271 U8 Tool;
272 U8 Reserved1;
273 U8 ChainOffset;
274 U8 Function;
275 U16 Reserved2;
276 U8 Reserved3;
277 U8 MsgFlags;
278 U8 VP_ID;
279 U8 VF_ID;
280 U16 Reserved4;
281 U8 SGLFlags;
282 U8 Reserved5;
283 U16 Reserved6;
284 U32 DataLength;
285 U8 DiagnosticCliCommand[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH];
286 MPI2_MPI_SGE_IO_UNION SGL;
287} MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
288 *PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
289 Mpi2ToolboxDiagnosticCliRequest_t,
290 *pMpi2ToolboxDiagnosticCliRequest_t;
291
292
293
294
295typedef struct _MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
296 U8 Tool;
297 U8 Reserved1;
298 U8 ChainOffset;
299 U8 Function;
300 U16 Reserved2;
301 U8 Reserved3;
302 U8 MsgFlags;
303 U8 VP_ID;
304 U8 VF_ID;
305 U16 Reserved4;
306 U32 Reserved5;
307 U32 DataLength;
308 U8 DiagnosticCliCommand[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH];
309 MPI25_SGE_IO_UNION SGL;
310} MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
311 *PTR_MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
312 Mpi25ToolboxDiagnosticCliRequest_t,
313 *pMpi25ToolboxDiagnosticCliRequest_t;
314
315
316typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY {
317 U8 Tool;
318 U8 Reserved1;
319 U8 MsgLength;
320 U8 Function;
321 U16 Reserved2;
322 U8 Reserved3;
323 U8 MsgFlags;
324 U8 VP_ID;
325 U8 VF_ID;
326 U16 Reserved4;
327 U16 Reserved5;
328 U16 IOCStatus;
329 U32 IOCLogInfo;
330 U32 ReturnedDataLength;
331} MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
332 *PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
333 Mpi2ToolboxDiagnosticCliReply_t,
334 *pMpi2ToolboxDiagnosticCliReply_t;
335
336
337
338
339
340
341
342typedef struct _MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST {
343 U8 Tool;
344 U8 Reserved1;
345 U8 ChainOffset;
346 U8 Function;
347 U16 Reserved2;
348 U8 Reserved3;
349 U8 MsgFlags;
350 U8 VP_ID;
351 U8 VF_ID;
352 U16 Reserved4;
353 U8 Console;
354 U8 Flags;
355 U16 Reserved6;
356 U8 TextToDisplay[4];
357} MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
358*PTR_MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
359Mpi2ToolboxTextDisplayRequest_t,
360*pMpi2ToolboxTextDisplayRequest_t;
361
362
363#define MPI2_TOOLBOX_CONSOLE_TYPE_MASK (0xF0)
364#define MPI2_TOOLBOX_CONSOLE_TYPE_DEFAULT (0x00)
365#define MPI2_TOOLBOX_CONSOLE_TYPE_UART (0x10)
366#define MPI2_TOOLBOX_CONSOLE_TYPE_ETHERNET (0x20)
367
368#define MPI2_TOOLBOX_CONSOLE_NUMBER_MASK (0x0F)
369
370
371#define MPI2_TOOLBOX_CONSOLE_FLAG_TIMESTAMP (0x01)
372
373
374
375
376
377
378
379
380
381
382
383
384
385typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST {
386 U8 ExtendedType;
387 U8 BufferType;
388 U8 ChainOffset;
389 U8 Function;
390 U16 Reserved2;
391 U8 Reserved3;
392 U8 MsgFlags;
393 U8 VP_ID;
394 U8 VF_ID;
395 U16 Reserved4;
396 U64 BufferAddress;
397 U32 BufferLength;
398 U32 Reserved5;
399 U32 Reserved6;
400 U32 Flags;
401 U32 ProductSpecific[23];
402} MPI2_DIAG_BUFFER_POST_REQUEST, *PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
403 Mpi2DiagBufferPostRequest_t, *pMpi2DiagBufferPostRequest_t;
404
405
406#define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION (0x02)
407
408
409#define MPI2_DIAG_BUF_TYPE_TRACE (0x00)
410#define MPI2_DIAG_BUF_TYPE_SNAPSHOT (0x01)
411#define MPI2_DIAG_BUF_TYPE_EXTENDED (0x02)
412
413#define MPI2_DIAG_BUF_TYPE_COUNT (0x03)
414
415
416#define MPI2_DIAG_BUF_FLAG_RELEASE_ON_FULL (0x00000002)
417#define MPI2_DIAG_BUF_FLAG_IMMEDIATE_RELEASE (0x00000001)
418
419
420
421
422
423typedef struct _MPI2_DIAG_BUFFER_POST_REPLY {
424 U8 ExtendedType;
425 U8 BufferType;
426 U8 MsgLength;
427 U8 Function;
428 U16 Reserved2;
429 U8 Reserved3;
430 U8 MsgFlags;
431 U8 VP_ID;
432 U8 VF_ID;
433 U16 Reserved4;
434 U16 Reserved5;
435 U16 IOCStatus;
436 U32 IOCLogInfo;
437 U32 TransferLength;
438} MPI2_DIAG_BUFFER_POST_REPLY, *PTR_MPI2_DIAG_BUFFER_POST_REPLY,
439 Mpi2DiagBufferPostReply_t, *pMpi2DiagBufferPostReply_t;
440
441
442
443
444
445typedef struct _MPI2_DIAG_RELEASE_REQUEST {
446 U8 Reserved1;
447 U8 BufferType;
448 U8 ChainOffset;
449 U8 Function;
450 U16 Reserved2;
451 U8 Reserved3;
452 U8 MsgFlags;
453 U8 VP_ID;
454 U8 VF_ID;
455 U16 Reserved4;
456} MPI2_DIAG_RELEASE_REQUEST, *PTR_MPI2_DIAG_RELEASE_REQUEST,
457 Mpi2DiagReleaseRequest_t, *pMpi2DiagReleaseRequest_t;
458
459
460
461
462
463typedef struct _MPI2_DIAG_RELEASE_REPLY {
464 U8 Reserved1;
465 U8 BufferType;
466 U8 MsgLength;
467 U8 Function;
468 U16 Reserved2;
469 U8 Reserved3;
470 U8 MsgFlags;
471 U8 VP_ID;
472 U8 VF_ID;
473 U16 Reserved4;
474 U16 Reserved5;
475 U16 IOCStatus;
476 U32 IOCLogInfo;
477} MPI2_DIAG_RELEASE_REPLY, *PTR_MPI2_DIAG_RELEASE_REPLY,
478 Mpi2DiagReleaseReply_t, *pMpi2DiagReleaseReply_t;
479
480#endif
481