mpi2_ioc.h 72 KB

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