Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  *  Copyright (c) 2001-2008 LSI Corporation.
0004  *
0005  *
0006  *           Name:  mpi_tool.h
0007  *          Title:  MPI Toolbox structures and definitions
0008  *  Creation Date:  July 30, 2001
0009  *
0010  *    mpi_tool.h Version:  01.05.03
0011  *
0012  *  Version History
0013  *  ---------------
0014  *
0015  *  Date      Version   Description
0016  *  --------  --------  ------------------------------------------------------
0017  *  08-08-01  01.02.01  Original release.
0018  *  08-29-01  01.02.02  Added DIAG_DATA_UPLOAD_HEADER and related defines.
0019  *  01-16-04  01.02.03  Added defines and structures for new tools
0020  *.                     MPI_TOOLBOX_ISTWI_READ_WRITE_TOOL and
0021  *                      MPI_TOOLBOX_FC_MANAGEMENT_TOOL.
0022  *  04-29-04  01.02.04  Added message structures for Diagnostic Buffer Post and
0023  *                      Diagnostic Release requests and replies.
0024  *  05-11-04  01.03.01  Original release for MPI v1.3.
0025  *  08-19-04  01.05.01  Original release for MPI v1.5.
0026  *  10-06-04  01.05.02  Added define for MPI_DIAG_BUF_TYPE_COUNT.
0027  *  02-09-05  01.05.03  Added frame size option to FC management tool.
0028  *                      Added Beacon tool to the Toolbox.
0029  *  --------------------------------------------------------------------------
0030  */
0031 
0032 #ifndef MPI_TOOL_H
0033 #define MPI_TOOL_H
0034 
0035 #define MPI_TOOLBOX_CLEAN_TOOL                      (0x00)
0036 #define MPI_TOOLBOX_MEMORY_MOVE_TOOL                (0x01)
0037 #define MPI_TOOLBOX_DIAG_DATA_UPLOAD_TOOL           (0x02)
0038 #define MPI_TOOLBOX_ISTWI_READ_WRITE_TOOL           (0x03)
0039 #define MPI_TOOLBOX_FC_MANAGEMENT_TOOL              (0x04)
0040 #define MPI_TOOLBOX_BEACON_TOOL                     (0x05)
0041 
0042 
0043 /****************************************************************************/
0044 /* Toolbox reply                                                            */
0045 /****************************************************************************/
0046 
0047 typedef struct _MSG_TOOLBOX_REPLY
0048 {
0049     U8                      Tool;                       /* 00h */
0050     U8                      Reserved;                   /* 01h */
0051     U8                      MsgLength;                  /* 02h */
0052     U8                      Function;                   /* 03h */
0053     U16                     Reserved1;                  /* 04h */
0054     U8                      Reserved2;                  /* 06h */
0055     U8                      MsgFlags;                   /* 07h */
0056     U32                     MsgContext;                 /* 08h */
0057     U16                     Reserved3;                  /* 0Ch */
0058     U16                     IOCStatus;                  /* 0Eh */
0059     U32                     IOCLogInfo;                 /* 10h */
0060 } MSG_TOOLBOX_REPLY, MPI_POINTER PTR_MSG_TOOLBOX_REPLY,
0061   ToolboxReply_t, MPI_POINTER pToolboxReply_t;
0062 
0063 
0064 /****************************************************************************/
0065 /* Toolbox Clean Tool request                                               */
0066 /****************************************************************************/
0067 
0068 typedef struct _MSG_TOOLBOX_CLEAN_REQUEST
0069 {
0070     U8                      Tool;                       /* 00h */
0071     U8                      Reserved;                   /* 01h */
0072     U8                      ChainOffset;                /* 02h */
0073     U8                      Function;                   /* 03h */
0074     U16                     Reserved1;                  /* 04h */
0075     U8                      Reserved2;                  /* 06h */
0076     U8                      MsgFlags;                   /* 07h */
0077     U32                     MsgContext;                 /* 08h */
0078     U32                     Flags;                      /* 0Ch */
0079 } MSG_TOOLBOX_CLEAN_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_CLEAN_REQUEST,
0080   ToolboxCleanRequest_t, MPI_POINTER pToolboxCleanRequest_t;
0081 
0082 #define MPI_TOOLBOX_CLEAN_NVSRAM                    (0x00000001)
0083 #define MPI_TOOLBOX_CLEAN_SEEPROM                   (0x00000002)
0084 #define MPI_TOOLBOX_CLEAN_FLASH                     (0x00000004)
0085 #define MPI_TOOLBOX_CLEAN_BOOTLOADER                (0x04000000)
0086 #define MPI_TOOLBOX_CLEAN_FW_BACKUP                 (0x08000000)
0087 #define MPI_TOOLBOX_CLEAN_FW_CURRENT                (0x10000000)
0088 #define MPI_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES       (0x20000000)
0089 #define MPI_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES    (0x40000000)
0090 #define MPI_TOOLBOX_CLEAN_BOOT_SERVICES             (0x80000000)
0091 
0092 
0093 /****************************************************************************/
0094 /* Toolbox Memory Move request                                              */
0095 /****************************************************************************/
0096 
0097 typedef struct _MSG_TOOLBOX_MEM_MOVE_REQUEST
0098 {
0099     U8                      Tool;                       /* 00h */
0100     U8                      Reserved;                   /* 01h */
0101     U8                      ChainOffset;                /* 02h */
0102     U8                      Function;                   /* 03h */
0103     U16                     Reserved1;                  /* 04h */
0104     U8                      Reserved2;                  /* 06h */
0105     U8                      MsgFlags;                   /* 07h */
0106     U32                     MsgContext;                 /* 08h */
0107     SGE_SIMPLE_UNION        SGL;                        /* 0Ch */
0108 } MSG_TOOLBOX_MEM_MOVE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_MEM_MOVE_REQUEST,
0109   ToolboxMemMoveRequest_t, MPI_POINTER pToolboxMemMoveRequest_t;
0110 
0111 
0112 /****************************************************************************/
0113 /* Toolbox Diagnostic Data Upload request                                   */
0114 /****************************************************************************/
0115 
0116 typedef struct _MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST
0117 {
0118     U8                      Tool;                       /* 00h */
0119     U8                      Reserved;                   /* 01h */
0120     U8                      ChainOffset;                /* 02h */
0121     U8                      Function;                   /* 03h */
0122     U16                     Reserved1;                  /* 04h */
0123     U8                      Reserved2;                  /* 06h */
0124     U8                      MsgFlags;                   /* 07h */
0125     U32                     MsgContext;                 /* 08h */
0126     U32                     Flags;                      /* 0Ch */
0127     U32                     Reserved3;                  /* 10h */
0128     SGE_SIMPLE_UNION        SGL;                        /* 14h */
0129 } MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
0130   ToolboxDiagDataUploadRequest_t, MPI_POINTER pToolboxDiagDataUploadRequest_t;
0131 
0132 typedef struct _DIAG_DATA_UPLOAD_HEADER
0133 {
0134     U32                     DiagDataLength;             /* 00h */
0135     U8                      FormatCode;                 /* 04h */
0136     U8                      Reserved;                   /* 05h */
0137     U16                     Reserved1;                  /* 06h */
0138 } DIAG_DATA_UPLOAD_HEADER, MPI_POINTER PTR_DIAG_DATA_UPLOAD_HEADER,
0139   DiagDataUploadHeader_t, MPI_POINTER pDiagDataUploadHeader_t;
0140 
0141 #define MPI_TB_DIAG_FORMAT_SCSI_PRINTF_1            (0x01)
0142 #define MPI_TB_DIAG_FORMAT_SCSI_2                   (0x02)
0143 #define MPI_TB_DIAG_FORMAT_SCSI_3                   (0x03)
0144 #define MPI_TB_DIAG_FORMAT_FC_TRACE_1               (0x04)
0145 
0146 
0147 /****************************************************************************/
0148 /* Toolbox ISTWI Read Write request                                         */
0149 /****************************************************************************/
0150 
0151 typedef struct _MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST
0152 {
0153     U8                      Tool;                       /* 00h */
0154     U8                      Reserved;                   /* 01h */
0155     U8                      ChainOffset;                /* 02h */
0156     U8                      Function;                   /* 03h */
0157     U16                     Reserved1;                  /* 04h */
0158     U8                      Reserved2;                  /* 06h */
0159     U8                      MsgFlags;                   /* 07h */
0160     U32                     MsgContext;                 /* 08h */
0161     U8                      Flags;                      /* 0Ch */
0162     U8                      BusNum;                     /* 0Dh */
0163     U16                     Reserved3;                  /* 0Eh */
0164     U8                      NumAddressBytes;            /* 10h */
0165     U8                      Reserved4;                  /* 11h */
0166     U16                     DataLength;                 /* 12h */
0167     U8                      DeviceAddr;                 /* 14h */
0168     U8                      Addr1;                      /* 15h */
0169     U8                      Addr2;                      /* 16h */
0170     U8                      Addr3;                      /* 17h */
0171     U32                     Reserved5;                  /* 18h */
0172     SGE_SIMPLE_UNION        SGL;                        /* 1Ch */
0173 } MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
0174   ToolboxIstwiReadWriteRequest_t, MPI_POINTER pToolboxIstwiReadWriteRequest_t;
0175 
0176 #define MPI_TB_ISTWI_FLAGS_WRITE                    (0x00)
0177 #define MPI_TB_ISTWI_FLAGS_READ                     (0x01)
0178 
0179 
0180 /****************************************************************************/
0181 /* Toolbox FC Management request                                            */
0182 /****************************************************************************/
0183 
0184 /* ActionInfo for Bus and TargetId */
0185 typedef struct _MPI_TB_FC_MANAGE_BUS_TID_AI
0186 {
0187     U16                     Reserved;                   /* 00h */
0188     U8                      Bus;                        /* 02h */
0189     U8                      TargetId;                   /* 03h */
0190 } MPI_TB_FC_MANAGE_BUS_TID_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_BUS_TID_AI,
0191   MpiTbFcManageBusTidAi_t, MPI_POINTER pMpiTbFcManageBusTidAi_t;
0192 
0193 /* ActionInfo for port identifier */
0194 typedef struct _MPI_TB_FC_MANAGE_PID_AI
0195 {
0196     U32                     PortIdentifier;             /* 00h */
0197 } MPI_TB_FC_MANAGE_PID_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_PID_AI,
0198   MpiTbFcManagePidAi_t, MPI_POINTER pMpiTbFcManagePidAi_t;
0199 
0200 /* ActionInfo for set max frame size */
0201 typedef struct _MPI_TB_FC_MANAGE_FRAME_SIZE_AI
0202 {
0203     U16                     FrameSize;                  /* 00h */
0204     U8                      PortNum;                    /* 02h */
0205     U8                      Reserved1;                  /* 03h */
0206 } MPI_TB_FC_MANAGE_FRAME_SIZE_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_FRAME_SIZE_AI,
0207   MpiTbFcManageFrameSizeAi_t, MPI_POINTER pMpiTbFcManageFrameSizeAi_t;
0208 
0209 /* union of ActionInfo */
0210 typedef union _MPI_TB_FC_MANAGE_AI_UNION
0211 {
0212     MPI_TB_FC_MANAGE_BUS_TID_AI     BusTid;
0213     MPI_TB_FC_MANAGE_PID_AI         Port;
0214     MPI_TB_FC_MANAGE_FRAME_SIZE_AI  FrameSize;
0215 } MPI_TB_FC_MANAGE_AI_UNION, MPI_POINTER PTR_MPI_TB_FC_MANAGE_AI_UNION,
0216   MpiTbFcManageAiUnion_t, MPI_POINTER pMpiTbFcManageAiUnion_t;
0217 
0218 typedef struct _MSG_TOOLBOX_FC_MANAGE_REQUEST
0219 {
0220     U8                          Tool;                   /* 00h */
0221     U8                          Reserved;               /* 01h */
0222     U8                          ChainOffset;            /* 02h */
0223     U8                          Function;               /* 03h */
0224     U16                         Reserved1;              /* 04h */
0225     U8                          Reserved2;              /* 06h */
0226     U8                          MsgFlags;               /* 07h */
0227     U32                         MsgContext;             /* 08h */
0228     U8                          Action;                 /* 0Ch */
0229     U8                          Reserved3;              /* 0Dh */
0230     U16                         Reserved4;              /* 0Eh */
0231     MPI_TB_FC_MANAGE_AI_UNION   ActionInfo;             /* 10h */
0232 } MSG_TOOLBOX_FC_MANAGE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_FC_MANAGE_REQUEST,
0233   ToolboxFcManageRequest_t, MPI_POINTER pToolboxFcManageRequest_t;
0234 
0235 /* defines for the Action field */
0236 #define MPI_TB_FC_MANAGE_ACTION_DISC_ALL            (0x00)
0237 #define MPI_TB_FC_MANAGE_ACTION_DISC_PID            (0x01)
0238 #define MPI_TB_FC_MANAGE_ACTION_DISC_BUS_TID        (0x02)
0239 #define MPI_TB_FC_MANAGE_ACTION_SET_MAX_FRAME_SIZE  (0x03)
0240 
0241 
0242 /****************************************************************************/
0243 /* Toolbox Beacon Tool request                                               */
0244 /****************************************************************************/
0245 
0246 typedef struct _MSG_TOOLBOX_BEACON_REQUEST
0247 {
0248     U8                      Tool;                       /* 00h */
0249     U8                      Reserved;                   /* 01h */
0250     U8                      ChainOffset;                /* 02h */
0251     U8                      Function;                   /* 03h */
0252     U16                     Reserved1;                  /* 04h */
0253     U8                      Reserved2;                  /* 06h */
0254     U8                      MsgFlags;                   /* 07h */
0255     U32                     MsgContext;                 /* 08h */
0256     U8                      ConnectNum;                 /* 0Ch */
0257     U8                      PortNum;                    /* 0Dh */
0258     U8                      Reserved3;                  /* 0Eh */
0259     U8                      Flags;                      /* 0Fh */
0260 } MSG_TOOLBOX_BEACON_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_BEACON_REQUEST,
0261   ToolboxBeaconRequest_t, MPI_POINTER pToolboxBeaconRequest_t;
0262 
0263 #define MPI_TOOLBOX_FLAGS_BEACON_MODE_OFF       (0x00)
0264 #define MPI_TOOLBOX_FLAGS_BEACON_MODE_ON        (0x01)
0265 
0266 
0267 /****************************************************************************/
0268 /* Diagnostic Buffer Post request                                           */
0269 /****************************************************************************/
0270 
0271 typedef struct _MSG_DIAG_BUFFER_POST_REQUEST
0272 {
0273     U8                      TraceLevel;                 /* 00h */
0274     U8                      BufferType;                 /* 01h */
0275     U8                      ChainOffset;                /* 02h */
0276     U8                      Function;                   /* 03h */
0277     U16                     Reserved1;                  /* 04h */
0278     U8                      Reserved2;                  /* 06h */
0279     U8                      MsgFlags;                   /* 07h */
0280     U32                     MsgContext;                 /* 08h */
0281     U32                     ExtendedType;               /* 0Ch */
0282     U32                     BufferLength;               /* 10h */
0283     U32                     ProductSpecific[4];         /* 14h */
0284     U32                     Reserved3;                  /* 24h */
0285     U64                     BufferAddress;              /* 28h */
0286 } MSG_DIAG_BUFFER_POST_REQUEST, MPI_POINTER PTR_MSG_DIAG_BUFFER_POST_REQUEST,
0287   DiagBufferPostRequest_t, MPI_POINTER pDiagBufferPostRequest_t;
0288 
0289 #define MPI_DIAG_BUF_TYPE_TRACE                     (0x00)
0290 #define MPI_DIAG_BUF_TYPE_SNAPSHOT                  (0x01)
0291 #define MPI_DIAG_BUF_TYPE_EXTENDED                  (0x02)
0292 /* count of the number of buffer types */
0293 #define MPI_DIAG_BUF_TYPE_COUNT                     (0x03)
0294 
0295 #define MPI_DIAG_EXTENDED_QTAG                      (0x00000001)
0296 
0297 
0298 /* Diagnostic Buffer Post reply */
0299 typedef struct _MSG_DIAG_BUFFER_POST_REPLY
0300 {
0301     U8                      Reserved1;                  /* 00h */
0302     U8                      BufferType;                 /* 01h */
0303     U8                      MsgLength;                  /* 02h */
0304     U8                      Function;                   /* 03h */
0305     U16                     Reserved2;                  /* 04h */
0306     U8                      Reserved3;                  /* 06h */
0307     U8                      MsgFlags;                   /* 07h */
0308     U32                     MsgContext;                 /* 08h */
0309     U16                     Reserved4;                  /* 0Ch */
0310     U16                     IOCStatus;                  /* 0Eh */
0311     U32                     IOCLogInfo;                 /* 10h */
0312     U32                     TransferLength;             /* 14h */
0313 } MSG_DIAG_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_DIAG_BUFFER_POST_REPLY,
0314   DiagBufferPostReply_t, MPI_POINTER pDiagBufferPostReply_t;
0315 
0316 
0317 /****************************************************************************/
0318 /* Diagnostic Release request                                               */
0319 /****************************************************************************/
0320 
0321 typedef struct _MSG_DIAG_RELEASE_REQUEST
0322 {
0323     U8                      Reserved1;                  /* 00h */
0324     U8                      BufferType;                 /* 01h */
0325     U8                      ChainOffset;                /* 02h */
0326     U8                      Function;                   /* 03h */
0327     U16                     Reserved2;                  /* 04h */
0328     U8                      Reserved3;                  /* 06h */
0329     U8                      MsgFlags;                   /* 07h */
0330     U32                     MsgContext;                 /* 08h */
0331 } MSG_DIAG_RELEASE_REQUEST, MPI_POINTER PTR_MSG_DIAG_RELEASE_REQUEST,
0332   DiagReleaseRequest_t, MPI_POINTER pDiagReleaseRequest_t;
0333 
0334 
0335 /* Diagnostic Release reply */
0336 typedef struct _MSG_DIAG_RELEASE_REPLY
0337 {
0338     U8                      Reserved1;                  /* 00h */
0339     U8                      BufferType;                 /* 01h */
0340     U8                      MsgLength;                  /* 02h */
0341     U8                      Function;                   /* 03h */
0342     U16                     Reserved2;                  /* 04h */
0343     U8                      Reserved3;                  /* 06h */
0344     U8                      MsgFlags;                   /* 07h */
0345     U32                     MsgContext;                 /* 08h */
0346     U16                     Reserved4;                  /* 0Ch */
0347     U16                     IOCStatus;                  /* 0Eh */
0348     U32                     IOCLogInfo;                 /* 10h */
0349 } MSG_DIAG_RELEASE_REPLY, MPI_POINTER PTR_MSG_DIAG_RELEASE_REPLY,
0350   DiagReleaseReply_t, MPI_POINTER pDiagReleaseReply_t;
0351 
0352 
0353 #endif
0354 
0355