]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - sys/dev/mpr/mpi/mpi2_tool.h
MFC r286567, r286568, r289426, r289429, r295113, r295286, r299367, r299369,
[FreeBSD/stable/10.git] / sys / dev / mpr / mpi / mpi2_tool.h
1 /*-
2  * Copyright (c) 2012-2015 LSI Corp.
3  * Copyright (c) 2013-2016 Avago Technologies
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  * 3. Neither the name of the author nor the names of any co-contributors
15  *    may be used to endorse or promote products derived from this software
16  *    without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28  * SUCH DAMAGE.
29  *
30  * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD
31  *
32  * $FreeBSD$
33  */
34
35 /*
36  *  Copyright (c) 2000-2015 LSI Corporation.
37  *  Copyright (c) 2013-2016 Avago Technologies
38  *  All rights reserved.
39  *
40  *
41  *           Name:  mpi2_tool.h
42  *          Title:  MPI diagnostic tool structures and definitions
43  *  Creation Date:  March 26, 2007
44  *
45  *    mpi2_tool.h Version:  02.00.14
46  *
47  *  Version History
48  *  ---------------
49  *
50  *  Date      Version   Description
51  *  --------  --------  ------------------------------------------------------
52  *  04-30-07  02.00.00  Corresponds to Fusion-MPT MPI Specification Rev A.
53  *  12-18-07  02.00.01  Added Diagnostic Buffer Post and Diagnostic Release
54  *                      structures and defines.
55  *  02-29-08  02.00.02  Modified various names to make them 32-character unique.
56  *  05-06-09  02.00.03  Added ISTWI Read Write Tool and Diagnostic CLI Tool.
57  *  07-30-09  02.00.04  Added ExtendedType field to DiagnosticBufferPost request
58  *                      and reply messages.
59  *                      Added MPI2_DIAG_BUF_TYPE_EXTENDED.
60  *                      Incremented MPI2_DIAG_BUF_TYPE_COUNT.
61  *  05-12-10  02.00.05  Added Diagnostic Data Upload tool.
62  *  08-11-10  02.00.06  Added defines that were missing for Diagnostic Buffer
63  *                      Post Request.
64  *  05-25-11  02.00.07  Added Flags field and related defines to
65  *                      MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST.
66  *  11-18-11  02.00.08  Incorporating additions for MPI v2.5.
67  *  07-10-12  02.00.09  Add MPI v2.5 Toolbox Diagnostic CLI Tool Request
68  *                      message.
69  *  07-26-12  02.00.10  Modified MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST so that
70  *                      it uses MPI Chain SGE as well as MPI Simple SGE.
71  *  08-19-13  02.00.11  Added MPI2_TOOLBOX_TEXT_DISPLAY_TOOL and related info.
72  *  01-08-14  02.00.12  Added MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC.
73  *  11-18-14  02.00.13  Updated copyright information.
74  *  08-25-16  02.00.14  Added new values for the Flags field of Toolbox Clean
75  *                      Tool Request Message.
76  *  --------------------------------------------------------------------------
77  */
78
79 #ifndef MPI2_TOOL_H
80 #define MPI2_TOOL_H
81
82 /*****************************************************************************
83 *
84 *               Toolbox Messages
85 *
86 *****************************************************************************/
87
88 /* defines for the Tools */
89 #define MPI2_TOOLBOX_CLEAN_TOOL                     (0x00)
90 #define MPI2_TOOLBOX_MEMORY_MOVE_TOOL               (0x01)
91 #define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL          (0x02)
92 #define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL          (0x03)
93 #define MPI2_TOOLBOX_BEACON_TOOL                    (0x05)
94 #define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL            (0x06)
95 #define MPI2_TOOLBOX_TEXT_DISPLAY_TOOL              (0x07)
96
97
98 /****************************************************************************
99 *  Toolbox reply
100 ****************************************************************************/
101
102 typedef struct _MPI2_TOOLBOX_REPLY
103 {
104     U8                      Tool;                       /* 0x00 */
105     U8                      Reserved1;                  /* 0x01 */
106     U8                      MsgLength;                  /* 0x02 */
107     U8                      Function;                   /* 0x03 */
108     U16                     Reserved2;                  /* 0x04 */
109     U8                      Reserved3;                  /* 0x06 */
110     U8                      MsgFlags;                   /* 0x07 */
111     U8                      VP_ID;                      /* 0x08 */
112     U8                      VF_ID;                      /* 0x09 */
113     U16                     Reserved4;                  /* 0x0A */
114     U16                     Reserved5;                  /* 0x0C */
115     U16                     IOCStatus;                  /* 0x0E */
116     U32                     IOCLogInfo;                 /* 0x10 */
117 } MPI2_TOOLBOX_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_REPLY,
118   Mpi2ToolboxReply_t, MPI2_POINTER pMpi2ToolboxReply_t;
119
120
121 /****************************************************************************
122 *  Toolbox Clean Tool request
123 ****************************************************************************/
124
125 typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST
126 {
127     U8                      Tool;                       /* 0x00 */
128     U8                      Reserved1;                  /* 0x01 */
129     U8                      ChainOffset;                /* 0x02 */
130     U8                      Function;                   /* 0x03 */
131     U16                     Reserved2;                  /* 0x04 */
132     U8                      Reserved3;                  /* 0x06 */
133     U8                      MsgFlags;                   /* 0x07 */
134     U8                      VP_ID;                      /* 0x08 */
135     U8                      VF_ID;                      /* 0x09 */
136     U16                     Reserved4;                  /* 0x0A */
137     U32                     Flags;                      /* 0x0C */
138    } MPI2_TOOLBOX_CLEAN_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
139   Mpi2ToolboxCleanRequest_t, MPI2_POINTER pMpi2ToolboxCleanRequest_t;
140
141 /* values for the Flags field */
142 #define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES            (0x80000000)
143 #define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES   (0x40000000)
144 #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES      (0x20000000)
145 #define MPI2_TOOLBOX_CLEAN_FW_CURRENT               (0x10000000)
146 #define MPI2_TOOLBOX_CLEAN_FW_BACKUP                (0x08000000)
147 #define MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC   (0x04000000)
148 #define MPI2_TOOLBOX_CLEAN_MEGARAID                 (0x02000000)
149 #define MPI2_TOOLBOX_CLEAN_INITIALIZATION           (0x01000000)
150 #define MPI2_TOOLBOX_CLEAN_SBR                      (0x00800000)
151 #define MPI2_TOOLBOX_CLEAN_SBR_BACKUP               (0x00400000)
152 #define MPI2_TOOLBOX_CLEAN_HIIM                     (0x00200000)
153 #define MPI2_TOOLBOX_CLEAN_HIIA                     (0x00100000)
154 #define MPI2_TOOLBOX_CLEAN_CTLR                     (0x00080000)
155 #define MPI2_TOOLBOX_CLEAN_IMR_FIRMWARE             (0x00040000)
156 #define MPI2_TOOLBOX_CLEAN_MR_NVDATA                (0x00020000)
157 #define MPI2_TOOLBOX_CLEAN_RESERVED_5_16            (0x0001FFE0)
158 #define MPI2_TOOLBOX_CLEAN_ALL_BUT_MPB              (0x00000010)
159 #define MPI2_TOOLBOX_CLEAN_ENTIRE_FLASH             (0x00000008)
160 #define MPI2_TOOLBOX_CLEAN_FLASH                    (0x00000004)
161 #define MPI2_TOOLBOX_CLEAN_SEEPROM                  (0x00000002)
162 #define MPI2_TOOLBOX_CLEAN_NVSRAM                   (0x00000001)
163
164
165 /****************************************************************************
166 *  Toolbox Memory Move request
167 ****************************************************************************/
168
169 typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST
170 {
171     U8                      Tool;                       /* 0x00 */
172     U8                      Reserved1;                  /* 0x01 */
173     U8                      ChainOffset;                /* 0x02 */
174     U8                      Function;                   /* 0x03 */
175     U16                     Reserved2;                  /* 0x04 */
176     U8                      Reserved3;                  /* 0x06 */
177     U8                      MsgFlags;                   /* 0x07 */
178     U8                      VP_ID;                      /* 0x08 */
179     U8                      VF_ID;                      /* 0x09 */
180     U16                     Reserved4;                  /* 0x0A */
181     MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x0C */
182 } MPI2_TOOLBOX_MEM_MOVE_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
183   Mpi2ToolboxMemMoveRequest_t, MPI2_POINTER pMpi2ToolboxMemMoveRequest_t;
184
185
186 /****************************************************************************
187 *  Toolbox Diagnostic Data Upload request
188 ****************************************************************************/
189
190 typedef struct _MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST
191 {
192     U8                      Tool;                       /* 0x00 */
193     U8                      Reserved1;                  /* 0x01 */
194     U8                      ChainOffset;                /* 0x02 */
195     U8                      Function;                   /* 0x03 */
196     U16                     Reserved2;                  /* 0x04 */
197     U8                      Reserved3;                  /* 0x06 */
198     U8                      MsgFlags;                   /* 0x07 */
199     U8                      VP_ID;                      /* 0x08 */
200     U8                      VF_ID;                      /* 0x09 */
201     U16                     Reserved4;                  /* 0x0A */
202     U8                      SGLFlags;                   /* 0x0C */
203     U8                      Reserved5;                  /* 0x0D */
204     U16                     Reserved6;                  /* 0x0E */
205     U32                     Flags;                      /* 0x10 */
206     U32                     DataLength;                 /* 0x14 */
207     MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x18 */
208 } MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
209   MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
210   Mpi2ToolboxDiagDataUploadRequest_t,
211   MPI2_POINTER pMpi2ToolboxDiagDataUploadRequest_t;
212
213 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
214
215
216 typedef struct _MPI2_DIAG_DATA_UPLOAD_HEADER
217 {
218     U32                     DiagDataLength;             /* 00h */
219     U8                      FormatCode;                 /* 04h */
220     U8                      Reserved1;                  /* 05h */
221     U16                     Reserved2;                  /* 06h */
222 } MPI2_DIAG_DATA_UPLOAD_HEADER, MPI2_POINTER PTR_MPI2_DIAG_DATA_UPLOAD_HEADER,
223   Mpi2DiagDataUploadHeader_t, MPI2_POINTER pMpi2DiagDataUploadHeader_t;
224
225
226 /****************************************************************************
227 *  Toolbox ISTWI Read Write Tool
228 ****************************************************************************/
229
230 /* Toolbox ISTWI Read Write Tool request message */
231 typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST
232 {
233     U8                      Tool;                       /* 0x00 */
234     U8                      Reserved1;                  /* 0x01 */
235     U8                      ChainOffset;                /* 0x02 */
236     U8                      Function;                   /* 0x03 */
237     U16                     Reserved2;                  /* 0x04 */
238     U8                      Reserved3;                  /* 0x06 */
239     U8                      MsgFlags;                   /* 0x07 */
240     U8                      VP_ID;                      /* 0x08 */
241     U8                      VF_ID;                      /* 0x09 */
242     U16                     Reserved4;                  /* 0x0A */
243     U32                     Reserved5;                  /* 0x0C */
244     U32                     Reserved6;                  /* 0x10 */
245     U8                      DevIndex;                   /* 0x14 */
246     U8                      Action;                     /* 0x15 */
247     U8                      SGLFlags;                   /* 0x16 */
248     U8                      Flags;                      /* 0x17 */
249     U16                     TxDataLength;               /* 0x18 */
250     U16                     RxDataLength;               /* 0x1A */
251     U32                     Reserved8;                  /* 0x1C */
252     U32                     Reserved9;                  /* 0x20 */
253     U32                     Reserved10;                 /* 0x24 */
254     U32                     Reserved11;                 /* 0x28 */
255     U32                     Reserved12;                 /* 0x2C */
256     MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x30 */
257 } MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
258   MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
259   Mpi2ToolboxIstwiReadWriteRequest_t,
260   MPI2_POINTER pMpi2ToolboxIstwiReadWriteRequest_t;
261
262 /* values for the Action field */
263 #define MPI2_TOOL_ISTWI_ACTION_READ_DATA            (0x01)
264 #define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA           (0x02)
265 #define MPI2_TOOL_ISTWI_ACTION_SEQUENCE             (0x03)
266 #define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS          (0x10)
267 #define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS          (0x11)
268 #define MPI2_TOOL_ISTWI_ACTION_RESET                (0x12)
269
270 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
271
272 /* values for the Flags field */
273 #define MPI2_TOOL_ISTWI_FLAG_AUTO_RESERVE_RELEASE   (0x80)
274 #define MPI2_TOOL_ISTWI_FLAG_PAGE_ADDR_MASK         (0x07)
275
276
277 /* Toolbox ISTWI Read Write Tool reply message */
278 typedef struct _MPI2_TOOLBOX_ISTWI_REPLY
279 {
280     U8                      Tool;                       /* 0x00 */
281     U8                      Reserved1;                  /* 0x01 */
282     U8                      MsgLength;                  /* 0x02 */
283     U8                      Function;                   /* 0x03 */
284     U16                     Reserved2;                  /* 0x04 */
285     U8                      Reserved3;                  /* 0x06 */
286     U8                      MsgFlags;                   /* 0x07 */
287     U8                      VP_ID;                      /* 0x08 */
288     U8                      VF_ID;                      /* 0x09 */
289     U16                     Reserved4;                  /* 0x0A */
290     U16                     Reserved5;                  /* 0x0C */
291     U16                     IOCStatus;                  /* 0x0E */
292     U32                     IOCLogInfo;                 /* 0x10 */
293     U8                      DevIndex;                   /* 0x14 */
294     U8                      Action;                     /* 0x15 */
295     U8                      IstwiStatus;                /* 0x16 */
296     U8                      Reserved6;                  /* 0x17 */
297     U16                     TxDataCount;                /* 0x18 */
298     U16                     RxDataCount;                /* 0x1A */
299 } MPI2_TOOLBOX_ISTWI_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_REPLY,
300   Mpi2ToolboxIstwiReply_t, MPI2_POINTER pMpi2ToolboxIstwiReply_t;
301
302
303 /****************************************************************************
304 *  Toolbox Beacon Tool request
305 ****************************************************************************/
306
307 typedef struct _MPI2_TOOLBOX_BEACON_REQUEST
308 {
309     U8                      Tool;                       /* 0x00 */
310     U8                      Reserved1;                  /* 0x01 */
311     U8                      ChainOffset;                /* 0x02 */
312     U8                      Function;                   /* 0x03 */
313     U16                     Reserved2;                  /* 0x04 */
314     U8                      Reserved3;                  /* 0x06 */
315     U8                      MsgFlags;                   /* 0x07 */
316     U8                      VP_ID;                      /* 0x08 */
317     U8                      VF_ID;                      /* 0x09 */
318     U16                     Reserved4;                  /* 0x0A */
319     U8                      Reserved5;                  /* 0x0C */
320     U8                      PhysicalPort;               /* 0x0D */
321     U8                      Reserved6;                  /* 0x0E */
322     U8                      Flags;                      /* 0x0F */
323 } MPI2_TOOLBOX_BEACON_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_BEACON_REQUEST,
324   Mpi2ToolboxBeaconRequest_t, MPI2_POINTER pMpi2ToolboxBeaconRequest_t;
325
326 /* values for the Flags field */
327 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF       (0x00)
328 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON        (0x01)
329
330
331 /****************************************************************************
332 *  Toolbox Diagnostic CLI Tool
333 ****************************************************************************/
334
335 #define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH    (0x5C)
336
337 /* MPI v2.0 Toolbox Diagnostic CLI Tool request message */
338 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
339 {
340     U8                      Tool;                       /* 0x00 */
341     U8                      Reserved1;                  /* 0x01 */
342     U8                      ChainOffset;                /* 0x02 */
343     U8                      Function;                   /* 0x03 */
344     U16                     Reserved2;                  /* 0x04 */
345     U8                      Reserved3;                  /* 0x06 */
346     U8                      MsgFlags;                   /* 0x07 */
347     U8                      VP_ID;                      /* 0x08 */
348     U8                      VF_ID;                      /* 0x09 */
349     U16                     Reserved4;                  /* 0x0A */
350     U8                      SGLFlags;                   /* 0x0C */
351     U8                      Reserved5;                  /* 0x0D */
352     U16                     Reserved6;                  /* 0x0E */
353     U32                     DataLength;                 /* 0x10 */
354     U8                      DiagnosticCliCommand[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH]; /* 0x14 */
355     MPI2_MPI_SGE_IO_UNION   SGL;                        /* 0x70 */
356 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
357   MPI2_POINTER PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
358   Mpi2ToolboxDiagnosticCliRequest_t,
359   MPI2_POINTER pMpi2ToolboxDiagnosticCliRequest_t;
360
361 /* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
362
363
364 /* MPI v2.5 Toolbox Diagnostic CLI Tool request message */
365 typedef struct _MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST
366 {
367     U8                      Tool;                       /* 0x00 */
368     U8                      Reserved1;                  /* 0x01 */
369     U8                      ChainOffset;                /* 0x02 */
370     U8                      Function;                   /* 0x03 */
371     U16                     Reserved2;                  /* 0x04 */
372     U8                      Reserved3;                  /* 0x06 */
373     U8                      MsgFlags;                   /* 0x07 */
374     U8                      VP_ID;                      /* 0x08 */
375     U8                      VF_ID;                      /* 0x09 */
376     U16                     Reserved4;                  /* 0x0A */
377     U32                     Reserved5;                  /* 0x0C */
378     U32                     DataLength;                 /* 0x10 */
379     U8                      DiagnosticCliCommand[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH]; /* 0x14 */
380     MPI25_SGE_IO_UNION      SGL;                        /* 0x70 */
381 } MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
382   MPI2_POINTER PTR_MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
383   Mpi25ToolboxDiagnosticCliRequest_t,
384   MPI2_POINTER pMpi25ToolboxDiagnosticCliRequest_t;
385
386
387 /* Toolbox Diagnostic CLI Tool reply message */
388 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY
389 {
390     U8                      Tool;                       /* 0x00 */
391     U8                      Reserved1;                  /* 0x01 */
392     U8                      MsgLength;                  /* 0x02 */
393     U8                      Function;                   /* 0x03 */
394     U16                     Reserved2;                  /* 0x04 */
395     U8                      Reserved3;                  /* 0x06 */
396     U8                      MsgFlags;                   /* 0x07 */
397     U8                      VP_ID;                      /* 0x08 */
398     U8                      VF_ID;                      /* 0x09 */
399     U16                     Reserved4;                  /* 0x0A */
400     U16                     Reserved5;                  /* 0x0C */
401     U16                     IOCStatus;                  /* 0x0E */
402     U32                     IOCLogInfo;                 /* 0x10 */
403     U32                     ReturnedDataLength;         /* 0x14 */
404 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
405   MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
406   Mpi2ToolboxDiagnosticCliReply_t,
407   MPI2_POINTER pMpi2ToolboxDiagnosticCliReply_t;
408
409
410 /****************************************************************************
411 *  Toolbox Console Text Display Tool
412 ****************************************************************************/
413
414 /* Toolbox Console Text Display Tool request message */
415 typedef struct _MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST
416 {
417     U8                      Tool;               /* 0x00 */
418     U8                      Reserved1;          /* 0x01 */
419     U8                      ChainOffset;        /* 0x02 */
420     U8                      Function;           /* 0x03 */
421     U16                     Reserved2;          /* 0x04 */
422     U8                      Reserved3;          /* 0x06 */
423     U8                      MsgFlags;           /* 0x07 */
424     U8                      VP_ID;              /* 0x08 */
425     U8                      VF_ID;              /* 0x09 */
426     U16                     Reserved4;          /* 0x0A */
427     U8                      Console;            /* 0x0C */
428     U8                      Flags;              /* 0x0D */
429     U16                     Reserved6;          /* 0x0E */
430     U8                      TextToDisplay[4];   /* 0x10 */ /* actual length determined at runtime based on frame size */
431 } MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
432   MPI2_POINTER PTR_MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
433   Mpi2ToolboxTextDisplayRequest_t,
434   MPI2_POINTER pMpi2ToolboxTextDisplayRequest_t;
435
436 /* defines for the Console field */
437 #define MPI2_TOOLBOX_CONSOLE_TYPE_MASK          (0xF0)
438 #define MPI2_TOOLBOX_CONSOLE_TYPE_DEFAULT       (0x00)
439 #define MPI2_TOOLBOX_CONSOLE_TYPE_UART          (0x10)
440 #define MPI2_TOOLBOX_CONSOLE_TYPE_ETHERNET      (0x20)
441
442 #define MPI2_TOOLBOX_CONSOLE_NUMBER_MASK        (0x0F)
443
444 /* defines for the Flags field */
445 #define MPI2_TOOLBOX_CONSOLE_FLAG_TIMESTAMP     (0x01)
446
447
448
449 /*****************************************************************************
450 *
451 *       Diagnostic Buffer Messages
452 *
453 *****************************************************************************/
454
455
456 /****************************************************************************
457 *  Diagnostic Buffer Post request
458 ****************************************************************************/
459
460 typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST
461 {
462     U8                      ExtendedType;               /* 0x00 */
463     U8                      BufferType;                 /* 0x01 */
464     U8                      ChainOffset;                /* 0x02 */
465     U8                      Function;                   /* 0x03 */
466     U16                     Reserved2;                  /* 0x04 */
467     U8                      Reserved3;                  /* 0x06 */
468     U8                      MsgFlags;                   /* 0x07 */
469     U8                      VP_ID;                      /* 0x08 */
470     U8                      VF_ID;                      /* 0x09 */
471     U16                     Reserved4;                  /* 0x0A */
472     U64                     BufferAddress;              /* 0x0C */
473     U32                     BufferLength;               /* 0x14 */
474     U32                     Reserved5;                  /* 0x18 */
475     U32                     Reserved6;                  /* 0x1C */
476     U32                     Flags;                      /* 0x20 */
477     U32                     ProductSpecific[23];        /* 0x24 */
478 } MPI2_DIAG_BUFFER_POST_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
479   Mpi2DiagBufferPostRequest_t, MPI2_POINTER pMpi2DiagBufferPostRequest_t;
480
481 /* values for the ExtendedType field */
482 #define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION         (0x02)
483
484 /* values for the BufferType field */
485 #define MPI2_DIAG_BUF_TYPE_TRACE                    (0x00)
486 #define MPI2_DIAG_BUF_TYPE_SNAPSHOT                 (0x01)
487 #define MPI2_DIAG_BUF_TYPE_EXTENDED                 (0x02)
488 /* count of the number of buffer types */
489 #define MPI2_DIAG_BUF_TYPE_COUNT                    (0x03)
490
491 /* values for the Flags field */
492 #define MPI2_DIAG_BUF_FLAG_RELEASE_ON_FULL          (0x00000002) /* for MPI v2.0 products only */
493 #define MPI2_DIAG_BUF_FLAG_IMMEDIATE_RELEASE        (0x00000001)
494
495
496 /****************************************************************************
497 *  Diagnostic Buffer Post reply
498 ****************************************************************************/
499
500 typedef struct _MPI2_DIAG_BUFFER_POST_REPLY
501 {
502     U8                      ExtendedType;               /* 0x00 */
503     U8                      BufferType;                 /* 0x01 */
504     U8                      MsgLength;                  /* 0x02 */
505     U8                      Function;                   /* 0x03 */
506     U16                     Reserved2;                  /* 0x04 */
507     U8                      Reserved3;                  /* 0x06 */
508     U8                      MsgFlags;                   /* 0x07 */
509     U8                      VP_ID;                      /* 0x08 */
510     U8                      VF_ID;                      /* 0x09 */
511     U16                     Reserved4;                  /* 0x0A */
512     U16                     Reserved5;                  /* 0x0C */
513     U16                     IOCStatus;                  /* 0x0E */
514     U32                     IOCLogInfo;                 /* 0x10 */
515     U32                     TransferLength;             /* 0x14 */
516 } MPI2_DIAG_BUFFER_POST_REPLY, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REPLY,
517   Mpi2DiagBufferPostReply_t, MPI2_POINTER pMpi2DiagBufferPostReply_t;
518
519
520 /****************************************************************************
521 *  Diagnostic Release request
522 ****************************************************************************/
523
524 typedef struct _MPI2_DIAG_RELEASE_REQUEST
525 {
526     U8                      Reserved1;                  /* 0x00 */
527     U8                      BufferType;                 /* 0x01 */
528     U8                      ChainOffset;                /* 0x02 */
529     U8                      Function;                   /* 0x03 */
530     U16                     Reserved2;                  /* 0x04 */
531     U8                      Reserved3;                  /* 0x06 */
532     U8                      MsgFlags;                   /* 0x07 */
533     U8                      VP_ID;                      /* 0x08 */
534     U8                      VF_ID;                      /* 0x09 */
535     U16                     Reserved4;                  /* 0x0A */
536 } MPI2_DIAG_RELEASE_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REQUEST,
537   Mpi2DiagReleaseRequest_t, MPI2_POINTER pMpi2DiagReleaseRequest_t;
538
539
540 /****************************************************************************
541 *  Diagnostic Buffer Post reply
542 ****************************************************************************/
543
544 typedef struct _MPI2_DIAG_RELEASE_REPLY
545 {
546     U8                      Reserved1;                  /* 0x00 */
547     U8                      BufferType;                 /* 0x01 */
548     U8                      MsgLength;                  /* 0x02 */
549     U8                      Function;                   /* 0x03 */
550     U16                     Reserved2;                  /* 0x04 */
551     U8                      Reserved3;                  /* 0x06 */
552     U8                      MsgFlags;                   /* 0x07 */
553     U8                      VP_ID;                      /* 0x08 */
554     U8                      VF_ID;                      /* 0x09 */
555     U16                     Reserved4;                  /* 0x0A */
556     U16                     Reserved5;                  /* 0x0C */
557     U16                     IOCStatus;                  /* 0x0E */
558     U32                     IOCLogInfo;                 /* 0x10 */
559 } MPI2_DIAG_RELEASE_REPLY, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REPLY,
560   Mpi2DiagReleaseReply_t, MPI2_POINTER pMpi2DiagReleaseReply_t;
561
562
563 #endif
564