mpi2_ioc.h 70 KB

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