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#ifndef MPI2_TOOL_H
32#define MPI2_TOOL_H
33
34
35
36
37
38
39
40
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)
47
48
49
50
51
52
53typedef struct _MPI2_TOOLBOX_REPLY
54{
55 U8 Tool;
56 U8 Reserved1;
57 U8 MsgLength;
58 U8 Function;
59 U16 Reserved2;
60 U8 Reserved3;
61 U8 MsgFlags;
62 U8 VP_ID;
63 U8 VF_ID;
64 U16 Reserved4;
65 U16 Reserved5;
66 U16 IOCStatus;
67 U32 IOCLogInfo;
68} MPI2_TOOLBOX_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_REPLY,
69 Mpi2ToolboxReply_t, MPI2_POINTER pMpi2ToolboxReply_t;
70
71
72
73
74
75
76typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST
77{
78 U8 Tool;
79 U8 Reserved1;
80 U8 ChainOffset;
81 U8 Function;
82 U16 Reserved2;
83 U8 Reserved3;
84 U8 MsgFlags;
85 U8 VP_ID;
86 U8 VF_ID;
87 U16 Reserved4;
88 U32 Flags;
89 } MPI2_TOOLBOX_CLEAN_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
90 Mpi2ToolboxCleanRequest_t, MPI2_POINTER pMpi2ToolboxCleanRequest_t;
91
92
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)
103
104
105
106
107
108
109typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST {
110 U8 Tool;
111 U8 Reserved1;
112 U8 ChainOffset;
113 U8 Function;
114 U16 Reserved2;
115 U8 Reserved3;
116 U8 MsgFlags;
117 U8 VP_ID;
118 U8 VF_ID;
119 U16 Reserved4;
120 MPI2_SGE_SIMPLE_UNION SGL;
121} MPI2_TOOLBOX_MEM_MOVE_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
122 Mpi2ToolboxMemMoveRequest_t, MPI2_POINTER pMpi2ToolboxMemMoveRequest_t;
123
124
125
126
127
128
129typedef struct _MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST {
130 U8 Tool;
131 U8 Reserved1;
132 U8 ChainOffset;
133 U8 Function;
134 U16 Reserved2;
135 U8 Reserved3;
136 U8 MsgFlags;
137 U8 VP_ID;
138 U8 VF_ID;
139 U16 Reserved4;
140 U8 SGLFlags;
141 U8 Reserved5;
142 U16 Reserved6;
143 U32 Flags;
144 U32 DataLength;
145 MPI2_SGE_SIMPLE_UNION SGL;
146} MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
147MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
148Mpi2ToolboxDiagDataUploadRequest_t,
149MPI2_POINTER pMpi2ToolboxDiagDataUploadRequest_t;
150
151
152
153
154typedef struct _MPI2_DIAG_DATA_UPLOAD_HEADER {
155 U32 DiagDataLength;
156 U8 FormatCode;
157 U8 Reserved1;
158 U16 Reserved2;
159} MPI2_DIAG_DATA_UPLOAD_HEADER, MPI2_POINTER PTR_MPI2_DIAG_DATA_UPLOAD_HEADER,
160Mpi2DiagDataUploadHeader_t, MPI2_POINTER pMpi2DiagDataUploadHeader_t;
161
162
163
164
165
166
167
168typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST {
169 U8 Tool;
170 U8 Reserved1;
171 U8 ChainOffset;
172 U8 Function;
173 U16 Reserved2;
174 U8 Reserved3;
175 U8 MsgFlags;
176 U8 VP_ID;
177 U8 VF_ID;
178 U16 Reserved4;
179 U32 Reserved5;
180 U32 Reserved6;
181 U8 DevIndex;
182 U8 Action;
183 U8 SGLFlags;
184 U8 Reserved7;
185 U16 TxDataLength;
186 U16 RxDataLength;
187 U32 Reserved8;
188 U32 Reserved9;
189 U32 Reserved10;
190 U32 Reserved11;
191 U32 Reserved12;
192 MPI2_SGE_SIMPLE_UNION SGL;
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;
197
198
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)
205
206
207
208
209
210typedef struct _MPI2_TOOLBOX_ISTWI_REPLY {
211 U8 Tool;
212 U8 Reserved1;
213 U8 MsgLength;
214 U8 Function;
215 U16 Reserved2;
216 U8 Reserved3;
217 U8 MsgFlags;
218 U8 VP_ID;
219 U8 VF_ID;
220 U16 Reserved4;
221 U16 Reserved5;
222 U16 IOCStatus;
223 U32 IOCLogInfo;
224 U8 DevIndex;
225 U8 Action;
226 U8 IstwiStatus;
227 U8 Reserved6;
228 U16 TxDataCount;
229 U16 RxDataCount;
230} MPI2_TOOLBOX_ISTWI_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_REPLY,
231 Mpi2ToolboxIstwiReply_t, MPI2_POINTER pMpi2ToolboxIstwiReply_t;
232
233
234
235
236
237
238typedef struct _MPI2_TOOLBOX_BEACON_REQUEST
239{
240 U8 Tool;
241 U8 Reserved1;
242 U8 ChainOffset;
243 U8 Function;
244 U16 Reserved2;
245 U8 Reserved3;
246 U8 MsgFlags;
247 U8 VP_ID;
248 U8 VF_ID;
249 U16 Reserved4;
250 U8 Reserved5;
251 U8 PhysicalPort;
252 U8 Reserved6;
253 U8 Flags;
254} MPI2_TOOLBOX_BEACON_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_BEACON_REQUEST,
255 Mpi2ToolboxBeaconRequest_t, MPI2_POINTER pMpi2ToolboxBeaconRequest_t;
256
257
258#define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF (0x00)
259#define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON (0x01)
260
261
262
263
264
265
266#define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH (0x5C)
267
268
269typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
270 U8 Tool;
271 U8 Reserved1;
272 U8 ChainOffset;
273 U8 Function;
274 U16 Reserved2;
275 U8 Reserved3;
276 U8 MsgFlags;
277 U8 VP_ID;
278 U8 VF_ID;
279 U16 Reserved4;
280 U8 SGLFlags;
281 U8 Reserved5;
282 U16 Reserved6;
283 U32 DataLength;
284 U8 DiagnosticCliCommand
285 [MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH];
286 MPI2_SGE_SIMPLE_UNION SGL;
287} MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
288 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
289 Mpi2ToolboxDiagnosticCliRequest_t,
290 MPI2_POINTER pMpi2ToolboxDiagnosticCliRequest_t;
291
292
293
294
295
296typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY {
297 U8 Tool;
298 U8 Reserved1;
299 U8 MsgLength;
300 U8 Function;
301 U16 Reserved2;
302 U8 Reserved3;
303 U8 MsgFlags;
304 U8 VP_ID;
305 U8 VF_ID;
306 U16 Reserved4;
307 U16 Reserved5;
308 U16 IOCStatus;
309 U32 IOCLogInfo;
310 U32 ReturnedDataLength;
311} MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
312 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
313 Mpi2ToolboxDiagnosticCliReply_t,
314 MPI2_POINTER pMpi2ToolboxDiagnosticCliReply_t;
315
316
317
318
319
320
321
322
323
324
325
326
327
328typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST
329{
330 U8 ExtendedType;
331 U8 BufferType;
332 U8 ChainOffset;
333 U8 Function;
334 U16 Reserved2;
335 U8 Reserved3;
336 U8 MsgFlags;
337 U8 VP_ID;
338 U8 VF_ID;
339 U16 Reserved4;
340 U64 BufferAddress;
341 U32 BufferLength;
342 U32 Reserved5;
343 U32 Reserved6;
344 U32 Flags;
345 U32 ProductSpecific[23];
346} MPI2_DIAG_BUFFER_POST_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
347 Mpi2DiagBufferPostRequest_t, MPI2_POINTER pMpi2DiagBufferPostRequest_t;
348
349
350#define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION (0x02)
351
352
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
357#define MPI2_DIAG_BUF_TYPE_COUNT (0x03)
358
359
360#define MPI2_DIAG_BUF_FLAG_RELEASE_ON_FULL (0x00000002)
361#define MPI2_DIAG_BUF_FLAG_IMMEDIATE_RELEASE (0x00000001)
362
363
364
365
366
367
368typedef struct _MPI2_DIAG_BUFFER_POST_REPLY
369{
370 U8 ExtendedType;
371 U8 BufferType;
372 U8 MsgLength;
373 U8 Function;
374 U16 Reserved2;
375 U8 Reserved3;
376 U8 MsgFlags;
377 U8 VP_ID;
378 U8 VF_ID;
379 U16 Reserved4;
380 U16 Reserved5;
381 U16 IOCStatus;
382 U32 IOCLogInfo;
383 U32 TransferLength;
384} MPI2_DIAG_BUFFER_POST_REPLY, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REPLY,
385 Mpi2DiagBufferPostReply_t, MPI2_POINTER pMpi2DiagBufferPostReply_t;
386
387
388
389
390
391
392typedef struct _MPI2_DIAG_RELEASE_REQUEST
393{
394 U8 Reserved1;
395 U8 BufferType;
396 U8 ChainOffset;
397 U8 Function;
398 U16 Reserved2;
399 U8 Reserved3;
400 U8 MsgFlags;
401 U8 VP_ID;
402 U8 VF_ID;
403 U16 Reserved4;
404} MPI2_DIAG_RELEASE_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REQUEST,
405 Mpi2DiagReleaseRequest_t, MPI2_POINTER pMpi2DiagReleaseRequest_t;
406
407
408
409
410
411
412typedef struct _MPI2_DIAG_RELEASE_REPLY
413{
414 U8 Reserved1;
415 U8 BufferType;
416 U8 MsgLength;
417 U8 Function;
418 U16 Reserved2;
419 U8 Reserved3;
420 U8 MsgFlags;
421 U8 VP_ID;
422 U8 VF_ID;
423 U16 Reserved4;
424 U16 Reserved5;
425 U16 IOCStatus;
426 U32 IOCLogInfo;
427} MPI2_DIAG_RELEASE_REPLY, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REPLY,
428 Mpi2DiagReleaseReply_t, MPI2_POINTER pMpi2DiagReleaseReply_t;
429
430
431#endif
432
433