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