0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047 #ifndef MPI2_TOOL_H
0048 #define MPI2_TOOL_H
0049
0050
0051
0052
0053
0054
0055
0056
0057 #define MPI2_TOOLBOX_CLEAN_TOOL (0x00)
0058 #define MPI2_TOOLBOX_MEMORY_MOVE_TOOL (0x01)
0059 #define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL (0x02)
0060 #define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)
0061 #define MPI2_TOOLBOX_BEACON_TOOL (0x05)
0062 #define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL (0x06)
0063 #define MPI2_TOOLBOX_TEXT_DISPLAY_TOOL (0x07)
0064 #define MPI26_TOOLBOX_BACKEND_PCIE_LANE_MARGIN (0x08)
0065
0066
0067
0068
0069
0070 typedef struct _MPI2_TOOLBOX_REPLY {
0071 U8 Tool;
0072 U8 Reserved1;
0073 U8 MsgLength;
0074 U8 Function;
0075 U16 Reserved2;
0076 U8 Reserved3;
0077 U8 MsgFlags;
0078 U8 VP_ID;
0079 U8 VF_ID;
0080 U16 Reserved4;
0081 U16 Reserved5;
0082 U16 IOCStatus;
0083 U32 IOCLogInfo;
0084 } MPI2_TOOLBOX_REPLY, *PTR_MPI2_TOOLBOX_REPLY,
0085 Mpi2ToolboxReply_t, *pMpi2ToolboxReply_t;
0086
0087
0088
0089
0090
0091 typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST {
0092 U8 Tool;
0093 U8 Reserved1;
0094 U8 ChainOffset;
0095 U8 Function;
0096 U16 Reserved2;
0097 U8 Reserved3;
0098 U8 MsgFlags;
0099 U8 VP_ID;
0100 U8 VF_ID;
0101 U16 Reserved4;
0102 U32 Flags;
0103 } MPI2_TOOLBOX_CLEAN_REQUEST, *PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
0104 Mpi2ToolboxCleanRequest_t, *pMpi2ToolboxCleanRequest_t;
0105
0106
0107 #define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES (0x80000000)
0108 #define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES (0x40000000)
0109 #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES (0x20000000)
0110 #define MPI2_TOOLBOX_CLEAN_FW_CURRENT (0x10000000)
0111 #define MPI2_TOOLBOX_CLEAN_FW_BACKUP (0x08000000)
0112 #define MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC (0x04000000)
0113 #define MPI2_TOOLBOX_CLEAN_MEGARAID (0x02000000)
0114 #define MPI2_TOOLBOX_CLEAN_INITIALIZATION (0x01000000)
0115 #define MPI2_TOOLBOX_CLEAN_SBR (0x00800000)
0116 #define MPI2_TOOLBOX_CLEAN_SBR_BACKUP (0x00400000)
0117 #define MPI2_TOOLBOX_CLEAN_HIIM (0x00200000)
0118 #define MPI2_TOOLBOX_CLEAN_HIIA (0x00100000)
0119 #define MPI2_TOOLBOX_CLEAN_CTLR (0x00080000)
0120 #define MPI2_TOOLBOX_CLEAN_IMR_FIRMWARE (0x00040000)
0121 #define MPI2_TOOLBOX_CLEAN_MR_NVDATA (0x00020000)
0122 #define MPI2_TOOLBOX_CLEAN_RESERVED_5_16 (0x0001FFE0)
0123 #define MPI2_TOOLBOX_CLEAN_ALL_BUT_MPB (0x00000010)
0124 #define MPI2_TOOLBOX_CLEAN_ENTIRE_FLASH (0x00000008)
0125 #define MPI2_TOOLBOX_CLEAN_FLASH (0x00000004)
0126 #define MPI2_TOOLBOX_CLEAN_SEEPROM (0x00000002)
0127 #define MPI2_TOOLBOX_CLEAN_NVSRAM (0x00000001)
0128
0129
0130
0131
0132
0133 typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST {
0134 U8 Tool;
0135 U8 Reserved1;
0136 U8 ChainOffset;
0137 U8 Function;
0138 U16 Reserved2;
0139 U8 Reserved3;
0140 U8 MsgFlags;
0141 U8 VP_ID;
0142 U8 VF_ID;
0143 U16 Reserved4;
0144 MPI2_SGE_SIMPLE_UNION SGL;
0145 } MPI2_TOOLBOX_MEM_MOVE_REQUEST, *PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
0146 Mpi2ToolboxMemMoveRequest_t, *pMpi2ToolboxMemMoveRequest_t;
0147
0148
0149
0150
0151
0152 typedef struct _MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST {
0153 U8 Tool;
0154 U8 Reserved1;
0155 U8 ChainOffset;
0156 U8 Function;
0157 U16 Reserved2;
0158 U8 Reserved3;
0159 U8 MsgFlags;
0160 U8 VP_ID;
0161 U8 VF_ID;
0162 U16 Reserved4;
0163 U8 SGLFlags;
0164 U8 Reserved5;
0165 U16 Reserved6;
0166 U32 Flags;
0167 U32 DataLength;
0168 MPI2_SGE_SIMPLE_UNION SGL;
0169 } MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
0170 *PTR_MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
0171 Mpi2ToolboxDiagDataUploadRequest_t,
0172 *pMpi2ToolboxDiagDataUploadRequest_t;
0173
0174
0175
0176 typedef struct _MPI2_DIAG_DATA_UPLOAD_HEADER {
0177 U32 DiagDataLength;
0178 U8 FormatCode;
0179 U8 Reserved1;
0180 U16 Reserved2;
0181 } MPI2_DIAG_DATA_UPLOAD_HEADER, *PTR_MPI2_DIAG_DATA_UPLOAD_HEADER,
0182 Mpi2DiagDataUploadHeader_t, *pMpi2DiagDataUploadHeader_t;
0183
0184
0185
0186
0187
0188
0189 typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST {
0190 U8 Tool;
0191 U8 Reserved1;
0192 U8 ChainOffset;
0193 U8 Function;
0194 U16 Reserved2;
0195 U8 Reserved3;
0196 U8 MsgFlags;
0197 U8 VP_ID;
0198 U8 VF_ID;
0199 U16 Reserved4;
0200 U32 Reserved5;
0201 U32 Reserved6;
0202 U8 DevIndex;
0203 U8 Action;
0204 U8 SGLFlags;
0205 U8 Flags;
0206 U16 TxDataLength;
0207 U16 RxDataLength;
0208 U32 Reserved8;
0209 U32 Reserved9;
0210 U32 Reserved10;
0211 U32 Reserved11;
0212 U32 Reserved12;
0213 MPI2_SGE_SIMPLE_UNION SGL;
0214 } MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
0215 *PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
0216 Mpi2ToolboxIstwiReadWriteRequest_t,
0217 *pMpi2ToolboxIstwiReadWriteRequest_t;
0218
0219
0220 #define MPI2_TOOL_ISTWI_ACTION_READ_DATA (0x01)
0221 #define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA (0x02)
0222 #define MPI2_TOOL_ISTWI_ACTION_SEQUENCE (0x03)
0223 #define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS (0x10)
0224 #define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS (0x11)
0225 #define MPI2_TOOL_ISTWI_ACTION_RESET (0x12)
0226
0227
0228
0229
0230 #define MPI2_TOOL_ISTWI_FLAG_AUTO_RESERVE_RELEASE (0x80)
0231 #define MPI2_TOOL_ISTWI_FLAG_PAGE_ADDR_MASK (0x07)
0232
0233
0234 #define MPI26_TOOL_ISTWI_MSGFLG_ADDR_MASK (0x01)
0235
0236 #define MPI26_TOOL_ISTWI_MSGFLG_ADDR_INDEX (0x00)
0237
0238 #define MPI26_TOOL_ISTWI_MSGFLG_ADDR_INFO (0x01)
0239
0240
0241 typedef struct _MPI2_TOOLBOX_ISTWI_REPLY {
0242 U8 Tool;
0243 U8 Reserved1;
0244 U8 MsgLength;
0245 U8 Function;
0246 U16 Reserved2;
0247 U8 Reserved3;
0248 U8 MsgFlags;
0249 U8 VP_ID;
0250 U8 VF_ID;
0251 U16 Reserved4;
0252 U16 Reserved5;
0253 U16 IOCStatus;
0254 U32 IOCLogInfo;
0255 U8 DevIndex;
0256 U8 Action;
0257 U8 IstwiStatus;
0258 U8 Reserved6;
0259 U16 TxDataCount;
0260 U16 RxDataCount;
0261 } MPI2_TOOLBOX_ISTWI_REPLY, *PTR_MPI2_TOOLBOX_ISTWI_REPLY,
0262 Mpi2ToolboxIstwiReply_t, *pMpi2ToolboxIstwiReply_t;
0263
0264
0265
0266
0267
0268 typedef struct _MPI2_TOOLBOX_BEACON_REQUEST {
0269 U8 Tool;
0270 U8 Reserved1;
0271 U8 ChainOffset;
0272 U8 Function;
0273 U16 Reserved2;
0274 U8 Reserved3;
0275 U8 MsgFlags;
0276 U8 VP_ID;
0277 U8 VF_ID;
0278 U16 Reserved4;
0279 U8 Reserved5;
0280 U8 PhysicalPort;
0281 U8 Reserved6;
0282 U8 Flags;
0283 } MPI2_TOOLBOX_BEACON_REQUEST, *PTR_MPI2_TOOLBOX_BEACON_REQUEST,
0284 Mpi2ToolboxBeaconRequest_t, *pMpi2ToolboxBeaconRequest_t;
0285
0286
0287 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF (0x00)
0288 #define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON (0x01)
0289
0290
0291
0292
0293
0294 #define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH (0x5C)
0295
0296
0297 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
0298 U8 Tool;
0299 U8 Reserved1;
0300 U8 ChainOffset;
0301 U8 Function;
0302 U16 Reserved2;
0303 U8 Reserved3;
0304 U8 MsgFlags;
0305 U8 VP_ID;
0306 U8 VF_ID;
0307 U16 Reserved4;
0308 U8 SGLFlags;
0309 U8 Reserved5;
0310 U16 Reserved6;
0311 U32 DataLength;
0312 U8 DiagnosticCliCommand[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH];
0313 MPI2_MPI_SGE_IO_UNION SGL;
0314 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
0315 *PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
0316 Mpi2ToolboxDiagnosticCliRequest_t,
0317 *pMpi2ToolboxDiagnosticCliRequest_t;
0318
0319
0320
0321
0322 typedef struct _MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
0323 U8 Tool;
0324 U8 Reserved1;
0325 U8 ChainOffset;
0326 U8 Function;
0327 U16 Reserved2;
0328 U8 Reserved3;
0329 U8 MsgFlags;
0330 U8 VP_ID;
0331 U8 VF_ID;
0332 U16 Reserved4;
0333 U32 Reserved5;
0334 U32 DataLength;
0335 U8 DiagnosticCliCommand[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH];
0336 MPI25_SGE_IO_UNION SGL;
0337 } MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
0338 *PTR_MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
0339 Mpi25ToolboxDiagnosticCliRequest_t,
0340 *pMpi25ToolboxDiagnosticCliRequest_t;
0341
0342
0343 typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY {
0344 U8 Tool;
0345 U8 Reserved1;
0346 U8 MsgLength;
0347 U8 Function;
0348 U16 Reserved2;
0349 U8 Reserved3;
0350 U8 MsgFlags;
0351 U8 VP_ID;
0352 U8 VF_ID;
0353 U16 Reserved4;
0354 U16 Reserved5;
0355 U16 IOCStatus;
0356 U32 IOCLogInfo;
0357 U32 ReturnedDataLength;
0358 } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
0359 *PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
0360 Mpi2ToolboxDiagnosticCliReply_t,
0361 *pMpi2ToolboxDiagnosticCliReply_t;
0362
0363
0364
0365
0366
0367
0368
0369 typedef struct _MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST {
0370 U8 Tool;
0371 U8 Reserved1;
0372 U8 ChainOffset;
0373 U8 Function;
0374 U16 Reserved2;
0375 U8 Reserved3;
0376 U8 MsgFlags;
0377 U8 VP_ID;
0378 U8 VF_ID;
0379 U16 Reserved4;
0380 U8 Console;
0381 U8 Flags;
0382 U16 Reserved6;
0383 U8 TextToDisplay[4];
0384 } MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
0385 *PTR_MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
0386 Mpi2ToolboxTextDisplayRequest_t,
0387 *pMpi2ToolboxTextDisplayRequest_t;
0388
0389
0390 #define MPI2_TOOLBOX_CONSOLE_TYPE_MASK (0xF0)
0391 #define MPI2_TOOLBOX_CONSOLE_TYPE_DEFAULT (0x00)
0392 #define MPI2_TOOLBOX_CONSOLE_TYPE_UART (0x10)
0393 #define MPI2_TOOLBOX_CONSOLE_TYPE_ETHERNET (0x20)
0394
0395 #define MPI2_TOOLBOX_CONSOLE_NUMBER_MASK (0x0F)
0396
0397
0398 #define MPI2_TOOLBOX_CONSOLE_FLAG_TIMESTAMP (0x01)
0399
0400
0401
0402
0403
0404
0405
0406
0407 typedef struct _MPI26_TOOLBOX_LANE_MARGIN_REQUEST {
0408 U8 Tool;
0409 U8 Reserved1;
0410 U8 ChainOffset;
0411 U8 Function;
0412 U16 Reserved2;
0413 U8 Reserved3;
0414 U8 MsgFlags;
0415 U8 VP_ID;
0416 U8 VF_ID;
0417 U16 Reserved4;
0418 U8 Command;
0419 U8 SwitchPort;
0420 U16 DevHandle;
0421 U8 RegisterOffset;
0422 U8 Reserved5;
0423 U16 DataLength;
0424 MPI25_SGE_IO_UNION SGL;
0425 } MPI26_TOOLBOX_LANE_MARGINING_REQUEST,
0426 *PTR_MPI2_TOOLBOX_LANE_MARGINING_REQUEST,
0427 Mpi26ToolboxLaneMarginingRequest_t,
0428 *pMpi2ToolboxLaneMarginingRequest_t;
0429
0430
0431 #define MPI26_TOOL_MARGIN_COMMAND_ENTER_MARGIN_MODE (0x01)
0432 #define MPI26_TOOL_MARGIN_COMMAND_READ_REGISTER_DATA (0x02)
0433 #define MPI26_TOOL_MARGIN_COMMAND_WRITE_REGISTER_DATA (0x03)
0434 #define MPI26_TOOL_MARGIN_COMMAND_EXIT_MARGIN_MODE (0x04)
0435
0436
0437
0438 typedef struct _MPI26_TOOLBOX_LANE_MARGIN_REPLY {
0439 U8 Tool;
0440 U8 Reserved1;
0441 U8 MsgLength;
0442 U8 Function;
0443 U16 Reserved2;
0444 U8 Reserved3;
0445 U8 MsgFlags;
0446 U8 VP_ID;
0447 U8 VF_ID;
0448 U16 Reserved4;
0449 U16 Reserved5;
0450 U16 IOCStatus;
0451 U32 IOCLogInfo;
0452 U16 ReturnedDataLength;
0453 U16 Reserved6;
0454 } MPI26_TOOLBOX_LANE_MARGINING_REPLY,
0455 *PTR_MPI26_TOOLBOX_LANE_MARGINING_REPLY,
0456 Mpi26ToolboxLaneMarginingReply_t,
0457 *pMpi26ToolboxLaneMarginingReply_t;
0458
0459
0460
0461
0462
0463
0464
0465
0466
0467
0468
0469
0470 typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST {
0471 U8 ExtendedType;
0472 U8 BufferType;
0473 U8 ChainOffset;
0474 U8 Function;
0475 U16 Reserved2;
0476 U8 Reserved3;
0477 U8 MsgFlags;
0478 U8 VP_ID;
0479 U8 VF_ID;
0480 U16 Reserved4;
0481 U64 BufferAddress;
0482 U32 BufferLength;
0483 U32 Reserved5;
0484 U32 Reserved6;
0485 U32 Flags;
0486 U32 ProductSpecific[23];
0487 } MPI2_DIAG_BUFFER_POST_REQUEST, *PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
0488 Mpi2DiagBufferPostRequest_t, *pMpi2DiagBufferPostRequest_t;
0489
0490
0491 #define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION (0x02)
0492
0493
0494 #define MPI2_DIAG_BUF_TYPE_TRACE (0x00)
0495 #define MPI2_DIAG_BUF_TYPE_SNAPSHOT (0x01)
0496 #define MPI2_DIAG_BUF_TYPE_EXTENDED (0x02)
0497
0498 #define MPI2_DIAG_BUF_TYPE_COUNT (0x03)
0499
0500
0501 #define MPI2_DIAG_BUF_FLAG_RELEASE_ON_FULL (0x00000002)
0502 #define MPI2_DIAG_BUF_FLAG_IMMEDIATE_RELEASE (0x00000001)
0503
0504
0505
0506
0507
0508 typedef struct _MPI2_DIAG_BUFFER_POST_REPLY {
0509 U8 ExtendedType;
0510 U8 BufferType;
0511 U8 MsgLength;
0512 U8 Function;
0513 U16 Reserved2;
0514 U8 Reserved3;
0515 U8 MsgFlags;
0516 U8 VP_ID;
0517 U8 VF_ID;
0518 U16 Reserved4;
0519 U16 Reserved5;
0520 U16 IOCStatus;
0521 U32 IOCLogInfo;
0522 U32 TransferLength;
0523 } MPI2_DIAG_BUFFER_POST_REPLY, *PTR_MPI2_DIAG_BUFFER_POST_REPLY,
0524 Mpi2DiagBufferPostReply_t, *pMpi2DiagBufferPostReply_t;
0525
0526
0527
0528
0529
0530 typedef struct _MPI2_DIAG_RELEASE_REQUEST {
0531 U8 Reserved1;
0532 U8 BufferType;
0533 U8 ChainOffset;
0534 U8 Function;
0535 U16 Reserved2;
0536 U8 Reserved3;
0537 U8 MsgFlags;
0538 U8 VP_ID;
0539 U8 VF_ID;
0540 U16 Reserved4;
0541 } MPI2_DIAG_RELEASE_REQUEST, *PTR_MPI2_DIAG_RELEASE_REQUEST,
0542 Mpi2DiagReleaseRequest_t, *pMpi2DiagReleaseRequest_t;
0543
0544
0545
0546
0547
0548 typedef struct _MPI2_DIAG_RELEASE_REPLY {
0549 U8 Reserved1;
0550 U8 BufferType;
0551 U8 MsgLength;
0552 U8 Function;
0553 U16 Reserved2;
0554 U8 Reserved3;
0555 U8 MsgFlags;
0556 U8 VP_ID;
0557 U8 VF_ID;
0558 U16 Reserved4;
0559 U16 Reserved5;
0560 U16 IOCStatus;
0561 U32 IOCLogInfo;
0562 } MPI2_DIAG_RELEASE_REPLY, *PTR_MPI2_DIAG_RELEASE_REPLY,
0563 Mpi2DiagReleaseReply_t, *pMpi2DiagReleaseReply_t;
0564
0565 #endif