mpi2_ioc.h 84 KB

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