mpi2_ioc.h 72 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861
  1. /*
  2. * Copyright 2000-2015 Avago Technologies. All rights reserved.
  3. *
  4. *
  5. * Name: mpi2_ioc.h
  6. * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages
  7. * Creation Date: October 11, 2006
  8. *
  9. * mpi2_ioc.h Version: 02.00.27
  10. *
  11. * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
  12. * prefix are for use only on MPI v2.5 products, and must not be used
  13. * with MPI v2.0 products. Unless otherwise noted, names beginning with
  14. * MPI2 or Mpi2 are for use with both MPI v2.0 and MPI v2.5 products.
  15. *
  16. * Version History
  17. * ---------------
  18. *
  19. * Date Version Description
  20. * -------- -------- ------------------------------------------------------
  21. * 04-30-07 02.00.00 Corresponds to Fusion-MPT MPI Specification Rev A.
  22. * 06-04-07 02.00.01 In IOCFacts Reply structure, renamed MaxDevices to
  23. * MaxTargets.
  24. * Added TotalImageSize field to FWDownload Request.
  25. * Added reserved words to FWUpload Request.
  26. * 06-26-07 02.00.02 Added IR Configuration Change List Event.
  27. * 08-31-07 02.00.03 Removed SystemReplyQueueDepth field from the IOCInit
  28. * request and replaced it with
  29. * ReplyDescriptorPostQueueDepth and ReplyFreeQueueDepth.
  30. * Replaced the MinReplyQueueDepth field of the IOCFacts
  31. * reply with MaxReplyDescriptorPostQueueDepth.
  32. * Added MPI2_RDPQ_DEPTH_MIN define to specify the minimum
  33. * depth for the Reply Descriptor Post Queue.
  34. * Added SASAddress field to Initiator Device Table
  35. * Overflow Event data.
  36. * 10-31-07 02.00.04 Added ReasonCode MPI2_EVENT_SAS_INIT_RC_NOT_RESPONDING
  37. * for SAS Initiator Device Status Change Event data.
  38. * Modified Reason Code defines for SAS Topology Change
  39. * List Event data, including adding a bit for PHY Vacant
  40. * status, and adding a mask for the Reason Code.
  41. * Added define for
  42. * MPI2_EVENT_SAS_TOPO_ES_DELAY_NOT_RESPONDING.
  43. * Added define for MPI2_EXT_IMAGE_TYPE_MEGARAID.
  44. * 12-18-07 02.00.05 Added Boot Status defines for the IOCExceptions field of
  45. * the IOCFacts Reply.
  46. * Removed MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER define.
  47. * Moved MPI2_VERSION_UNION to mpi2.h.
  48. * Changed MPI2_EVENT_NOTIFICATION_REQUEST to use masks
  49. * instead of enables, and added SASBroadcastPrimitiveMasks
  50. * field.
  51. * Added Log Entry Added Event and related structure.
  52. * 02-29-08 02.00.06 Added define MPI2_IOCFACTS_CAPABILITY_INTEGRATED_RAID.
  53. * Removed define MPI2_IOCFACTS_PROTOCOL_SMP_TARGET.
  54. * Added MaxVolumes and MaxPersistentEntries fields to
  55. * IOCFacts reply.
  56. * Added ProtocalFlags and IOCCapabilities fields to
  57. * MPI2_FW_IMAGE_HEADER.
  58. * Removed MPI2_PORTENABLE_FLAGS_ENABLE_SINGLE_PORT.
  59. * 03-03-08 02.00.07 Fixed MPI2_FW_IMAGE_HEADER by changing Reserved26 to
  60. * a U16 (from a U32).
  61. * Removed extra 's' from EventMasks name.
  62. * 06-27-08 02.00.08 Fixed an offset in a comment.
  63. * 10-02-08 02.00.09 Removed SystemReplyFrameSize from MPI2_IOC_INIT_REQUEST.
  64. * Removed CurReplyFrameSize from MPI2_IOC_FACTS_REPLY and
  65. * renamed MinReplyFrameSize to ReplyFrameSize.
  66. * Added MPI2_IOCFACTS_EXCEPT_IR_FOREIGN_CONFIG_MAX.
  67. * Added two new RAIDOperation values for Integrated RAID
  68. * Operations Status Event data.
  69. * Added four new IR Configuration Change List Event data
  70. * ReasonCode values.
  71. * Added two new ReasonCode defines for SAS Device Status
  72. * Change Event data.
  73. * Added three new DiscoveryStatus bits for the SAS
  74. * Discovery event data.
  75. * Added Multiplexing Status Change bit to the PhyStatus
  76. * field of the SAS Topology Change List event data.
  77. * Removed define for MPI2_INIT_IMAGE_BOOTFLAGS_XMEMCOPY.
  78. * BootFlags are now product-specific.
  79. * Added defines for the indivdual signature bytes
  80. * for MPI2_INIT_IMAGE_FOOTER.
  81. * 01-19-09 02.00.10 Added MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY define.
  82. * Added MPI2_EVENT_SAS_DISC_DS_DOWNSTREAM_INITIATOR
  83. * define.
  84. * Added MPI2_EVENT_SAS_DEV_STAT_RC_SATA_INIT_FAILURE
  85. * define.
  86. * Removed MPI2_EVENT_SAS_DISC_DS_SATA_INIT_FAILURE define.
  87. * 05-06-09 02.00.11 Added MPI2_IOCFACTS_CAPABILITY_RAID_ACCELERATOR define.
  88. * Added MPI2_IOCFACTS_CAPABILITY_MSI_X_INDEX define.
  89. * Added two new reason codes for SAS Device Status Change
  90. * Event.
  91. * Added new event: SAS PHY Counter.
  92. * 07-30-09 02.00.12 Added GPIO Interrupt event define and structure.
  93. * Added MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER define.
  94. * Added new product id family for 2208.
  95. * 10-28-09 02.00.13 Added HostMSIxVectors field to MPI2_IOC_INIT_REQUEST.
  96. * Added MaxMSIxVectors field to MPI2_IOC_FACTS_REPLY.
  97. * Added MinDevHandle field to MPI2_IOC_FACTS_REPLY.
  98. * Added MPI2_IOCFACTS_CAPABILITY_HOST_BASED_DISCOVERY.
  99. * Added MPI2_EVENT_HOST_BASED_DISCOVERY_PHY define.
  100. * Added MPI2_EVENT_SAS_TOPO_ES_NO_EXPANDER define.
  101. * Added Host Based Discovery Phy Event data.
  102. * Added defines for ProductID Product field
  103. * (MPI2_FW_HEADER_PID_).
  104. * Modified values for SAS ProductID Family
  105. * (MPI2_FW_HEADER_PID_FAMILY_).
  106. * 02-10-10 02.00.14 Added SAS Quiesce Event structure and defines.
  107. * Added PowerManagementControl Request structures and
  108. * defines.
  109. * 05-12-10 02.00.15 Marked Task Set Full Event as obsolete.
  110. * Added MPI2_EVENT_SAS_TOPO_LR_UNSUPPORTED_PHY define.
  111. * 11-10-10 02.00.16 Added MPI2_FW_DOWNLOAD_ITYPE_MIN_PRODUCT_SPECIFIC.
  112. * 02-23-11 02.00.17 Added SAS NOTIFY Primitive event, and added
  113. * SASNotifyPrimitiveMasks field to
  114. * MPI2_EVENT_NOTIFICATION_REQUEST.
  115. * Added Temperature Threshold Event.
  116. * Added Host Message Event.
  117. * Added Send Host Message request and reply.
  118. * 05-25-11 02.00.18 For Extended Image Header, added
  119. * MPI2_EXT_IMAGE_TYPE_MIN_PRODUCT_SPECIFIC and
  120. * MPI2_EXT_IMAGE_TYPE_MAX_PRODUCT_SPECIFIC defines.
  121. * Deprecated MPI2_EXT_IMAGE_TYPE_MAX define.
  122. * 08-24-11 02.00.19 Added PhysicalPort field to
  123. * MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE structure.
  124. * Marked MPI2_PM_CONTROL_FEATURE_PCIE_LINK as obsolete.
  125. * 11-18-11 02.00.20 Incorporating additions for MPI v2.5.
  126. * 03-29-12 02.00.21 Added a product specific range to event values.
  127. * 07-26-12 02.00.22 Added MPI2_IOCFACTS_EXCEPT_PARTIAL_MEMORY_FAILURE.
  128. * Added ElapsedSeconds field to
  129. * MPI2_EVENT_DATA_IR_OPERATION_STATUS.
  130. * 08-19-13 02.00.23 For IOCInit, added MPI2_IOCINIT_MSGFLAG_RDPQ_ARRAY_MODE
  131. * and MPI2_IOC_INIT_RDPQ_ARRAY_ENTRY.
  132. * Added MPI2_IOCFACTS_CAPABILITY_RDPQ_ARRAY_CAPABLE.
  133. * Added MPI2_FW_DOWNLOAD_ITYPE_PUBLIC_KEY.
  134. * Added Encrypted Hash Extended Image.
  135. * 12-05-13 02.00.24 Added MPI25_HASH_IMAGE_TYPE_BIOS.
  136. * 11-18-14 02.00.25 Updated copyright information.
  137. * 03-16-15 02.00.26 Updated for MPI v2.6.
  138. * Added MPI2_EVENT_ACTIVE_CABLE_EXCEPTION and
  139. * MPI26_EVENT_DATA_ACTIVE_CABLE_EXCEPT.
  140. * Added MPI26_FW_HEADER_PID_FAMILY_3324_SAS and
  141. * MPI26_FW_HEADER_PID_FAMILY_3516_SAS.
  142. * Added MPI26_CTRL_OP_SHUTDOWN.
  143. * 08-25-15 02.00.27 Added IC ARCH Class based signature defines
  144. * --------------------------------------------------------------------------
  145. */
  146. #ifndef MPI2_IOC_H
  147. #define MPI2_IOC_H
  148. /*****************************************************************************
  149. *
  150. * IOC Messages
  151. *
  152. *****************************************************************************/
  153. /****************************************************************************
  154. * IOCInit message
  155. ****************************************************************************/
  156. /*IOCInit Request message */
  157. typedef struct _MPI2_IOC_INIT_REQUEST {
  158. U8 WhoInit; /*0x00 */
  159. U8 Reserved1; /*0x01 */
  160. U8 ChainOffset; /*0x02 */
  161. U8 Function; /*0x03 */
  162. U16 Reserved2; /*0x04 */
  163. U8 Reserved3; /*0x06 */
  164. U8 MsgFlags; /*0x07 */
  165. U8 VP_ID; /*0x08 */
  166. U8 VF_ID; /*0x09 */
  167. U16 Reserved4; /*0x0A */
  168. U16 MsgVersion; /*0x0C */
  169. U16 HeaderVersion; /*0x0E */
  170. U32 Reserved5; /*0x10 */
  171. U16 ConfigurationFlags; /* 0x14 */
  172. U8 HostPageSize; /*0x16 */
  173. U8 HostMSIxVectors; /*0x17 */
  174. U16 Reserved8; /*0x18 */
  175. U16 SystemRequestFrameSize; /*0x1A */
  176. U16 ReplyDescriptorPostQueueDepth; /*0x1C */
  177. U16 ReplyFreeQueueDepth; /*0x1E */
  178. U32 SenseBufferAddressHigh; /*0x20 */
  179. U32 SystemReplyAddressHigh; /*0x24 */
  180. U64 SystemRequestFrameBaseAddress; /*0x28 */
  181. U64 ReplyDescriptorPostQueueAddress; /*0x30 */
  182. U64 ReplyFreeQueueAddress; /*0x38 */
  183. U64 TimeStamp; /*0x40 */
  184. } MPI2_IOC_INIT_REQUEST, *PTR_MPI2_IOC_INIT_REQUEST,
  185. Mpi2IOCInitRequest_t, *pMpi2IOCInitRequest_t;
  186. /*WhoInit values */
  187. #define MPI2_WHOINIT_NOT_INITIALIZED (0x00)
  188. #define MPI2_WHOINIT_SYSTEM_BIOS (0x01)
  189. #define MPI2_WHOINIT_ROM_BIOS (0x02)
  190. #define MPI2_WHOINIT_PCI_PEER (0x03)
  191. #define MPI2_WHOINIT_HOST_DRIVER (0x04)
  192. #define MPI2_WHOINIT_MANUFACTURER (0x05)
  193. /* MsgFlags */
  194. #define MPI2_IOCINIT_MSGFLAG_RDPQ_ARRAY_MODE (0x01)
  195. /*MsgVersion */
  196. #define MPI2_IOCINIT_MSGVERSION_MAJOR_MASK (0xFF00)
  197. #define MPI2_IOCINIT_MSGVERSION_MAJOR_SHIFT (8)
  198. #define MPI2_IOCINIT_MSGVERSION_MINOR_MASK (0x00FF)
  199. #define MPI2_IOCINIT_MSGVERSION_MINOR_SHIFT (0)
  200. /*HeaderVersion */
  201. #define MPI2_IOCINIT_HDRVERSION_UNIT_MASK (0xFF00)
  202. #define MPI2_IOCINIT_HDRVERSION_UNIT_SHIFT (8)
  203. #define MPI2_IOCINIT_HDRVERSION_DEV_MASK (0x00FF)
  204. #define MPI2_IOCINIT_HDRVERSION_DEV_SHIFT (0)
  205. /*minimum depth for a Reply Descriptor Post Queue */
  206. #define MPI2_RDPQ_DEPTH_MIN (16)
  207. /* Reply Descriptor Post Queue Array Entry */
  208. typedef struct _MPI2_IOC_INIT_RDPQ_ARRAY_ENTRY {
  209. U64 RDPQBaseAddress; /* 0x00 */
  210. U32 Reserved1; /* 0x08 */
  211. U32 Reserved2; /* 0x0C */
  212. } MPI2_IOC_INIT_RDPQ_ARRAY_ENTRY,
  213. *PTR_MPI2_IOC_INIT_RDPQ_ARRAY_ENTRY,
  214. Mpi2IOCInitRDPQArrayEntry, *pMpi2IOCInitRDPQArrayEntry;
  215. /*IOCInit Reply message */
  216. typedef struct _MPI2_IOC_INIT_REPLY {
  217. U8 WhoInit; /*0x00 */
  218. U8 Reserved1; /*0x01 */
  219. U8 MsgLength; /*0x02 */
  220. U8 Function; /*0x03 */
  221. U16 Reserved2; /*0x04 */
  222. U8 Reserved3; /*0x06 */
  223. U8 MsgFlags; /*0x07 */
  224. U8 VP_ID; /*0x08 */
  225. U8 VF_ID; /*0x09 */
  226. U16 Reserved4; /*0x0A */
  227. U16 Reserved5; /*0x0C */
  228. U16 IOCStatus; /*0x0E */
  229. U32 IOCLogInfo; /*0x10 */
  230. } MPI2_IOC_INIT_REPLY, *PTR_MPI2_IOC_INIT_REPLY,
  231. Mpi2IOCInitReply_t, *pMpi2IOCInitReply_t;
  232. /****************************************************************************
  233. * IOCFacts message
  234. ****************************************************************************/
  235. /*IOCFacts Request message */
  236. typedef struct _MPI2_IOC_FACTS_REQUEST {
  237. U16 Reserved1; /*0x00 */
  238. U8 ChainOffset; /*0x02 */
  239. U8 Function; /*0x03 */
  240. U16 Reserved2; /*0x04 */
  241. U8 Reserved3; /*0x06 */
  242. U8 MsgFlags; /*0x07 */
  243. U8 VP_ID; /*0x08 */
  244. U8 VF_ID; /*0x09 */
  245. U16 Reserved4; /*0x0A */
  246. } MPI2_IOC_FACTS_REQUEST, *PTR_MPI2_IOC_FACTS_REQUEST,
  247. Mpi2IOCFactsRequest_t, *pMpi2IOCFactsRequest_t;
  248. /*IOCFacts Reply message */
  249. typedef struct _MPI2_IOC_FACTS_REPLY {
  250. U16 MsgVersion; /*0x00 */
  251. U8 MsgLength; /*0x02 */
  252. U8 Function; /*0x03 */
  253. U16 HeaderVersion; /*0x04 */
  254. U8 IOCNumber; /*0x06 */
  255. U8 MsgFlags; /*0x07 */
  256. U8 VP_ID; /*0x08 */
  257. U8 VF_ID; /*0x09 */
  258. U16 Reserved1; /*0x0A */
  259. U16 IOCExceptions; /*0x0C */
  260. U16 IOCStatus; /*0x0E */
  261. U32 IOCLogInfo; /*0x10 */
  262. U8 MaxChainDepth; /*0x14 */
  263. U8 WhoInit; /*0x15 */
  264. U8 NumberOfPorts; /*0x16 */
  265. U8 MaxMSIxVectors; /*0x17 */
  266. U16 RequestCredit; /*0x18 */
  267. U16 ProductID; /*0x1A */
  268. U32 IOCCapabilities; /*0x1C */
  269. MPI2_VERSION_UNION FWVersion; /*0x20 */
  270. U16 IOCRequestFrameSize; /*0x24 */
  271. U16 IOCMaxChainSegmentSize; /*0x26 */
  272. U16 MaxInitiators; /*0x28 */
  273. U16 MaxTargets; /*0x2A */
  274. U16 MaxSasExpanders; /*0x2C */
  275. U16 MaxEnclosures; /*0x2E */
  276. U16 ProtocolFlags; /*0x30 */
  277. U16 HighPriorityCredit; /*0x32 */
  278. U16 MaxReplyDescriptorPostQueueDepth; /*0x34 */
  279. U8 ReplyFrameSize; /*0x36 */
  280. U8 MaxVolumes; /*0x37 */
  281. U16 MaxDevHandle; /*0x38 */
  282. U16 MaxPersistentEntries; /*0x3A */
  283. U16 MinDevHandle; /*0x3C */
  284. U8 CurrentHostPageSize; /* 0x3E */
  285. U8 Reserved4; /* 0x3F */
  286. } MPI2_IOC_FACTS_REPLY, *PTR_MPI2_IOC_FACTS_REPLY,
  287. Mpi2IOCFactsReply_t, *pMpi2IOCFactsReply_t;
  288. /*MsgVersion */
  289. #define MPI2_IOCFACTS_MSGVERSION_MAJOR_MASK (0xFF00)
  290. #define MPI2_IOCFACTS_MSGVERSION_MAJOR_SHIFT (8)
  291. #define MPI2_IOCFACTS_MSGVERSION_MINOR_MASK (0x00FF)
  292. #define MPI2_IOCFACTS_MSGVERSION_MINOR_SHIFT (0)
  293. /*HeaderVersion */
  294. #define MPI2_IOCFACTS_HDRVERSION_UNIT_MASK (0xFF00)
  295. #define MPI2_IOCFACTS_HDRVERSION_UNIT_SHIFT (8)
  296. #define MPI2_IOCFACTS_HDRVERSION_DEV_MASK (0x00FF)
  297. #define MPI2_IOCFACTS_HDRVERSION_DEV_SHIFT (0)
  298. /*IOCExceptions */
  299. #define MPI2_IOCFACTS_EXCEPT_PARTIAL_MEMORY_FAILURE (0x0200)
  300. #define MPI2_IOCFACTS_EXCEPT_IR_FOREIGN_CONFIG_MAX (0x0100)
  301. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_MASK (0x00E0)
  302. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_GOOD (0x0000)
  303. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_BACKUP (0x0020)
  304. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_RESTORED (0x0040)
  305. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_CORRUPT_BACKUP (0x0060)
  306. #define MPI2_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED (0x0010)
  307. #define MPI2_IOCFACTS_EXCEPT_MANUFACT_CHECKSUM_FAIL (0x0008)
  308. #define MPI2_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL (0x0004)
  309. #define MPI2_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID (0x0002)
  310. #define MPI2_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0001)
  311. /*defines for WhoInit field are after the IOCInit Request */
  312. /*ProductID field uses MPI2_FW_HEADER_PID_ */
  313. /*IOCCapabilities */
  314. #define MPI26_IOCFACTS_CAPABILITY_ATOMIC_REQ (0x00080000)
  315. #define MPI2_IOCFACTS_CAPABILITY_RDPQ_ARRAY_CAPABLE (0x00040000)
  316. #define MPI25_IOCFACTS_CAPABILITY_FAST_PATH_CAPABLE (0x00020000)
  317. #define MPI2_IOCFACTS_CAPABILITY_HOST_BASED_DISCOVERY (0x00010000)
  318. #define MPI2_IOCFACTS_CAPABILITY_MSI_X_INDEX (0x00008000)
  319. #define MPI2_IOCFACTS_CAPABILITY_RAID_ACCELERATOR (0x00004000)
  320. #define MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY (0x00002000)
  321. #define MPI2_IOCFACTS_CAPABILITY_INTEGRATED_RAID (0x00001000)
  322. #define MPI2_IOCFACTS_CAPABILITY_TLR (0x00000800)
  323. #define MPI2_IOCFACTS_CAPABILITY_MULTICAST (0x00000100)
  324. #define MPI2_IOCFACTS_CAPABILITY_BIDIRECTIONAL_TARGET (0x00000080)
  325. #define MPI2_IOCFACTS_CAPABILITY_EEDP (0x00000040)
  326. #define MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER (0x00000020)
  327. #define MPI2_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER (0x00000010)
  328. #define MPI2_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER (0x00000008)
  329. #define MPI2_IOCFACTS_CAPABILITY_TASK_SET_FULL_HANDLING (0x00000004)
  330. /*ProtocolFlags */
  331. #define MPI2_IOCFACTS_PROTOCOL_SCSI_INITIATOR (0x0002)
  332. #define MPI2_IOCFACTS_PROTOCOL_SCSI_TARGET (0x0001)
  333. /****************************************************************************
  334. * PortFacts message
  335. ****************************************************************************/
  336. /*PortFacts Request message */
  337. typedef struct _MPI2_PORT_FACTS_REQUEST {
  338. U16 Reserved1; /*0x00 */
  339. U8 ChainOffset; /*0x02 */
  340. U8 Function; /*0x03 */
  341. U16 Reserved2; /*0x04 */
  342. U8 PortNumber; /*0x06 */
  343. U8 MsgFlags; /*0x07 */
  344. U8 VP_ID; /*0x08 */
  345. U8 VF_ID; /*0x09 */
  346. U16 Reserved3; /*0x0A */
  347. } MPI2_PORT_FACTS_REQUEST, *PTR_MPI2_PORT_FACTS_REQUEST,
  348. Mpi2PortFactsRequest_t, *pMpi2PortFactsRequest_t;
  349. /*PortFacts Reply message */
  350. typedef struct _MPI2_PORT_FACTS_REPLY {
  351. U16 Reserved1; /*0x00 */
  352. U8 MsgLength; /*0x02 */
  353. U8 Function; /*0x03 */
  354. U16 Reserved2; /*0x04 */
  355. U8 PortNumber; /*0x06 */
  356. U8 MsgFlags; /*0x07 */
  357. U8 VP_ID; /*0x08 */
  358. U8 VF_ID; /*0x09 */
  359. U16 Reserved3; /*0x0A */
  360. U16 Reserved4; /*0x0C */
  361. U16 IOCStatus; /*0x0E */
  362. U32 IOCLogInfo; /*0x10 */
  363. U8 Reserved5; /*0x14 */
  364. U8 PortType; /*0x15 */
  365. U16 Reserved6; /*0x16 */
  366. U16 MaxPostedCmdBuffers; /*0x18 */
  367. U16 Reserved7; /*0x1A */
  368. } MPI2_PORT_FACTS_REPLY, *PTR_MPI2_PORT_FACTS_REPLY,
  369. Mpi2PortFactsReply_t, *pMpi2PortFactsReply_t;
  370. /*PortType values */
  371. #define MPI2_PORTFACTS_PORTTYPE_INACTIVE (0x00)
  372. #define MPI2_PORTFACTS_PORTTYPE_FC (0x10)
  373. #define MPI2_PORTFACTS_PORTTYPE_ISCSI (0x20)
  374. #define MPI2_PORTFACTS_PORTTYPE_SAS_PHYSICAL (0x30)
  375. #define MPI2_PORTFACTS_PORTTYPE_SAS_VIRTUAL (0x31)
  376. /****************************************************************************
  377. * PortEnable message
  378. ****************************************************************************/
  379. /*PortEnable Request message */
  380. typedef struct _MPI2_PORT_ENABLE_REQUEST {
  381. U16 Reserved1; /*0x00 */
  382. U8 ChainOffset; /*0x02 */
  383. U8 Function; /*0x03 */
  384. U8 Reserved2; /*0x04 */
  385. U8 PortFlags; /*0x05 */
  386. U8 Reserved3; /*0x06 */
  387. U8 MsgFlags; /*0x07 */
  388. U8 VP_ID; /*0x08 */
  389. U8 VF_ID; /*0x09 */
  390. U16 Reserved4; /*0x0A */
  391. } MPI2_PORT_ENABLE_REQUEST, *PTR_MPI2_PORT_ENABLE_REQUEST,
  392. Mpi2PortEnableRequest_t, *pMpi2PortEnableRequest_t;
  393. /*PortEnable Reply message */
  394. typedef struct _MPI2_PORT_ENABLE_REPLY {
  395. U16 Reserved1; /*0x00 */
  396. U8 MsgLength; /*0x02 */
  397. U8 Function; /*0x03 */
  398. U8 Reserved2; /*0x04 */
  399. U8 PortFlags; /*0x05 */
  400. U8 Reserved3; /*0x06 */
  401. U8 MsgFlags; /*0x07 */
  402. U8 VP_ID; /*0x08 */
  403. U8 VF_ID; /*0x09 */
  404. U16 Reserved4; /*0x0A */
  405. U16 Reserved5; /*0x0C */
  406. U16 IOCStatus; /*0x0E */
  407. U32 IOCLogInfo; /*0x10 */
  408. } MPI2_PORT_ENABLE_REPLY, *PTR_MPI2_PORT_ENABLE_REPLY,
  409. Mpi2PortEnableReply_t, *pMpi2PortEnableReply_t;
  410. /****************************************************************************
  411. * EventNotification message
  412. ****************************************************************************/
  413. /*EventNotification Request message */
  414. #define MPI2_EVENT_NOTIFY_EVENTMASK_WORDS (4)
  415. typedef struct _MPI2_EVENT_NOTIFICATION_REQUEST {
  416. U16 Reserved1; /*0x00 */
  417. U8 ChainOffset; /*0x02 */
  418. U8 Function; /*0x03 */
  419. U16 Reserved2; /*0x04 */
  420. U8 Reserved3; /*0x06 */
  421. U8 MsgFlags; /*0x07 */
  422. U8 VP_ID; /*0x08 */
  423. U8 VF_ID; /*0x09 */
  424. U16 Reserved4; /*0x0A */
  425. U32 Reserved5; /*0x0C */
  426. U32 Reserved6; /*0x10 */
  427. U32 EventMasks[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS]; /*0x14 */
  428. U16 SASBroadcastPrimitiveMasks; /*0x24 */
  429. U16 SASNotifyPrimitiveMasks; /*0x26 */
  430. U32 Reserved8; /*0x28 */
  431. } MPI2_EVENT_NOTIFICATION_REQUEST,
  432. *PTR_MPI2_EVENT_NOTIFICATION_REQUEST,
  433. Mpi2EventNotificationRequest_t,
  434. *pMpi2EventNotificationRequest_t;
  435. /*EventNotification Reply message */
  436. typedef struct _MPI2_EVENT_NOTIFICATION_REPLY {
  437. U16 EventDataLength; /*0x00 */
  438. U8 MsgLength; /*0x02 */
  439. U8 Function; /*0x03 */
  440. U16 Reserved1; /*0x04 */
  441. U8 AckRequired; /*0x06 */
  442. U8 MsgFlags; /*0x07 */
  443. U8 VP_ID; /*0x08 */
  444. U8 VF_ID; /*0x09 */
  445. U16 Reserved2; /*0x0A */
  446. U16 Reserved3; /*0x0C */
  447. U16 IOCStatus; /*0x0E */
  448. U32 IOCLogInfo; /*0x10 */
  449. U16 Event; /*0x14 */
  450. U16 Reserved4; /*0x16 */
  451. U32 EventContext; /*0x18 */
  452. U32 EventData[1]; /*0x1C */
  453. } MPI2_EVENT_NOTIFICATION_REPLY, *PTR_MPI2_EVENT_NOTIFICATION_REPLY,
  454. Mpi2EventNotificationReply_t,
  455. *pMpi2EventNotificationReply_t;
  456. /*AckRequired */
  457. #define MPI2_EVENT_NOTIFICATION_ACK_NOT_REQUIRED (0x00)
  458. #define MPI2_EVENT_NOTIFICATION_ACK_REQUIRED (0x01)
  459. /*Event */
  460. #define MPI2_EVENT_LOG_DATA (0x0001)
  461. #define MPI2_EVENT_STATE_CHANGE (0x0002)
  462. #define MPI2_EVENT_HARD_RESET_RECEIVED (0x0005)
  463. #define MPI2_EVENT_EVENT_CHANGE (0x000A)
  464. #define MPI2_EVENT_TASK_SET_FULL (0x000E) /*obsolete */
  465. #define MPI2_EVENT_SAS_DEVICE_STATUS_CHANGE (0x000F)
  466. #define MPI2_EVENT_IR_OPERATION_STATUS (0x0014)
  467. #define MPI2_EVENT_SAS_DISCOVERY (0x0016)
  468. #define MPI2_EVENT_SAS_BROADCAST_PRIMITIVE (0x0017)
  469. #define MPI2_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE (0x0018)
  470. #define MPI2_EVENT_SAS_INIT_TABLE_OVERFLOW (0x0019)
  471. #define MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST (0x001C)
  472. #define MPI2_EVENT_SAS_ENCL_DEVICE_STATUS_CHANGE (0x001D)
  473. #define MPI2_EVENT_IR_VOLUME (0x001E)
  474. #define MPI2_EVENT_IR_PHYSICAL_DISK (0x001F)
  475. #define MPI2_EVENT_IR_CONFIGURATION_CHANGE_LIST (0x0020)
  476. #define MPI2_EVENT_LOG_ENTRY_ADDED (0x0021)
  477. #define MPI2_EVENT_SAS_PHY_COUNTER (0x0022)
  478. #define MPI2_EVENT_GPIO_INTERRUPT (0x0023)
  479. #define MPI2_EVENT_HOST_BASED_DISCOVERY_PHY (0x0024)
  480. #define MPI2_EVENT_SAS_QUIESCE (0x0025)
  481. #define MPI2_EVENT_SAS_NOTIFY_PRIMITIVE (0x0026)
  482. #define MPI2_EVENT_TEMP_THRESHOLD (0x0027)
  483. #define MPI2_EVENT_HOST_MESSAGE (0x0028)
  484. #define MPI2_EVENT_POWER_PERFORMANCE_CHANGE (0x0029)
  485. #define MPI2_EVENT_ACTIVE_CABLE_EXCEPTION (0x0034)
  486. #define MPI2_EVENT_MIN_PRODUCT_SPECIFIC (0x006E)
  487. #define MPI2_EVENT_MAX_PRODUCT_SPECIFIC (0x007F)
  488. /*Log Entry Added Event data */
  489. /*the following structure matches MPI2_LOG_0_ENTRY in mpi2_cnfg.h */
  490. #define MPI2_EVENT_DATA_LOG_DATA_LENGTH (0x1C)
  491. typedef struct _MPI2_EVENT_DATA_LOG_ENTRY_ADDED {
  492. U64 TimeStamp; /*0x00 */
  493. U32 Reserved1; /*0x08 */
  494. U16 LogSequence; /*0x0C */
  495. U16 LogEntryQualifier; /*0x0E */
  496. U8 VP_ID; /*0x10 */
  497. U8 VF_ID; /*0x11 */
  498. U16 Reserved2; /*0x12 */
  499. U8 LogData[MPI2_EVENT_DATA_LOG_DATA_LENGTH]; /*0x14 */
  500. } MPI2_EVENT_DATA_LOG_ENTRY_ADDED,
  501. *PTR_MPI2_EVENT_DATA_LOG_ENTRY_ADDED,
  502. Mpi2EventDataLogEntryAdded_t,
  503. *pMpi2EventDataLogEntryAdded_t;
  504. /*GPIO Interrupt Event data */
  505. typedef struct _MPI2_EVENT_DATA_GPIO_INTERRUPT {
  506. U8 GPIONum; /*0x00 */
  507. U8 Reserved1; /*0x01 */
  508. U16 Reserved2; /*0x02 */
  509. } MPI2_EVENT_DATA_GPIO_INTERRUPT,
  510. *PTR_MPI2_EVENT_DATA_GPIO_INTERRUPT,
  511. Mpi2EventDataGpioInterrupt_t,
  512. *pMpi2EventDataGpioInterrupt_t;
  513. /*Temperature Threshold Event data */
  514. typedef struct _MPI2_EVENT_DATA_TEMPERATURE {
  515. U16 Status; /*0x00 */
  516. U8 SensorNum; /*0x02 */
  517. U8 Reserved1; /*0x03 */
  518. U16 CurrentTemperature; /*0x04 */
  519. U16 Reserved2; /*0x06 */
  520. U32 Reserved3; /*0x08 */
  521. U32 Reserved4; /*0x0C */
  522. } MPI2_EVENT_DATA_TEMPERATURE,
  523. *PTR_MPI2_EVENT_DATA_TEMPERATURE,
  524. Mpi2EventDataTemperature_t, *pMpi2EventDataTemperature_t;
  525. /*Temperature Threshold Event data Status bits */
  526. #define MPI2_EVENT_TEMPERATURE3_EXCEEDED (0x0008)
  527. #define MPI2_EVENT_TEMPERATURE2_EXCEEDED (0x0004)
  528. #define MPI2_EVENT_TEMPERATURE1_EXCEEDED (0x0002)
  529. #define MPI2_EVENT_TEMPERATURE0_EXCEEDED (0x0001)
  530. /*Host Message Event data */
  531. typedef struct _MPI2_EVENT_DATA_HOST_MESSAGE {
  532. U8 SourceVF_ID; /*0x00 */
  533. U8 Reserved1; /*0x01 */
  534. U16 Reserved2; /*0x02 */
  535. U32 Reserved3; /*0x04 */
  536. U32 HostData[1]; /*0x08 */
  537. } MPI2_EVENT_DATA_HOST_MESSAGE, *PTR_MPI2_EVENT_DATA_HOST_MESSAGE,
  538. Mpi2EventDataHostMessage_t, *pMpi2EventDataHostMessage_t;
  539. /*Power Performance Change Event data */
  540. typedef struct _MPI2_EVENT_DATA_POWER_PERF_CHANGE {
  541. U8 CurrentPowerMode; /*0x00 */
  542. U8 PreviousPowerMode; /*0x01 */
  543. U16 Reserved1; /*0x02 */
  544. } MPI2_EVENT_DATA_POWER_PERF_CHANGE,
  545. *PTR_MPI2_EVENT_DATA_POWER_PERF_CHANGE,
  546. Mpi2EventDataPowerPerfChange_t,
  547. *pMpi2EventDataPowerPerfChange_t;
  548. /*defines for CurrentPowerMode and PreviousPowerMode fields */
  549. #define MPI2_EVENT_PM_INIT_MASK (0xC0)
  550. #define MPI2_EVENT_PM_INIT_UNAVAILABLE (0x00)
  551. #define MPI2_EVENT_PM_INIT_HOST (0x40)
  552. #define MPI2_EVENT_PM_INIT_IO_UNIT (0x80)
  553. #define MPI2_EVENT_PM_INIT_PCIE_DPA (0xC0)
  554. #define MPI2_EVENT_PM_MODE_MASK (0x07)
  555. #define MPI2_EVENT_PM_MODE_UNAVAILABLE (0x00)
  556. #define MPI2_EVENT_PM_MODE_UNKNOWN (0x01)
  557. #define MPI2_EVENT_PM_MODE_FULL_POWER (0x04)
  558. #define MPI2_EVENT_PM_MODE_REDUCED_POWER (0x05)
  559. #define MPI2_EVENT_PM_MODE_STANDBY (0x06)
  560. /* Active Cable Exception Event data */
  561. typedef struct _MPI26_EVENT_DATA_ACTIVE_CABLE_EXCEPT {
  562. U32 ActiveCablePowerRequirement; /* 0x00 */
  563. U8 ReasonCode; /* 0x04 */
  564. U8 ReceptacleID; /* 0x05 */
  565. U16 Reserved1; /* 0x06 */
  566. } MPI26_EVENT_DATA_ACTIVE_CABLE_EXCEPT,
  567. *PTR_MPI26_EVENT_DATA_ACTIVE_CABLE_EXCEPT,
  568. Mpi26EventDataActiveCableExcept_t,
  569. *pMpi26EventDataActiveCableExcept_t;
  570. /* defines for ReasonCode field */
  571. #define MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER (0x00)
  572. /*Hard Reset Received Event data */
  573. typedef struct _MPI2_EVENT_DATA_HARD_RESET_RECEIVED {
  574. U8 Reserved1; /*0x00 */
  575. U8 Port; /*0x01 */
  576. U16 Reserved2; /*0x02 */
  577. } MPI2_EVENT_DATA_HARD_RESET_RECEIVED,
  578. *PTR_MPI2_EVENT_DATA_HARD_RESET_RECEIVED,
  579. Mpi2EventDataHardResetReceived_t,
  580. *pMpi2EventDataHardResetReceived_t;
  581. /*Task Set Full Event data */
  582. /* this event is obsolete */
  583. typedef struct _MPI2_EVENT_DATA_TASK_SET_FULL {
  584. U16 DevHandle; /*0x00 */
  585. U16 CurrentDepth; /*0x02 */
  586. } MPI2_EVENT_DATA_TASK_SET_FULL, *PTR_MPI2_EVENT_DATA_TASK_SET_FULL,
  587. Mpi2EventDataTaskSetFull_t, *pMpi2EventDataTaskSetFull_t;
  588. /*SAS Device Status Change Event data */
  589. typedef struct _MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE {
  590. U16 TaskTag; /*0x00 */
  591. U8 ReasonCode; /*0x02 */
  592. U8 PhysicalPort; /*0x03 */
  593. U8 ASC; /*0x04 */
  594. U8 ASCQ; /*0x05 */
  595. U16 DevHandle; /*0x06 */
  596. U32 Reserved2; /*0x08 */
  597. U64 SASAddress; /*0x0C */
  598. U8 LUN[8]; /*0x14 */
  599. } MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
  600. *PTR_MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
  601. Mpi2EventDataSasDeviceStatusChange_t,
  602. *pMpi2EventDataSasDeviceStatusChange_t;
  603. /*SAS Device Status Change Event data ReasonCode values */
  604. #define MPI2_EVENT_SAS_DEV_STAT_RC_SMART_DATA (0x05)
  605. #define MPI2_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED (0x07)
  606. #define MPI2_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET (0x08)
  607. #define MPI2_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL (0x09)
  608. #define MPI2_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL (0x0A)
  609. #define MPI2_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL (0x0B)
  610. #define MPI2_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL (0x0C)
  611. #define MPI2_EVENT_SAS_DEV_STAT_RC_ASYNC_NOTIFICATION (0x0D)
  612. #define MPI2_EVENT_SAS_DEV_STAT_RC_CMP_INTERNAL_DEV_RESET (0x0E)
  613. #define MPI2_EVENT_SAS_DEV_STAT_RC_CMP_TASK_ABORT_INTERNAL (0x0F)
  614. #define MPI2_EVENT_SAS_DEV_STAT_RC_SATA_INIT_FAILURE (0x10)
  615. #define MPI2_EVENT_SAS_DEV_STAT_RC_EXPANDER_REDUCED_FUNCTIONALITY (0x11)
  616. #define MPI2_EVENT_SAS_DEV_STAT_RC_CMP_EXPANDER_REDUCED_FUNCTIONALITY (0x12)
  617. /*Integrated RAID Operation Status Event data */
  618. typedef struct _MPI2_EVENT_DATA_IR_OPERATION_STATUS {
  619. U16 VolDevHandle; /*0x00 */
  620. U16 Reserved1; /*0x02 */
  621. U8 RAIDOperation; /*0x04 */
  622. U8 PercentComplete; /*0x05 */
  623. U16 Reserved2; /*0x06 */
  624. U32 ElapsedSeconds; /*0x08 */
  625. } MPI2_EVENT_DATA_IR_OPERATION_STATUS,
  626. *PTR_MPI2_EVENT_DATA_IR_OPERATION_STATUS,
  627. Mpi2EventDataIrOperationStatus_t,
  628. *pMpi2EventDataIrOperationStatus_t;
  629. /*Integrated RAID Operation Status Event data RAIDOperation values */
  630. #define MPI2_EVENT_IR_RAIDOP_RESYNC (0x00)
  631. #define MPI2_EVENT_IR_RAIDOP_ONLINE_CAP_EXPANSION (0x01)
  632. #define MPI2_EVENT_IR_RAIDOP_CONSISTENCY_CHECK (0x02)
  633. #define MPI2_EVENT_IR_RAIDOP_BACKGROUND_INIT (0x03)
  634. #define MPI2_EVENT_IR_RAIDOP_MAKE_DATA_CONSISTENT (0x04)
  635. /*Integrated RAID Volume Event data */
  636. typedef struct _MPI2_EVENT_DATA_IR_VOLUME {
  637. U16 VolDevHandle; /*0x00 */
  638. U8 ReasonCode; /*0x02 */
  639. U8 Reserved1; /*0x03 */
  640. U32 NewValue; /*0x04 */
  641. U32 PreviousValue; /*0x08 */
  642. } MPI2_EVENT_DATA_IR_VOLUME, *PTR_MPI2_EVENT_DATA_IR_VOLUME,
  643. Mpi2EventDataIrVolume_t, *pMpi2EventDataIrVolume_t;
  644. /*Integrated RAID Volume Event data ReasonCode values */
  645. #define MPI2_EVENT_IR_VOLUME_RC_SETTINGS_CHANGED (0x01)
  646. #define MPI2_EVENT_IR_VOLUME_RC_STATUS_FLAGS_CHANGED (0x02)
  647. #define MPI2_EVENT_IR_VOLUME_RC_STATE_CHANGED (0x03)
  648. /*Integrated RAID Physical Disk Event data */
  649. typedef struct _MPI2_EVENT_DATA_IR_PHYSICAL_DISK {
  650. U16 Reserved1; /*0x00 */
  651. U8 ReasonCode; /*0x02 */
  652. U8 PhysDiskNum; /*0x03 */
  653. U16 PhysDiskDevHandle; /*0x04 */
  654. U16 Reserved2; /*0x06 */
  655. U16 Slot; /*0x08 */
  656. U16 EnclosureHandle; /*0x0A */
  657. U32 NewValue; /*0x0C */
  658. U32 PreviousValue; /*0x10 */
  659. } MPI2_EVENT_DATA_IR_PHYSICAL_DISK,
  660. *PTR_MPI2_EVENT_DATA_IR_PHYSICAL_DISK,
  661. Mpi2EventDataIrPhysicalDisk_t,
  662. *pMpi2EventDataIrPhysicalDisk_t;
  663. /*Integrated RAID Physical Disk Event data ReasonCode values */
  664. #define MPI2_EVENT_IR_PHYSDISK_RC_SETTINGS_CHANGED (0x01)
  665. #define MPI2_EVENT_IR_PHYSDISK_RC_STATUS_FLAGS_CHANGED (0x02)
  666. #define MPI2_EVENT_IR_PHYSDISK_RC_STATE_CHANGED (0x03)
  667. /*Integrated RAID Configuration Change List Event data */
  668. /*
  669. *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  670. *one and check NumElements at runtime.
  671. */
  672. #ifndef MPI2_EVENT_IR_CONFIG_ELEMENT_COUNT
  673. #define MPI2_EVENT_IR_CONFIG_ELEMENT_COUNT (1)
  674. #endif
  675. typedef struct _MPI2_EVENT_IR_CONFIG_ELEMENT {
  676. U16 ElementFlags; /*0x00 */
  677. U16 VolDevHandle; /*0x02 */
  678. U8 ReasonCode; /*0x04 */
  679. U8 PhysDiskNum; /*0x05 */
  680. U16 PhysDiskDevHandle; /*0x06 */
  681. } MPI2_EVENT_IR_CONFIG_ELEMENT, *PTR_MPI2_EVENT_IR_CONFIG_ELEMENT,
  682. Mpi2EventIrConfigElement_t, *pMpi2EventIrConfigElement_t;
  683. /*IR Configuration Change List Event data ElementFlags values */
  684. #define MPI2_EVENT_IR_CHANGE_EFLAGS_ELEMENT_TYPE_MASK (0x000F)
  685. #define MPI2_EVENT_IR_CHANGE_EFLAGS_VOLUME_ELEMENT (0x0000)
  686. #define MPI2_EVENT_IR_CHANGE_EFLAGS_VOLPHYSDISK_ELEMENT (0x0001)
  687. #define MPI2_EVENT_IR_CHANGE_EFLAGS_HOTSPARE_ELEMENT (0x0002)
  688. /*IR Configuration Change List Event data ReasonCode values */
  689. #define MPI2_EVENT_IR_CHANGE_RC_ADDED (0x01)
  690. #define MPI2_EVENT_IR_CHANGE_RC_REMOVED (0x02)
  691. #define MPI2_EVENT_IR_CHANGE_RC_NO_CHANGE (0x03)
  692. #define MPI2_EVENT_IR_CHANGE_RC_HIDE (0x04)
  693. #define MPI2_EVENT_IR_CHANGE_RC_UNHIDE (0x05)
  694. #define MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED (0x06)
  695. #define MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED (0x07)
  696. #define MPI2_EVENT_IR_CHANGE_RC_PD_CREATED (0x08)
  697. #define MPI2_EVENT_IR_CHANGE_RC_PD_DELETED (0x09)
  698. typedef struct _MPI2_EVENT_DATA_IR_CONFIG_CHANGE_LIST {
  699. U8 NumElements; /*0x00 */
  700. U8 Reserved1; /*0x01 */
  701. U8 Reserved2; /*0x02 */
  702. U8 ConfigNum; /*0x03 */
  703. U32 Flags; /*0x04 */
  704. MPI2_EVENT_IR_CONFIG_ELEMENT
  705. ConfigElement[MPI2_EVENT_IR_CONFIG_ELEMENT_COUNT];/*0x08 */
  706. } MPI2_EVENT_DATA_IR_CONFIG_CHANGE_LIST,
  707. *PTR_MPI2_EVENT_DATA_IR_CONFIG_CHANGE_LIST,
  708. Mpi2EventDataIrConfigChangeList_t,
  709. *pMpi2EventDataIrConfigChangeList_t;
  710. /*IR Configuration Change List Event data Flags values */
  711. #define MPI2_EVENT_IR_CHANGE_FLAGS_FOREIGN_CONFIG (0x00000001)
  712. /*SAS Discovery Event data */
  713. typedef struct _MPI2_EVENT_DATA_SAS_DISCOVERY {
  714. U8 Flags; /*0x00 */
  715. U8 ReasonCode; /*0x01 */
  716. U8 PhysicalPort; /*0x02 */
  717. U8 Reserved1; /*0x03 */
  718. U32 DiscoveryStatus; /*0x04 */
  719. } MPI2_EVENT_DATA_SAS_DISCOVERY,
  720. *PTR_MPI2_EVENT_DATA_SAS_DISCOVERY,
  721. Mpi2EventDataSasDiscovery_t, *pMpi2EventDataSasDiscovery_t;
  722. /*SAS Discovery Event data Flags values */
  723. #define MPI2_EVENT_SAS_DISC_DEVICE_CHANGE (0x02)
  724. #define MPI2_EVENT_SAS_DISC_IN_PROGRESS (0x01)
  725. /*SAS Discovery Event data ReasonCode values */
  726. #define MPI2_EVENT_SAS_DISC_RC_STARTED (0x01)
  727. #define MPI2_EVENT_SAS_DISC_RC_COMPLETED (0x02)
  728. /*SAS Discovery Event data DiscoveryStatus values */
  729. #define MPI2_EVENT_SAS_DISC_DS_MAX_ENCLOSURES_EXCEED (0x80000000)
  730. #define MPI2_EVENT_SAS_DISC_DS_MAX_EXPANDERS_EXCEED (0x40000000)
  731. #define MPI2_EVENT_SAS_DISC_DS_MAX_DEVICES_EXCEED (0x20000000)
  732. #define MPI2_EVENT_SAS_DISC_DS_MAX_TOPO_PHYS_EXCEED (0x10000000)
  733. #define MPI2_EVENT_SAS_DISC_DS_DOWNSTREAM_INITIATOR (0x08000000)
  734. #define MPI2_EVENT_SAS_DISC_DS_MULTI_SUBTRACTIVE_SUBTRACTIVE (0x00008000)
  735. #define MPI2_EVENT_SAS_DISC_DS_EXP_MULTI_SUBTRACTIVE (0x00004000)
  736. #define MPI2_EVENT_SAS_DISC_DS_MULTI_PORT_DOMAIN (0x00002000)
  737. #define MPI2_EVENT_SAS_DISC_DS_TABLE_TO_SUBTRACTIVE_LINK (0x00001000)
  738. #define MPI2_EVENT_SAS_DISC_DS_UNSUPPORTED_DEVICE (0x00000800)
  739. #define MPI2_EVENT_SAS_DISC_DS_TABLE_LINK (0x00000400)
  740. #define MPI2_EVENT_SAS_DISC_DS_SUBTRACTIVE_LINK (0x00000200)
  741. #define MPI2_EVENT_SAS_DISC_DS_SMP_CRC_ERROR (0x00000100)
  742. #define MPI2_EVENT_SAS_DISC_DS_SMP_FUNCTION_FAILED (0x00000080)
  743. #define MPI2_EVENT_SAS_DISC_DS_INDEX_NOT_EXIST (0x00000040)
  744. #define MPI2_EVENT_SAS_DISC_DS_OUT_ROUTE_ENTRIES (0x00000020)
  745. #define MPI2_EVENT_SAS_DISC_DS_SMP_TIMEOUT (0x00000010)
  746. #define MPI2_EVENT_SAS_DISC_DS_MULTIPLE_PORTS (0x00000004)
  747. #define MPI2_EVENT_SAS_DISC_DS_UNADDRESSABLE_DEVICE (0x00000002)
  748. #define MPI2_EVENT_SAS_DISC_DS_LOOP_DETECTED (0x00000001)
  749. /*SAS Broadcast Primitive Event data */
  750. typedef struct _MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE {
  751. U8 PhyNum; /*0x00 */
  752. U8 Port; /*0x01 */
  753. U8 PortWidth; /*0x02 */
  754. U8 Primitive; /*0x03 */
  755. } MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
  756. *PTR_MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
  757. Mpi2EventDataSasBroadcastPrimitive_t,
  758. *pMpi2EventDataSasBroadcastPrimitive_t;
  759. /*defines for the Primitive field */
  760. #define MPI2_EVENT_PRIMITIVE_CHANGE (0x01)
  761. #define MPI2_EVENT_PRIMITIVE_SES (0x02)
  762. #define MPI2_EVENT_PRIMITIVE_EXPANDER (0x03)
  763. #define MPI2_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT (0x04)
  764. #define MPI2_EVENT_PRIMITIVE_RESERVED3 (0x05)
  765. #define MPI2_EVENT_PRIMITIVE_RESERVED4 (0x06)
  766. #define MPI2_EVENT_PRIMITIVE_CHANGE0_RESERVED (0x07)
  767. #define MPI2_EVENT_PRIMITIVE_CHANGE1_RESERVED (0x08)
  768. /*SAS Notify Primitive Event data */
  769. typedef struct _MPI2_EVENT_DATA_SAS_NOTIFY_PRIMITIVE {
  770. U8 PhyNum; /*0x00 */
  771. U8 Port; /*0x01 */
  772. U8 Reserved1; /*0x02 */
  773. U8 Primitive; /*0x03 */
  774. } MPI2_EVENT_DATA_SAS_NOTIFY_PRIMITIVE,
  775. *PTR_MPI2_EVENT_DATA_SAS_NOTIFY_PRIMITIVE,
  776. Mpi2EventDataSasNotifyPrimitive_t,
  777. *pMpi2EventDataSasNotifyPrimitive_t;
  778. /*defines for the Primitive field */
  779. #define MPI2_EVENT_NOTIFY_ENABLE_SPINUP (0x01)
  780. #define MPI2_EVENT_NOTIFY_POWER_LOSS_EXPECTED (0x02)
  781. #define MPI2_EVENT_NOTIFY_RESERVED1 (0x03)
  782. #define MPI2_EVENT_NOTIFY_RESERVED2 (0x04)
  783. /*SAS Initiator Device Status Change Event data */
  784. typedef struct _MPI2_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE {
  785. U8 ReasonCode; /*0x00 */
  786. U8 PhysicalPort; /*0x01 */
  787. U16 DevHandle; /*0x02 */
  788. U64 SASAddress; /*0x04 */
  789. } MPI2_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
  790. *PTR_MPI2_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
  791. Mpi2EventDataSasInitDevStatusChange_t,
  792. *pMpi2EventDataSasInitDevStatusChange_t;
  793. /*SAS Initiator Device Status Change event ReasonCode values */
  794. #define MPI2_EVENT_SAS_INIT_RC_ADDED (0x01)
  795. #define MPI2_EVENT_SAS_INIT_RC_NOT_RESPONDING (0x02)
  796. /*SAS Initiator Device Table Overflow Event data */
  797. typedef struct _MPI2_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW {
  798. U16 MaxInit; /*0x00 */
  799. U16 CurrentInit; /*0x02 */
  800. U64 SASAddress; /*0x04 */
  801. } MPI2_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
  802. *PTR_MPI2_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
  803. Mpi2EventDataSasInitTableOverflow_t,
  804. *pMpi2EventDataSasInitTableOverflow_t;
  805. /*SAS Topology Change List Event data */
  806. /*
  807. *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  808. *one and check NumEntries at runtime.
  809. */
  810. #ifndef MPI2_EVENT_SAS_TOPO_PHY_COUNT
  811. #define MPI2_EVENT_SAS_TOPO_PHY_COUNT (1)
  812. #endif
  813. typedef struct _MPI2_EVENT_SAS_TOPO_PHY_ENTRY {
  814. U16 AttachedDevHandle; /*0x00 */
  815. U8 LinkRate; /*0x02 */
  816. U8 PhyStatus; /*0x03 */
  817. } MPI2_EVENT_SAS_TOPO_PHY_ENTRY, *PTR_MPI2_EVENT_SAS_TOPO_PHY_ENTRY,
  818. Mpi2EventSasTopoPhyEntry_t, *pMpi2EventSasTopoPhyEntry_t;
  819. typedef struct _MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST {
  820. U16 EnclosureHandle; /*0x00 */
  821. U16 ExpanderDevHandle; /*0x02 */
  822. U8 NumPhys; /*0x04 */
  823. U8 Reserved1; /*0x05 */
  824. U16 Reserved2; /*0x06 */
  825. U8 NumEntries; /*0x08 */
  826. U8 StartPhyNum; /*0x09 */
  827. U8 ExpStatus; /*0x0A */
  828. U8 PhysicalPort; /*0x0B */
  829. MPI2_EVENT_SAS_TOPO_PHY_ENTRY
  830. PHY[MPI2_EVENT_SAS_TOPO_PHY_COUNT]; /*0x0C */
  831. } MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST,
  832. *PTR_MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST,
  833. Mpi2EventDataSasTopologyChangeList_t,
  834. *pMpi2EventDataSasTopologyChangeList_t;
  835. /*values for the ExpStatus field */
  836. #define MPI2_EVENT_SAS_TOPO_ES_NO_EXPANDER (0x00)
  837. #define MPI2_EVENT_SAS_TOPO_ES_ADDED (0x01)
  838. #define MPI2_EVENT_SAS_TOPO_ES_NOT_RESPONDING (0x02)
  839. #define MPI2_EVENT_SAS_TOPO_ES_RESPONDING (0x03)
  840. #define MPI2_EVENT_SAS_TOPO_ES_DELAY_NOT_RESPONDING (0x04)
  841. /*defines for the LinkRate field */
  842. #define MPI2_EVENT_SAS_TOPO_LR_CURRENT_MASK (0xF0)
  843. #define MPI2_EVENT_SAS_TOPO_LR_CURRENT_SHIFT (4)
  844. #define MPI2_EVENT_SAS_TOPO_LR_PREV_MASK (0x0F)
  845. #define MPI2_EVENT_SAS_TOPO_LR_PREV_SHIFT (0)
  846. #define MPI2_EVENT_SAS_TOPO_LR_UNKNOWN_LINK_RATE (0x00)
  847. #define MPI2_EVENT_SAS_TOPO_LR_PHY_DISABLED (0x01)
  848. #define MPI2_EVENT_SAS_TOPO_LR_NEGOTIATION_FAILED (0x02)
  849. #define MPI2_EVENT_SAS_TOPO_LR_SATA_OOB_COMPLETE (0x03)
  850. #define MPI2_EVENT_SAS_TOPO_LR_PORT_SELECTOR (0x04)
  851. #define MPI2_EVENT_SAS_TOPO_LR_SMP_RESET_IN_PROGRESS (0x05)
  852. #define MPI2_EVENT_SAS_TOPO_LR_UNSUPPORTED_PHY (0x06)
  853. #define MPI2_EVENT_SAS_TOPO_LR_RATE_1_5 (0x08)
  854. #define MPI2_EVENT_SAS_TOPO_LR_RATE_3_0 (0x09)
  855. #define MPI2_EVENT_SAS_TOPO_LR_RATE_6_0 (0x0A)
  856. #define MPI25_EVENT_SAS_TOPO_LR_RATE_12_0 (0x0B)
  857. /*values for the PhyStatus field */
  858. #define MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT (0x80)
  859. #define MPI2_EVENT_SAS_TOPO_PS_MULTIPLEX_CHANGE (0x10)
  860. /*values for the PhyStatus ReasonCode sub-field */
  861. #define MPI2_EVENT_SAS_TOPO_RC_MASK (0x0F)
  862. #define MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED (0x01)
  863. #define MPI2_EVENT_SAS_TOPO_RC_TARG_NOT_RESPONDING (0x02)
  864. #define MPI2_EVENT_SAS_TOPO_RC_PHY_CHANGED (0x03)
  865. #define MPI2_EVENT_SAS_TOPO_RC_NO_CHANGE (0x04)
  866. #define MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING (0x05)
  867. /*SAS Enclosure Device Status Change Event data */
  868. typedef struct _MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE {
  869. U16 EnclosureHandle; /*0x00 */
  870. U8 ReasonCode; /*0x02 */
  871. U8 PhysicalPort; /*0x03 */
  872. U64 EnclosureLogicalID; /*0x04 */
  873. U16 NumSlots; /*0x0C */
  874. U16 StartSlot; /*0x0E */
  875. U32 PhyBits; /*0x10 */
  876. } MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE,
  877. *PTR_MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE,
  878. Mpi2EventDataSasEnclDevStatusChange_t,
  879. *pMpi2EventDataSasEnclDevStatusChange_t;
  880. /*SAS Enclosure Device Status Change event ReasonCode values */
  881. #define MPI2_EVENT_SAS_ENCL_RC_ADDED (0x01)
  882. #define MPI2_EVENT_SAS_ENCL_RC_NOT_RESPONDING (0x02)
  883. /*SAS PHY Counter Event data */
  884. typedef struct _MPI2_EVENT_DATA_SAS_PHY_COUNTER {
  885. U64 TimeStamp; /*0x00 */
  886. U32 Reserved1; /*0x08 */
  887. U8 PhyEventCode; /*0x0C */
  888. U8 PhyNum; /*0x0D */
  889. U16 Reserved2; /*0x0E */
  890. U32 PhyEventInfo; /*0x10 */
  891. U8 CounterType; /*0x14 */
  892. U8 ThresholdWindow; /*0x15 */
  893. U8 TimeUnits; /*0x16 */
  894. U8 Reserved3; /*0x17 */
  895. U32 EventThreshold; /*0x18 */
  896. U16 ThresholdFlags; /*0x1C */
  897. U16 Reserved4; /*0x1E */
  898. } MPI2_EVENT_DATA_SAS_PHY_COUNTER,
  899. *PTR_MPI2_EVENT_DATA_SAS_PHY_COUNTER,
  900. Mpi2EventDataSasPhyCounter_t,
  901. *pMpi2EventDataSasPhyCounter_t;
  902. /*use MPI2_SASPHY3_EVENT_CODE_ values from mpi2_cnfg.h
  903. *for the PhyEventCode field */
  904. /*use MPI2_SASPHY3_COUNTER_TYPE_ values from mpi2_cnfg.h
  905. *for the CounterType field */
  906. /*use MPI2_SASPHY3_TIME_UNITS_ values from mpi2_cnfg.h
  907. *for the TimeUnits field */
  908. /*use MPI2_SASPHY3_TFLAGS_ values from mpi2_cnfg.h
  909. *for the ThresholdFlags field */
  910. /*SAS Quiesce Event data */
  911. typedef struct _MPI2_EVENT_DATA_SAS_QUIESCE {
  912. U8 ReasonCode; /*0x00 */
  913. U8 Reserved1; /*0x01 */
  914. U16 Reserved2; /*0x02 */
  915. U32 Reserved3; /*0x04 */
  916. } MPI2_EVENT_DATA_SAS_QUIESCE,
  917. *PTR_MPI2_EVENT_DATA_SAS_QUIESCE,
  918. Mpi2EventDataSasQuiesce_t, *pMpi2EventDataSasQuiesce_t;
  919. /*SAS Quiesce Event data ReasonCode values */
  920. #define MPI2_EVENT_SAS_QUIESCE_RC_STARTED (0x01)
  921. #define MPI2_EVENT_SAS_QUIESCE_RC_COMPLETED (0x02)
  922. /*Host Based Discovery Phy Event data */
  923. typedef struct _MPI2_EVENT_HBD_PHY_SAS {
  924. U8 Flags; /*0x00 */
  925. U8 NegotiatedLinkRate; /*0x01 */
  926. U8 PhyNum; /*0x02 */
  927. U8 PhysicalPort; /*0x03 */
  928. U32 Reserved1; /*0x04 */
  929. U8 InitialFrame[28]; /*0x08 */
  930. } MPI2_EVENT_HBD_PHY_SAS, *PTR_MPI2_EVENT_HBD_PHY_SAS,
  931. Mpi2EventHbdPhySas_t, *pMpi2EventHbdPhySas_t;
  932. /*values for the Flags field */
  933. #define MPI2_EVENT_HBD_SAS_FLAGS_FRAME_VALID (0x02)
  934. #define MPI2_EVENT_HBD_SAS_FLAGS_SATA_FRAME (0x01)
  935. /*use MPI2_SAS_NEG_LINK_RATE_ defines from mpi2_cnfg.h
  936. *for the NegotiatedLinkRate field */
  937. typedef union _MPI2_EVENT_HBD_DESCRIPTOR {
  938. MPI2_EVENT_HBD_PHY_SAS Sas;
  939. } MPI2_EVENT_HBD_DESCRIPTOR, *PTR_MPI2_EVENT_HBD_DESCRIPTOR,
  940. Mpi2EventHbdDescriptor_t, *pMpi2EventHbdDescriptor_t;
  941. typedef struct _MPI2_EVENT_DATA_HBD_PHY {
  942. U8 DescriptorType; /*0x00 */
  943. U8 Reserved1; /*0x01 */
  944. U16 Reserved2; /*0x02 */
  945. U32 Reserved3; /*0x04 */
  946. MPI2_EVENT_HBD_DESCRIPTOR Descriptor; /*0x08 */
  947. } MPI2_EVENT_DATA_HBD_PHY, *PTR_MPI2_EVENT_DATA_HBD_PHY,
  948. Mpi2EventDataHbdPhy_t,
  949. *pMpi2EventDataMpi2EventDataHbdPhy_t;
  950. /*values for the DescriptorType field */
  951. #define MPI2_EVENT_HBD_DT_SAS (0x01)
  952. /****************************************************************************
  953. * EventAck message
  954. ****************************************************************************/
  955. /*EventAck Request message */
  956. typedef struct _MPI2_EVENT_ACK_REQUEST {
  957. U16 Reserved1; /*0x00 */
  958. U8 ChainOffset; /*0x02 */
  959. U8 Function; /*0x03 */
  960. U16 Reserved2; /*0x04 */
  961. U8 Reserved3; /*0x06 */
  962. U8 MsgFlags; /*0x07 */
  963. U8 VP_ID; /*0x08 */
  964. U8 VF_ID; /*0x09 */
  965. U16 Reserved4; /*0x0A */
  966. U16 Event; /*0x0C */
  967. U16 Reserved5; /*0x0E */
  968. U32 EventContext; /*0x10 */
  969. } MPI2_EVENT_ACK_REQUEST, *PTR_MPI2_EVENT_ACK_REQUEST,
  970. Mpi2EventAckRequest_t, *pMpi2EventAckRequest_t;
  971. /*EventAck Reply message */
  972. typedef struct _MPI2_EVENT_ACK_REPLY {
  973. U16 Reserved1; /*0x00 */
  974. U8 MsgLength; /*0x02 */
  975. U8 Function; /*0x03 */
  976. U16 Reserved2; /*0x04 */
  977. U8 Reserved3; /*0x06 */
  978. U8 MsgFlags; /*0x07 */
  979. U8 VP_ID; /*0x08 */
  980. U8 VF_ID; /*0x09 */
  981. U16 Reserved4; /*0x0A */
  982. U16 Reserved5; /*0x0C */
  983. U16 IOCStatus; /*0x0E */
  984. U32 IOCLogInfo; /*0x10 */
  985. } MPI2_EVENT_ACK_REPLY, *PTR_MPI2_EVENT_ACK_REPLY,
  986. Mpi2EventAckReply_t, *pMpi2EventAckReply_t;
  987. /****************************************************************************
  988. * SendHostMessage message
  989. ****************************************************************************/
  990. /*SendHostMessage Request message */
  991. typedef struct _MPI2_SEND_HOST_MESSAGE_REQUEST {
  992. U16 HostDataLength; /*0x00 */
  993. U8 ChainOffset; /*0x02 */
  994. U8 Function; /*0x03 */
  995. U16 Reserved1; /*0x04 */
  996. U8 Reserved2; /*0x06 */
  997. U8 MsgFlags; /*0x07 */
  998. U8 VP_ID; /*0x08 */
  999. U8 VF_ID; /*0x09 */
  1000. U16 Reserved3; /*0x0A */
  1001. U8 Reserved4; /*0x0C */
  1002. U8 DestVF_ID; /*0x0D */
  1003. U16 Reserved5; /*0x0E */
  1004. U32 Reserved6; /*0x10 */
  1005. U32 Reserved7; /*0x14 */
  1006. U32 Reserved8; /*0x18 */
  1007. U32 Reserved9; /*0x1C */
  1008. U32 Reserved10; /*0x20 */
  1009. U32 HostData[1]; /*0x24 */
  1010. } MPI2_SEND_HOST_MESSAGE_REQUEST,
  1011. *PTR_MPI2_SEND_HOST_MESSAGE_REQUEST,
  1012. Mpi2SendHostMessageRequest_t,
  1013. *pMpi2SendHostMessageRequest_t;
  1014. /*SendHostMessage Reply message */
  1015. typedef struct _MPI2_SEND_HOST_MESSAGE_REPLY {
  1016. U16 HostDataLength; /*0x00 */
  1017. U8 MsgLength; /*0x02 */
  1018. U8 Function; /*0x03 */
  1019. U16 Reserved1; /*0x04 */
  1020. U8 Reserved2; /*0x06 */
  1021. U8 MsgFlags; /*0x07 */
  1022. U8 VP_ID; /*0x08 */
  1023. U8 VF_ID; /*0x09 */
  1024. U16 Reserved3; /*0x0A */
  1025. U16 Reserved4; /*0x0C */
  1026. U16 IOCStatus; /*0x0E */
  1027. U32 IOCLogInfo; /*0x10 */
  1028. } MPI2_SEND_HOST_MESSAGE_REPLY, *PTR_MPI2_SEND_HOST_MESSAGE_REPLY,
  1029. Mpi2SendHostMessageReply_t, *pMpi2SendHostMessageReply_t;
  1030. /****************************************************************************
  1031. * FWDownload message
  1032. ****************************************************************************/
  1033. /*MPI v2.0 FWDownload Request message */
  1034. typedef struct _MPI2_FW_DOWNLOAD_REQUEST {
  1035. U8 ImageType; /*0x00 */
  1036. U8 Reserved1; /*0x01 */
  1037. U8 ChainOffset; /*0x02 */
  1038. U8 Function; /*0x03 */
  1039. U16 Reserved2; /*0x04 */
  1040. U8 Reserved3; /*0x06 */
  1041. U8 MsgFlags; /*0x07 */
  1042. U8 VP_ID; /*0x08 */
  1043. U8 VF_ID; /*0x09 */
  1044. U16 Reserved4; /*0x0A */
  1045. U32 TotalImageSize; /*0x0C */
  1046. U32 Reserved5; /*0x10 */
  1047. MPI2_MPI_SGE_UNION SGL; /*0x14 */
  1048. } MPI2_FW_DOWNLOAD_REQUEST, *PTR_MPI2_FW_DOWNLOAD_REQUEST,
  1049. Mpi2FWDownloadRequest, *pMpi2FWDownloadRequest;
  1050. #define MPI2_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT (0x01)
  1051. #define MPI2_FW_DOWNLOAD_ITYPE_FW (0x01)
  1052. #define MPI2_FW_DOWNLOAD_ITYPE_BIOS (0x02)
  1053. #define MPI2_FW_DOWNLOAD_ITYPE_MANUFACTURING (0x06)
  1054. #define MPI2_FW_DOWNLOAD_ITYPE_CONFIG_1 (0x07)
  1055. #define MPI2_FW_DOWNLOAD_ITYPE_CONFIG_2 (0x08)
  1056. #define MPI2_FW_DOWNLOAD_ITYPE_MEGARAID (0x09)
  1057. #define MPI2_FW_DOWNLOAD_ITYPE_COMPLETE (0x0A)
  1058. #define MPI2_FW_DOWNLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B)
  1059. #define MPI2_FW_DOWNLOAD_ITYPE_PUBLIC_KEY (0x0C)
  1060. #define MPI2_FW_DOWNLOAD_ITYPE_MIN_PRODUCT_SPECIFIC (0xF0)
  1061. /*MPI v2.0 FWDownload TransactionContext Element */
  1062. typedef struct _MPI2_FW_DOWNLOAD_TCSGE {
  1063. U8 Reserved1; /*0x00 */
  1064. U8 ContextSize; /*0x01 */
  1065. U8 DetailsLength; /*0x02 */
  1066. U8 Flags; /*0x03 */
  1067. U32 Reserved2; /*0x04 */
  1068. U32 ImageOffset; /*0x08 */
  1069. U32 ImageSize; /*0x0C */
  1070. } MPI2_FW_DOWNLOAD_TCSGE, *PTR_MPI2_FW_DOWNLOAD_TCSGE,
  1071. Mpi2FWDownloadTCSGE_t, *pMpi2FWDownloadTCSGE_t;
  1072. /*MPI v2.5 FWDownload Request message */
  1073. typedef struct _MPI25_FW_DOWNLOAD_REQUEST {
  1074. U8 ImageType; /*0x00 */
  1075. U8 Reserved1; /*0x01 */
  1076. U8 ChainOffset; /*0x02 */
  1077. U8 Function; /*0x03 */
  1078. U16 Reserved2; /*0x04 */
  1079. U8 Reserved3; /*0x06 */
  1080. U8 MsgFlags; /*0x07 */
  1081. U8 VP_ID; /*0x08 */
  1082. U8 VF_ID; /*0x09 */
  1083. U16 Reserved4; /*0x0A */
  1084. U32 TotalImageSize; /*0x0C */
  1085. U32 Reserved5; /*0x10 */
  1086. U32 Reserved6; /*0x14 */
  1087. U32 ImageOffset; /*0x18 */
  1088. U32 ImageSize; /*0x1C */
  1089. MPI25_SGE_IO_UNION SGL; /*0x20 */
  1090. } MPI25_FW_DOWNLOAD_REQUEST, *PTR_MPI25_FW_DOWNLOAD_REQUEST,
  1091. Mpi25FWDownloadRequest, *pMpi25FWDownloadRequest;
  1092. /*FWDownload Reply message */
  1093. typedef struct _MPI2_FW_DOWNLOAD_REPLY {
  1094. U8 ImageType; /*0x00 */
  1095. U8 Reserved1; /*0x01 */
  1096. U8 MsgLength; /*0x02 */
  1097. U8 Function; /*0x03 */
  1098. U16 Reserved2; /*0x04 */
  1099. U8 Reserved3; /*0x06 */
  1100. U8 MsgFlags; /*0x07 */
  1101. U8 VP_ID; /*0x08 */
  1102. U8 VF_ID; /*0x09 */
  1103. U16 Reserved4; /*0x0A */
  1104. U16 Reserved5; /*0x0C */
  1105. U16 IOCStatus; /*0x0E */
  1106. U32 IOCLogInfo; /*0x10 */
  1107. } MPI2_FW_DOWNLOAD_REPLY, *PTR_MPI2_FW_DOWNLOAD_REPLY,
  1108. Mpi2FWDownloadReply_t, *pMpi2FWDownloadReply_t;
  1109. /****************************************************************************
  1110. * FWUpload message
  1111. ****************************************************************************/
  1112. /*MPI v2.0 FWUpload Request message */
  1113. typedef struct _MPI2_FW_UPLOAD_REQUEST {
  1114. U8 ImageType; /*0x00 */
  1115. U8 Reserved1; /*0x01 */
  1116. U8 ChainOffset; /*0x02 */
  1117. U8 Function; /*0x03 */
  1118. U16 Reserved2; /*0x04 */
  1119. U8 Reserved3; /*0x06 */
  1120. U8 MsgFlags; /*0x07 */
  1121. U8 VP_ID; /*0x08 */
  1122. U8 VF_ID; /*0x09 */
  1123. U16 Reserved4; /*0x0A */
  1124. U32 Reserved5; /*0x0C */
  1125. U32 Reserved6; /*0x10 */
  1126. MPI2_MPI_SGE_UNION SGL; /*0x14 */
  1127. } MPI2_FW_UPLOAD_REQUEST, *PTR_MPI2_FW_UPLOAD_REQUEST,
  1128. Mpi2FWUploadRequest_t, *pMpi2FWUploadRequest_t;
  1129. #define MPI2_FW_UPLOAD_ITYPE_FW_CURRENT (0x00)
  1130. #define MPI2_FW_UPLOAD_ITYPE_FW_FLASH (0x01)
  1131. #define MPI2_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02)
  1132. #define MPI2_FW_UPLOAD_ITYPE_FW_BACKUP (0x05)
  1133. #define MPI2_FW_UPLOAD_ITYPE_MANUFACTURING (0x06)
  1134. #define MPI2_FW_UPLOAD_ITYPE_CONFIG_1 (0x07)
  1135. #define MPI2_FW_UPLOAD_ITYPE_CONFIG_2 (0x08)
  1136. #define MPI2_FW_UPLOAD_ITYPE_MEGARAID (0x09)
  1137. #define MPI2_FW_UPLOAD_ITYPE_COMPLETE (0x0A)
  1138. #define MPI2_FW_UPLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B)
  1139. #define MPI2_FW_UPLOAD_ITYPE_CBB_BACKUP (0x0D)
  1140. /*MPI v2.0 FWUpload TransactionContext Element */
  1141. typedef struct _MPI2_FW_UPLOAD_TCSGE {
  1142. U8 Reserved1; /*0x00 */
  1143. U8 ContextSize; /*0x01 */
  1144. U8 DetailsLength; /*0x02 */
  1145. U8 Flags; /*0x03 */
  1146. U32 Reserved2; /*0x04 */
  1147. U32 ImageOffset; /*0x08 */
  1148. U32 ImageSize; /*0x0C */
  1149. } MPI2_FW_UPLOAD_TCSGE, *PTR_MPI2_FW_UPLOAD_TCSGE,
  1150. Mpi2FWUploadTCSGE_t, *pMpi2FWUploadTCSGE_t;
  1151. /*MPI v2.5 FWUpload Request message */
  1152. typedef struct _MPI25_FW_UPLOAD_REQUEST {
  1153. U8 ImageType; /*0x00 */
  1154. U8 Reserved1; /*0x01 */
  1155. U8 ChainOffset; /*0x02 */
  1156. U8 Function; /*0x03 */
  1157. U16 Reserved2; /*0x04 */
  1158. U8 Reserved3; /*0x06 */
  1159. U8 MsgFlags; /*0x07 */
  1160. U8 VP_ID; /*0x08 */
  1161. U8 VF_ID; /*0x09 */
  1162. U16 Reserved4; /*0x0A */
  1163. U32 Reserved5; /*0x0C */
  1164. U32 Reserved6; /*0x10 */
  1165. U32 Reserved7; /*0x14 */
  1166. U32 ImageOffset; /*0x18 */
  1167. U32 ImageSize; /*0x1C */
  1168. MPI25_SGE_IO_UNION SGL; /*0x20 */
  1169. } MPI25_FW_UPLOAD_REQUEST, *PTR_MPI25_FW_UPLOAD_REQUEST,
  1170. Mpi25FWUploadRequest_t, *pMpi25FWUploadRequest_t;
  1171. /*FWUpload Reply message */
  1172. typedef struct _MPI2_FW_UPLOAD_REPLY {
  1173. U8 ImageType; /*0x00 */
  1174. U8 Reserved1; /*0x01 */
  1175. U8 MsgLength; /*0x02 */
  1176. U8 Function; /*0x03 */
  1177. U16 Reserved2; /*0x04 */
  1178. U8 Reserved3; /*0x06 */
  1179. U8 MsgFlags; /*0x07 */
  1180. U8 VP_ID; /*0x08 */
  1181. U8 VF_ID; /*0x09 */
  1182. U16 Reserved4; /*0x0A */
  1183. U16 Reserved5; /*0x0C */
  1184. U16 IOCStatus; /*0x0E */
  1185. U32 IOCLogInfo; /*0x10 */
  1186. U32 ActualImageSize; /*0x14 */
  1187. } MPI2_FW_UPLOAD_REPLY, *PTR_MPI2_FW_UPLOAD_REPLY,
  1188. Mpi2FWUploadReply_t, *pMPi2FWUploadReply_t;
  1189. /*FW Image Header */
  1190. typedef struct _MPI2_FW_IMAGE_HEADER {
  1191. U32 Signature; /*0x00 */
  1192. U32 Signature0; /*0x04 */
  1193. U32 Signature1; /*0x08 */
  1194. U32 Signature2; /*0x0C */
  1195. MPI2_VERSION_UNION MPIVersion; /*0x10 */
  1196. MPI2_VERSION_UNION FWVersion; /*0x14 */
  1197. MPI2_VERSION_UNION NVDATAVersion; /*0x18 */
  1198. MPI2_VERSION_UNION PackageVersion; /*0x1C */
  1199. U16 VendorID; /*0x20 */
  1200. U16 ProductID; /*0x22 */
  1201. U16 ProtocolFlags; /*0x24 */
  1202. U16 Reserved26; /*0x26 */
  1203. U32 IOCCapabilities; /*0x28 */
  1204. U32 ImageSize; /*0x2C */
  1205. U32 NextImageHeaderOffset; /*0x30 */
  1206. U32 Checksum; /*0x34 */
  1207. U32 Reserved38; /*0x38 */
  1208. U32 Reserved3C; /*0x3C */
  1209. U32 Reserved40; /*0x40 */
  1210. U32 Reserved44; /*0x44 */
  1211. U32 Reserved48; /*0x48 */
  1212. U32 Reserved4C; /*0x4C */
  1213. U32 Reserved50; /*0x50 */
  1214. U32 Reserved54; /*0x54 */
  1215. U32 Reserved58; /*0x58 */
  1216. U32 Reserved5C; /*0x5C */
  1217. U32 BootFlags; /*0x60 */
  1218. U32 FirmwareVersionNameWhat; /*0x64 */
  1219. U8 FirmwareVersionName[32]; /*0x68 */
  1220. U32 VendorNameWhat; /*0x88 */
  1221. U8 VendorName[32]; /*0x8C */
  1222. U32 PackageNameWhat; /*0x88 */
  1223. U8 PackageName[32]; /*0x8C */
  1224. U32 ReservedD0; /*0xD0 */
  1225. U32 ReservedD4; /*0xD4 */
  1226. U32 ReservedD8; /*0xD8 */
  1227. U32 ReservedDC; /*0xDC */
  1228. U32 ReservedE0; /*0xE0 */
  1229. U32 ReservedE4; /*0xE4 */
  1230. U32 ReservedE8; /*0xE8 */
  1231. U32 ReservedEC; /*0xEC */
  1232. U32 ReservedF0; /*0xF0 */
  1233. U32 ReservedF4; /*0xF4 */
  1234. U32 ReservedF8; /*0xF8 */
  1235. U32 ReservedFC; /*0xFC */
  1236. } MPI2_FW_IMAGE_HEADER, *PTR_MPI2_FW_IMAGE_HEADER,
  1237. Mpi2FWImageHeader_t, *pMpi2FWImageHeader_t;
  1238. /*Signature field */
  1239. #define MPI2_FW_HEADER_SIGNATURE_OFFSET (0x00)
  1240. #define MPI2_FW_HEADER_SIGNATURE_MASK (0xFF000000)
  1241. #define MPI2_FW_HEADER_SIGNATURE (0xEA000000)
  1242. #define MPI26_FW_HEADER_SIGNATURE (0xEB000000)
  1243. /*Signature0 field */
  1244. #define MPI2_FW_HEADER_SIGNATURE0_OFFSET (0x04)
  1245. #define MPI2_FW_HEADER_SIGNATURE0 (0x5AFAA55A)
  1246. /* Last byte is defined by architecture */
  1247. #define MPI26_FW_HEADER_SIGNATURE0_BASE (0x5AEAA500)
  1248. #define MPI26_FW_HEADER_SIGNATURE0_ARC_0 (0x5A)
  1249. #define MPI26_FW_HEADER_SIGNATURE0_ARC_1 (0x00)
  1250. #define MPI26_FW_HEADER_SIGNATURE0_ARC_2 (0x01)
  1251. /* legacy (0x5AEAA55A) */
  1252. #define MPI26_FW_HEADER_SIGNATURE0 \
  1253. (MPI26_FW_HEADER_SIGNATURE0_BASE+MPI26_FW_HEADER_SIGNATURE0_ARC_0)
  1254. #define MPI26_FW_HEADER_SIGNATURE0_3516 \
  1255. (MPI26_FW_HEADER_SIGNATURE0_BASE+MPI26_FW_HEADER_SIGNATURE0_ARC_1)
  1256. /*Signature1 field */
  1257. #define MPI2_FW_HEADER_SIGNATURE1_OFFSET (0x08)
  1258. #define MPI2_FW_HEADER_SIGNATURE1 (0xA55AFAA5)
  1259. #define MPI26_FW_HEADER_SIGNATURE1 (0xA55AEAA5)
  1260. /*Signature2 field */
  1261. #define MPI2_FW_HEADER_SIGNATURE2_OFFSET (0x0C)
  1262. #define MPI2_FW_HEADER_SIGNATURE2 (0x5AA55AFA)
  1263. #define MPI26_FW_HEADER_SIGNATURE2 (0x5AA55AEA)
  1264. /*defines for using the ProductID field */
  1265. #define MPI2_FW_HEADER_PID_TYPE_MASK (0xF000)
  1266. #define MPI2_FW_HEADER_PID_TYPE_SAS (0x2000)
  1267. #define MPI2_FW_HEADER_PID_PROD_MASK (0x0F00)
  1268. #define MPI2_FW_HEADER_PID_PROD_A (0x0000)
  1269. #define MPI2_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI (0x0200)
  1270. #define MPI2_FW_HEADER_PID_PROD_IR_SCSI (0x0700)
  1271. #define MPI2_FW_HEADER_PID_FAMILY_MASK (0x00FF)
  1272. /*SAS ProductID Family bits */
  1273. #define MPI2_FW_HEADER_PID_FAMILY_2108_SAS (0x0013)
  1274. #define MPI2_FW_HEADER_PID_FAMILY_2208_SAS (0x0014)
  1275. #define MPI25_FW_HEADER_PID_FAMILY_3108_SAS (0x0021)
  1276. #define MPI26_FW_HEADER_PID_FAMILY_3324_SAS (0x0028)
  1277. #define MPI26_FW_HEADER_PID_FAMILY_3516_SAS (0x0031)
  1278. /*use MPI2_IOCFACTS_PROTOCOL_ defines for ProtocolFlags field */
  1279. /*use MPI2_IOCFACTS_CAPABILITY_ defines for IOCCapabilities field */
  1280. #define MPI2_FW_HEADER_IMAGESIZE_OFFSET (0x2C)
  1281. #define MPI2_FW_HEADER_NEXTIMAGE_OFFSET (0x30)
  1282. #define MPI26_FW_HEADER_BOOTFLAGS_OFFSET (0x60)
  1283. #define MPI2_FW_HEADER_VERNMHWAT_OFFSET (0x64)
  1284. #define MPI2_FW_HEADER_WHAT_SIGNATURE (0x29232840)
  1285. #define MPI2_FW_HEADER_SIZE (0x100)
  1286. /*Extended Image Header */
  1287. typedef struct _MPI2_EXT_IMAGE_HEADER {
  1288. U8 ImageType; /*0x00 */
  1289. U8 Reserved1; /*0x01 */
  1290. U16 Reserved2; /*0x02 */
  1291. U32 Checksum; /*0x04 */
  1292. U32 ImageSize; /*0x08 */
  1293. U32 NextImageHeaderOffset; /*0x0C */
  1294. U32 PackageVersion; /*0x10 */
  1295. U32 Reserved3; /*0x14 */
  1296. U32 Reserved4; /*0x18 */
  1297. U32 Reserved5; /*0x1C */
  1298. U8 IdentifyString[32]; /*0x20 */
  1299. } MPI2_EXT_IMAGE_HEADER, *PTR_MPI2_EXT_IMAGE_HEADER,
  1300. Mpi2ExtImageHeader_t, *pMpi2ExtImageHeader_t;
  1301. /*useful offsets */
  1302. #define MPI2_EXT_IMAGE_IMAGETYPE_OFFSET (0x00)
  1303. #define MPI2_EXT_IMAGE_IMAGESIZE_OFFSET (0x08)
  1304. #define MPI2_EXT_IMAGE_NEXTIMAGE_OFFSET (0x0C)
  1305. #define MPI2_EXT_IMAGE_HEADER_SIZE (0x40)
  1306. /*defines for the ImageType field */
  1307. #define MPI2_EXT_IMAGE_TYPE_UNSPECIFIED (0x00)
  1308. #define MPI2_EXT_IMAGE_TYPE_FW (0x01)
  1309. #define MPI2_EXT_IMAGE_TYPE_NVDATA (0x03)
  1310. #define MPI2_EXT_IMAGE_TYPE_BOOTLOADER (0x04)
  1311. #define MPI2_EXT_IMAGE_TYPE_INITIALIZATION (0x05)
  1312. #define MPI2_EXT_IMAGE_TYPE_FLASH_LAYOUT (0x06)
  1313. #define MPI2_EXT_IMAGE_TYPE_SUPPORTED_DEVICES (0x07)
  1314. #define MPI2_EXT_IMAGE_TYPE_MEGARAID (0x08)
  1315. #define MPI2_EXT_IMAGE_TYPE_ENCRYPTED_HASH (0x09)
  1316. #define MPI2_EXT_IMAGE_TYPE_MIN_PRODUCT_SPECIFIC (0x80)
  1317. #define MPI2_EXT_IMAGE_TYPE_MAX_PRODUCT_SPECIFIC (0xFF)
  1318. #define MPI2_EXT_IMAGE_TYPE_MAX (MPI2_EXT_IMAGE_TYPE_MAX_PRODUCT_SPECIFIC)
  1319. /*FLASH Layout Extended Image Data */
  1320. /*
  1321. *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  1322. *one and check RegionsPerLayout at runtime.
  1323. */
  1324. #ifndef MPI2_FLASH_NUMBER_OF_REGIONS
  1325. #define MPI2_FLASH_NUMBER_OF_REGIONS (1)
  1326. #endif
  1327. /*
  1328. *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  1329. *one and check NumberOfLayouts at runtime.
  1330. */
  1331. #ifndef MPI2_FLASH_NUMBER_OF_LAYOUTS
  1332. #define MPI2_FLASH_NUMBER_OF_LAYOUTS (1)
  1333. #endif
  1334. typedef struct _MPI2_FLASH_REGION {
  1335. U8 RegionType; /*0x00 */
  1336. U8 Reserved1; /*0x01 */
  1337. U16 Reserved2; /*0x02 */
  1338. U32 RegionOffset; /*0x04 */
  1339. U32 RegionSize; /*0x08 */
  1340. U32 Reserved3; /*0x0C */
  1341. } MPI2_FLASH_REGION, *PTR_MPI2_FLASH_REGION,
  1342. Mpi2FlashRegion_t, *pMpi2FlashRegion_t;
  1343. typedef struct _MPI2_FLASH_LAYOUT {
  1344. U32 FlashSize; /*0x00 */
  1345. U32 Reserved1; /*0x04 */
  1346. U32 Reserved2; /*0x08 */
  1347. U32 Reserved3; /*0x0C */
  1348. MPI2_FLASH_REGION Region[MPI2_FLASH_NUMBER_OF_REGIONS]; /*0x10 */
  1349. } MPI2_FLASH_LAYOUT, *PTR_MPI2_FLASH_LAYOUT,
  1350. Mpi2FlashLayout_t, *pMpi2FlashLayout_t;
  1351. typedef struct _MPI2_FLASH_LAYOUT_DATA {
  1352. U8 ImageRevision; /*0x00 */
  1353. U8 Reserved1; /*0x01 */
  1354. U8 SizeOfRegion; /*0x02 */
  1355. U8 Reserved2; /*0x03 */
  1356. U16 NumberOfLayouts; /*0x04 */
  1357. U16 RegionsPerLayout; /*0x06 */
  1358. U16 MinimumSectorAlignment; /*0x08 */
  1359. U16 Reserved3; /*0x0A */
  1360. U32 Reserved4; /*0x0C */
  1361. MPI2_FLASH_LAYOUT Layout[MPI2_FLASH_NUMBER_OF_LAYOUTS]; /*0x10 */
  1362. } MPI2_FLASH_LAYOUT_DATA, *PTR_MPI2_FLASH_LAYOUT_DATA,
  1363. Mpi2FlashLayoutData_t, *pMpi2FlashLayoutData_t;
  1364. /*defines for the RegionType field */
  1365. #define MPI2_FLASH_REGION_UNUSED (0x00)
  1366. #define MPI2_FLASH_REGION_FIRMWARE (0x01)
  1367. #define MPI2_FLASH_REGION_BIOS (0x02)
  1368. #define MPI2_FLASH_REGION_NVDATA (0x03)
  1369. #define MPI2_FLASH_REGION_FIRMWARE_BACKUP (0x05)
  1370. #define MPI2_FLASH_REGION_MFG_INFORMATION (0x06)
  1371. #define MPI2_FLASH_REGION_CONFIG_1 (0x07)
  1372. #define MPI2_FLASH_REGION_CONFIG_2 (0x08)
  1373. #define MPI2_FLASH_REGION_MEGARAID (0x09)
  1374. #define MPI2_FLASH_REGION_COMMON_BOOT_BLOCK (0x0A)
  1375. #define MPI2_FLASH_REGION_INIT (MPI2_FLASH_REGION_COMMON_BOOT_BLOCK)
  1376. #define MPI2_FLASH_REGION_CBB_BACKUP (0x0D)
  1377. /*ImageRevision */
  1378. #define MPI2_FLASH_LAYOUT_IMAGE_REVISION (0x00)
  1379. /*Supported Devices Extended Image Data */
  1380. /*
  1381. *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  1382. *one and check NumberOfDevices at runtime.
  1383. */
  1384. #ifndef MPI2_SUPPORTED_DEVICES_IMAGE_NUM_DEVICES
  1385. #define MPI2_SUPPORTED_DEVICES_IMAGE_NUM_DEVICES (1)
  1386. #endif
  1387. typedef struct _MPI2_SUPPORTED_DEVICE {
  1388. U16 DeviceID; /*0x00 */
  1389. U16 VendorID; /*0x02 */
  1390. U16 DeviceIDMask; /*0x04 */
  1391. U16 Reserved1; /*0x06 */
  1392. U8 LowPCIRev; /*0x08 */
  1393. U8 HighPCIRev; /*0x09 */
  1394. U16 Reserved2; /*0x0A */
  1395. U32 Reserved3; /*0x0C */
  1396. } MPI2_SUPPORTED_DEVICE, *PTR_MPI2_SUPPORTED_DEVICE,
  1397. Mpi2SupportedDevice_t, *pMpi2SupportedDevice_t;
  1398. typedef struct _MPI2_SUPPORTED_DEVICES_DATA {
  1399. U8 ImageRevision; /*0x00 */
  1400. U8 Reserved1; /*0x01 */
  1401. U8 NumberOfDevices; /*0x02 */
  1402. U8 Reserved2; /*0x03 */
  1403. U32 Reserved3; /*0x04 */
  1404. MPI2_SUPPORTED_DEVICE
  1405. SupportedDevice[MPI2_SUPPORTED_DEVICES_IMAGE_NUM_DEVICES];/*0x08 */
  1406. } MPI2_SUPPORTED_DEVICES_DATA, *PTR_MPI2_SUPPORTED_DEVICES_DATA,
  1407. Mpi2SupportedDevicesData_t, *pMpi2SupportedDevicesData_t;
  1408. /*ImageRevision */
  1409. #define MPI2_SUPPORTED_DEVICES_IMAGE_REVISION (0x00)
  1410. /*Init Extended Image Data */
  1411. typedef struct _MPI2_INIT_IMAGE_FOOTER {
  1412. U32 BootFlags; /*0x00 */
  1413. U32 ImageSize; /*0x04 */
  1414. U32 Signature0; /*0x08 */
  1415. U32 Signature1; /*0x0C */
  1416. U32 Signature2; /*0x10 */
  1417. U32 ResetVector; /*0x14 */
  1418. } MPI2_INIT_IMAGE_FOOTER, *PTR_MPI2_INIT_IMAGE_FOOTER,
  1419. Mpi2InitImageFooter_t, *pMpi2InitImageFooter_t;
  1420. /*defines for the BootFlags field */
  1421. #define MPI2_INIT_IMAGE_BOOTFLAGS_OFFSET (0x00)
  1422. /*defines for the ImageSize field */
  1423. #define MPI2_INIT_IMAGE_IMAGESIZE_OFFSET (0x04)
  1424. /*defines for the Signature0 field */
  1425. #define MPI2_INIT_IMAGE_SIGNATURE0_OFFSET (0x08)
  1426. #define MPI2_INIT_IMAGE_SIGNATURE0 (0x5AA55AEA)
  1427. /*defines for the Signature1 field */
  1428. #define MPI2_INIT_IMAGE_SIGNATURE1_OFFSET (0x0C)
  1429. #define MPI2_INIT_IMAGE_SIGNATURE1 (0xA55AEAA5)
  1430. /*defines for the Signature2 field */
  1431. #define MPI2_INIT_IMAGE_SIGNATURE2_OFFSET (0x10)
  1432. #define MPI2_INIT_IMAGE_SIGNATURE2 (0x5AEAA55A)
  1433. /*Signature fields as individual bytes */
  1434. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_0 (0xEA)
  1435. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_1 (0x5A)
  1436. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_2 (0xA5)
  1437. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_3 (0x5A)
  1438. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_4 (0xA5)
  1439. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_5 (0xEA)
  1440. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_6 (0x5A)
  1441. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_7 (0xA5)
  1442. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_8 (0x5A)
  1443. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_9 (0xA5)
  1444. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_A (0xEA)
  1445. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_B (0x5A)
  1446. /*defines for the ResetVector field */
  1447. #define MPI2_INIT_IMAGE_RESETVECTOR_OFFSET (0x14)
  1448. /* Encrypted Hash Extended Image Data */
  1449. typedef struct _MPI25_ENCRYPTED_HASH_ENTRY {
  1450. U8 HashImageType; /* 0x00 */
  1451. U8 HashAlgorithm; /* 0x01 */
  1452. U8 EncryptionAlgorithm; /* 0x02 */
  1453. U8 Reserved1; /* 0x03 */
  1454. U32 Reserved2; /* 0x04 */
  1455. U32 EncryptedHash[1]; /* 0x08 */ /* variable length */
  1456. } MPI25_ENCRYPTED_HASH_ENTRY, *PTR_MPI25_ENCRYPTED_HASH_ENTRY,
  1457. Mpi25EncryptedHashEntry_t, *pMpi25EncryptedHashEntry_t;
  1458. /* values for HashImageType */
  1459. #define MPI25_HASH_IMAGE_TYPE_UNUSED (0x00)
  1460. #define MPI25_HASH_IMAGE_TYPE_FIRMWARE (0x01)
  1461. #define MPI25_HASH_IMAGE_TYPE_BIOS (0x02)
  1462. /* values for HashAlgorithm */
  1463. #define MPI25_HASH_ALGORITHM_UNUSED (0x00)
  1464. #define MPI25_HASH_ALGORITHM_SHA256 (0x01)
  1465. /* values for EncryptionAlgorithm */
  1466. #define MPI25_ENCRYPTION_ALG_UNUSED (0x00)
  1467. #define MPI25_ENCRYPTION_ALG_RSA256 (0x01)
  1468. typedef struct _MPI25_ENCRYPTED_HASH_DATA {
  1469. U8 ImageVersion; /* 0x00 */
  1470. U8 NumHash; /* 0x01 */
  1471. U16 Reserved1; /* 0x02 */
  1472. U32 Reserved2; /* 0x04 */
  1473. MPI25_ENCRYPTED_HASH_ENTRY EncryptedHashEntry[1]; /* 0x08 */
  1474. } MPI25_ENCRYPTED_HASH_DATA, *PTR_MPI25_ENCRYPTED_HASH_DATA,
  1475. Mpi25EncryptedHashData_t, *pMpi25EncryptedHashData_t;
  1476. /****************************************************************************
  1477. * PowerManagementControl message
  1478. ****************************************************************************/
  1479. /*PowerManagementControl Request message */
  1480. typedef struct _MPI2_PWR_MGMT_CONTROL_REQUEST {
  1481. U8 Feature; /*0x00 */
  1482. U8 Reserved1; /*0x01 */
  1483. U8 ChainOffset; /*0x02 */
  1484. U8 Function; /*0x03 */
  1485. U16 Reserved2; /*0x04 */
  1486. U8 Reserved3; /*0x06 */
  1487. U8 MsgFlags; /*0x07 */
  1488. U8 VP_ID; /*0x08 */
  1489. U8 VF_ID; /*0x09 */
  1490. U16 Reserved4; /*0x0A */
  1491. U8 Parameter1; /*0x0C */
  1492. U8 Parameter2; /*0x0D */
  1493. U8 Parameter3; /*0x0E */
  1494. U8 Parameter4; /*0x0F */
  1495. U32 Reserved5; /*0x10 */
  1496. U32 Reserved6; /*0x14 */
  1497. } MPI2_PWR_MGMT_CONTROL_REQUEST, *PTR_MPI2_PWR_MGMT_CONTROL_REQUEST,
  1498. Mpi2PwrMgmtControlRequest_t, *pMpi2PwrMgmtControlRequest_t;
  1499. /*defines for the Feature field */
  1500. #define MPI2_PM_CONTROL_FEATURE_DA_PHY_POWER_COND (0x01)
  1501. #define MPI2_PM_CONTROL_FEATURE_PORT_WIDTH_MODULATION (0x02)
  1502. #define MPI2_PM_CONTROL_FEATURE_PCIE_LINK (0x03) /*obsolete */
  1503. #define MPI2_PM_CONTROL_FEATURE_IOC_SPEED (0x04)
  1504. #define MPI2_PM_CONTROL_FEATURE_GLOBAL_PWR_MGMT_MODE (0x05)
  1505. #define MPI2_PM_CONTROL_FEATURE_MIN_PRODUCT_SPECIFIC (0x80)
  1506. #define MPI2_PM_CONTROL_FEATURE_MAX_PRODUCT_SPECIFIC (0xFF)
  1507. /*parameter usage for the MPI2_PM_CONTROL_FEATURE_DA_PHY_POWER_COND Feature */
  1508. /*Parameter1 contains a PHY number */
  1509. /*Parameter2 indicates power condition action using these defines */
  1510. #define MPI2_PM_CONTROL_PARAM2_PARTIAL (0x01)
  1511. #define MPI2_PM_CONTROL_PARAM2_SLUMBER (0x02)
  1512. #define MPI2_PM_CONTROL_PARAM2_EXIT_PWR_MGMT (0x03)
  1513. /*Parameter3 and Parameter4 are reserved */
  1514. /*parameter usage for the MPI2_PM_CONTROL_FEATURE_PORT_WIDTH_MODULATION
  1515. * Feature */
  1516. /*Parameter1 contains SAS port width modulation group number */
  1517. /*Parameter2 indicates IOC action using these defines */
  1518. #define MPI2_PM_CONTROL_PARAM2_REQUEST_OWNERSHIP (0x01)
  1519. #define MPI2_PM_CONTROL_PARAM2_CHANGE_MODULATION (0x02)
  1520. #define MPI2_PM_CONTROL_PARAM2_RELINQUISH_OWNERSHIP (0x03)
  1521. /*Parameter3 indicates desired modulation level using these defines */
  1522. #define MPI2_PM_CONTROL_PARAM3_25_PERCENT (0x00)
  1523. #define MPI2_PM_CONTROL_PARAM3_50_PERCENT (0x01)
  1524. #define MPI2_PM_CONTROL_PARAM3_75_PERCENT (0x02)
  1525. #define MPI2_PM_CONTROL_PARAM3_100_PERCENT (0x03)
  1526. /*Parameter4 is reserved */
  1527. /*this next set (_PCIE_LINK) is obsolete */
  1528. /*parameter usage for the MPI2_PM_CONTROL_FEATURE_PCIE_LINK Feature */
  1529. /*Parameter1 indicates desired PCIe link speed using these defines */
  1530. #define MPI2_PM_CONTROL_PARAM1_PCIE_2_5_GBPS (0x00) /*obsolete */
  1531. #define MPI2_PM_CONTROL_PARAM1_PCIE_5_0_GBPS (0x01) /*obsolete */
  1532. #define MPI2_PM_CONTROL_PARAM1_PCIE_8_0_GBPS (0x02) /*obsolete */
  1533. /*Parameter2 indicates desired PCIe link width using these defines */
  1534. #define MPI2_PM_CONTROL_PARAM2_WIDTH_X1 (0x01) /*obsolete */
  1535. #define MPI2_PM_CONTROL_PARAM2_WIDTH_X2 (0x02) /*obsolete */
  1536. #define MPI2_PM_CONTROL_PARAM2_WIDTH_X4 (0x04) /*obsolete */
  1537. #define MPI2_PM_CONTROL_PARAM2_WIDTH_X8 (0x08) /*obsolete */
  1538. /*Parameter3 and Parameter4 are reserved */
  1539. /*parameter usage for the MPI2_PM_CONTROL_FEATURE_IOC_SPEED Feature */
  1540. /*Parameter1 indicates desired IOC hardware clock speed using these defines */
  1541. #define MPI2_PM_CONTROL_PARAM1_FULL_IOC_SPEED (0x01)
  1542. #define MPI2_PM_CONTROL_PARAM1_HALF_IOC_SPEED (0x02)
  1543. #define MPI2_PM_CONTROL_PARAM1_QUARTER_IOC_SPEED (0x04)
  1544. #define MPI2_PM_CONTROL_PARAM1_EIGHTH_IOC_SPEED (0x08)
  1545. /*Parameter2, Parameter3, and Parameter4 are reserved */
  1546. /*parameter usage for the MPI2_PM_CONTROL_FEATURE_GLOBAL_PWR_MGMT_MODE Feature*/
  1547. /*Parameter1 indicates host action regarding global power management mode */
  1548. #define MPI2_PM_CONTROL_PARAM1_TAKE_CONTROL (0x01)
  1549. #define MPI2_PM_CONTROL_PARAM1_CHANGE_GLOBAL_MODE (0x02)
  1550. #define MPI2_PM_CONTROL_PARAM1_RELEASE_CONTROL (0x03)
  1551. /*Parameter2 indicates the requested global power management mode */
  1552. #define MPI2_PM_CONTROL_PARAM2_FULL_PWR_PERF (0x01)
  1553. #define MPI2_PM_CONTROL_PARAM2_REDUCED_PWR_PERF (0x08)
  1554. #define MPI2_PM_CONTROL_PARAM2_STANDBY (0x40)
  1555. /*Parameter3 and Parameter4 are reserved */
  1556. /*PowerManagementControl Reply message */
  1557. typedef struct _MPI2_PWR_MGMT_CONTROL_REPLY {
  1558. U8 Feature; /*0x00 */
  1559. U8 Reserved1; /*0x01 */
  1560. U8 MsgLength; /*0x02 */
  1561. U8 Function; /*0x03 */
  1562. U16 Reserved2; /*0x04 */
  1563. U8 Reserved3; /*0x06 */
  1564. U8 MsgFlags; /*0x07 */
  1565. U8 VP_ID; /*0x08 */
  1566. U8 VF_ID; /*0x09 */
  1567. U16 Reserved4; /*0x0A */
  1568. U16 Reserved5; /*0x0C */
  1569. U16 IOCStatus; /*0x0E */
  1570. U32 IOCLogInfo; /*0x10 */
  1571. } MPI2_PWR_MGMT_CONTROL_REPLY, *PTR_MPI2_PWR_MGMT_CONTROL_REPLY,
  1572. Mpi2PwrMgmtControlReply_t, *pMpi2PwrMgmtControlReply_t;
  1573. /****************************************************************************
  1574. * IO Unit Control messages (MPI v2.6 and later only.)
  1575. ****************************************************************************/
  1576. /* IO Unit Control Request Message */
  1577. typedef struct _MPI26_IOUNIT_CONTROL_REQUEST {
  1578. U8 Operation; /* 0x00 */
  1579. U8 Reserved1; /* 0x01 */
  1580. U8 ChainOffset; /* 0x02 */
  1581. U8 Function; /* 0x03 */
  1582. U16 DevHandle; /* 0x04 */
  1583. U8 IOCParameter; /* 0x06 */
  1584. U8 MsgFlags; /* 0x07 */
  1585. U8 VP_ID; /* 0x08 */
  1586. U8 VF_ID; /* 0x09 */
  1587. U16 Reserved3; /* 0x0A */
  1588. U16 Reserved4; /* 0x0C */
  1589. U8 PhyNum; /* 0x0E */
  1590. U8 PrimFlags; /* 0x0F */
  1591. U32 Primitive; /* 0x10 */
  1592. U8 LookupMethod; /* 0x14 */
  1593. U8 Reserved5; /* 0x15 */
  1594. U16 SlotNumber; /* 0x16 */
  1595. U64 LookupAddress; /* 0x18 */
  1596. U32 IOCParameterValue; /* 0x20 */
  1597. U32 Reserved7; /* 0x24 */
  1598. U32 Reserved8; /* 0x28 */
  1599. } MPI26_IOUNIT_CONTROL_REQUEST,
  1600. *PTR_MPI26_IOUNIT_CONTROL_REQUEST,
  1601. Mpi26IoUnitControlRequest_t,
  1602. *pMpi26IoUnitControlRequest_t;
  1603. /* values for the Operation field */
  1604. #define MPI26_CTRL_OP_CLEAR_ALL_PERSISTENT (0x02)
  1605. #define MPI26_CTRL_OP_SAS_PHY_LINK_RESET (0x06)
  1606. #define MPI26_CTRL_OP_SAS_PHY_HARD_RESET (0x07)
  1607. #define MPI26_CTRL_OP_PHY_CLEAR_ERROR_LOG (0x08)
  1608. #define MPI26_CTRL_OP_LINK_CLEAR_ERROR_LOG (0x09)
  1609. #define MPI26_CTRL_OP_SAS_SEND_PRIMITIVE (0x0A)
  1610. #define MPI26_CTRL_OP_FORCE_FULL_DISCOVERY (0x0B)
  1611. #define MPI26_CTRL_OP_REMOVE_DEVICE (0x0D)
  1612. #define MPI26_CTRL_OP_LOOKUP_MAPPING (0x0E)
  1613. #define MPI26_CTRL_OP_SET_IOC_PARAMETER (0x0F)
  1614. #define MPI26_CTRL_OP_ENABLE_FP_DEVICE (0x10)
  1615. #define MPI26_CTRL_OP_DISABLE_FP_DEVICE (0x11)
  1616. #define MPI26_CTRL_OP_ENABLE_FP_ALL (0x12)
  1617. #define MPI26_CTRL_OP_DISABLE_FP_ALL (0x13)
  1618. #define MPI26_CTRL_OP_DEV_ENABLE_NCQ (0x14)
  1619. #define MPI26_CTRL_OP_DEV_DISABLE_NCQ (0x15)
  1620. #define MPI26_CTRL_OP_SHUTDOWN (0x16)
  1621. #define MPI26_CTRL_OP_DEV_ENABLE_PERSIST_CONNECTION (0x17)
  1622. #define MPI26_CTRL_OP_DEV_DISABLE_PERSIST_CONNECTION (0x18)
  1623. #define MPI26_CTRL_OP_DEV_CLOSE_PERSIST_CONNECTION (0x19)
  1624. #define MPI26_CTRL_OP_PRODUCT_SPECIFIC_MIN (0x80)
  1625. /* values for the PrimFlags field */
  1626. #define MPI26_CTRL_PRIMFLAGS_SINGLE (0x08)
  1627. #define MPI26_CTRL_PRIMFLAGS_TRIPLE (0x02)
  1628. #define MPI26_CTRL_PRIMFLAGS_REDUNDANT (0x01)
  1629. /* values for the LookupMethod field */
  1630. #define MPI26_CTRL_LOOKUP_METHOD_WWID_ADDRESS (0x01)
  1631. #define MPI26_CTRL_LOOKUP_METHOD_ENCLOSURE_SLOT (0x02)
  1632. #define MPI26_CTRL_LOOKUP_METHOD_SAS_DEVICE_NAME (0x03)
  1633. /* IO Unit Control Reply Message */
  1634. typedef struct _MPI26_IOUNIT_CONTROL_REPLY {
  1635. U8 Operation; /* 0x00 */
  1636. U8 Reserved1; /* 0x01 */
  1637. U8 MsgLength; /* 0x02 */
  1638. U8 Function; /* 0x03 */
  1639. U16 DevHandle; /* 0x04 */
  1640. U8 IOCParameter; /* 0x06 */
  1641. U8 MsgFlags; /* 0x07 */
  1642. U8 VP_ID; /* 0x08 */
  1643. U8 VF_ID; /* 0x09 */
  1644. U16 Reserved3; /* 0x0A */
  1645. U16 Reserved4; /* 0x0C */
  1646. U16 IOCStatus; /* 0x0E */
  1647. U32 IOCLogInfo; /* 0x10 */
  1648. } MPI26_IOUNIT_CONTROL_REPLY,
  1649. *PTR_MPI26_IOUNIT_CONTROL_REPLY,
  1650. Mpi26IoUnitControlReply_t,
  1651. *pMpi26IoUnitControlReply_t;
  1652. #endif