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