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