1 /* $FreeBSD: src/sys/dev/mps/mpi/mpi2_tool.h,v 1.1 2010/09/10 15:03:56 ken Exp $ */
3 * Copyright (c) 2000-2009 LSI Corporation.
7 * Title: MPI diagnostic tool structures and definitions
8 * Creation Date: March 26, 2007
10 * mpi2_tool.h Version: 02.00.04
15 * Date Version Description
16 * -------- -------- ------------------------------------------------------
17 * 04-30-07 02.00.00 Corresponds to Fusion-MPT MPI Specification Rev A.
18 * 12-18-07 02.00.01 Added Diagnostic Buffer Post and Diagnostic Release
19 * structures and defines.
20 * 02-29-08 02.00.02 Modified various names to make them 32-character unique.
21 * 05-06-09 02.00.03 Added ISTWI Read Write Tool and Diagnostic CLI Tool.
22 * 07-30-09 02.00.04 Added ExtendedType field to DiagnosticBufferPost request
24 * Added MPI2_DIAG_BUF_TYPE_EXTENDED.
25 * Incremented MPI2_DIAG_BUF_TYPE_COUNT.
26 * --------------------------------------------------------------------------
32 /*****************************************************************************
36 *****************************************************************************/
38 /* defines for the Tools */
39 #define MPI2_TOOLBOX_CLEAN_TOOL (0x00)
40 #define MPI2_TOOLBOX_MEMORY_MOVE_TOOL (0x01)
41 #define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)
42 #define MPI2_TOOLBOX_BEACON_TOOL (0x05)
43 #define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL (0x06)
46 /****************************************************************************
48 ****************************************************************************/
50 typedef struct _MPI2_TOOLBOX_REPLY
53 U8 Reserved1; /* 0x01 */
54 U8 MsgLength; /* 0x02 */
55 U8 Function; /* 0x03 */
56 U16 Reserved2; /* 0x04 */
57 U8 Reserved3; /* 0x06 */
58 U8 MsgFlags; /* 0x07 */
61 U16 Reserved4; /* 0x0A */
62 U16 Reserved5; /* 0x0C */
63 U16 IOCStatus; /* 0x0E */
64 U32 IOCLogInfo; /* 0x10 */
65 } MPI2_TOOLBOX_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_REPLY,
66 Mpi2ToolboxReply_t, MPI2_POINTER pMpi2ToolboxReply_t;
69 /****************************************************************************
70 * Toolbox Clean Tool request
71 ****************************************************************************/
73 typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST
76 U8 Reserved1; /* 0x01 */
77 U8 ChainOffset; /* 0x02 */
78 U8 Function; /* 0x03 */
79 U16 Reserved2; /* 0x04 */
80 U8 Reserved3; /* 0x06 */
81 U8 MsgFlags; /* 0x07 */
84 U16 Reserved4; /* 0x0A */
86 } MPI2_TOOLBOX_CLEAN_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
87 Mpi2ToolboxCleanRequest_t, MPI2_POINTER pMpi2ToolboxCleanRequest_t;
89 /* values for the Flags field */
90 #define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES (0x80000000)
91 #define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES (0x40000000)
92 #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES (0x20000000)
93 #define MPI2_TOOLBOX_CLEAN_FW_CURRENT (0x10000000)
94 #define MPI2_TOOLBOX_CLEAN_FW_BACKUP (0x08000000)
95 #define MPI2_TOOLBOX_CLEAN_MEGARAID (0x02000000)
96 #define MPI2_TOOLBOX_CLEAN_INITIALIZATION (0x01000000)
97 #define MPI2_TOOLBOX_CLEAN_FLASH (0x00000004)
98 #define MPI2_TOOLBOX_CLEAN_SEEPROM (0x00000002)
99 #define MPI2_TOOLBOX_CLEAN_NVSRAM (0x00000001)
102 /****************************************************************************
103 * Toolbox Memory Move request
104 ****************************************************************************/
106 typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST
109 U8 Reserved1; /* 0x01 */
110 U8 ChainOffset; /* 0x02 */
111 U8 Function; /* 0x03 */
112 U16 Reserved2; /* 0x04 */
113 U8 Reserved3; /* 0x06 */
114 U8 MsgFlags; /* 0x07 */
117 U16 Reserved4; /* 0x0A */
118 MPI2_SGE_SIMPLE_UNION SGL; /* 0x0C */
119 } MPI2_TOOLBOX_MEM_MOVE_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
120 Mpi2ToolboxMemMoveRequest_t, MPI2_POINTER pMpi2ToolboxMemMoveRequest_t;
123 /****************************************************************************
124 * Toolbox ISTWI Read Write Tool
125 ****************************************************************************/
127 /* Toolbox ISTWI Read Write Tool request message */
128 typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_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 U32 Reserved5; /* 0x0C */
141 U32 Reserved6; /* 0x10 */
142 U8 DevIndex; /* 0x14 */
143 U8 Action; /* 0x15 */
144 U8 SGLFlags; /* 0x16 */
145 U8 Reserved7; /* 0x17 */
146 U16 TxDataLength; /* 0x18 */
147 U16 RxDataLength; /* 0x1A */
148 U32 Reserved8; /* 0x1C */
149 U32 Reserved9; /* 0x20 */
150 U32 Reserved10; /* 0x24 */
151 U32 Reserved11; /* 0x28 */
152 U32 Reserved12; /* 0x2C */
153 MPI2_SGE_SIMPLE_UNION SGL; /* 0x30 */
154 } MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
155 MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
156 Mpi2ToolboxIstwiReadWriteRequest_t,
157 MPI2_POINTER pMpi2ToolboxIstwiReadWriteRequest_t;
159 /* values for the Action field */
160 #define MPI2_TOOL_ISTWI_ACTION_READ_DATA (0x01)
161 #define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA (0x02)
162 #define MPI2_TOOL_ISTWI_ACTION_SEQUENCE (0x03)
163 #define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS (0x10)
164 #define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS (0x11)
165 #define MPI2_TOOL_ISTWI_ACTION_RESET (0x12)
167 /* values for SGLFlags field are in the SGL section of mpi2.h */
170 /* Toolbox ISTWI Read Write Tool reply message */
171 typedef struct _MPI2_TOOLBOX_ISTWI_REPLY
174 U8 Reserved1; /* 0x01 */
175 U8 MsgLength; /* 0x02 */
176 U8 Function; /* 0x03 */
177 U16 Reserved2; /* 0x04 */
178 U8 Reserved3; /* 0x06 */
179 U8 MsgFlags; /* 0x07 */
182 U16 Reserved4; /* 0x0A */
183 U16 Reserved5; /* 0x0C */
184 U16 IOCStatus; /* 0x0E */
185 U32 IOCLogInfo; /* 0x10 */
186 U8 DevIndex; /* 0x14 */
187 U8 Action; /* 0x15 */
188 U8 IstwiStatus; /* 0x16 */
189 U8 Reserved6; /* 0x17 */
190 U16 TxDataCount; /* 0x18 */
191 U16 RxDataCount; /* 0x1A */
192 } MPI2_TOOLBOX_ISTWI_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_REPLY,
193 Mpi2ToolboxIstwiReply_t, MPI2_POINTER pMpi2ToolboxIstwiReply_t;
196 /****************************************************************************
197 * Toolbox Beacon Tool request
198 ****************************************************************************/
200 typedef struct _MPI2_TOOLBOX_BEACON_REQUEST
203 U8 Reserved1; /* 0x01 */
204 U8 ChainOffset; /* 0x02 */
205 U8 Function; /* 0x03 */
206 U16 Reserved2; /* 0x04 */
207 U8 Reserved3; /* 0x06 */
208 U8 MsgFlags; /* 0x07 */
211 U16 Reserved4; /* 0x0A */
212 U8 Reserved5; /* 0x0C */
213 U8 PhysicalPort; /* 0x0D */
214 U8 Reserved6; /* 0x0E */
216 } MPI2_TOOLBOX_BEACON_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_BEACON_REQUEST,
217 Mpi2ToolboxBeaconRequest_t, MPI2_POINTER pMpi2ToolboxBeaconRequest_t;
219 /* values for the Flags field */
220 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF (0x00)
221 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON (0x01)
224 /****************************************************************************
225 * Toolbox Diagnostic CLI Tool
226 ****************************************************************************/
228 #define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH (0x5C)
230 /* Toolbox Diagnostic CLI Tool request message */
231 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
234 U8 Reserved1; /* 0x01 */
235 U8 ChainOffset; /* 0x02 */
236 U8 Function; /* 0x03 */
237 U16 Reserved2; /* 0x04 */
238 U8 Reserved3; /* 0x06 */
239 U8 MsgFlags; /* 0x07 */
242 U16 Reserved4; /* 0x0A */
243 U8 SGLFlags; /* 0x0C */
244 U8 Reserved5; /* 0x0D */
245 U16 Reserved6; /* 0x0E */
246 U32 DataLength; /* 0x10 */
247 U8 DiagnosticCliCommand[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH]; /* 0x14 */
248 MPI2_SGE_SIMPLE_UNION SGL; /* 0x70 */
249 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
250 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
251 Mpi2ToolboxDiagnosticCliRequest_t,
252 MPI2_POINTER pMpi2ToolboxDiagnosticCliRequest_t;
254 /* values for SGLFlags field are in the SGL section of mpi2.h */
257 /* Toolbox Diagnostic CLI Tool reply message */
258 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY
261 U8 Reserved1; /* 0x01 */
262 U8 MsgLength; /* 0x02 */
263 U8 Function; /* 0x03 */
264 U16 Reserved2; /* 0x04 */
265 U8 Reserved3; /* 0x06 */
266 U8 MsgFlags; /* 0x07 */
269 U16 Reserved4; /* 0x0A */
270 U16 Reserved5; /* 0x0C */
271 U16 IOCStatus; /* 0x0E */
272 U32 IOCLogInfo; /* 0x10 */
273 U32 ReturnedDataLength; /* 0x14 */
274 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
275 MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
276 Mpi2ToolboxDiagnosticCliReply_t,
277 MPI2_POINTER pMpi2ToolboxDiagnosticCliReply_t;
280 /*****************************************************************************
282 * Diagnostic Buffer Messages
284 *****************************************************************************/
287 /****************************************************************************
288 * Diagnostic Buffer Post request
289 ****************************************************************************/
291 typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST
293 U8 ExtendedType; /* 0x00 */
294 U8 BufferType; /* 0x01 */
295 U8 ChainOffset; /* 0x02 */
296 U8 Function; /* 0x03 */
297 U16 Reserved2; /* 0x04 */
298 U8 Reserved3; /* 0x06 */
299 U8 MsgFlags; /* 0x07 */
302 U16 Reserved4; /* 0x0A */
303 U64 BufferAddress; /* 0x0C */
304 U32 BufferLength; /* 0x14 */
305 U32 Reserved5; /* 0x18 */
306 U32 Reserved6; /* 0x1C */
307 U32 Flags; /* 0x20 */
308 U32 ProductSpecific[23]; /* 0x24 */
309 } MPI2_DIAG_BUFFER_POST_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
310 Mpi2DiagBufferPostRequest_t, MPI2_POINTER pMpi2DiagBufferPostRequest_t;
312 /* values for the ExtendedType field */
313 #define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION (0x02)
315 /* values for the BufferType field */
316 #define MPI2_DIAG_BUF_TYPE_TRACE (0x00)
317 #define MPI2_DIAG_BUF_TYPE_SNAPSHOT (0x01)
318 #define MPI2_DIAG_BUF_TYPE_EXTENDED (0x02)
319 /* count of the number of buffer types */
320 #define MPI2_DIAG_BUF_TYPE_COUNT (0x03)
323 /****************************************************************************
324 * Diagnostic Buffer Post reply
325 ****************************************************************************/
327 typedef struct _MPI2_DIAG_BUFFER_POST_REPLY
329 U8 ExtendedType; /* 0x00 */
330 U8 BufferType; /* 0x01 */
331 U8 MsgLength; /* 0x02 */
332 U8 Function; /* 0x03 */
333 U16 Reserved2; /* 0x04 */
334 U8 Reserved3; /* 0x06 */
335 U8 MsgFlags; /* 0x07 */
338 U16 Reserved4; /* 0x0A */
339 U16 Reserved5; /* 0x0C */
340 U16 IOCStatus; /* 0x0E */
341 U32 IOCLogInfo; /* 0x10 */
342 U32 TransferLength; /* 0x14 */
343 } MPI2_DIAG_BUFFER_POST_REPLY, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REPLY,
344 Mpi2DiagBufferPostReply_t, MPI2_POINTER pMpi2DiagBufferPostReply_t;
347 /****************************************************************************
348 * Diagnostic Release request
349 ****************************************************************************/
351 typedef struct _MPI2_DIAG_RELEASE_REQUEST
353 U8 Reserved1; /* 0x00 */
354 U8 BufferType; /* 0x01 */
355 U8 ChainOffset; /* 0x02 */
356 U8 Function; /* 0x03 */
357 U16 Reserved2; /* 0x04 */
358 U8 Reserved3; /* 0x06 */
359 U8 MsgFlags; /* 0x07 */
362 U16 Reserved4; /* 0x0A */
363 } MPI2_DIAG_RELEASE_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REQUEST,
364 Mpi2DiagReleaseRequest_t, MPI2_POINTER pMpi2DiagReleaseRequest_t;
367 /****************************************************************************
368 * Diagnostic Buffer Post reply
369 ****************************************************************************/
371 typedef struct _MPI2_DIAG_RELEASE_REPLY
373 U8 Reserved1; /* 0x00 */
374 U8 BufferType; /* 0x01 */
375 U8 MsgLength; /* 0x02 */
376 U8 Function; /* 0x03 */
377 U16 Reserved2; /* 0x04 */
378 U8 Reserved3; /* 0x06 */
379 U8 MsgFlags; /* 0x07 */
382 U16 Reserved4; /* 0x0A */
383 U16 Reserved5; /* 0x0C */
384 U16 IOCStatus; /* 0x0E */
385 U32 IOCLogInfo; /* 0x10 */
386 } MPI2_DIAG_RELEASE_REPLY, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REPLY,
387 Mpi2DiagReleaseReply_t, MPI2_POINTER pMpi2DiagReleaseReply_t;