1 /* $FreeBSD$ */ 2 /* 3 * Copyright (c) 2000-2001 LSI Logic Corporation. 4 * 5 * 6 * Name: MPI_IOC.H 7 * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages 8 * Creation Date: August 11, 2000 9 * 10 * MPI Version: 01.02.04 11 * 12 * Version History 13 * --------------- 14 * 15 * Date Version Description 16 * -------- -------- ------------------------------------------------------ 17 * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000. 18 * 05-24-00 00.10.02 Added _MSG_IOC_INIT_REPLY structure. 19 * 06-06-00 01.00.01 Added CurReplyFrameSize field to _MSG_IOC_FACTS_REPLY. 20 * 06-12-00 01.00.02 Added _MSG_PORT_ENABLE_REPLY structure. 21 * Added _MSG_EVENT_ACK_REPLY structure. 22 * Added _MSG_FW_DOWNLOAD_REPLY structure. 23 * Added _MSG_TOOLBOX_REPLY structure. 24 * 06-30-00 01.00.03 Added MaxLanBuckets to _PORT_FACT_REPLY structure. 25 * 07-27-00 01.00.04 Added _EVENT_DATA structure definitions for _SCSI, 26 * _LINK_STATUS, _LOOP_STATE and _LOGOUT. 27 * 08-11-00 01.00.05 Switched positions of MsgLength and Function fields in 28 * _MSG_EVENT_ACK_REPLY structure to match specification. 29 * 11-02-00 01.01.01 Original release for post 1.0 work. 30 * Added a value for Manufacturer to WhoInit. 31 * 12-04-00 01.01.02 Modified IOCFacts reply, added FWUpload messages, and 32 * removed toolbox message. 33 * 01-09-01 01.01.03 Added event enabled and disabled defines. 34 * Added structures for FwHeader and DataHeader. 35 * Added ImageType to FwUpload reply. 36 * 02-20-01 01.01.04 Started using MPI_POINTER. 37 * 02-27-01 01.01.05 Added event for RAID status change and its event data. 38 * Added IocNumber field to MSG_IOC_FACTS_REPLY. 39 * 03-27-01 01.01.06 Added defines for ProductId field of MPI_FW_HEADER. 40 * Added structure offset comments. 41 * 04-09-01 01.01.07 Added structure EVENT_DATA_EVENT_CHANGE. 42 * 08-08-01 01.02.01 Original release for v1.2 work. 43 * New format for FWVersion and ProductId in 44 * MSG_IOC_FACTS_REPLY and MPI_FW_HEADER. 45 * 08-31-01 01.02.02 Addded event MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE and 46 * related structure and defines. 47 * Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED. 48 * Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE. 49 * Replaced a reserved field in MSG_IOC_FACTS_REPLY with 50 * IOCExceptions and changed DataImageSize to reserved. 51 * Added MPI_FW_DOWNLOAD_ITYPE_NVSTORE_DATA and 52 * MPI_FW_UPLOAD_ITYPE_NVDATA. 53 * 09-28-01 01.02.03 Modified Event Data for Integrated RAID. 54 * 11-01-01 01.02.04 Added defines for MPI_EXT_IMAGE_HEADER ImageType field. 55 * -------------------------------------------------------------------------- 56 */ 57 58 #ifndef MPI_IOC_H 59 #define MPI_IOC_H 60 61 62 /***************************************************************************** 63 * 64 * I O C M e s s a g e s 65 * 66 *****************************************************************************/ 67 68 /****************************************************************************/ 69 /* IOCInit message */ 70 /****************************************************************************/ 71 72 typedef struct _MSG_IOC_INIT 73 { 74 U8 WhoInit; /* 00h */ 75 U8 Reserved; /* 01h */ 76 U8 ChainOffset; /* 02h */ 77 U8 Function; /* 03h */ 78 U8 Flags; /* 04h */ 79 U8 MaxDevices; /* 05h */ 80 U8 MaxBuses; /* 06h */ 81 U8 MsgFlags; /* 07h */ 82 U32 MsgContext; /* 08h */ 83 U16 ReplyFrameSize; /* 0Ch */ 84 U8 Reserved1[2]; /* 0Eh */ 85 U32 HostMfaHighAddr; /* 10h */ 86 U32 SenseBufferHighAddr; /* 14h */ 87 } MSG_IOC_INIT, MPI_POINTER PTR_MSG_IOC_INIT, 88 IOCInit_t, MPI_POINTER pIOCInit_t; 89 90 /* WhoInit values */ 91 #define MPI_WHOINIT_NO_ONE (0x00) 92 #define MPI_WHOINIT_SYSTEM_BIOS (0x01) 93 #define MPI_WHOINIT_ROM_BIOS (0x02) 94 #define MPI_WHOINIT_PCI_PEER (0x03) 95 #define MPI_WHOINIT_HOST_DRIVER (0x04) 96 #define MPI_WHOINIT_MANUFACTURER (0x05) 97 98 /* Flags values */ 99 #define MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE (0x01) 100 101 typedef struct _MSG_IOC_INIT_REPLY 102 { 103 U8 WhoInit; /* 00h */ 104 U8 Reserved; /* 01h */ 105 U8 MsgLength; /* 02h */ 106 U8 Function; /* 03h */ 107 U8 Flags; /* 04h */ 108 U8 MaxDevices; /* 05h */ 109 U8 MaxBuses; /* 06h */ 110 U8 MsgFlags; /* 07h */ 111 U32 MsgContext; /* 08h */ 112 U16 Reserved2; /* 0Ch */ 113 U16 IOCStatus; /* 0Eh */ 114 U32 IOCLogInfo; /* 10h */ 115 } MSG_IOC_INIT_REPLY, MPI_POINTER PTR_MSG_IOC_INIT_REPLY, 116 IOCInitReply_t, MPI_POINTER pIOCInitReply_t; 117 118 119 120 /****************************************************************************/ 121 /* IOC Facts message */ 122 /****************************************************************************/ 123 124 typedef struct _MSG_IOC_FACTS 125 { 126 U8 Reserved[2]; /* 00h */ 127 U8 ChainOffset; /* 01h */ 128 U8 Function; /* 02h */ 129 U8 Reserved1[3]; /* 03h */ 130 U8 MsgFlags; /* 04h */ 131 U32 MsgContext; /* 08h */ 132 } MSG_IOC_FACTS, MPI_POINTER PTR_IOC_FACTS, 133 IOCFacts_t, MPI_POINTER pIOCFacts_t; 134 135 typedef struct _MPI_FW_VERSION_STRUCT 136 { 137 U8 Dev; /* 00h */ 138 U8 Unit; /* 01h */ 139 U8 Minor; /* 02h */ 140 U8 Major; /* 03h */ 141 } MPI_FW_VERSION_STRUCT; 142 143 typedef union _MPI_FW_VERSION 144 { 145 MPI_FW_VERSION_STRUCT Struct; 146 U32 Word; 147 } MPI_FW_VERSION; 148 149 /* IOC Facts Reply */ 150 typedef struct _MSG_IOC_FACTS_REPLY 151 { 152 U16 MsgVersion; /* 00h */ 153 U8 MsgLength; /* 02h */ 154 U8 Function; /* 03h */ 155 U16 Reserved; /* 04h */ 156 U8 IOCNumber; /* 06h */ 157 U8 MsgFlags; /* 07h */ 158 U32 MsgContext; /* 08h */ 159 U16 IOCExceptions; /* 0Ch */ 160 U16 IOCStatus; /* 0Eh */ 161 U32 IOCLogInfo; /* 10h */ 162 U8 MaxChainDepth; /* 14h */ 163 U8 WhoInit; /* 15h */ 164 U8 BlockSize; /* 16h */ 165 U8 Flags; /* 17h */ 166 U16 ReplyQueueDepth; /* 18h */ 167 U16 RequestFrameSize; /* 1Ah */ 168 U16 Reserved_0101_FWVersion; /* 1Ch */ /* obsolete 16-bit FWVersion */ 169 U16 ProductID; /* 1Eh */ 170 U32 CurrentHostMfaHighAddr; /* 20h */ 171 U16 GlobalCredits; /* 24h */ 172 U8 NumberOfPorts; /* 26h */ 173 U8 EventState; /* 27h */ 174 U32 CurrentSenseBufferHighAddr; /* 28h */ 175 U16 CurReplyFrameSize; /* 2Ch */ 176 U8 MaxDevices; /* 2Eh */ 177 U8 MaxBuses; /* 2Fh */ 178 U32 FWImageSize; /* 30h */ 179 U32 Reserved4; /* 34h */ 180 MPI_FW_VERSION FWVersion; /* 38h */ 181 } MSG_IOC_FACTS_REPLY, MPI_POINTER PTR_MSG_IOC_FACTS_REPLY, 182 IOCFactsReply_t, MPI_POINTER pIOCFactsReply_t; 183 184 #define MPI_IOCFACTS_MSGVERSION_MAJOR_MASK (0xFF00) 185 #define MPI_IOCFACTS_MSGVERSION_MINOR_MASK (0x00FF) 186 187 #define MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0001) 188 189 #define MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT (0x01) 190 191 #define MPI_IOCFACTS_EVENTSTATE_DISABLED (0x00) 192 #define MPI_IOCFACTS_EVENTSTATE_ENABLED (0x01) 193 194 195 196 /***************************************************************************** 197 * 198 * P o r t M e s s a g e s 199 * 200 *****************************************************************************/ 201 202 /****************************************************************************/ 203 /* Port Facts message and Reply */ 204 /****************************************************************************/ 205 206 typedef struct _MSG_PORT_FACTS 207 { 208 U8 Reserved[2]; /* 00h */ 209 U8 ChainOffset; /* 02h */ 210 U8 Function; /* 03h */ 211 U8 Reserved1[2]; /* 04h */ 212 U8 PortNumber; /* 06h */ 213 U8 MsgFlags; /* 07h */ 214 U32 MsgContext; /* 08h */ 215 } MSG_PORT_FACTS, MPI_POINTER PTR_MSG_PORT_FACTS, 216 PortFacts_t, MPI_POINTER pPortFacts_t; 217 218 typedef struct _MSG_PORT_FACTS_REPLY 219 { 220 U16 Reserved; /* 00h */ 221 U8 MsgLength; /* 02h */ 222 U8 Function; /* 03h */ 223 U16 Reserved1; /* 04h */ 224 U8 PortNumber; /* 06h */ 225 U8 MsgFlags; /* 07h */ 226 U32 MsgContext; /* 08h */ 227 U16 Reserved2; /* 0Ch */ 228 U16 IOCStatus; /* 0Eh */ 229 U32 IOCLogInfo; /* 10h */ 230 U8 Reserved3; /* 14h */ 231 U8 PortType; /* 15h */ 232 U16 MaxDevices; /* 16h */ 233 U16 PortSCSIID; /* 18h */ 234 U16 ProtocolFlags; /* 1Ah */ 235 U16 MaxPostedCmdBuffers; /* 1Ch */ 236 U16 MaxPersistentIDs; /* 1Eh */ 237 U16 MaxLanBuckets; /* 20h */ 238 U16 Reserved4; /* 22h */ 239 U32 Reserved5; /* 24h */ 240 } MSG_PORT_FACTS_REPLY, MPI_POINTER PTR_MSG_PORT_FACTS_REPLY, 241 PortFactsReply_t, MPI_POINTER pPortFactsReply_t; 242 243 244 /* PortTypes values */ 245 246 #define MPI_PORTFACTS_PORTTYPE_INACTIVE (0x00) 247 #define MPI_PORTFACTS_PORTTYPE_SCSI (0x01) 248 #define MPI_PORTFACTS_PORTTYPE_FC (0x10) 249 250 /* ProtocolFlags values */ 251 252 #define MPI_PORTFACTS_PROTOCOL_LOGBUSADDR (0x01) 253 #define MPI_PORTFACTS_PROTOCOL_LAN (0x02) 254 #define MPI_PORTFACTS_PROTOCOL_TARGET (0x04) 255 #define MPI_PORTFACTS_PROTOCOL_INITIATOR (0x08) 256 257 258 /****************************************************************************/ 259 /* Port Enable Message */ 260 /****************************************************************************/ 261 262 typedef struct _MSG_PORT_ENABLE 263 { 264 U8 Reserved[2]; /* 00h */ 265 U8 ChainOffset; /* 02h */ 266 U8 Function; /* 03h */ 267 U8 Reserved1[2]; /* 04h */ 268 U8 PortNumber; /* 06h */ 269 U8 MsgFlags; /* 07h */ 270 U32 MsgContext; /* 08h */ 271 } MSG_PORT_ENABLE, MPI_POINTER PTR_MSG_PORT_ENABLE, 272 PortEnable_t, MPI_POINTER pPortEnable_t; 273 274 typedef struct _MSG_PORT_ENABLE_REPLY 275 { 276 U8 Reserved[2]; /* 00h */ 277 U8 MsgLength; /* 02h */ 278 U8 Function; /* 03h */ 279 U8 Reserved1[2]; /* 04h */ 280 U8 PortNumber; /* 05h */ 281 U8 MsgFlags; /* 07h */ 282 U32 MsgContext; /* 08h */ 283 U16 Reserved2; /* 0Ch */ 284 U16 IOCStatus; /* 0Eh */ 285 U32 IOCLogInfo; /* 10h */ 286 } MSG_PORT_ENABLE_REPLY, MPI_POINTER PTR_MSG_PORT_ENABLE_REPLY, 287 PortEnableReply_t, MPI_POINTER pPortEnableReply_t; 288 289 290 /***************************************************************************** 291 * 292 * E v e n t M e s s a g e s 293 * 294 *****************************************************************************/ 295 296 /****************************************************************************/ 297 /* Event Notification messages */ 298 /****************************************************************************/ 299 300 typedef struct _MSG_EVENT_NOTIFY 301 { 302 U8 Switch; /* 00h */ 303 U8 Reserved; /* 01h */ 304 U8 ChainOffset; /* 02h */ 305 U8 Function; /* 03h */ 306 U8 Reserved1[3]; /* 04h */ 307 U8 MsgFlags; /* 07h */ 308 U32 MsgContext; /* 08h */ 309 } MSG_EVENT_NOTIFY, MPI_POINTER PTR_MSG_EVENT_NOTIFY, 310 EventNotification_t, MPI_POINTER pEventNotification_t; 311 312 /* Event Notification Reply */ 313 314 typedef struct _MSG_EVENT_NOTIFY_REPLY 315 { 316 U16 EventDataLength; /* 00h */ 317 U8 MsgLength; /* 02h */ 318 U8 Function; /* 03h */ 319 U8 Reserved1[2]; /* 04h */ 320 U8 AckRequired; /* 06h */ 321 U8 MsgFlags; /* 07h */ 322 U32 MsgContext; /* 08h */ 323 U8 Reserved2[2]; /* 0Ch */ 324 U16 IOCStatus; /* 0Eh */ 325 U32 IOCLogInfo; /* 10h */ 326 U32 Event; /* 14h */ 327 U32 EventContext; /* 18h */ 328 U32 Data[1]; /* 1Ch */ 329 } MSG_EVENT_NOTIFY_REPLY, MPI_POINTER PTR_MSG_EVENT_NOTIFY_REPLY, 330 EventNotificationReply_t, MPI_POINTER pEventNotificationReply_t; 331 332 /* Event Acknowledge */ 333 334 typedef struct _MSG_EVENT_ACK 335 { 336 U8 Reserved[2]; /* 00h */ 337 U8 ChainOffset; /* 02h */ 338 U8 Function; /* 03h */ 339 U8 Reserved1[3]; /* 04h */ 340 U8 MsgFlags; /* 07h */ 341 U32 MsgContext; /* 08h */ 342 U32 Event; /* 0Ch */ 343 U32 EventContext; /* 10h */ 344 } MSG_EVENT_ACK, MPI_POINTER PTR_MSG_EVENT_ACK, 345 EventAck_t, MPI_POINTER pEventAck_t; 346 347 typedef struct _MSG_EVENT_ACK_REPLY 348 { 349 U8 Reserved[2]; /* 00h */ 350 U8 MsgLength; /* 02h */ 351 U8 Function; /* 03h */ 352 U8 Reserved1[3]; /* 04h */ 353 U8 MsgFlags; /* 07h */ 354 U32 MsgContext; /* 08h */ 355 U16 Reserved2; /* 0Ch */ 356 U16 IOCStatus; /* 0Eh */ 357 U32 IOCLogInfo; /* 10h */ 358 } MSG_EVENT_ACK_REPLY, MPI_POINTER PTR_MSG_EVENT_ACK_REPLY, 359 EventAckReply_t, MPI_POINTER pEventAckReply_t; 360 361 /* Switch */ 362 363 #define MPI_EVENT_NOTIFICATION_SWITCH_OFF (0x00) 364 #define MPI_EVENT_NOTIFICATION_SWITCH_ON (0x01) 365 366 /* Event */ 367 368 #define MPI_EVENT_NONE (0x00000000) 369 #define MPI_EVENT_LOG_DATA (0x00000001) 370 #define MPI_EVENT_STATE_CHANGE (0x00000002) 371 #define MPI_EVENT_UNIT_ATTENTION (0x00000003) 372 #define MPI_EVENT_IOC_BUS_RESET (0x00000004) 373 #define MPI_EVENT_EXT_BUS_RESET (0x00000005) 374 #define MPI_EVENT_RESCAN (0x00000006) 375 #define MPI_EVENT_LINK_STATUS_CHANGE (0x00000007) 376 #define MPI_EVENT_LOOP_STATE_CHANGE (0x00000008) 377 #define MPI_EVENT_LOGOUT (0x00000009) 378 #define MPI_EVENT_EVENT_CHANGE (0x0000000A) 379 #define MPI_EVENT_INTEGRATED_RAID (0x0000000B) 380 #define MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE (0x0000000C) 381 #define MPI_EVENT_ON_BUS_TIMER_EXPIRED (0x0000000D) 382 383 /* AckRequired field values */ 384 385 #define MPI_EVENT_NOTIFICATION_ACK_NOT_REQUIRED (0x00) 386 #define MPI_EVENT_NOTIFICATION_ACK_REQUIRED (0x01) 387 388 /* EventChange Event data */ 389 390 typedef struct _EVENT_DATA_EVENT_CHANGE 391 { 392 U8 EventState; /* 00h */ 393 U8 Reserved; /* 01h */ 394 U16 Reserved1; /* 02h */ 395 } EVENT_DATA_EVENT_CHANGE, MPI_POINTER PTR_EVENT_DATA_EVENT_CHANGE, 396 EventDataEventChange_t, MPI_POINTER pEventDataEventChange_t; 397 398 /* SCSI Event data for Port, Bus and Device forms */ 399 400 typedef struct _EVENT_DATA_SCSI 401 { 402 U8 TargetID; /* 00h */ 403 U8 BusPort; /* 01h */ 404 U16 Reserved; /* 02h */ 405 } EVENT_DATA_SCSI, MPI_POINTER PTR_EVENT_DATA_SCSI, 406 EventDataScsi_t, MPI_POINTER pEventDataScsi_t; 407 408 /* SCSI Device Status Change Event data */ 409 410 typedef struct _EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE 411 { 412 U8 TargetID; /* 00h */ 413 U8 Bus; /* 01h */ 414 U8 ReasonCode; /* 02h */ 415 U8 LUN; /* 03h */ 416 U8 ASC; /* 04h */ 417 U8 ASCQ; /* 05h */ 418 U16 Reserved; /* 06h */ 419 } EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE, 420 MPI_POINTER PTR_EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE, 421 MpiEventDataScsiDeviceStatusChange_t, 422 MPI_POINTER pMpiEventDataScsiDeviceStatusChange_t; 423 424 /* MPI SCSI Device Status Change Event data ReasonCode values */ 425 #define MPI_EVENT_SCSI_DEV_STAT_RC_ADDED (0x03) 426 #define MPI_EVENT_SCSI_DEV_STAT_RC_NOT_RESPONDING (0x04) 427 #define MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA (0x05) 428 429 /* MPI Link Status Change Event data */ 430 431 typedef struct _EVENT_DATA_LINK_STATUS 432 { 433 U8 State; /* 00h */ 434 U8 Reserved; /* 01h */ 435 U16 Reserved1; /* 02h */ 436 U8 Reserved2; /* 04h */ 437 U8 Port; /* 05h */ 438 U16 Reserved3; /* 06h */ 439 } EVENT_DATA_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_LINK_STATUS, 440 EventDataLinkStatus_t, MPI_POINTER pEventDataLinkStatus_t; 441 442 #define MPI_EVENT_LINK_STATUS_FAILURE (0x00000000) 443 #define MPI_EVENT_LINK_STATUS_ACTIVE (0x00000001) 444 445 /* MPI Loop State Change Event data */ 446 447 typedef struct _EVENT_DATA_LOOP_STATE 448 { 449 U8 Character4; /* 00h */ 450 U8 Character3; /* 01h */ 451 U8 Type; /* 02h */ 452 U8 Reserved; /* 03h */ 453 U8 Reserved1; /* 04h */ 454 U8 Port; /* 05h */ 455 U16 Reserved2; /* 06h */ 456 } EVENT_DATA_LOOP_STATE, MPI_POINTER PTR_EVENT_DATA_LOOP_STATE, 457 EventDataLoopState_t, MPI_POINTER pEventDataLoopState_t; 458 459 #define MPI_EVENT_LOOP_STATE_CHANGE_LIP (0x0001) 460 #define MPI_EVENT_LOOP_STATE_CHANGE_LPE (0x0002) 461 #define MPI_EVENT_LOOP_STATE_CHANGE_LPB (0x0003) 462 463 /* MPI LOGOUT Event data */ 464 465 typedef struct _EVENT_DATA_LOGOUT 466 { 467 U32 NPortID; /* 00h */ 468 U8 Reserved; /* 04h */ 469 U8 Port; /* 05h */ 470 U16 Reserved1; /* 06h */ 471 } EVENT_DATA_LOGOUT, MPI_POINTER PTR_EVENT_DATA_LOGOUT, 472 EventDataLogout_t, MPI_POINTER pEventDataLogout_t; 473 474 /* MPI Integrated RAID Event data */ 475 476 typedef struct _EVENT_DATA_RAID 477 { 478 U8 VolumeID; /* 00h */ 479 U8 VolumeBus; /* 01h */ 480 U8 ReasonCode; /* 02h */ 481 U8 PhysDiskNum; /* 03h */ 482 U8 ASC; /* 04h */ 483 U8 ASCQ; /* 05h */ 484 U16 Reserved; /* 06h */ 485 U32 SettingsStatus; /* 08h */ 486 } EVENT_DATA_RAID, MPI_POINTER PTR_EVENT_DATA_RAID, 487 MpiEventDataRaid_t, MPI_POINTER pMpiEventDataRaid_t; 488 489 /* MPI Integrated RAID Event data ReasonCode values */ 490 #define MPI_EVENT_RAID_RC_VOLUME_CREATED (0x00) 491 #define MPI_EVENT_RAID_RC_VOLUME_DELETED (0x01) 492 #define MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED (0x02) 493 #define MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED (0x03) 494 #define MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED (0x04) 495 #define MPI_EVENT_RAID_RC_PHYSDISK_CREATED (0x05) 496 #define MPI_EVENT_RAID_RC_PHYSDISK_DELETED (0x06) 497 #define MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED (0x07) 498 #define MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED (0x08) 499 #define MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED (0x09) 500 #define MPI_EVENT_RAID_RC_SMART_DATA (0x0A) 501 #define MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED (0x0B) 502 503 504 /***************************************************************************** 505 * 506 * F i r m w a r e L o a d M e s s a g e s 507 * 508 *****************************************************************************/ 509 510 /****************************************************************************/ 511 /* Firmware Download message and associated structures */ 512 /****************************************************************************/ 513 514 typedef struct _MSG_FW_DOWNLOAD 515 { 516 U8 ImageType; /* 00h */ 517 U8 Reserved; /* 01h */ 518 U8 ChainOffset; /* 02h */ 519 U8 Function; /* 03h */ 520 U8 Reserved1[3]; /* 04h */ 521 U8 MsgFlags; /* 07h */ 522 U32 MsgContext; /* 08h */ 523 SGE_MPI_UNION SGL; /* 0Ch */ 524 } MSG_FW_DOWNLOAD, MPI_POINTER PTR_MSG_FW_DOWNLOAD, 525 FWDownload_t, MPI_POINTER pFWDownload_t; 526 527 #define MPI_FW_DOWNLOAD_ITYPE_RESERVED (0x00) 528 #define MPI_FW_DOWNLOAD_ITYPE_FW (0x01) 529 #define MPI_FW_DOWNLOAD_ITYPE_BIOS (0x02) 530 #define MPI_FW_DOWNLOAD_ITYPE_NVDATA (0x03) 531 532 533 typedef struct _FWDownloadTCSGE 534 { 535 U8 Reserved; /* 00h */ 536 U8 ContextSize; /* 01h */ 537 U8 DetailsLength; /* 02h */ 538 U8 Flags; /* 03h */ 539 U32 Reserved_0100_Checksum; /* 04h */ /* obsolete Checksum */ 540 U32 ImageOffset; /* 08h */ 541 U32 ImageSize; /* 0Ch */ 542 } FW_DOWNLOAD_TCSGE, MPI_POINTER PTR_FW_DOWNLOAD_TCSGE, 543 FWDownloadTCSGE_t, MPI_POINTER pFWDownloadTCSGE_t; 544 545 /* Firmware Download reply */ 546 typedef struct _MSG_FW_DOWNLOAD_REPLY 547 { 548 U8 ImageType; /* 00h */ 549 U8 Reserved; /* 01h */ 550 U8 MsgLength; /* 02h */ 551 U8 Function; /* 03h */ 552 U8 Reserved1[3]; /* 04h */ 553 U8 MsgFlags; /* 07h */ 554 U32 MsgContext; /* 08h */ 555 U16 Reserved2; /* 0Ch */ 556 U16 IOCStatus; /* 0Eh */ 557 U32 IOCLogInfo; /* 10h */ 558 } MSG_FW_DOWNLOAD_REPLY, MPI_POINTER PTR_MSG_FW_DOWNLOAD_REPLY, 559 FWDownloadReply_t, MPI_POINTER pFWDownloadReply_t; 560 561 562 /****************************************************************************/ 563 /* Firmware Upload message and associated structures */ 564 /****************************************************************************/ 565 566 typedef struct _MSG_FW_UPLOAD 567 { 568 U8 ImageType; /* 00h */ 569 U8 Reserved; /* 01h */ 570 U8 ChainOffset; /* 02h */ 571 U8 Function; /* 03h */ 572 U8 Reserved1[3]; /* 04h */ 573 U8 MsgFlags; /* 07h */ 574 U32 MsgContext; /* 08h */ 575 SGE_MPI_UNION SGL; /* 0Ch */ 576 } MSG_FW_UPLOAD, MPI_POINTER PTR_MSG_FW_UPLOAD, 577 FWUpload_t, MPI_POINTER pFWUpload_t; 578 579 #define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM (0x00) 580 #define MPI_FW_UPLOAD_ITYPE_FW_FLASH (0x01) 581 #define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02) 582 #define MPI_FW_UPLOAD_ITYPE_NVDATA (0x03) 583 584 typedef struct _FWUploadTCSGE 585 { 586 U8 Reserved; /* 00h */ 587 U8 ContextSize; /* 01h */ 588 U8 DetailsLength; /* 02h */ 589 U8 Flags; /* 03h */ 590 U32 Reserved1; /* 04h */ 591 U32 ImageOffset; /* 08h */ 592 U32 ImageSize; /* 0Ch */ 593 } FW_UPLOAD_TCSGE, MPI_POINTER PTR_FW_UPLOAD_TCSGE, 594 FWUploadTCSGE_t, MPI_POINTER pFWUploadTCSGE_t; 595 596 /* Firmware Upload reply */ 597 typedef struct _MSG_FW_UPLOAD_REPLY 598 { 599 U8 ImageType; /* 00h */ 600 U8 Reserved; /* 01h */ 601 U8 MsgLength; /* 02h */ 602 U8 Function; /* 03h */ 603 U8 Reserved1[3]; /* 04h */ 604 U8 MsgFlags; /* 07h */ 605 U32 MsgContext; /* 08h */ 606 U16 Reserved2; /* 0Ch */ 607 U16 IOCStatus; /* 0Eh */ 608 U32 IOCLogInfo; /* 10h */ 609 U32 ActualImageSize; /* 14h */ 610 } MSG_FW_UPLOAD_REPLY, MPI_POINTER PTR_MSG_FW_UPLOAD_REPLY, 611 FWUploadReply_t, MPI_POINTER pFWUploadReply_t; 612 613 614 typedef struct _MPI_FW_HEADER 615 { 616 U32 ArmBranchInstruction0; /* 00h */ 617 U32 Signature0; /* 04h */ 618 U32 Signature1; /* 08h */ 619 U32 Signature2; /* 0Ch */ 620 U32 ArmBranchInstruction1; /* 10h */ 621 U32 ArmBranchInstruction2; /* 14h */ 622 U32 Reserved; /* 18h */ 623 U32 Checksum; /* 1Ch */ 624 U16 VendorId; /* 20h */ 625 U16 ProductId; /* 22h */ 626 MPI_FW_VERSION FWVersion; /* 24h */ 627 U32 SeqCodeVersion; /* 28h */ 628 U32 ImageSize; /* 2Ch */ 629 U32 NextImageHeaderOffset; /* 30h */ 630 U32 LoadStartAddress; /* 34h */ 631 U32 IopResetVectorValue; /* 38h */ 632 U32 IopResetRegAddr; /* 3Ch */ 633 U32 VersionNameWhat; /* 40h */ 634 U8 VersionName[32]; /* 44h */ 635 U32 VendorNameWhat; /* 64h */ 636 U8 VendorName[32]; /* 68h */ 637 } MPI_FW_HEADER, MPI_POINTER PTR_MPI_FW_HEADER, 638 MpiFwHeader_t, MPI_POINTER pMpiFwHeader_t; 639 640 #define MPI_FW_HEADER_WHAT_SIGNATURE (0x29232840) 641 642 /* defines for using the ProductId field */ 643 #define MPI_FW_HEADER_PID_TYPE_MASK (0xF000) 644 #define MPI_FW_HEADER_PID_TYPE_SCSI (0x0000) 645 #define MPI_FW_HEADER_PID_TYPE_FC (0x1000) 646 647 #define MPI_FW_HEADER_PID_PROD_MASK (0x0F00) 648 #define MPI_FW_HEADER_PID_PROD_INITIATOR_SCSI (0x0100) 649 #define MPI_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI (0x0200) 650 #define MPI_FW_HEADER_PID_PROD_TARGET_SCSI (0x0300) 651 #define MPI_FW_HEADER_PID_PROD_IM_SCSI (0x0400) 652 #define MPI_FW_HEADER_PID_PROD_IS_SCSI (0x0500) 653 #define MPI_FW_HEADER_PID_PROD_CTX_SCSI (0x0600) 654 655 #define MPI_FW_HEADER_PID_FAMILY_MASK (0x00FF) 656 #define MPI_FW_HEADER_PID_FAMILY_1030A0_SCSI (0x0001) 657 #define MPI_FW_HEADER_PID_FAMILY_1030B0_SCSI (0x0002) 658 #define MPI_FW_HEADER_PID_FAMILY_1030B1_SCSI (0x0003) 659 #define MPI_FW_HEADER_PID_FAMILY_1030C0_SCSI (0x0004) 660 #define MPI_FW_HEADER_PID_FAMILY_1020A0_SCSI (0x0005) 661 #define MPI_FW_HEADER_PID_FAMILY_1020B0_SCSI (0x0006) 662 #define MPI_FW_HEADER_PID_FAMILY_1020B1_SCSI (0x0007) 663 #define MPI_FW_HEADER_PID_FAMILY_1020C0_SCSI (0x0008) 664 #define MPI_FW_HEADER_PID_FAMILY_1035A0_SCSI (0x0009) 665 #define MPI_FW_HEADER_PID_FAMILY_1035B0_SCSI (0x000A) 666 #define MPI_FW_HEADER_PID_FAMILY_909_FC (0x0000) 667 #define MPI_FW_HEADER_PID_FAMILY_919_FC (0x0001) 668 #define MPI_FW_HEADER_PID_FAMILY_919X_FC (0x0002) 669 670 typedef struct _MPI_EXT_IMAGE_HEADER 671 { 672 U8 ImageType; /* 00h */ 673 U8 Reserved; /* 01h */ 674 U16 Reserved1; /* 02h */ 675 U32 Checksum; /* 04h */ 676 U32 ImageSize; /* 08h */ 677 U32 NextImageHeaderOffset; /* 0Ch */ 678 U32 LoadStartAddress; /* 10h */ 679 U32 Reserved2; /* 14h */ 680 } MPI_EXT_IMAGE_HEADER, MPI_POINTER PTR_MPI_EXT_IMAGE_HEADER, 681 MpiExtImageHeader_t, MPI_POINTER pMpiExtImageHeader_t; 682 683 /* defines for the ImageType field */ 684 #define MPI_EXT_IMAGE_TYPE_UNSPECIFIED (0x00) 685 #define MPI_EXT_IMAGE_TYPE_FW (0x01) 686 #define MPI_EXT_IMAGE_TYPE_NVDATA (0x03) 687 688 #endif 689