mpi_ioc.h 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017
  1. /*
  2. * Copyright (c) 2000-2005 LSI Logic Corporation.
  3. *
  4. *
  5. * Name: mpi_ioc.h
  6. * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages
  7. * Creation Date: August 11, 2000
  8. *
  9. * mpi_ioc.h Version: 01.05.10
  10. *
  11. * Version History
  12. * ---------------
  13. *
  14. * Date Version Description
  15. * -------- -------- ------------------------------------------------------
  16. * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000.
  17. * 05-24-00 00.10.02 Added _MSG_IOC_INIT_REPLY structure.
  18. * 06-06-00 01.00.01 Added CurReplyFrameSize field to _MSG_IOC_FACTS_REPLY.
  19. * 06-12-00 01.00.02 Added _MSG_PORT_ENABLE_REPLY structure.
  20. * Added _MSG_EVENT_ACK_REPLY structure.
  21. * Added _MSG_FW_DOWNLOAD_REPLY structure.
  22. * Added _MSG_TOOLBOX_REPLY structure.
  23. * 06-30-00 01.00.03 Added MaxLanBuckets to _PORT_FACT_REPLY structure.
  24. * 07-27-00 01.00.04 Added _EVENT_DATA structure definitions for _SCSI,
  25. * _LINK_STATUS, _LOOP_STATE and _LOGOUT.
  26. * 08-11-00 01.00.05 Switched positions of MsgLength and Function fields in
  27. * _MSG_EVENT_ACK_REPLY structure to match specification.
  28. * 11-02-00 01.01.01 Original release for post 1.0 work.
  29. * Added a value for Manufacturer to WhoInit.
  30. * 12-04-00 01.01.02 Modified IOCFacts reply, added FWUpload messages, and
  31. * removed toolbox message.
  32. * 01-09-01 01.01.03 Added event enabled and disabled defines.
  33. * Added structures for FwHeader and DataHeader.
  34. * Added ImageType to FwUpload reply.
  35. * 02-20-01 01.01.04 Started using MPI_POINTER.
  36. * 02-27-01 01.01.05 Added event for RAID status change and its event data.
  37. * Added IocNumber field to MSG_IOC_FACTS_REPLY.
  38. * 03-27-01 01.01.06 Added defines for ProductId field of MPI_FW_HEADER.
  39. * Added structure offset comments.
  40. * 04-09-01 01.01.07 Added structure EVENT_DATA_EVENT_CHANGE.
  41. * 08-08-01 01.02.01 Original release for v1.2 work.
  42. * New format for FWVersion and ProductId in
  43. * MSG_IOC_FACTS_REPLY and MPI_FW_HEADER.
  44. * 08-31-01 01.02.02 Addded event MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE and
  45. * related structure and defines.
  46. * Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED.
  47. * Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE.
  48. * Replaced a reserved field in MSG_IOC_FACTS_REPLY with
  49. * IOCExceptions and changed DataImageSize to reserved.
  50. * Added MPI_FW_DOWNLOAD_ITYPE_NVSTORE_DATA and
  51. * MPI_FW_UPLOAD_ITYPE_NVDATA.
  52. * 09-28-01 01.02.03 Modified Event Data for Integrated RAID.
  53. * 11-01-01 01.02.04 Added defines for MPI_EXT_IMAGE_HEADER ImageType field.
  54. * 03-14-02 01.02.05 Added HeaderVersion field to MSG_IOC_FACTS_REPLY.
  55. * 05-31-02 01.02.06 Added define for
  56. * MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID.
  57. * Added AliasIndex to EVENT_DATA_LOGOUT structure.
  58. * 04-01-03 01.02.07 Added defines for MPI_FW_HEADER_SIGNATURE_.
  59. * 06-26-03 01.02.08 Added new values to the product family defines.
  60. * 04-29-04 01.02.09 Added IOCCapabilities field to MSG_IOC_FACTS_REPLY and
  61. * added related defines.
  62. * 05-11-04 01.03.01 Original release for MPI v1.3.
  63. * 08-19-04 01.05.01 Added four new fields to MSG_IOC_INIT.
  64. * Added three new fields to MSG_IOC_FACTS_REPLY.
  65. * Defined four new bits for the IOCCapabilities field of
  66. * the IOCFacts reply.
  67. * Added two new PortTypes for the PortFacts reply.
  68. * Added six new events along with their EventData
  69. * structures.
  70. * Added a new MsgFlag to the FwDownload request to
  71. * indicate last segment.
  72. * Defined a new image type of boot loader.
  73. * Added FW family codes for SAS product families.
  74. * 10-05-04 01.05.02 Added ReplyFifoHostSignalingAddr field to
  75. * MSG_IOC_FACTS_REPLY.
  76. * 12-07-04 01.05.03 Added more defines for SAS Discovery Error event.
  77. * 12-09-04 01.05.04 Added Unsupported device to SAS Device event.
  78. * 01-15-05 01.05.05 Added event data for SAS SES Event.
  79. * 02-09-05 01.05.06 Added MPI_FW_UPLOAD_ITYPE_FW_BACKUP define.
  80. * 02-22-05 01.05.07 Added Host Page Buffer Persistent flag to IOC Facts
  81. * Reply and IOC Init Request.
  82. * 03-11-05 01.05.08 Added family code for 1068E family.
  83. * Removed IOCFacts Reply EEDP Capability bit.
  84. * 06-24-05 01.05.09 Added 5 new IOCFacts Reply IOCCapabilities bits.
  85. * Added Max SATA Targets to SAS Discovery Error event.
  86. * 08-30-05 01.05.10 Added 4 new events and their event data structures.
  87. * Added new ReasonCode value for SAS Device Status Change
  88. * event.
  89. * Added new family code for FC949E.
  90. * --------------------------------------------------------------------------
  91. */
  92. #ifndef MPI_IOC_H
  93. #define MPI_IOC_H
  94. /*****************************************************************************
  95. *
  96. * I O C M e s s a g e s
  97. *
  98. *****************************************************************************/
  99. /****************************************************************************/
  100. /* IOCInit message */
  101. /****************************************************************************/
  102. typedef struct _MSG_IOC_INIT
  103. {
  104. U8 WhoInit; /* 00h */
  105. U8 Reserved; /* 01h */
  106. U8 ChainOffset; /* 02h */
  107. U8 Function; /* 03h */
  108. U8 Flags; /* 04h */
  109. U8 MaxDevices; /* 05h */
  110. U8 MaxBuses; /* 06h */
  111. U8 MsgFlags; /* 07h */
  112. U32 MsgContext; /* 08h */
  113. U16 ReplyFrameSize; /* 0Ch */
  114. U8 Reserved1[2]; /* 0Eh */
  115. U32 HostMfaHighAddr; /* 10h */
  116. U32 SenseBufferHighAddr; /* 14h */
  117. U32 ReplyFifoHostSignalingAddr; /* 18h */
  118. SGE_SIMPLE_UNION HostPageBufferSGE; /* 1Ch */
  119. U16 MsgVersion; /* 28h */
  120. U16 HeaderVersion; /* 2Ah */
  121. } MSG_IOC_INIT, MPI_POINTER PTR_MSG_IOC_INIT,
  122. IOCInit_t, MPI_POINTER pIOCInit_t;
  123. /* WhoInit values */
  124. #define MPI_WHOINIT_NO_ONE (0x00)
  125. #define MPI_WHOINIT_SYSTEM_BIOS (0x01)
  126. #define MPI_WHOINIT_ROM_BIOS (0x02)
  127. #define MPI_WHOINIT_PCI_PEER (0x03)
  128. #define MPI_WHOINIT_HOST_DRIVER (0x04)
  129. #define MPI_WHOINIT_MANUFACTURER (0x05)
  130. /* Flags values */
  131. #define MPI_IOCINIT_FLAGS_HOST_PAGE_BUFFER_PERSISTENT (0x04)
  132. #define MPI_IOCINIT_FLAGS_REPLY_FIFO_HOST_SIGNAL (0x02)
  133. #define MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE (0x01)
  134. /* MsgVersion */
  135. #define MPI_IOCINIT_MSGVERSION_MAJOR_MASK (0xFF00)
  136. #define MPI_IOCINIT_MSGVERSION_MAJOR_SHIFT (8)
  137. #define MPI_IOCINIT_MSGVERSION_MINOR_MASK (0x00FF)
  138. #define MPI_IOCINIT_MSGVERSION_MINOR_SHIFT (0)
  139. /* HeaderVersion */
  140. #define MPI_IOCINIT_HEADERVERSION_UNIT_MASK (0xFF00)
  141. #define MPI_IOCINIT_HEADERVERSION_UNIT_SHIFT (8)
  142. #define MPI_IOCINIT_HEADERVERSION_DEV_MASK (0x00FF)
  143. #define MPI_IOCINIT_HEADERVERSION_DEV_SHIFT (0)
  144. typedef struct _MSG_IOC_INIT_REPLY
  145. {
  146. U8 WhoInit; /* 00h */
  147. U8 Reserved; /* 01h */
  148. U8 MsgLength; /* 02h */
  149. U8 Function; /* 03h */
  150. U8 Flags; /* 04h */
  151. U8 MaxDevices; /* 05h */
  152. U8 MaxBuses; /* 06h */
  153. U8 MsgFlags; /* 07h */
  154. U32 MsgContext; /* 08h */
  155. U16 Reserved2; /* 0Ch */
  156. U16 IOCStatus; /* 0Eh */
  157. U32 IOCLogInfo; /* 10h */
  158. } MSG_IOC_INIT_REPLY, MPI_POINTER PTR_MSG_IOC_INIT_REPLY,
  159. IOCInitReply_t, MPI_POINTER pIOCInitReply_t;
  160. /****************************************************************************/
  161. /* IOC Facts message */
  162. /****************************************************************************/
  163. typedef struct _MSG_IOC_FACTS
  164. {
  165. U8 Reserved[2]; /* 00h */
  166. U8 ChainOffset; /* 01h */
  167. U8 Function; /* 02h */
  168. U8 Reserved1[3]; /* 03h */
  169. U8 MsgFlags; /* 04h */
  170. U32 MsgContext; /* 08h */
  171. } MSG_IOC_FACTS, MPI_POINTER PTR_IOC_FACTS,
  172. IOCFacts_t, MPI_POINTER pIOCFacts_t;
  173. typedef struct _MPI_FW_VERSION_STRUCT
  174. {
  175. U8 Dev; /* 00h */
  176. U8 Unit; /* 01h */
  177. U8 Minor; /* 02h */
  178. U8 Major; /* 03h */
  179. } MPI_FW_VERSION_STRUCT;
  180. typedef union _MPI_FW_VERSION
  181. {
  182. MPI_FW_VERSION_STRUCT Struct;
  183. U32 Word;
  184. } MPI_FW_VERSION;
  185. /* IOC Facts Reply */
  186. typedef struct _MSG_IOC_FACTS_REPLY
  187. {
  188. U16 MsgVersion; /* 00h */
  189. U8 MsgLength; /* 02h */
  190. U8 Function; /* 03h */
  191. U16 HeaderVersion; /* 04h */
  192. U8 IOCNumber; /* 06h */
  193. U8 MsgFlags; /* 07h */
  194. U32 MsgContext; /* 08h */
  195. U16 IOCExceptions; /* 0Ch */
  196. U16 IOCStatus; /* 0Eh */
  197. U32 IOCLogInfo; /* 10h */
  198. U8 MaxChainDepth; /* 14h */
  199. U8 WhoInit; /* 15h */
  200. U8 BlockSize; /* 16h */
  201. U8 Flags; /* 17h */
  202. U16 ReplyQueueDepth; /* 18h */
  203. U16 RequestFrameSize; /* 1Ah */
  204. U16 Reserved_0101_FWVersion; /* 1Ch */ /* obsolete 16-bit FWVersion */
  205. U16 ProductID; /* 1Eh */
  206. U32 CurrentHostMfaHighAddr; /* 20h */
  207. U16 GlobalCredits; /* 24h */
  208. U8 NumberOfPorts; /* 26h */
  209. U8 EventState; /* 27h */
  210. U32 CurrentSenseBufferHighAddr; /* 28h */
  211. U16 CurReplyFrameSize; /* 2Ch */
  212. U8 MaxDevices; /* 2Eh */
  213. U8 MaxBuses; /* 2Fh */
  214. U32 FWImageSize; /* 30h */
  215. U32 IOCCapabilities; /* 34h */
  216. MPI_FW_VERSION FWVersion; /* 38h */
  217. U16 HighPriorityQueueDepth; /* 3Ch */
  218. U16 Reserved2; /* 3Eh */
  219. SGE_SIMPLE_UNION HostPageBufferSGE; /* 40h */
  220. U32 ReplyFifoHostSignalingAddr; /* 4Ch */
  221. } MSG_IOC_FACTS_REPLY, MPI_POINTER PTR_MSG_IOC_FACTS_REPLY,
  222. IOCFactsReply_t, MPI_POINTER pIOCFactsReply_t;
  223. #define MPI_IOCFACTS_MSGVERSION_MAJOR_MASK (0xFF00)
  224. #define MPI_IOCFACTS_MSGVERSION_MAJOR_SHIFT (8)
  225. #define MPI_IOCFACTS_MSGVERSION_MINOR_MASK (0x00FF)
  226. #define MPI_IOCFACTS_MSGVERSION_MINOR_SHIFT (0)
  227. #define MPI_IOCFACTS_HDRVERSION_UNIT_MASK (0xFF00)
  228. #define MPI_IOCFACTS_HDRVERSION_UNIT_SHIFT (8)
  229. #define MPI_IOCFACTS_HDRVERSION_DEV_MASK (0x00FF)
  230. #define MPI_IOCFACTS_HDRVERSION_DEV_SHIFT (0)
  231. #define MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0001)
  232. #define MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID (0x0002)
  233. #define MPI_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL (0x0004)
  234. #define MPI_IOCFACTS_EXCEPT_PERSISTENT_TABLE_FULL (0x0008)
  235. #define MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT (0x01)
  236. #define MPI_IOCFACTS_FLAGS_REPLY_FIFO_HOST_SIGNAL (0x02)
  237. #define MPI_IOCFACTS_FLAGS_HOST_PAGE_BUFFER_PERSISTENT (0x04)
  238. #define MPI_IOCFACTS_EVENTSTATE_DISABLED (0x00)
  239. #define MPI_IOCFACTS_EVENTSTATE_ENABLED (0x01)
  240. #define MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q (0x00000001)
  241. #define MPI_IOCFACTS_CAPABILITY_REPLY_HOST_SIGNAL (0x00000002)
  242. #define MPI_IOCFACTS_CAPABILITY_QUEUE_FULL_HANDLING (0x00000004)
  243. #define MPI_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER (0x00000008)
  244. #define MPI_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER (0x00000010)
  245. #define MPI_IOCFACTS_CAPABILITY_EXTENDED_BUFFER (0x00000020)
  246. #define MPI_IOCFACTS_CAPABILITY_EEDP (0x00000040)
  247. #define MPI_IOCFACTS_CAPABILITY_BIDIRECTIONAL (0x00000080)
  248. #define MPI_IOCFACTS_CAPABILITY_MULTICAST (0x00000100)
  249. #define MPI_IOCFACTS_CAPABILITY_SCSIIO32 (0x00000200)
  250. #define MPI_IOCFACTS_CAPABILITY_NO_SCSIIO16 (0x00000400)
  251. /*****************************************************************************
  252. *
  253. * P o r t M e s s a g e s
  254. *
  255. *****************************************************************************/
  256. /****************************************************************************/
  257. /* Port Facts message and Reply */
  258. /****************************************************************************/
  259. typedef struct _MSG_PORT_FACTS
  260. {
  261. U8 Reserved[2]; /* 00h */
  262. U8 ChainOffset; /* 02h */
  263. U8 Function; /* 03h */
  264. U8 Reserved1[2]; /* 04h */
  265. U8 PortNumber; /* 06h */
  266. U8 MsgFlags; /* 07h */
  267. U32 MsgContext; /* 08h */
  268. } MSG_PORT_FACTS, MPI_POINTER PTR_MSG_PORT_FACTS,
  269. PortFacts_t, MPI_POINTER pPortFacts_t;
  270. typedef struct _MSG_PORT_FACTS_REPLY
  271. {
  272. U16 Reserved; /* 00h */
  273. U8 MsgLength; /* 02h */
  274. U8 Function; /* 03h */
  275. U16 Reserved1; /* 04h */
  276. U8 PortNumber; /* 06h */
  277. U8 MsgFlags; /* 07h */
  278. U32 MsgContext; /* 08h */
  279. U16 Reserved2; /* 0Ch */
  280. U16 IOCStatus; /* 0Eh */
  281. U32 IOCLogInfo; /* 10h */
  282. U8 Reserved3; /* 14h */
  283. U8 PortType; /* 15h */
  284. U16 MaxDevices; /* 16h */
  285. U16 PortSCSIID; /* 18h */
  286. U16 ProtocolFlags; /* 1Ah */
  287. U16 MaxPostedCmdBuffers; /* 1Ch */
  288. U16 MaxPersistentIDs; /* 1Eh */
  289. U16 MaxLanBuckets; /* 20h */
  290. U16 Reserved4; /* 22h */
  291. U32 Reserved5; /* 24h */
  292. } MSG_PORT_FACTS_REPLY, MPI_POINTER PTR_MSG_PORT_FACTS_REPLY,
  293. PortFactsReply_t, MPI_POINTER pPortFactsReply_t;
  294. /* PortTypes values */
  295. #define MPI_PORTFACTS_PORTTYPE_INACTIVE (0x00)
  296. #define MPI_PORTFACTS_PORTTYPE_SCSI (0x01)
  297. #define MPI_PORTFACTS_PORTTYPE_FC (0x10)
  298. #define MPI_PORTFACTS_PORTTYPE_ISCSI (0x20)
  299. #define MPI_PORTFACTS_PORTTYPE_SAS (0x30)
  300. /* ProtocolFlags values */
  301. #define MPI_PORTFACTS_PROTOCOL_LOGBUSADDR (0x01)
  302. #define MPI_PORTFACTS_PROTOCOL_LAN (0x02)
  303. #define MPI_PORTFACTS_PROTOCOL_TARGET (0x04)
  304. #define MPI_PORTFACTS_PROTOCOL_INITIATOR (0x08)
  305. /****************************************************************************/
  306. /* Port Enable Message */
  307. /****************************************************************************/
  308. typedef struct _MSG_PORT_ENABLE
  309. {
  310. U8 Reserved[2]; /* 00h */
  311. U8 ChainOffset; /* 02h */
  312. U8 Function; /* 03h */
  313. U8 Reserved1[2]; /* 04h */
  314. U8 PortNumber; /* 06h */
  315. U8 MsgFlags; /* 07h */
  316. U32 MsgContext; /* 08h */
  317. } MSG_PORT_ENABLE, MPI_POINTER PTR_MSG_PORT_ENABLE,
  318. PortEnable_t, MPI_POINTER pPortEnable_t;
  319. typedef struct _MSG_PORT_ENABLE_REPLY
  320. {
  321. U8 Reserved[2]; /* 00h */
  322. U8 MsgLength; /* 02h */
  323. U8 Function; /* 03h */
  324. U8 Reserved1[2]; /* 04h */
  325. U8 PortNumber; /* 05h */
  326. U8 MsgFlags; /* 07h */
  327. U32 MsgContext; /* 08h */
  328. U16 Reserved2; /* 0Ch */
  329. U16 IOCStatus; /* 0Eh */
  330. U32 IOCLogInfo; /* 10h */
  331. } MSG_PORT_ENABLE_REPLY, MPI_POINTER PTR_MSG_PORT_ENABLE_REPLY,
  332. PortEnableReply_t, MPI_POINTER pPortEnableReply_t;
  333. /*****************************************************************************
  334. *
  335. * E v e n t M e s s a g e s
  336. *
  337. *****************************************************************************/
  338. /****************************************************************************/
  339. /* Event Notification messages */
  340. /****************************************************************************/
  341. typedef struct _MSG_EVENT_NOTIFY
  342. {
  343. U8 Switch; /* 00h */
  344. U8 Reserved; /* 01h */
  345. U8 ChainOffset; /* 02h */
  346. U8 Function; /* 03h */
  347. U8 Reserved1[3]; /* 04h */
  348. U8 MsgFlags; /* 07h */
  349. U32 MsgContext; /* 08h */
  350. } MSG_EVENT_NOTIFY, MPI_POINTER PTR_MSG_EVENT_NOTIFY,
  351. EventNotification_t, MPI_POINTER pEventNotification_t;
  352. /* Event Notification Reply */
  353. typedef struct _MSG_EVENT_NOTIFY_REPLY
  354. {
  355. U16 EventDataLength; /* 00h */
  356. U8 MsgLength; /* 02h */
  357. U8 Function; /* 03h */
  358. U8 Reserved1[2]; /* 04h */
  359. U8 AckRequired; /* 06h */
  360. U8 MsgFlags; /* 07h */
  361. U32 MsgContext; /* 08h */
  362. U8 Reserved2[2]; /* 0Ch */
  363. U16 IOCStatus; /* 0Eh */
  364. U32 IOCLogInfo; /* 10h */
  365. U32 Event; /* 14h */
  366. U32 EventContext; /* 18h */
  367. U32 Data[1]; /* 1Ch */
  368. } MSG_EVENT_NOTIFY_REPLY, MPI_POINTER PTR_MSG_EVENT_NOTIFY_REPLY,
  369. EventNotificationReply_t, MPI_POINTER pEventNotificationReply_t;
  370. /* Event Acknowledge */
  371. typedef struct _MSG_EVENT_ACK
  372. {
  373. U8 Reserved[2]; /* 00h */
  374. U8 ChainOffset; /* 02h */
  375. U8 Function; /* 03h */
  376. U8 Reserved1[3]; /* 04h */
  377. U8 MsgFlags; /* 07h */
  378. U32 MsgContext; /* 08h */
  379. U32 Event; /* 0Ch */
  380. U32 EventContext; /* 10h */
  381. } MSG_EVENT_ACK, MPI_POINTER PTR_MSG_EVENT_ACK,
  382. EventAck_t, MPI_POINTER pEventAck_t;
  383. typedef struct _MSG_EVENT_ACK_REPLY
  384. {
  385. U8 Reserved[2]; /* 00h */
  386. U8 MsgLength; /* 02h */
  387. U8 Function; /* 03h */
  388. U8 Reserved1[3]; /* 04h */
  389. U8 MsgFlags; /* 07h */
  390. U32 MsgContext; /* 08h */
  391. U16 Reserved2; /* 0Ch */
  392. U16 IOCStatus; /* 0Eh */
  393. U32 IOCLogInfo; /* 10h */
  394. } MSG_EVENT_ACK_REPLY, MPI_POINTER PTR_MSG_EVENT_ACK_REPLY,
  395. EventAckReply_t, MPI_POINTER pEventAckReply_t;
  396. /* Switch */
  397. #define MPI_EVENT_NOTIFICATION_SWITCH_OFF (0x00)
  398. #define MPI_EVENT_NOTIFICATION_SWITCH_ON (0x01)
  399. /* Event */
  400. #define MPI_EVENT_NONE (0x00000000)
  401. #define MPI_EVENT_LOG_DATA (0x00000001)
  402. #define MPI_EVENT_STATE_CHANGE (0x00000002)
  403. #define MPI_EVENT_UNIT_ATTENTION (0x00000003)
  404. #define MPI_EVENT_IOC_BUS_RESET (0x00000004)
  405. #define MPI_EVENT_EXT_BUS_RESET (0x00000005)
  406. #define MPI_EVENT_RESCAN (0x00000006)
  407. #define MPI_EVENT_LINK_STATUS_CHANGE (0x00000007)
  408. #define MPI_EVENT_LOOP_STATE_CHANGE (0x00000008)
  409. #define MPI_EVENT_LOGOUT (0x00000009)
  410. #define MPI_EVENT_EVENT_CHANGE (0x0000000A)
  411. #define MPI_EVENT_INTEGRATED_RAID (0x0000000B)
  412. #define MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE (0x0000000C)
  413. #define MPI_EVENT_ON_BUS_TIMER_EXPIRED (0x0000000D)
  414. #define MPI_EVENT_QUEUE_FULL (0x0000000E)
  415. #define MPI_EVENT_SAS_DEVICE_STATUS_CHANGE (0x0000000F)
  416. #define MPI_EVENT_SAS_SES (0x00000010)
  417. #define MPI_EVENT_PERSISTENT_TABLE_FULL (0x00000011)
  418. #define MPI_EVENT_SAS_PHY_LINK_STATUS (0x00000012)
  419. #define MPI_EVENT_SAS_DISCOVERY_ERROR (0x00000013)
  420. #define MPI_EVENT_IR_RESYNC_UPDATE (0x00000014)
  421. #define MPI_EVENT_IR2 (0x00000015)
  422. #define MPI_EVENT_SAS_DISCOVERY (0x00000016)
  423. #define MPI_EVENT_LOG_ENTRY_ADDED (0x00000021)
  424. /* AckRequired field values */
  425. #define MPI_EVENT_NOTIFICATION_ACK_NOT_REQUIRED (0x00)
  426. #define MPI_EVENT_NOTIFICATION_ACK_REQUIRED (0x01)
  427. /* EventChange Event data */
  428. typedef struct _EVENT_DATA_EVENT_CHANGE
  429. {
  430. U8 EventState; /* 00h */
  431. U8 Reserved; /* 01h */
  432. U16 Reserved1; /* 02h */
  433. } EVENT_DATA_EVENT_CHANGE, MPI_POINTER PTR_EVENT_DATA_EVENT_CHANGE,
  434. EventDataEventChange_t, MPI_POINTER pEventDataEventChange_t;
  435. /* LogEntryAdded Event data */
  436. /* this structure matches MPI_LOG_0_ENTRY in mpi_cnfg.h */
  437. #define MPI_EVENT_DATA_LOG_ENTRY_DATA_LENGTH (0x1C)
  438. typedef struct _EVENT_DATA_LOG_ENTRY
  439. {
  440. U32 TimeStamp; /* 00h */
  441. U32 Reserved1; /* 04h */
  442. U16 LogSequence; /* 08h */
  443. U16 LogEntryQualifier; /* 0Ah */
  444. U8 LogData[MPI_EVENT_DATA_LOG_ENTRY_DATA_LENGTH]; /* 0Ch */
  445. } EVENT_DATA_LOG_ENTRY, MPI_POINTER PTR_EVENT_DATA_LOG_ENTRY,
  446. MpiEventDataLogEntry_t, MPI_POINTER pMpiEventDataLogEntry_t;
  447. typedef struct _EVENT_DATA_LOG_ENTRY_ADDED
  448. {
  449. U16 LogSequence; /* 00h */
  450. U16 Reserved1; /* 02h */
  451. U32 Reserved2; /* 04h */
  452. EVENT_DATA_LOG_ENTRY LogEntry; /* 08h */
  453. } EVENT_DATA_LOG_ENTRY_ADDED, MPI_POINTER PTR_EVENT_DATA_LOG_ENTRY_ADDED,
  454. MpiEventDataLogEntryAdded_t, MPI_POINTER pMpiEventDataLogEntryAdded_t;
  455. /* SCSI Event data for Port, Bus and Device forms */
  456. typedef struct _EVENT_DATA_SCSI
  457. {
  458. U8 TargetID; /* 00h */
  459. U8 BusPort; /* 01h */
  460. U16 Reserved; /* 02h */
  461. } EVENT_DATA_SCSI, MPI_POINTER PTR_EVENT_DATA_SCSI,
  462. EventDataScsi_t, MPI_POINTER pEventDataScsi_t;
  463. /* SCSI Device Status Change Event data */
  464. typedef struct _EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE
  465. {
  466. U8 TargetID; /* 00h */
  467. U8 Bus; /* 01h */
  468. U8 ReasonCode; /* 02h */
  469. U8 LUN; /* 03h */
  470. U8 ASC; /* 04h */
  471. U8 ASCQ; /* 05h */
  472. U16 Reserved; /* 06h */
  473. } EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE,
  474. MPI_POINTER PTR_EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE,
  475. MpiEventDataScsiDeviceStatusChange_t,
  476. MPI_POINTER pMpiEventDataScsiDeviceStatusChange_t;
  477. /* MPI SCSI Device Status Change Event data ReasonCode values */
  478. #define MPI_EVENT_SCSI_DEV_STAT_RC_ADDED (0x03)
  479. #define MPI_EVENT_SCSI_DEV_STAT_RC_NOT_RESPONDING (0x04)
  480. #define MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA (0x05)
  481. /* SAS Device Status Change Event data */
  482. typedef struct _EVENT_DATA_SAS_DEVICE_STATUS_CHANGE
  483. {
  484. U8 TargetID; /* 00h */
  485. U8 Bus; /* 01h */
  486. U8 ReasonCode; /* 02h */
  487. U8 Reserved; /* 03h */
  488. U8 ASC; /* 04h */
  489. U8 ASCQ; /* 05h */
  490. U16 DevHandle; /* 06h */
  491. U32 DeviceInfo; /* 08h */
  492. U16 ParentDevHandle; /* 0Ch */
  493. U8 PhyNum; /* 0Eh */
  494. U8 Reserved1; /* 0Fh */
  495. U64 SASAddress; /* 10h */
  496. } EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
  497. MPI_POINTER PTR_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
  498. MpiEventDataSasDeviceStatusChange_t,
  499. MPI_POINTER pMpiEventDataSasDeviceStatusChange_t;
  500. /* MPI SAS Device Status Change Event data ReasonCode values */
  501. #define MPI_EVENT_SAS_DEV_STAT_RC_ADDED (0x03)
  502. #define MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING (0x04)
  503. #define MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA (0x05)
  504. #define MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED (0x06)
  505. #define MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED (0x07)
  506. #define MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET (0x08)
  507. /* SCSI Event data for Queue Full event */
  508. typedef struct _EVENT_DATA_QUEUE_FULL
  509. {
  510. U8 TargetID; /* 00h */
  511. U8 Bus; /* 01h */
  512. U16 CurrentDepth; /* 02h */
  513. } EVENT_DATA_QUEUE_FULL, MPI_POINTER PTR_EVENT_DATA_QUEUE_FULL,
  514. EventDataQueueFull_t, MPI_POINTER pEventDataQueueFull_t;
  515. /* MPI Integrated RAID Event data */
  516. typedef struct _EVENT_DATA_RAID
  517. {
  518. U8 VolumeID; /* 00h */
  519. U8 VolumeBus; /* 01h */
  520. U8 ReasonCode; /* 02h */
  521. U8 PhysDiskNum; /* 03h */
  522. U8 ASC; /* 04h */
  523. U8 ASCQ; /* 05h */
  524. U16 Reserved; /* 06h */
  525. U32 SettingsStatus; /* 08h */
  526. } EVENT_DATA_RAID, MPI_POINTER PTR_EVENT_DATA_RAID,
  527. MpiEventDataRaid_t, MPI_POINTER pMpiEventDataRaid_t;
  528. /* MPI Integrated RAID Event data ReasonCode values */
  529. #define MPI_EVENT_RAID_RC_VOLUME_CREATED (0x00)
  530. #define MPI_EVENT_RAID_RC_VOLUME_DELETED (0x01)
  531. #define MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED (0x02)
  532. #define MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED (0x03)
  533. #define MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED (0x04)
  534. #define MPI_EVENT_RAID_RC_PHYSDISK_CREATED (0x05)
  535. #define MPI_EVENT_RAID_RC_PHYSDISK_DELETED (0x06)
  536. #define MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED (0x07)
  537. #define MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED (0x08)
  538. #define MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED (0x09)
  539. #define MPI_EVENT_RAID_RC_SMART_DATA (0x0A)
  540. #define MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED (0x0B)
  541. /* MPI Integrated RAID Resync Update Event data */
  542. typedef struct _MPI_EVENT_DATA_IR_RESYNC_UPDATE
  543. {
  544. U8 VolumeID; /* 00h */
  545. U8 VolumeBus; /* 01h */
  546. U8 ResyncComplete; /* 02h */
  547. U8 Reserved1; /* 03h */
  548. U32 Reserved2; /* 04h */
  549. } MPI_EVENT_DATA_IR_RESYNC_UPDATE,
  550. MPI_POINTER PTR_MPI_EVENT_DATA_IR_RESYNC_UPDATE,
  551. MpiEventDataIrResyncUpdate_t, MPI_POINTER pMpiEventDataIrResyncUpdate_t;
  552. /* MPI IR2 Event data */
  553. /* MPI_LD_STATE or MPI_PD_STATE */
  554. typedef struct _IR2_STATE_CHANGED
  555. {
  556. U16 PreviousState; /* 00h */
  557. U16 NewState; /* 02h */
  558. } IR2_STATE_CHANGED, MPI_POINTER PTR_IR2_STATE_CHANGED;
  559. typedef struct _IR2_PD_INFO
  560. {
  561. U16 DeviceHandle; /* 00h */
  562. U8 TruncEnclosureHandle; /* 02h */
  563. U8 TruncatedSlot; /* 03h */
  564. } IR2_PD_INFO, MPI_POINTER PTR_IR2_PD_INFO;
  565. typedef union _MPI_IR2_RC_EVENT_DATA
  566. {
  567. IR2_STATE_CHANGED StateChanged;
  568. U32 Lba;
  569. IR2_PD_INFO PdInfo;
  570. } MPI_IR2_RC_EVENT_DATA, MPI_POINTER PTR_MPI_IR2_RC_EVENT_DATA;
  571. typedef struct _MPI_EVENT_DATA_IR2
  572. {
  573. U8 TargetID; /* 00h */
  574. U8 Bus; /* 01h */
  575. U8 ReasonCode; /* 02h */
  576. U8 PhysDiskNum; /* 03h */
  577. MPI_IR2_RC_EVENT_DATA IR2EventData; /* 04h */
  578. } MPI_EVENT_DATA_IR2, MPI_POINTER PTR_MPI_EVENT_DATA_IR2,
  579. MpiEventDataIR2_t, MPI_POINTER pMpiEventDataIR2_t;
  580. /* MPI IR2 Event data ReasonCode values */
  581. #define MPI_EVENT_IR2_RC_LD_STATE_CHANGED (0x01)
  582. #define MPI_EVENT_IR2_RC_PD_STATE_CHANGED (0x02)
  583. #define MPI_EVENT_IR2_RC_BAD_BLOCK_TABLE_FULL (0x03)
  584. #define MPI_EVENT_IR2_RC_PD_INSERTED (0x04)
  585. #define MPI_EVENT_IR2_RC_PD_REMOVED (0x05)
  586. #define MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED (0x06)
  587. #define MPI_EVENT_IR2_RC_REBUILD_MEDIUM_ERROR (0x07)
  588. /* defines for logical disk states */
  589. #define MPI_LD_STATE_OPTIMAL (0x00)
  590. #define MPI_LD_STATE_DEGRADED (0x01)
  591. #define MPI_LD_STATE_FAILED (0x02)
  592. #define MPI_LD_STATE_MISSING (0x03)
  593. #define MPI_LD_STATE_OFFLINE (0x04)
  594. /* defines for physical disk states */
  595. #define MPI_PD_STATE_ONLINE (0x00)
  596. #define MPI_PD_STATE_MISSING (0x01)
  597. #define MPI_PD_STATE_NOT_COMPATIBLE (0x02)
  598. #define MPI_PD_STATE_FAILED (0x03)
  599. #define MPI_PD_STATE_INITIALIZING (0x04)
  600. #define MPI_PD_STATE_OFFLINE_AT_HOST_REQUEST (0x05)
  601. #define MPI_PD_STATE_FAILED_AT_HOST_REQUEST (0x06)
  602. #define MPI_PD_STATE_OFFLINE_FOR_ANOTHER_REASON (0xFF)
  603. /* MPI Link Status Change Event data */
  604. typedef struct _EVENT_DATA_LINK_STATUS
  605. {
  606. U8 State; /* 00h */
  607. U8 Reserved; /* 01h */
  608. U16 Reserved1; /* 02h */
  609. U8 Reserved2; /* 04h */
  610. U8 Port; /* 05h */
  611. U16 Reserved3; /* 06h */
  612. } EVENT_DATA_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_LINK_STATUS,
  613. EventDataLinkStatus_t, MPI_POINTER pEventDataLinkStatus_t;
  614. #define MPI_EVENT_LINK_STATUS_FAILURE (0x00000000)
  615. #define MPI_EVENT_LINK_STATUS_ACTIVE (0x00000001)
  616. /* MPI Loop State Change Event data */
  617. typedef struct _EVENT_DATA_LOOP_STATE
  618. {
  619. U8 Character4; /* 00h */
  620. U8 Character3; /* 01h */
  621. U8 Type; /* 02h */
  622. U8 Reserved; /* 03h */
  623. U8 Reserved1; /* 04h */
  624. U8 Port; /* 05h */
  625. U16 Reserved2; /* 06h */
  626. } EVENT_DATA_LOOP_STATE, MPI_POINTER PTR_EVENT_DATA_LOOP_STATE,
  627. EventDataLoopState_t, MPI_POINTER pEventDataLoopState_t;
  628. #define MPI_EVENT_LOOP_STATE_CHANGE_LIP (0x0001)
  629. #define MPI_EVENT_LOOP_STATE_CHANGE_LPE (0x0002)
  630. #define MPI_EVENT_LOOP_STATE_CHANGE_LPB (0x0003)
  631. /* MPI LOGOUT Event data */
  632. typedef struct _EVENT_DATA_LOGOUT
  633. {
  634. U32 NPortID; /* 00h */
  635. U8 AliasIndex; /* 04h */
  636. U8 Port; /* 05h */
  637. U16 Reserved1; /* 06h */
  638. } EVENT_DATA_LOGOUT, MPI_POINTER PTR_EVENT_DATA_LOGOUT,
  639. EventDataLogout_t, MPI_POINTER pEventDataLogout_t;
  640. #define MPI_EVENT_LOGOUT_ALL_ALIASES (0xFF)
  641. /* SAS SES Event data */
  642. typedef struct _EVENT_DATA_SAS_SES
  643. {
  644. U8 PhyNum; /* 00h */
  645. U8 Port; /* 01h */
  646. U8 PortWidth; /* 02h */
  647. U8 Reserved1; /* 04h */
  648. } EVENT_DATA_SAS_SES, MPI_POINTER PTR_EVENT_DATA_SAS_SES,
  649. MpiEventDataSasSes_t, MPI_POINTER pMpiEventDataSasSes_t;
  650. /* SAS Phy Link Status Event data */
  651. typedef struct _EVENT_DATA_SAS_PHY_LINK_STATUS
  652. {
  653. U8 PhyNum; /* 00h */
  654. U8 LinkRates; /* 01h */
  655. U16 DevHandle; /* 02h */
  656. U64 SASAddress; /* 04h */
  657. } EVENT_DATA_SAS_PHY_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_SAS_PHY_LINK_STATUS,
  658. MpiEventDataSasPhyLinkStatus_t, MPI_POINTER pMpiEventDataSasPhyLinkStatus_t;
  659. /* defines for the LinkRates field of the SAS PHY Link Status event */
  660. #define MPI_EVENT_SAS_PLS_LR_CURRENT_MASK (0xF0)
  661. #define MPI_EVENT_SAS_PLS_LR_CURRENT_SHIFT (4)
  662. #define MPI_EVENT_SAS_PLS_LR_PREVIOUS_MASK (0x0F)
  663. #define MPI_EVENT_SAS_PLS_LR_PREVIOUS_SHIFT (0)
  664. #define MPI_EVENT_SAS_PLS_LR_RATE_UNKNOWN (0x00)
  665. #define MPI_EVENT_SAS_PLS_LR_RATE_PHY_DISABLED (0x01)
  666. #define MPI_EVENT_SAS_PLS_LR_RATE_FAILED_SPEED_NEGOTIATION (0x02)
  667. #define MPI_EVENT_SAS_PLS_LR_RATE_SATA_OOB_COMPLETE (0x03)
  668. #define MPI_EVENT_SAS_PLS_LR_RATE_1_5 (0x08)
  669. #define MPI_EVENT_SAS_PLS_LR_RATE_3_0 (0x09)
  670. /* SAS Discovery Event data */
  671. typedef struct _EVENT_DATA_SAS_DISCOVERY
  672. {
  673. U32 DiscoveryStatus; /* 00h */
  674. U32 Reserved1; /* 04h */
  675. } EVENT_DATA_SAS_DISCOVERY, MPI_POINTER PTR_EVENT_DATA_SAS_DISCOVERY,
  676. EventDataSasDiscovery_t, MPI_POINTER pEventDataSasDiscovery_t;
  677. #define MPI_EVENT_SAS_DSCVRY_COMPLETE (0x00000000)
  678. #define MPI_EVENT_SAS_DSCVRY_IN_PROGRESS (0x00000001)
  679. #define MPI_EVENT_SAS_DSCVRY_PHY_BITS_MASK (0xFFFF0000)
  680. #define MPI_EVENT_SAS_DSCVRY_PHY_BITS_SHIFT (16)
  681. /* SAS Discovery Errror Event data */
  682. typedef struct _EVENT_DATA_DISCOVERY_ERROR
  683. {
  684. U32 DiscoveryStatus; /* 00h */
  685. U8 Port; /* 04h */
  686. U8 Reserved1; /* 05h */
  687. U16 Reserved2; /* 06h */
  688. } EVENT_DATA_DISCOVERY_ERROR, MPI_POINTER PTR_EVENT_DATA_DISCOVERY_ERROR,
  689. EventDataDiscoveryError_t, MPI_POINTER pEventDataDiscoveryError_t;
  690. #define MPI_EVENT_DSCVRY_ERR_DS_LOOP_DETECTED (0x00000001)
  691. #define MPI_EVENT_DSCVRY_ERR_DS_UNADDRESSABLE_DEVICE (0x00000002)
  692. #define MPI_EVENT_DSCVRY_ERR_DS_MULTIPLE_PORTS (0x00000004)
  693. #define MPI_EVENT_DSCVRY_ERR_DS_EXPANDER_ERR (0x00000008)
  694. #define MPI_EVENT_DSCVRY_ERR_DS_SMP_TIMEOUT (0x00000010)
  695. #define MPI_EVENT_DSCVRY_ERR_DS_OUT_ROUTE_ENTRIES (0x00000020)
  696. #define MPI_EVENT_DSCVRY_ERR_DS_INDEX_NOT_EXIST (0x00000040)
  697. #define MPI_EVENT_DSCVRY_ERR_DS_SMP_FUNCTION_FAILED (0x00000080)
  698. #define MPI_EVENT_DSCVRY_ERR_DS_SMP_CRC_ERROR (0x00000100)
  699. #define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_SUBTRACTIVE (0x00000200)
  700. #define MPI_EVENT_DSCVRY_ERR_DS_TABLE_TO_TABLE (0x00000400)
  701. #define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_PATHS (0x00000800)
  702. #define MPI_EVENT_DSCVRY_ERR_DS_MAX_SATA_TARGETS (0x00001000)
  703. /*****************************************************************************
  704. *
  705. * F i r m w a r e L o a d M e s s a g e s
  706. *
  707. *****************************************************************************/
  708. /****************************************************************************/
  709. /* Firmware Download message and associated structures */
  710. /****************************************************************************/
  711. typedef struct _MSG_FW_DOWNLOAD
  712. {
  713. U8 ImageType; /* 00h */
  714. U8 Reserved; /* 01h */
  715. U8 ChainOffset; /* 02h */
  716. U8 Function; /* 03h */
  717. U8 Reserved1[3]; /* 04h */
  718. U8 MsgFlags; /* 07h */
  719. U32 MsgContext; /* 08h */
  720. SGE_MPI_UNION SGL; /* 0Ch */
  721. } MSG_FW_DOWNLOAD, MPI_POINTER PTR_MSG_FW_DOWNLOAD,
  722. FWDownload_t, MPI_POINTER pFWDownload_t;
  723. #define MPI_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT (0x01)
  724. #define MPI_FW_DOWNLOAD_ITYPE_RESERVED (0x00)
  725. #define MPI_FW_DOWNLOAD_ITYPE_FW (0x01)
  726. #define MPI_FW_DOWNLOAD_ITYPE_BIOS (0x02)
  727. #define MPI_FW_DOWNLOAD_ITYPE_NVDATA (0x03)
  728. #define MPI_FW_DOWNLOAD_ITYPE_BOOTLOADER (0x04)
  729. typedef struct _FWDownloadTCSGE
  730. {
  731. U8 Reserved; /* 00h */
  732. U8 ContextSize; /* 01h */
  733. U8 DetailsLength; /* 02h */
  734. U8 Flags; /* 03h */
  735. U32 Reserved_0100_Checksum; /* 04h */ /* obsolete Checksum */
  736. U32 ImageOffset; /* 08h */
  737. U32 ImageSize; /* 0Ch */
  738. } FW_DOWNLOAD_TCSGE, MPI_POINTER PTR_FW_DOWNLOAD_TCSGE,
  739. FWDownloadTCSGE_t, MPI_POINTER pFWDownloadTCSGE_t;
  740. /* Firmware Download reply */
  741. typedef struct _MSG_FW_DOWNLOAD_REPLY
  742. {
  743. U8 ImageType; /* 00h */
  744. U8 Reserved; /* 01h */
  745. U8 MsgLength; /* 02h */
  746. U8 Function; /* 03h */
  747. U8 Reserved1[3]; /* 04h */
  748. U8 MsgFlags; /* 07h */
  749. U32 MsgContext; /* 08h */
  750. U16 Reserved2; /* 0Ch */
  751. U16 IOCStatus; /* 0Eh */
  752. U32 IOCLogInfo; /* 10h */
  753. } MSG_FW_DOWNLOAD_REPLY, MPI_POINTER PTR_MSG_FW_DOWNLOAD_REPLY,
  754. FWDownloadReply_t, MPI_POINTER pFWDownloadReply_t;
  755. /****************************************************************************/
  756. /* Firmware Upload message and associated structures */
  757. /****************************************************************************/
  758. typedef struct _MSG_FW_UPLOAD
  759. {
  760. U8 ImageType; /* 00h */
  761. U8 Reserved; /* 01h */
  762. U8 ChainOffset; /* 02h */
  763. U8 Function; /* 03h */
  764. U8 Reserved1[3]; /* 04h */
  765. U8 MsgFlags; /* 07h */
  766. U32 MsgContext; /* 08h */
  767. SGE_MPI_UNION SGL; /* 0Ch */
  768. } MSG_FW_UPLOAD, MPI_POINTER PTR_MSG_FW_UPLOAD,
  769. FWUpload_t, MPI_POINTER pFWUpload_t;
  770. #define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM (0x00)
  771. #define MPI_FW_UPLOAD_ITYPE_FW_FLASH (0x01)
  772. #define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02)
  773. #define MPI_FW_UPLOAD_ITYPE_NVDATA (0x03)
  774. #define MPI_FW_UPLOAD_ITYPE_BOOTLOADER (0x04)
  775. #define MPI_FW_UPLOAD_ITYPE_FW_BACKUP (0x05)
  776. typedef struct _FWUploadTCSGE
  777. {
  778. U8 Reserved; /* 00h */
  779. U8 ContextSize; /* 01h */
  780. U8 DetailsLength; /* 02h */
  781. U8 Flags; /* 03h */
  782. U32 Reserved1; /* 04h */
  783. U32 ImageOffset; /* 08h */
  784. U32 ImageSize; /* 0Ch */
  785. } FW_UPLOAD_TCSGE, MPI_POINTER PTR_FW_UPLOAD_TCSGE,
  786. FWUploadTCSGE_t, MPI_POINTER pFWUploadTCSGE_t;
  787. /* Firmware Upload reply */
  788. typedef struct _MSG_FW_UPLOAD_REPLY
  789. {
  790. U8 ImageType; /* 00h */
  791. U8 Reserved; /* 01h */
  792. U8 MsgLength; /* 02h */
  793. U8 Function; /* 03h */
  794. U8 Reserved1[3]; /* 04h */
  795. U8 MsgFlags; /* 07h */
  796. U32 MsgContext; /* 08h */
  797. U16 Reserved2; /* 0Ch */
  798. U16 IOCStatus; /* 0Eh */
  799. U32 IOCLogInfo; /* 10h */
  800. U32 ActualImageSize; /* 14h */
  801. } MSG_FW_UPLOAD_REPLY, MPI_POINTER PTR_MSG_FW_UPLOAD_REPLY,
  802. FWUploadReply_t, MPI_POINTER pFWUploadReply_t;
  803. typedef struct _MPI_FW_HEADER
  804. {
  805. U32 ArmBranchInstruction0; /* 00h */
  806. U32 Signature0; /* 04h */
  807. U32 Signature1; /* 08h */
  808. U32 Signature2; /* 0Ch */
  809. U32 ArmBranchInstruction1; /* 10h */
  810. U32 ArmBranchInstruction2; /* 14h */
  811. U32 Reserved; /* 18h */
  812. U32 Checksum; /* 1Ch */
  813. U16 VendorId; /* 20h */
  814. U16 ProductId; /* 22h */
  815. MPI_FW_VERSION FWVersion; /* 24h */
  816. U32 SeqCodeVersion; /* 28h */
  817. U32 ImageSize; /* 2Ch */
  818. U32 NextImageHeaderOffset; /* 30h */
  819. U32 LoadStartAddress; /* 34h */
  820. U32 IopResetVectorValue; /* 38h */
  821. U32 IopResetRegAddr; /* 3Ch */
  822. U32 VersionNameWhat; /* 40h */
  823. U8 VersionName[32]; /* 44h */
  824. U32 VendorNameWhat; /* 64h */
  825. U8 VendorName[32]; /* 68h */
  826. } MPI_FW_HEADER, MPI_POINTER PTR_MPI_FW_HEADER,
  827. MpiFwHeader_t, MPI_POINTER pMpiFwHeader_t;
  828. #define MPI_FW_HEADER_WHAT_SIGNATURE (0x29232840)
  829. /* defines for using the ProductId field */
  830. #define MPI_FW_HEADER_PID_TYPE_MASK (0xF000)
  831. #define MPI_FW_HEADER_PID_TYPE_SCSI (0x0000)
  832. #define MPI_FW_HEADER_PID_TYPE_FC (0x1000)
  833. #define MPI_FW_HEADER_PID_TYPE_SAS (0x2000)
  834. #define MPI_FW_HEADER_SIGNATURE_0 (0x5AEAA55A)
  835. #define MPI_FW_HEADER_SIGNATURE_1 (0xA55AEAA5)
  836. #define MPI_FW_HEADER_SIGNATURE_2 (0x5AA55AEA)
  837. #define MPI_FW_HEADER_PID_PROD_MASK (0x0F00)
  838. #define MPI_FW_HEADER_PID_PROD_INITIATOR_SCSI (0x0100)
  839. #define MPI_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI (0x0200)
  840. #define MPI_FW_HEADER_PID_PROD_TARGET_SCSI (0x0300)
  841. #define MPI_FW_HEADER_PID_PROD_IM_SCSI (0x0400)
  842. #define MPI_FW_HEADER_PID_PROD_IS_SCSI (0x0500)
  843. #define MPI_FW_HEADER_PID_PROD_CTX_SCSI (0x0600)
  844. #define MPI_FW_HEADER_PID_PROD_IR_SCSI (0x0700)
  845. #define MPI_FW_HEADER_PID_FAMILY_MASK (0x00FF)
  846. /* SCSI */
  847. #define MPI_FW_HEADER_PID_FAMILY_1030A0_SCSI (0x0001)
  848. #define MPI_FW_HEADER_PID_FAMILY_1030B0_SCSI (0x0002)
  849. #define MPI_FW_HEADER_PID_FAMILY_1030B1_SCSI (0x0003)
  850. #define MPI_FW_HEADER_PID_FAMILY_1030C0_SCSI (0x0004)
  851. #define MPI_FW_HEADER_PID_FAMILY_1020A0_SCSI (0x0005)
  852. #define MPI_FW_HEADER_PID_FAMILY_1020B0_SCSI (0x0006)
  853. #define MPI_FW_HEADER_PID_FAMILY_1020B1_SCSI (0x0007)
  854. #define MPI_FW_HEADER_PID_FAMILY_1020C0_SCSI (0x0008)
  855. #define MPI_FW_HEADER_PID_FAMILY_1035A0_SCSI (0x0009)
  856. #define MPI_FW_HEADER_PID_FAMILY_1035B0_SCSI (0x000A)
  857. #define MPI_FW_HEADER_PID_FAMILY_1030TA0_SCSI (0x000B)
  858. #define MPI_FW_HEADER_PID_FAMILY_1020TA0_SCSI (0x000C)
  859. /* Fibre Channel */
  860. #define MPI_FW_HEADER_PID_FAMILY_909_FC (0x0000)
  861. #define MPI_FW_HEADER_PID_FAMILY_919_FC (0x0001) /* 919 and 929 */
  862. #define MPI_FW_HEADER_PID_FAMILY_919X_FC (0x0002) /* 919X and 929X */
  863. #define MPI_FW_HEADER_PID_FAMILY_919XL_FC (0x0003) /* 919XL and 929XL */
  864. #define MPI_FW_HEADER_PID_FAMILY_939X_FC (0x0004) /* 939X and 949X */
  865. #define MPI_FW_HEADER_PID_FAMILY_959_FC (0x0005)
  866. #define MPI_FW_HEADER_PID_FAMILY_949E_FC (0x0006)
  867. /* SAS */
  868. #define MPI_FW_HEADER_PID_FAMILY_1064_SAS (0x0001)
  869. #define MPI_FW_HEADER_PID_FAMILY_1068_SAS (0x0002)
  870. #define MPI_FW_HEADER_PID_FAMILY_1078_SAS (0x0003)
  871. #define MPI_FW_HEADER_PID_FAMILY_106xE_SAS (0x0004) /* 1068E, 1066E, and 1064E */
  872. typedef struct _MPI_EXT_IMAGE_HEADER
  873. {
  874. U8 ImageType; /* 00h */
  875. U8 Reserved; /* 01h */
  876. U16 Reserved1; /* 02h */
  877. U32 Checksum; /* 04h */
  878. U32 ImageSize; /* 08h */
  879. U32 NextImageHeaderOffset; /* 0Ch */
  880. U32 LoadStartAddress; /* 10h */
  881. U32 Reserved2; /* 14h */
  882. } MPI_EXT_IMAGE_HEADER, MPI_POINTER PTR_MPI_EXT_IMAGE_HEADER,
  883. MpiExtImageHeader_t, MPI_POINTER pMpiExtImageHeader_t;
  884. /* defines for the ImageType field */
  885. #define MPI_EXT_IMAGE_TYPE_UNSPECIFIED (0x00)
  886. #define MPI_EXT_IMAGE_TYPE_FW (0x01)
  887. #define MPI_EXT_IMAGE_TYPE_NVDATA (0x03)
  888. #define MPI_EXT_IMAGE_TYPE_BOOTLOADER (0x04)
  889. #endif