mpi2_ioc.h 65 KB

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