mpi2_ioc.h 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352
  1. /*
  2. * Copyright (c) 2000-2009 LSI Corporation.
  3. *
  4. *
  5. * Name: mpi2_ioc.h
  6. * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages
  7. * Creation Date: October 11, 2006
  8. *
  9. * mpi2_ioc.h Version: 02.00.12
  10. *
  11. * Version History
  12. * ---------------
  13. *
  14. * Date Version Description
  15. * -------- -------- ------------------------------------------------------
  16. * 04-30-07 02.00.00 Corresponds to Fusion-MPT MPI Specification Rev A.
  17. * 06-04-07 02.00.01 In IOCFacts Reply structure, renamed MaxDevices to
  18. * MaxTargets.
  19. * Added TotalImageSize field to FWDownload Request.
  20. * Added reserved words to FWUpload Request.
  21. * 06-26-07 02.00.02 Added IR Configuration Change List Event.
  22. * 08-31-07 02.00.03 Removed SystemReplyQueueDepth field from the IOCInit
  23. * request and replaced it with
  24. * ReplyDescriptorPostQueueDepth and ReplyFreeQueueDepth.
  25. * Replaced the MinReplyQueueDepth field of the IOCFacts
  26. * reply with MaxReplyDescriptorPostQueueDepth.
  27. * Added MPI2_RDPQ_DEPTH_MIN define to specify the minimum
  28. * depth for the Reply Descriptor Post Queue.
  29. * Added SASAddress field to Initiator Device Table
  30. * Overflow Event data.
  31. * 10-31-07 02.00.04 Added ReasonCode MPI2_EVENT_SAS_INIT_RC_NOT_RESPONDING
  32. * for SAS Initiator Device Status Change Event data.
  33. * Modified Reason Code defines for SAS Topology Change
  34. * List Event data, including adding a bit for PHY Vacant
  35. * status, and adding a mask for the Reason Code.
  36. * Added define for
  37. * MPI2_EVENT_SAS_TOPO_ES_DELAY_NOT_RESPONDING.
  38. * Added define for MPI2_EXT_IMAGE_TYPE_MEGARAID.
  39. * 12-18-07 02.00.05 Added Boot Status defines for the IOCExceptions field of
  40. * the IOCFacts Reply.
  41. * Removed MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER define.
  42. * Moved MPI2_VERSION_UNION to mpi2.h.
  43. * Changed MPI2_EVENT_NOTIFICATION_REQUEST to use masks
  44. * instead of enables, and added SASBroadcastPrimitiveMasks
  45. * field.
  46. * Added Log Entry Added Event and related structure.
  47. * 02-29-08 02.00.06 Added define MPI2_IOCFACTS_CAPABILITY_INTEGRATED_RAID.
  48. * Removed define MPI2_IOCFACTS_PROTOCOL_SMP_TARGET.
  49. * Added MaxVolumes and MaxPersistentEntries fields to
  50. * IOCFacts reply.
  51. * Added ProtocalFlags and IOCCapabilities fields to
  52. * MPI2_FW_IMAGE_HEADER.
  53. * Removed MPI2_PORTENABLE_FLAGS_ENABLE_SINGLE_PORT.
  54. * 03-03-08 02.00.07 Fixed MPI2_FW_IMAGE_HEADER by changing Reserved26 to
  55. * a U16 (from a U32).
  56. * Removed extra 's' from EventMasks name.
  57. * 06-27-08 02.00.08 Fixed an offset in a comment.
  58. * 10-02-08 02.00.09 Removed SystemReplyFrameSize from MPI2_IOC_INIT_REQUEST.
  59. * Removed CurReplyFrameSize from MPI2_IOC_FACTS_REPLY and
  60. * renamed MinReplyFrameSize to ReplyFrameSize.
  61. * Added MPI2_IOCFACTS_EXCEPT_IR_FOREIGN_CONFIG_MAX.
  62. * Added two new RAIDOperation values for Integrated RAID
  63. * Operations Status Event data.
  64. * Added four new IR Configuration Change List Event data
  65. * ReasonCode values.
  66. * Added two new ReasonCode defines for SAS Device Status
  67. * Change Event data.
  68. * Added three new DiscoveryStatus bits for the SAS
  69. * Discovery event data.
  70. * Added Multiplexing Status Change bit to the PhyStatus
  71. * field of the SAS Topology Change List event data.
  72. * Removed define for MPI2_INIT_IMAGE_BOOTFLAGS_XMEMCOPY.
  73. * BootFlags are now product-specific.
  74. * Added defines for the indivdual signature bytes
  75. * for MPI2_INIT_IMAGE_FOOTER.
  76. * 01-19-09 02.00.10 Added MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY define.
  77. * Added MPI2_EVENT_SAS_DISC_DS_DOWNSTREAM_INITIATOR
  78. * define.
  79. * Added MPI2_EVENT_SAS_DEV_STAT_RC_SATA_INIT_FAILURE
  80. * define.
  81. * Removed MPI2_EVENT_SAS_DISC_DS_SATA_INIT_FAILURE define.
  82. * 05-06-09 02.00.11 Added MPI2_IOCFACTS_CAPABILITY_RAID_ACCELERATOR define.
  83. * Added MPI2_IOCFACTS_CAPABILITY_MSI_X_INDEX define.
  84. * Added two new reason codes for SAS Device Status Change
  85. * Event.
  86. * Added new event: SAS PHY Counter.
  87. * 07-30-09 02.00.12 Added GPIO Interrupt event define and structure.
  88. * Added MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER define.
  89. * Added new product id family for 2208.
  90. * --------------------------------------------------------------------------
  91. */
  92. #ifndef MPI2_IOC_H
  93. #define MPI2_IOC_H
  94. /*****************************************************************************
  95. *
  96. * IOC Messages
  97. *
  98. *****************************************************************************/
  99. /****************************************************************************
  100. * IOCInit message
  101. ****************************************************************************/
  102. /* IOCInit Request message */
  103. typedef struct _MPI2_IOC_INIT_REQUEST
  104. {
  105. U8 WhoInit; /* 0x00 */
  106. U8 Reserved1; /* 0x01 */
  107. U8 ChainOffset; /* 0x02 */
  108. U8 Function; /* 0x03 */
  109. U16 Reserved2; /* 0x04 */
  110. U8 Reserved3; /* 0x06 */
  111. U8 MsgFlags; /* 0x07 */
  112. U8 VP_ID; /* 0x08 */
  113. U8 VF_ID; /* 0x09 */
  114. U16 Reserved4; /* 0x0A */
  115. U16 MsgVersion; /* 0x0C */
  116. U16 HeaderVersion; /* 0x0E */
  117. U32 Reserved5; /* 0x10 */
  118. U32 Reserved6; /* 0x14 */
  119. U16 Reserved7; /* 0x18 */
  120. U16 SystemRequestFrameSize; /* 0x1A */
  121. U16 ReplyDescriptorPostQueueDepth; /* 0x1C */
  122. U16 ReplyFreeQueueDepth; /* 0x1E */
  123. U32 SenseBufferAddressHigh; /* 0x20 */
  124. U32 SystemReplyAddressHigh; /* 0x24 */
  125. U64 SystemRequestFrameBaseAddress; /* 0x28 */
  126. U64 ReplyDescriptorPostQueueAddress;/* 0x30 */
  127. U64 ReplyFreeQueueAddress; /* 0x38 */
  128. U64 TimeStamp; /* 0x40 */
  129. } MPI2_IOC_INIT_REQUEST, MPI2_POINTER PTR_MPI2_IOC_INIT_REQUEST,
  130. Mpi2IOCInitRequest_t, MPI2_POINTER pMpi2IOCInitRequest_t;
  131. /* WhoInit values */
  132. #define MPI2_WHOINIT_NOT_INITIALIZED (0x00)
  133. #define MPI2_WHOINIT_SYSTEM_BIOS (0x01)
  134. #define MPI2_WHOINIT_ROM_BIOS (0x02)
  135. #define MPI2_WHOINIT_PCI_PEER (0x03)
  136. #define MPI2_WHOINIT_HOST_DRIVER (0x04)
  137. #define MPI2_WHOINIT_MANUFACTURER (0x05)
  138. /* MsgVersion */
  139. #define MPI2_IOCINIT_MSGVERSION_MAJOR_MASK (0xFF00)
  140. #define MPI2_IOCINIT_MSGVERSION_MAJOR_SHIFT (8)
  141. #define MPI2_IOCINIT_MSGVERSION_MINOR_MASK (0x00FF)
  142. #define MPI2_IOCINIT_MSGVERSION_MINOR_SHIFT (0)
  143. /* HeaderVersion */
  144. #define MPI2_IOCINIT_HDRVERSION_UNIT_MASK (0xFF00)
  145. #define MPI2_IOCINIT_HDRVERSION_UNIT_SHIFT (8)
  146. #define MPI2_IOCINIT_HDRVERSION_DEV_MASK (0x00FF)
  147. #define MPI2_IOCINIT_HDRVERSION_DEV_SHIFT (0)
  148. /* minimum depth for the Reply Descriptor Post Queue */
  149. #define MPI2_RDPQ_DEPTH_MIN (16)
  150. /* IOCInit Reply message */
  151. typedef struct _MPI2_IOC_INIT_REPLY
  152. {
  153. U8 WhoInit; /* 0x00 */
  154. U8 Reserved1; /* 0x01 */
  155. U8 MsgLength; /* 0x02 */
  156. U8 Function; /* 0x03 */
  157. U16 Reserved2; /* 0x04 */
  158. U8 Reserved3; /* 0x06 */
  159. U8 MsgFlags; /* 0x07 */
  160. U8 VP_ID; /* 0x08 */
  161. U8 VF_ID; /* 0x09 */
  162. U16 Reserved4; /* 0x0A */
  163. U16 Reserved5; /* 0x0C */
  164. U16 IOCStatus; /* 0x0E */
  165. U32 IOCLogInfo; /* 0x10 */
  166. } MPI2_IOC_INIT_REPLY, MPI2_POINTER PTR_MPI2_IOC_INIT_REPLY,
  167. Mpi2IOCInitReply_t, MPI2_POINTER pMpi2IOCInitReply_t;
  168. /****************************************************************************
  169. * IOCFacts message
  170. ****************************************************************************/
  171. /* IOCFacts Request message */
  172. typedef struct _MPI2_IOC_FACTS_REQUEST
  173. {
  174. U16 Reserved1; /* 0x00 */
  175. U8 ChainOffset; /* 0x02 */
  176. U8 Function; /* 0x03 */
  177. U16 Reserved2; /* 0x04 */
  178. U8 Reserved3; /* 0x06 */
  179. U8 MsgFlags; /* 0x07 */
  180. U8 VP_ID; /* 0x08 */
  181. U8 VF_ID; /* 0x09 */
  182. U16 Reserved4; /* 0x0A */
  183. } MPI2_IOC_FACTS_REQUEST, MPI2_POINTER PTR_MPI2_IOC_FACTS_REQUEST,
  184. Mpi2IOCFactsRequest_t, MPI2_POINTER pMpi2IOCFactsRequest_t;
  185. /* IOCFacts Reply message */
  186. typedef struct _MPI2_IOC_FACTS_REPLY
  187. {
  188. U16 MsgVersion; /* 0x00 */
  189. U8 MsgLength; /* 0x02 */
  190. U8 Function; /* 0x03 */
  191. U16 HeaderVersion; /* 0x04 */
  192. U8 IOCNumber; /* 0x06 */
  193. U8 MsgFlags; /* 0x07 */
  194. U8 VP_ID; /* 0x08 */
  195. U8 VF_ID; /* 0x09 */
  196. U16 Reserved1; /* 0x0A */
  197. U16 IOCExceptions; /* 0x0C */
  198. U16 IOCStatus; /* 0x0E */
  199. U32 IOCLogInfo; /* 0x10 */
  200. U8 MaxChainDepth; /* 0x14 */
  201. U8 WhoInit; /* 0x15 */
  202. U8 NumberOfPorts; /* 0x16 */
  203. U8 Reserved2; /* 0x17 */
  204. U16 RequestCredit; /* 0x18 */
  205. U16 ProductID; /* 0x1A */
  206. U32 IOCCapabilities; /* 0x1C */
  207. MPI2_VERSION_UNION FWVersion; /* 0x20 */
  208. U16 IOCRequestFrameSize; /* 0x24 */
  209. U16 Reserved3; /* 0x26 */
  210. U16 MaxInitiators; /* 0x28 */
  211. U16 MaxTargets; /* 0x2A */
  212. U16 MaxSasExpanders; /* 0x2C */
  213. U16 MaxEnclosures; /* 0x2E */
  214. U16 ProtocolFlags; /* 0x30 */
  215. U16 HighPriorityCredit; /* 0x32 */
  216. U16 MaxReplyDescriptorPostQueueDepth; /* 0x34 */
  217. U8 ReplyFrameSize; /* 0x36 */
  218. U8 MaxVolumes; /* 0x37 */
  219. U16 MaxDevHandle; /* 0x38 */
  220. U16 MaxPersistentEntries; /* 0x3A */
  221. U32 Reserved4; /* 0x3C */
  222. } MPI2_IOC_FACTS_REPLY, MPI2_POINTER PTR_MPI2_IOC_FACTS_REPLY,
  223. Mpi2IOCFactsReply_t, MPI2_POINTER pMpi2IOCFactsReply_t;
  224. /* MsgVersion */
  225. #define MPI2_IOCFACTS_MSGVERSION_MAJOR_MASK (0xFF00)
  226. #define MPI2_IOCFACTS_MSGVERSION_MAJOR_SHIFT (8)
  227. #define MPI2_IOCFACTS_MSGVERSION_MINOR_MASK (0x00FF)
  228. #define MPI2_IOCFACTS_MSGVERSION_MINOR_SHIFT (0)
  229. /* HeaderVersion */
  230. #define MPI2_IOCFACTS_HDRVERSION_UNIT_MASK (0xFF00)
  231. #define MPI2_IOCFACTS_HDRVERSION_UNIT_SHIFT (8)
  232. #define MPI2_IOCFACTS_HDRVERSION_DEV_MASK (0x00FF)
  233. #define MPI2_IOCFACTS_HDRVERSION_DEV_SHIFT (0)
  234. /* IOCExceptions */
  235. #define MPI2_IOCFACTS_EXCEPT_IR_FOREIGN_CONFIG_MAX (0x0100)
  236. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_MASK (0x00E0)
  237. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_GOOD (0x0000)
  238. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_BACKUP (0x0020)
  239. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_RESTORED (0x0040)
  240. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_CORRUPT_BACKUP (0x0060)
  241. #define MPI2_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED (0x0010)
  242. #define MPI2_IOCFACTS_EXCEPT_MANUFACT_CHECKSUM_FAIL (0x0008)
  243. #define MPI2_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL (0x0004)
  244. #define MPI2_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID (0x0002)
  245. #define MPI2_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0001)
  246. /* defines for WhoInit field are after the IOCInit Request */
  247. /* ProductID field uses MPI2_FW_HEADER_PID_ */
  248. /* IOCCapabilities */
  249. #define MPI2_IOCFACTS_CAPABILITY_MSI_X_INDEX (0x00008000)
  250. #define MPI2_IOCFACTS_CAPABILITY_RAID_ACCELERATOR (0x00004000)
  251. #define MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY (0x00002000)
  252. #define MPI2_IOCFACTS_CAPABILITY_INTEGRATED_RAID (0x00001000)
  253. #define MPI2_IOCFACTS_CAPABILITY_TLR (0x00000800)
  254. #define MPI2_IOCFACTS_CAPABILITY_MULTICAST (0x00000100)
  255. #define MPI2_IOCFACTS_CAPABILITY_BIDIRECTIONAL_TARGET (0x00000080)
  256. #define MPI2_IOCFACTS_CAPABILITY_EEDP (0x00000040)
  257. #define MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER (0x00000020)
  258. #define MPI2_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER (0x00000010)
  259. #define MPI2_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER (0x00000008)
  260. #define MPI2_IOCFACTS_CAPABILITY_TASK_SET_FULL_HANDLING (0x00000004)
  261. /* ProtocolFlags */
  262. #define MPI2_IOCFACTS_PROTOCOL_SCSI_TARGET (0x0001)
  263. #define MPI2_IOCFACTS_PROTOCOL_SCSI_INITIATOR (0x0002)
  264. /****************************************************************************
  265. * PortFacts message
  266. ****************************************************************************/
  267. /* PortFacts Request message */
  268. typedef struct _MPI2_PORT_FACTS_REQUEST
  269. {
  270. U16 Reserved1; /* 0x00 */
  271. U8 ChainOffset; /* 0x02 */
  272. U8 Function; /* 0x03 */
  273. U16 Reserved2; /* 0x04 */
  274. U8 PortNumber; /* 0x06 */
  275. U8 MsgFlags; /* 0x07 */
  276. U8 VP_ID; /* 0x08 */
  277. U8 VF_ID; /* 0x09 */
  278. U16 Reserved3; /* 0x0A */
  279. } MPI2_PORT_FACTS_REQUEST, MPI2_POINTER PTR_MPI2_PORT_FACTS_REQUEST,
  280. Mpi2PortFactsRequest_t, MPI2_POINTER pMpi2PortFactsRequest_t;
  281. /* PortFacts Reply message */
  282. typedef struct _MPI2_PORT_FACTS_REPLY
  283. {
  284. U16 Reserved1; /* 0x00 */
  285. U8 MsgLength; /* 0x02 */
  286. U8 Function; /* 0x03 */
  287. U16 Reserved2; /* 0x04 */
  288. U8 PortNumber; /* 0x06 */
  289. U8 MsgFlags; /* 0x07 */
  290. U8 VP_ID; /* 0x08 */
  291. U8 VF_ID; /* 0x09 */
  292. U16 Reserved3; /* 0x0A */
  293. U16 Reserved4; /* 0x0C */
  294. U16 IOCStatus; /* 0x0E */
  295. U32 IOCLogInfo; /* 0x10 */
  296. U8 Reserved5; /* 0x14 */
  297. U8 PortType; /* 0x15 */
  298. U16 Reserved6; /* 0x16 */
  299. U16 MaxPostedCmdBuffers; /* 0x18 */
  300. U16 Reserved7; /* 0x1A */
  301. } MPI2_PORT_FACTS_REPLY, MPI2_POINTER PTR_MPI2_PORT_FACTS_REPLY,
  302. Mpi2PortFactsReply_t, MPI2_POINTER pMpi2PortFactsReply_t;
  303. /* PortType values */
  304. #define MPI2_PORTFACTS_PORTTYPE_INACTIVE (0x00)
  305. #define MPI2_PORTFACTS_PORTTYPE_FC (0x10)
  306. #define MPI2_PORTFACTS_PORTTYPE_ISCSI (0x20)
  307. #define MPI2_PORTFACTS_PORTTYPE_SAS_PHYSICAL (0x30)
  308. #define MPI2_PORTFACTS_PORTTYPE_SAS_VIRTUAL (0x31)
  309. /****************************************************************************
  310. * PortEnable message
  311. ****************************************************************************/
  312. /* PortEnable Request message */
  313. typedef struct _MPI2_PORT_ENABLE_REQUEST
  314. {
  315. U16 Reserved1; /* 0x00 */
  316. U8 ChainOffset; /* 0x02 */
  317. U8 Function; /* 0x03 */
  318. U8 Reserved2; /* 0x04 */
  319. U8 PortFlags; /* 0x05 */
  320. U8 Reserved3; /* 0x06 */
  321. U8 MsgFlags; /* 0x07 */
  322. U8 VP_ID; /* 0x08 */
  323. U8 VF_ID; /* 0x09 */
  324. U16 Reserved4; /* 0x0A */
  325. } MPI2_PORT_ENABLE_REQUEST, MPI2_POINTER PTR_MPI2_PORT_ENABLE_REQUEST,
  326. Mpi2PortEnableRequest_t, MPI2_POINTER pMpi2PortEnableRequest_t;
  327. /* PortEnable Reply message */
  328. typedef struct _MPI2_PORT_ENABLE_REPLY
  329. {
  330. U16 Reserved1; /* 0x00 */
  331. U8 MsgLength; /* 0x02 */
  332. U8 Function; /* 0x03 */
  333. U8 Reserved2; /* 0x04 */
  334. U8 PortFlags; /* 0x05 */
  335. U8 Reserved3; /* 0x06 */
  336. U8 MsgFlags; /* 0x07 */
  337. U8 VP_ID; /* 0x08 */
  338. U8 VF_ID; /* 0x09 */
  339. U16 Reserved4; /* 0x0A */
  340. U16 Reserved5; /* 0x0C */
  341. U16 IOCStatus; /* 0x0E */
  342. U32 IOCLogInfo; /* 0x10 */
  343. } MPI2_PORT_ENABLE_REPLY, MPI2_POINTER PTR_MPI2_PORT_ENABLE_REPLY,
  344. Mpi2PortEnableReply_t, MPI2_POINTER pMpi2PortEnableReply_t;
  345. /****************************************************************************
  346. * EventNotification message
  347. ****************************************************************************/
  348. /* EventNotification Request message */
  349. #define MPI2_EVENT_NOTIFY_EVENTMASK_WORDS (4)
  350. typedef struct _MPI2_EVENT_NOTIFICATION_REQUEST
  351. {
  352. U16 Reserved1; /* 0x00 */
  353. U8 ChainOffset; /* 0x02 */
  354. U8 Function; /* 0x03 */
  355. U16 Reserved2; /* 0x04 */
  356. U8 Reserved3; /* 0x06 */
  357. U8 MsgFlags; /* 0x07 */
  358. U8 VP_ID; /* 0x08 */
  359. U8 VF_ID; /* 0x09 */
  360. U16 Reserved4; /* 0x0A */
  361. U32 Reserved5; /* 0x0C */
  362. U32 Reserved6; /* 0x10 */
  363. U32 EventMasks[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS];/* 0x14 */
  364. U16 SASBroadcastPrimitiveMasks; /* 0x24 */
  365. U16 Reserved7; /* 0x26 */
  366. U32 Reserved8; /* 0x28 */
  367. } MPI2_EVENT_NOTIFICATION_REQUEST,
  368. MPI2_POINTER PTR_MPI2_EVENT_NOTIFICATION_REQUEST,
  369. Mpi2EventNotificationRequest_t, MPI2_POINTER pMpi2EventNotificationRequest_t;
  370. /* EventNotification Reply message */
  371. typedef struct _MPI2_EVENT_NOTIFICATION_REPLY
  372. {
  373. U16 EventDataLength; /* 0x00 */
  374. U8 MsgLength; /* 0x02 */
  375. U8 Function; /* 0x03 */
  376. U16 Reserved1; /* 0x04 */
  377. U8 AckRequired; /* 0x06 */
  378. U8 MsgFlags; /* 0x07 */
  379. U8 VP_ID; /* 0x08 */
  380. U8 VF_ID; /* 0x09 */
  381. U16 Reserved2; /* 0x0A */
  382. U16 Reserved3; /* 0x0C */
  383. U16 IOCStatus; /* 0x0E */
  384. U32 IOCLogInfo; /* 0x10 */
  385. U16 Event; /* 0x14 */
  386. U16 Reserved4; /* 0x16 */
  387. U32 EventContext; /* 0x18 */
  388. U32 EventData[1]; /* 0x1C */
  389. } MPI2_EVENT_NOTIFICATION_REPLY, MPI2_POINTER PTR_MPI2_EVENT_NOTIFICATION_REPLY,
  390. Mpi2EventNotificationReply_t, MPI2_POINTER pMpi2EventNotificationReply_t;
  391. /* AckRequired */
  392. #define MPI2_EVENT_NOTIFICATION_ACK_NOT_REQUIRED (0x00)
  393. #define MPI2_EVENT_NOTIFICATION_ACK_REQUIRED (0x01)
  394. /* Event */
  395. #define MPI2_EVENT_LOG_DATA (0x0001)
  396. #define MPI2_EVENT_STATE_CHANGE (0x0002)
  397. #define MPI2_EVENT_HARD_RESET_RECEIVED (0x0005)
  398. #define MPI2_EVENT_EVENT_CHANGE (0x000A)
  399. #define MPI2_EVENT_TASK_SET_FULL (0x000E)
  400. #define MPI2_EVENT_SAS_DEVICE_STATUS_CHANGE (0x000F)
  401. #define MPI2_EVENT_IR_OPERATION_STATUS (0x0014)
  402. #define MPI2_EVENT_SAS_DISCOVERY (0x0016)
  403. #define MPI2_EVENT_SAS_BROADCAST_PRIMITIVE (0x0017)
  404. #define MPI2_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE (0x0018)
  405. #define MPI2_EVENT_SAS_INIT_TABLE_OVERFLOW (0x0019)
  406. #define MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST (0x001C)
  407. #define MPI2_EVENT_SAS_ENCL_DEVICE_STATUS_CHANGE (0x001D)
  408. #define MPI2_EVENT_IR_VOLUME (0x001E)
  409. #define MPI2_EVENT_IR_PHYSICAL_DISK (0x001F)
  410. #define MPI2_EVENT_IR_CONFIGURATION_CHANGE_LIST (0x0020)
  411. #define MPI2_EVENT_LOG_ENTRY_ADDED (0x0021)
  412. #define MPI2_EVENT_SAS_PHY_COUNTER (0x0022)
  413. #define MPI2_EVENT_GPIO_INTERRUPT (0x0023)
  414. /* Log Entry Added Event data */
  415. /* the following structure matches MPI2_LOG_0_ENTRY in mpi2_cnfg.h */
  416. #define MPI2_EVENT_DATA_LOG_DATA_LENGTH (0x1C)
  417. typedef struct _MPI2_EVENT_DATA_LOG_ENTRY_ADDED
  418. {
  419. U64 TimeStamp; /* 0x00 */
  420. U32 Reserved1; /* 0x08 */
  421. U16 LogSequence; /* 0x0C */
  422. U16 LogEntryQualifier; /* 0x0E */
  423. U8 VP_ID; /* 0x10 */
  424. U8 VF_ID; /* 0x11 */
  425. U16 Reserved2; /* 0x12 */
  426. U8 LogData[MPI2_EVENT_DATA_LOG_DATA_LENGTH];/* 0x14 */
  427. } MPI2_EVENT_DATA_LOG_ENTRY_ADDED,
  428. MPI2_POINTER PTR_MPI2_EVENT_DATA_LOG_ENTRY_ADDED,
  429. Mpi2EventDataLogEntryAdded_t, MPI2_POINTER pMpi2EventDataLogEntryAdded_t;
  430. /* GPIO Interrupt Event data */
  431. typedef struct _MPI2_EVENT_DATA_GPIO_INTERRUPT {
  432. U8 GPIONum; /* 0x00 */
  433. U8 Reserved1; /* 0x01 */
  434. U16 Reserved2; /* 0x02 */
  435. } MPI2_EVENT_DATA_GPIO_INTERRUPT,
  436. MPI2_POINTER PTR_MPI2_EVENT_DATA_GPIO_INTERRUPT,
  437. Mpi2EventDataGpioInterrupt_t, MPI2_POINTER pMpi2EventDataGpioInterrupt_t;
  438. /* Hard Reset Received Event data */
  439. typedef struct _MPI2_EVENT_DATA_HARD_RESET_RECEIVED
  440. {
  441. U8 Reserved1; /* 0x00 */
  442. U8 Port; /* 0x01 */
  443. U16 Reserved2; /* 0x02 */
  444. } MPI2_EVENT_DATA_HARD_RESET_RECEIVED,
  445. MPI2_POINTER PTR_MPI2_EVENT_DATA_HARD_RESET_RECEIVED,
  446. Mpi2EventDataHardResetReceived_t,
  447. MPI2_POINTER pMpi2EventDataHardResetReceived_t;
  448. /* Task Set Full Event data */
  449. typedef struct _MPI2_EVENT_DATA_TASK_SET_FULL
  450. {
  451. U16 DevHandle; /* 0x00 */
  452. U16 CurrentDepth; /* 0x02 */
  453. } MPI2_EVENT_DATA_TASK_SET_FULL, MPI2_POINTER PTR_MPI2_EVENT_DATA_TASK_SET_FULL,
  454. Mpi2EventDataTaskSetFull_t, MPI2_POINTER pMpi2EventDataTaskSetFull_t;
  455. /* SAS Device Status Change Event data */
  456. typedef struct _MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE
  457. {
  458. U16 TaskTag; /* 0x00 */
  459. U8 ReasonCode; /* 0x02 */
  460. U8 Reserved1; /* 0x03 */
  461. U8 ASC; /* 0x04 */
  462. U8 ASCQ; /* 0x05 */
  463. U16 DevHandle; /* 0x06 */
  464. U32 Reserved2; /* 0x08 */
  465. U64 SASAddress; /* 0x0C */
  466. U8 LUN[8]; /* 0x14 */
  467. } MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
  468. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
  469. Mpi2EventDataSasDeviceStatusChange_t,
  470. MPI2_POINTER pMpi2EventDataSasDeviceStatusChange_t;
  471. /* SAS Device Status Change Event data ReasonCode values */
  472. #define MPI2_EVENT_SAS_DEV_STAT_RC_SMART_DATA (0x05)
  473. #define MPI2_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED (0x07)
  474. #define MPI2_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET (0x08)
  475. #define MPI2_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL (0x09)
  476. #define MPI2_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL (0x0A)
  477. #define MPI2_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL (0x0B)
  478. #define MPI2_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL (0x0C)
  479. #define MPI2_EVENT_SAS_DEV_STAT_RC_ASYNC_NOTIFICATION (0x0D)
  480. #define MPI2_EVENT_SAS_DEV_STAT_RC_CMP_INTERNAL_DEV_RESET (0x0E)
  481. #define MPI2_EVENT_SAS_DEV_STAT_RC_CMP_TASK_ABORT_INTERNAL (0x0F)
  482. #define MPI2_EVENT_SAS_DEV_STAT_RC_SATA_INIT_FAILURE (0x10)
  483. #define MPI2_EVENT_SAS_DEV_STAT_RC_EXPANDER_REDUCED_FUNCTIONALITY (0x11)
  484. #define MPI2_EVENT_SAS_DEV_STAT_RC_CMP_EXPANDER_REDUCED_FUNCTIONALITY (0x12)
  485. /* Integrated RAID Operation Status Event data */
  486. typedef struct _MPI2_EVENT_DATA_IR_OPERATION_STATUS
  487. {
  488. U16 VolDevHandle; /* 0x00 */
  489. U16 Reserved1; /* 0x02 */
  490. U8 RAIDOperation; /* 0x04 */
  491. U8 PercentComplete; /* 0x05 */
  492. U16 Reserved2; /* 0x06 */
  493. U32 Resereved3; /* 0x08 */
  494. } MPI2_EVENT_DATA_IR_OPERATION_STATUS,
  495. MPI2_POINTER PTR_MPI2_EVENT_DATA_IR_OPERATION_STATUS,
  496. Mpi2EventDataIrOperationStatus_t,
  497. MPI2_POINTER pMpi2EventDataIrOperationStatus_t;
  498. /* Integrated RAID Operation Status Event data RAIDOperation values */
  499. #define MPI2_EVENT_IR_RAIDOP_RESYNC (0x00)
  500. #define MPI2_EVENT_IR_RAIDOP_ONLINE_CAP_EXPANSION (0x01)
  501. #define MPI2_EVENT_IR_RAIDOP_CONSISTENCY_CHECK (0x02)
  502. #define MPI2_EVENT_IR_RAIDOP_BACKGROUND_INIT (0x03)
  503. #define MPI2_EVENT_IR_RAIDOP_MAKE_DATA_CONSISTENT (0x04)
  504. /* Integrated RAID Volume Event data */
  505. typedef struct _MPI2_EVENT_DATA_IR_VOLUME
  506. {
  507. U16 VolDevHandle; /* 0x00 */
  508. U8 ReasonCode; /* 0x02 */
  509. U8 Reserved1; /* 0x03 */
  510. U32 NewValue; /* 0x04 */
  511. U32 PreviousValue; /* 0x08 */
  512. } MPI2_EVENT_DATA_IR_VOLUME, MPI2_POINTER PTR_MPI2_EVENT_DATA_IR_VOLUME,
  513. Mpi2EventDataIrVolume_t, MPI2_POINTER pMpi2EventDataIrVolume_t;
  514. /* Integrated RAID Volume Event data ReasonCode values */
  515. #define MPI2_EVENT_IR_VOLUME_RC_SETTINGS_CHANGED (0x01)
  516. #define MPI2_EVENT_IR_VOLUME_RC_STATUS_FLAGS_CHANGED (0x02)
  517. #define MPI2_EVENT_IR_VOLUME_RC_STATE_CHANGED (0x03)
  518. /* Integrated RAID Physical Disk Event data */
  519. typedef struct _MPI2_EVENT_DATA_IR_PHYSICAL_DISK
  520. {
  521. U16 Reserved1; /* 0x00 */
  522. U8 ReasonCode; /* 0x02 */
  523. U8 PhysDiskNum; /* 0x03 */
  524. U16 PhysDiskDevHandle; /* 0x04 */
  525. U16 Reserved2; /* 0x06 */
  526. U16 Slot; /* 0x08 */
  527. U16 EnclosureHandle; /* 0x0A */
  528. U32 NewValue; /* 0x0C */
  529. U32 PreviousValue; /* 0x10 */
  530. } MPI2_EVENT_DATA_IR_PHYSICAL_DISK,
  531. MPI2_POINTER PTR_MPI2_EVENT_DATA_IR_PHYSICAL_DISK,
  532. Mpi2EventDataIrPhysicalDisk_t, MPI2_POINTER pMpi2EventDataIrPhysicalDisk_t;
  533. /* Integrated RAID Physical Disk Event data ReasonCode values */
  534. #define MPI2_EVENT_IR_PHYSDISK_RC_SETTINGS_CHANGED (0x01)
  535. #define MPI2_EVENT_IR_PHYSDISK_RC_STATUS_FLAGS_CHANGED (0x02)
  536. #define MPI2_EVENT_IR_PHYSDISK_RC_STATE_CHANGED (0x03)
  537. /* Integrated RAID Configuration Change List Event data */
  538. /*
  539. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  540. * one and check NumElements at runtime.
  541. */
  542. #ifndef MPI2_EVENT_IR_CONFIG_ELEMENT_COUNT
  543. #define MPI2_EVENT_IR_CONFIG_ELEMENT_COUNT (1)
  544. #endif
  545. typedef struct _MPI2_EVENT_IR_CONFIG_ELEMENT
  546. {
  547. U16 ElementFlags; /* 0x00 */
  548. U16 VolDevHandle; /* 0x02 */
  549. U8 ReasonCode; /* 0x04 */
  550. U8 PhysDiskNum; /* 0x05 */
  551. U16 PhysDiskDevHandle; /* 0x06 */
  552. } MPI2_EVENT_IR_CONFIG_ELEMENT, MPI2_POINTER PTR_MPI2_EVENT_IR_CONFIG_ELEMENT,
  553. Mpi2EventIrConfigElement_t, MPI2_POINTER pMpi2EventIrConfigElement_t;
  554. /* IR Configuration Change List Event data ElementFlags values */
  555. #define MPI2_EVENT_IR_CHANGE_EFLAGS_ELEMENT_TYPE_MASK (0x000F)
  556. #define MPI2_EVENT_IR_CHANGE_EFLAGS_VOLUME_ELEMENT (0x0000)
  557. #define MPI2_EVENT_IR_CHANGE_EFLAGS_VOLPHYSDISK_ELEMENT (0x0001)
  558. #define MPI2_EVENT_IR_CHANGE_EFLAGS_HOTSPARE_ELEMENT (0x0002)
  559. /* IR Configuration Change List Event data ReasonCode values */
  560. #define MPI2_EVENT_IR_CHANGE_RC_ADDED (0x01)
  561. #define MPI2_EVENT_IR_CHANGE_RC_REMOVED (0x02)
  562. #define MPI2_EVENT_IR_CHANGE_RC_NO_CHANGE (0x03)
  563. #define MPI2_EVENT_IR_CHANGE_RC_HIDE (0x04)
  564. #define MPI2_EVENT_IR_CHANGE_RC_UNHIDE (0x05)
  565. #define MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED (0x06)
  566. #define MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED (0x07)
  567. #define MPI2_EVENT_IR_CHANGE_RC_PD_CREATED (0x08)
  568. #define MPI2_EVENT_IR_CHANGE_RC_PD_DELETED (0x09)
  569. typedef struct _MPI2_EVENT_DATA_IR_CONFIG_CHANGE_LIST
  570. {
  571. U8 NumElements; /* 0x00 */
  572. U8 Reserved1; /* 0x01 */
  573. U8 Reserved2; /* 0x02 */
  574. U8 ConfigNum; /* 0x03 */
  575. U32 Flags; /* 0x04 */
  576. MPI2_EVENT_IR_CONFIG_ELEMENT ConfigElement[MPI2_EVENT_IR_CONFIG_ELEMENT_COUNT]; /* 0x08 */
  577. } MPI2_EVENT_DATA_IR_CONFIG_CHANGE_LIST,
  578. MPI2_POINTER PTR_MPI2_EVENT_DATA_IR_CONFIG_CHANGE_LIST,
  579. Mpi2EventDataIrConfigChangeList_t,
  580. MPI2_POINTER pMpi2EventDataIrConfigChangeList_t;
  581. /* IR Configuration Change List Event data Flags values */
  582. #define MPI2_EVENT_IR_CHANGE_FLAGS_FOREIGN_CONFIG (0x00000001)
  583. /* SAS Discovery Event data */
  584. typedef struct _MPI2_EVENT_DATA_SAS_DISCOVERY
  585. {
  586. U8 Flags; /* 0x00 */
  587. U8 ReasonCode; /* 0x01 */
  588. U8 PhysicalPort; /* 0x02 */
  589. U8 Reserved1; /* 0x03 */
  590. U32 DiscoveryStatus; /* 0x04 */
  591. } MPI2_EVENT_DATA_SAS_DISCOVERY,
  592. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_DISCOVERY,
  593. Mpi2EventDataSasDiscovery_t, MPI2_POINTER pMpi2EventDataSasDiscovery_t;
  594. /* SAS Discovery Event data Flags values */
  595. #define MPI2_EVENT_SAS_DISC_DEVICE_CHANGE (0x02)
  596. #define MPI2_EVENT_SAS_DISC_IN_PROGRESS (0x01)
  597. /* SAS Discovery Event data ReasonCode values */
  598. #define MPI2_EVENT_SAS_DISC_RC_STARTED (0x01)
  599. #define MPI2_EVENT_SAS_DISC_RC_COMPLETED (0x02)
  600. /* SAS Discovery Event data DiscoveryStatus values */
  601. #define MPI2_EVENT_SAS_DISC_DS_MAX_ENCLOSURES_EXCEED (0x80000000)
  602. #define MPI2_EVENT_SAS_DISC_DS_MAX_EXPANDERS_EXCEED (0x40000000)
  603. #define MPI2_EVENT_SAS_DISC_DS_MAX_DEVICES_EXCEED (0x20000000)
  604. #define MPI2_EVENT_SAS_DISC_DS_MAX_TOPO_PHYS_EXCEED (0x10000000)
  605. #define MPI2_EVENT_SAS_DISC_DS_DOWNSTREAM_INITIATOR (0x08000000)
  606. #define MPI2_EVENT_SAS_DISC_DS_MULTI_SUBTRACTIVE_SUBTRACTIVE (0x00008000)
  607. #define MPI2_EVENT_SAS_DISC_DS_EXP_MULTI_SUBTRACTIVE (0x00004000)
  608. #define MPI2_EVENT_SAS_DISC_DS_MULTI_PORT_DOMAIN (0x00002000)
  609. #define MPI2_EVENT_SAS_DISC_DS_TABLE_TO_SUBTRACTIVE_LINK (0x00001000)
  610. #define MPI2_EVENT_SAS_DISC_DS_UNSUPPORTED_DEVICE (0x00000800)
  611. #define MPI2_EVENT_SAS_DISC_DS_TABLE_LINK (0x00000400)
  612. #define MPI2_EVENT_SAS_DISC_DS_SUBTRACTIVE_LINK (0x00000200)
  613. #define MPI2_EVENT_SAS_DISC_DS_SMP_CRC_ERROR (0x00000100)
  614. #define MPI2_EVENT_SAS_DISC_DS_SMP_FUNCTION_FAILED (0x00000080)
  615. #define MPI2_EVENT_SAS_DISC_DS_INDEX_NOT_EXIST (0x00000040)
  616. #define MPI2_EVENT_SAS_DISC_DS_OUT_ROUTE_ENTRIES (0x00000020)
  617. #define MPI2_EVENT_SAS_DISC_DS_SMP_TIMEOUT (0x00000010)
  618. #define MPI2_EVENT_SAS_DISC_DS_MULTIPLE_PORTS (0x00000004)
  619. #define MPI2_EVENT_SAS_DISC_DS_UNADDRESSABLE_DEVICE (0x00000002)
  620. #define MPI2_EVENT_SAS_DISC_DS_LOOP_DETECTED (0x00000001)
  621. /* SAS Broadcast Primitive Event data */
  622. typedef struct _MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE
  623. {
  624. U8 PhyNum; /* 0x00 */
  625. U8 Port; /* 0x01 */
  626. U8 PortWidth; /* 0x02 */
  627. U8 Primitive; /* 0x03 */
  628. } MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
  629. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
  630. Mpi2EventDataSasBroadcastPrimitive_t,
  631. MPI2_POINTER pMpi2EventDataSasBroadcastPrimitive_t;
  632. /* defines for the Primitive field */
  633. #define MPI2_EVENT_PRIMITIVE_CHANGE (0x01)
  634. #define MPI2_EVENT_PRIMITIVE_SES (0x02)
  635. #define MPI2_EVENT_PRIMITIVE_EXPANDER (0x03)
  636. #define MPI2_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT (0x04)
  637. #define MPI2_EVENT_PRIMITIVE_RESERVED3 (0x05)
  638. #define MPI2_EVENT_PRIMITIVE_RESERVED4 (0x06)
  639. #define MPI2_EVENT_PRIMITIVE_CHANGE0_RESERVED (0x07)
  640. #define MPI2_EVENT_PRIMITIVE_CHANGE1_RESERVED (0x08)
  641. /* SAS Initiator Device Status Change Event data */
  642. typedef struct _MPI2_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE
  643. {
  644. U8 ReasonCode; /* 0x00 */
  645. U8 PhysicalPort; /* 0x01 */
  646. U16 DevHandle; /* 0x02 */
  647. U64 SASAddress; /* 0x04 */
  648. } MPI2_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
  649. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
  650. Mpi2EventDataSasInitDevStatusChange_t,
  651. MPI2_POINTER pMpi2EventDataSasInitDevStatusChange_t;
  652. /* SAS Initiator Device Status Change event ReasonCode values */
  653. #define MPI2_EVENT_SAS_INIT_RC_ADDED (0x01)
  654. #define MPI2_EVENT_SAS_INIT_RC_NOT_RESPONDING (0x02)
  655. /* SAS Initiator Device Table Overflow Event data */
  656. typedef struct _MPI2_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW
  657. {
  658. U16 MaxInit; /* 0x00 */
  659. U16 CurrentInit; /* 0x02 */
  660. U64 SASAddress; /* 0x04 */
  661. } MPI2_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
  662. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
  663. Mpi2EventDataSasInitTableOverflow_t,
  664. MPI2_POINTER pMpi2EventDataSasInitTableOverflow_t;
  665. /* SAS Topology Change List Event data */
  666. /*
  667. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  668. * one and check NumEntries at runtime.
  669. */
  670. #ifndef MPI2_EVENT_SAS_TOPO_PHY_COUNT
  671. #define MPI2_EVENT_SAS_TOPO_PHY_COUNT (1)
  672. #endif
  673. typedef struct _MPI2_EVENT_SAS_TOPO_PHY_ENTRY
  674. {
  675. U16 AttachedDevHandle; /* 0x00 */
  676. U8 LinkRate; /* 0x02 */
  677. U8 PhyStatus; /* 0x03 */
  678. } MPI2_EVENT_SAS_TOPO_PHY_ENTRY, MPI2_POINTER PTR_MPI2_EVENT_SAS_TOPO_PHY_ENTRY,
  679. Mpi2EventSasTopoPhyEntry_t, MPI2_POINTER pMpi2EventSasTopoPhyEntry_t;
  680. typedef struct _MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST
  681. {
  682. U16 EnclosureHandle; /* 0x00 */
  683. U16 ExpanderDevHandle; /* 0x02 */
  684. U8 NumPhys; /* 0x04 */
  685. U8 Reserved1; /* 0x05 */
  686. U16 Reserved2; /* 0x06 */
  687. U8 NumEntries; /* 0x08 */
  688. U8 StartPhyNum; /* 0x09 */
  689. U8 ExpStatus; /* 0x0A */
  690. U8 PhysicalPort; /* 0x0B */
  691. MPI2_EVENT_SAS_TOPO_PHY_ENTRY PHY[MPI2_EVENT_SAS_TOPO_PHY_COUNT]; /* 0x0C*/
  692. } MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST,
  693. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST,
  694. Mpi2EventDataSasTopologyChangeList_t,
  695. MPI2_POINTER pMpi2EventDataSasTopologyChangeList_t;
  696. /* values for the ExpStatus field */
  697. #define MPI2_EVENT_SAS_TOPO_ES_ADDED (0x01)
  698. #define MPI2_EVENT_SAS_TOPO_ES_NOT_RESPONDING (0x02)
  699. #define MPI2_EVENT_SAS_TOPO_ES_RESPONDING (0x03)
  700. #define MPI2_EVENT_SAS_TOPO_ES_DELAY_NOT_RESPONDING (0x04)
  701. /* defines for the LinkRate field */
  702. #define MPI2_EVENT_SAS_TOPO_LR_CURRENT_MASK (0xF0)
  703. #define MPI2_EVENT_SAS_TOPO_LR_CURRENT_SHIFT (4)
  704. #define MPI2_EVENT_SAS_TOPO_LR_PREV_MASK (0x0F)
  705. #define MPI2_EVENT_SAS_TOPO_LR_PREV_SHIFT (0)
  706. #define MPI2_EVENT_SAS_TOPO_LR_UNKNOWN_LINK_RATE (0x00)
  707. #define MPI2_EVENT_SAS_TOPO_LR_PHY_DISABLED (0x01)
  708. #define MPI2_EVENT_SAS_TOPO_LR_NEGOTIATION_FAILED (0x02)
  709. #define MPI2_EVENT_SAS_TOPO_LR_SATA_OOB_COMPLETE (0x03)
  710. #define MPI2_EVENT_SAS_TOPO_LR_PORT_SELECTOR (0x04)
  711. #define MPI2_EVENT_SAS_TOPO_LR_SMP_RESET_IN_PROGRESS (0x05)
  712. #define MPI2_EVENT_SAS_TOPO_LR_RATE_1_5 (0x08)
  713. #define MPI2_EVENT_SAS_TOPO_LR_RATE_3_0 (0x09)
  714. #define MPI2_EVENT_SAS_TOPO_LR_RATE_6_0 (0x0A)
  715. /* values for the PhyStatus field */
  716. #define MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT (0x80)
  717. #define MPI2_EVENT_SAS_TOPO_PS_MULTIPLEX_CHANGE (0x10)
  718. /* values for the PhyStatus ReasonCode sub-field */
  719. #define MPI2_EVENT_SAS_TOPO_RC_MASK (0x0F)
  720. #define MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED (0x01)
  721. #define MPI2_EVENT_SAS_TOPO_RC_TARG_NOT_RESPONDING (0x02)
  722. #define MPI2_EVENT_SAS_TOPO_RC_PHY_CHANGED (0x03)
  723. #define MPI2_EVENT_SAS_TOPO_RC_NO_CHANGE (0x04)
  724. #define MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING (0x05)
  725. /* SAS Enclosure Device Status Change Event data */
  726. typedef struct _MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE
  727. {
  728. U16 EnclosureHandle; /* 0x00 */
  729. U8 ReasonCode; /* 0x02 */
  730. U8 PhysicalPort; /* 0x03 */
  731. U64 EnclosureLogicalID; /* 0x04 */
  732. U16 NumSlots; /* 0x0C */
  733. U16 StartSlot; /* 0x0E */
  734. U32 PhyBits; /* 0x10 */
  735. } MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE,
  736. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE,
  737. Mpi2EventDataSasEnclDevStatusChange_t,
  738. MPI2_POINTER pMpi2EventDataSasEnclDevStatusChange_t;
  739. /* SAS Enclosure Device Status Change event ReasonCode values */
  740. #define MPI2_EVENT_SAS_ENCL_RC_ADDED (0x01)
  741. #define MPI2_EVENT_SAS_ENCL_RC_NOT_RESPONDING (0x02)
  742. /* SAS PHY Counter Event data */
  743. typedef struct _MPI2_EVENT_DATA_SAS_PHY_COUNTER {
  744. U64 TimeStamp; /* 0x00 */
  745. U32 Reserved1; /* 0x08 */
  746. U8 PhyEventCode; /* 0x0C */
  747. U8 PhyNum; /* 0x0D */
  748. U16 Reserved2; /* 0x0E */
  749. U32 PhyEventInfo; /* 0x10 */
  750. U8 CounterType; /* 0x14 */
  751. U8 ThresholdWindow; /* 0x15 */
  752. U8 TimeUnits; /* 0x16 */
  753. U8 Reserved3; /* 0x17 */
  754. U32 EventThreshold; /* 0x18 */
  755. U16 ThresholdFlags; /* 0x1C */
  756. U16 Reserved4; /* 0x1E */
  757. } MPI2_EVENT_DATA_SAS_PHY_COUNTER,
  758. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_PHY_COUNTER,
  759. Mpi2EventDataSasPhyCounter_t, MPI2_POINTER pMpi2EventDataSasPhyCounter_t;
  760. /* use MPI2_SASPHY3_EVENT_CODE_ values from mpi2_cnfg.h for the
  761. * PhyEventCode field
  762. * use MPI2_SASPHY3_COUNTER_TYPE_ values from mpi2_cnfg.h for the
  763. * CounterType field
  764. * use MPI2_SASPHY3_TIME_UNITS_ values from mpi2_cnfg.h for the
  765. * TimeUnits field
  766. * use MPI2_SASPHY3_TFLAGS_ values from mpi2_cnfg.h for the
  767. * ThresholdFlags field
  768. * */
  769. /****************************************************************************
  770. * EventAck message
  771. ****************************************************************************/
  772. /* EventAck Request message */
  773. typedef struct _MPI2_EVENT_ACK_REQUEST
  774. {
  775. U16 Reserved1; /* 0x00 */
  776. U8 ChainOffset; /* 0x02 */
  777. U8 Function; /* 0x03 */
  778. U16 Reserved2; /* 0x04 */
  779. U8 Reserved3; /* 0x06 */
  780. U8 MsgFlags; /* 0x07 */
  781. U8 VP_ID; /* 0x08 */
  782. U8 VF_ID; /* 0x09 */
  783. U16 Reserved4; /* 0x0A */
  784. U16 Event; /* 0x0C */
  785. U16 Reserved5; /* 0x0E */
  786. U32 EventContext; /* 0x10 */
  787. } MPI2_EVENT_ACK_REQUEST, MPI2_POINTER PTR_MPI2_EVENT_ACK_REQUEST,
  788. Mpi2EventAckRequest_t, MPI2_POINTER pMpi2EventAckRequest_t;
  789. /* EventAck Reply message */
  790. typedef struct _MPI2_EVENT_ACK_REPLY
  791. {
  792. U16 Reserved1; /* 0x00 */
  793. U8 MsgLength; /* 0x02 */
  794. U8 Function; /* 0x03 */
  795. U16 Reserved2; /* 0x04 */
  796. U8 Reserved3; /* 0x06 */
  797. U8 MsgFlags; /* 0x07 */
  798. U8 VP_ID; /* 0x08 */
  799. U8 VF_ID; /* 0x09 */
  800. U16 Reserved4; /* 0x0A */
  801. U16 Reserved5; /* 0x0C */
  802. U16 IOCStatus; /* 0x0E */
  803. U32 IOCLogInfo; /* 0x10 */
  804. } MPI2_EVENT_ACK_REPLY, MPI2_POINTER PTR_MPI2_EVENT_ACK_REPLY,
  805. Mpi2EventAckReply_t, MPI2_POINTER pMpi2EventAckReply_t;
  806. /****************************************************************************
  807. * FWDownload message
  808. ****************************************************************************/
  809. /* FWDownload Request message */
  810. typedef struct _MPI2_FW_DOWNLOAD_REQUEST
  811. {
  812. U8 ImageType; /* 0x00 */
  813. U8 Reserved1; /* 0x01 */
  814. U8 ChainOffset; /* 0x02 */
  815. U8 Function; /* 0x03 */
  816. U16 Reserved2; /* 0x04 */
  817. U8 Reserved3; /* 0x06 */
  818. U8 MsgFlags; /* 0x07 */
  819. U8 VP_ID; /* 0x08 */
  820. U8 VF_ID; /* 0x09 */
  821. U16 Reserved4; /* 0x0A */
  822. U32 TotalImageSize; /* 0x0C */
  823. U32 Reserved5; /* 0x10 */
  824. MPI2_MPI_SGE_UNION SGL; /* 0x14 */
  825. } MPI2_FW_DOWNLOAD_REQUEST, MPI2_POINTER PTR_MPI2_FW_DOWNLOAD_REQUEST,
  826. Mpi2FWDownloadRequest, MPI2_POINTER pMpi2FWDownloadRequest;
  827. #define MPI2_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT (0x01)
  828. #define MPI2_FW_DOWNLOAD_ITYPE_FW (0x01)
  829. #define MPI2_FW_DOWNLOAD_ITYPE_BIOS (0x02)
  830. #define MPI2_FW_DOWNLOAD_ITYPE_MANUFACTURING (0x06)
  831. #define MPI2_FW_DOWNLOAD_ITYPE_CONFIG_1 (0x07)
  832. #define MPI2_FW_DOWNLOAD_ITYPE_CONFIG_2 (0x08)
  833. #define MPI2_FW_DOWNLOAD_ITYPE_MEGARAID (0x09)
  834. #define MPI2_FW_DOWNLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B)
  835. /* FWDownload TransactionContext Element */
  836. typedef struct _MPI2_FW_DOWNLOAD_TCSGE
  837. {
  838. U8 Reserved1; /* 0x00 */
  839. U8 ContextSize; /* 0x01 */
  840. U8 DetailsLength; /* 0x02 */
  841. U8 Flags; /* 0x03 */
  842. U32 Reserved2; /* 0x04 */
  843. U32 ImageOffset; /* 0x08 */
  844. U32 ImageSize; /* 0x0C */
  845. } MPI2_FW_DOWNLOAD_TCSGE, MPI2_POINTER PTR_MPI2_FW_DOWNLOAD_TCSGE,
  846. Mpi2FWDownloadTCSGE_t, MPI2_POINTER pMpi2FWDownloadTCSGE_t;
  847. /* FWDownload Reply message */
  848. typedef struct _MPI2_FW_DOWNLOAD_REPLY
  849. {
  850. U8 ImageType; /* 0x00 */
  851. U8 Reserved1; /* 0x01 */
  852. U8 MsgLength; /* 0x02 */
  853. U8 Function; /* 0x03 */
  854. U16 Reserved2; /* 0x04 */
  855. U8 Reserved3; /* 0x06 */
  856. U8 MsgFlags; /* 0x07 */
  857. U8 VP_ID; /* 0x08 */
  858. U8 VF_ID; /* 0x09 */
  859. U16 Reserved4; /* 0x0A */
  860. U16 Reserved5; /* 0x0C */
  861. U16 IOCStatus; /* 0x0E */
  862. U32 IOCLogInfo; /* 0x10 */
  863. } MPI2_FW_DOWNLOAD_REPLY, MPI2_POINTER PTR_MPI2_FW_DOWNLOAD_REPLY,
  864. Mpi2FWDownloadReply_t, MPI2_POINTER pMpi2FWDownloadReply_t;
  865. /****************************************************************************
  866. * FWUpload message
  867. ****************************************************************************/
  868. /* FWUpload Request message */
  869. typedef struct _MPI2_FW_UPLOAD_REQUEST
  870. {
  871. U8 ImageType; /* 0x00 */
  872. U8 Reserved1; /* 0x01 */
  873. U8 ChainOffset; /* 0x02 */
  874. U8 Function; /* 0x03 */
  875. U16 Reserved2; /* 0x04 */
  876. U8 Reserved3; /* 0x06 */
  877. U8 MsgFlags; /* 0x07 */
  878. U8 VP_ID; /* 0x08 */
  879. U8 VF_ID; /* 0x09 */
  880. U16 Reserved4; /* 0x0A */
  881. U32 Reserved5; /* 0x0C */
  882. U32 Reserved6; /* 0x10 */
  883. MPI2_MPI_SGE_UNION SGL; /* 0x14 */
  884. } MPI2_FW_UPLOAD_REQUEST, MPI2_POINTER PTR_MPI2_FW_UPLOAD_REQUEST,
  885. Mpi2FWUploadRequest_t, MPI2_POINTER pMpi2FWUploadRequest_t;
  886. #define MPI2_FW_UPLOAD_ITYPE_FW_CURRENT (0x00)
  887. #define MPI2_FW_UPLOAD_ITYPE_FW_FLASH (0x01)
  888. #define MPI2_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02)
  889. #define MPI2_FW_UPLOAD_ITYPE_FW_BACKUP (0x05)
  890. #define MPI2_FW_UPLOAD_ITYPE_MANUFACTURING (0x06)
  891. #define MPI2_FW_UPLOAD_ITYPE_CONFIG_1 (0x07)
  892. #define MPI2_FW_UPLOAD_ITYPE_CONFIG_2 (0x08)
  893. #define MPI2_FW_UPLOAD_ITYPE_MEGARAID (0x09)
  894. #define MPI2_FW_UPLOAD_ITYPE_COMPLETE (0x0A)
  895. #define MPI2_FW_UPLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B)
  896. typedef struct _MPI2_FW_UPLOAD_TCSGE
  897. {
  898. U8 Reserved1; /* 0x00 */
  899. U8 ContextSize; /* 0x01 */
  900. U8 DetailsLength; /* 0x02 */
  901. U8 Flags; /* 0x03 */
  902. U32 Reserved2; /* 0x04 */
  903. U32 ImageOffset; /* 0x08 */
  904. U32 ImageSize; /* 0x0C */
  905. } MPI2_FW_UPLOAD_TCSGE, MPI2_POINTER PTR_MPI2_FW_UPLOAD_TCSGE,
  906. Mpi2FWUploadTCSGE_t, MPI2_POINTER pMpi2FWUploadTCSGE_t;
  907. /* FWUpload Reply message */
  908. typedef struct _MPI2_FW_UPLOAD_REPLY
  909. {
  910. U8 ImageType; /* 0x00 */
  911. U8 Reserved1; /* 0x01 */
  912. U8 MsgLength; /* 0x02 */
  913. U8 Function; /* 0x03 */
  914. U16 Reserved2; /* 0x04 */
  915. U8 Reserved3; /* 0x06 */
  916. U8 MsgFlags; /* 0x07 */
  917. U8 VP_ID; /* 0x08 */
  918. U8 VF_ID; /* 0x09 */
  919. U16 Reserved4; /* 0x0A */
  920. U16 Reserved5; /* 0x0C */
  921. U16 IOCStatus; /* 0x0E */
  922. U32 IOCLogInfo; /* 0x10 */
  923. U32 ActualImageSize; /* 0x14 */
  924. } MPI2_FW_UPLOAD_REPLY, MPI2_POINTER PTR_MPI2_FW_UPLOAD_REPLY,
  925. Mpi2FWUploadReply_t, MPI2_POINTER pMPi2FWUploadReply_t;
  926. /* FW Image Header */
  927. typedef struct _MPI2_FW_IMAGE_HEADER
  928. {
  929. U32 Signature; /* 0x00 */
  930. U32 Signature0; /* 0x04 */
  931. U32 Signature1; /* 0x08 */
  932. U32 Signature2; /* 0x0C */
  933. MPI2_VERSION_UNION MPIVersion; /* 0x10 */
  934. MPI2_VERSION_UNION FWVersion; /* 0x14 */
  935. MPI2_VERSION_UNION NVDATAVersion; /* 0x18 */
  936. MPI2_VERSION_UNION PackageVersion; /* 0x1C */
  937. U16 VendorID; /* 0x20 */
  938. U16 ProductID; /* 0x22 */
  939. U16 ProtocolFlags; /* 0x24 */
  940. U16 Reserved26; /* 0x26 */
  941. U32 IOCCapabilities; /* 0x28 */
  942. U32 ImageSize; /* 0x2C */
  943. U32 NextImageHeaderOffset; /* 0x30 */
  944. U32 Checksum; /* 0x34 */
  945. U32 Reserved38; /* 0x38 */
  946. U32 Reserved3C; /* 0x3C */
  947. U32 Reserved40; /* 0x40 */
  948. U32 Reserved44; /* 0x44 */
  949. U32 Reserved48; /* 0x48 */
  950. U32 Reserved4C; /* 0x4C */
  951. U32 Reserved50; /* 0x50 */
  952. U32 Reserved54; /* 0x54 */
  953. U32 Reserved58; /* 0x58 */
  954. U32 Reserved5C; /* 0x5C */
  955. U32 Reserved60; /* 0x60 */
  956. U32 FirmwareVersionNameWhat; /* 0x64 */
  957. U8 FirmwareVersionName[32]; /* 0x68 */
  958. U32 VendorNameWhat; /* 0x88 */
  959. U8 VendorName[32]; /* 0x8C */
  960. U32 PackageNameWhat; /* 0x88 */
  961. U8 PackageName[32]; /* 0x8C */
  962. U32 ReservedD0; /* 0xD0 */
  963. U32 ReservedD4; /* 0xD4 */
  964. U32 ReservedD8; /* 0xD8 */
  965. U32 ReservedDC; /* 0xDC */
  966. U32 ReservedE0; /* 0xE0 */
  967. U32 ReservedE4; /* 0xE4 */
  968. U32 ReservedE8; /* 0xE8 */
  969. U32 ReservedEC; /* 0xEC */
  970. U32 ReservedF0; /* 0xF0 */
  971. U32 ReservedF4; /* 0xF4 */
  972. U32 ReservedF8; /* 0xF8 */
  973. U32 ReservedFC; /* 0xFC */
  974. } MPI2_FW_IMAGE_HEADER, MPI2_POINTER PTR_MPI2_FW_IMAGE_HEADER,
  975. Mpi2FWImageHeader_t, MPI2_POINTER pMpi2FWImageHeader_t;
  976. /* Signature field */
  977. #define MPI2_FW_HEADER_SIGNATURE_OFFSET (0x00)
  978. #define MPI2_FW_HEADER_SIGNATURE_MASK (0xFF000000)
  979. #define MPI2_FW_HEADER_SIGNATURE (0xEA000000)
  980. /* Signature0 field */
  981. #define MPI2_FW_HEADER_SIGNATURE0_OFFSET (0x04)
  982. #define MPI2_FW_HEADER_SIGNATURE0 (0x5AFAA55A)
  983. /* Signature1 field */
  984. #define MPI2_FW_HEADER_SIGNATURE1_OFFSET (0x08)
  985. #define MPI2_FW_HEADER_SIGNATURE1 (0xA55AFAA5)
  986. /* Signature2 field */
  987. #define MPI2_FW_HEADER_SIGNATURE2_OFFSET (0x0C)
  988. #define MPI2_FW_HEADER_SIGNATURE2 (0x5AA55AFA)
  989. /* defines for using the ProductID field */
  990. #define MPI2_FW_HEADER_PID_TYPE_MASK (0xF000)
  991. #define MPI2_FW_HEADER_PID_TYPE_SAS (0x2000)
  992. #define MPI2_FW_HEADER_PID_PROD_MASK (0x0F00)
  993. #define MPI2_FW_HEADER_PID_PROD_A (0x0000)
  994. #define MPI2_FW_HEADER_PID_FAMILY_MASK (0x00FF)
  995. /* SAS */
  996. #define MPI2_FW_HEADER_PID_FAMILY_2108_SAS (0x0010)
  997. #define MPI2_FW_HEADER_PID_FAMILY_2208_SAS (0x0011)
  998. /* use MPI2_IOCFACTS_PROTOCOL_ defines for ProtocolFlags field */
  999. /* use MPI2_IOCFACTS_CAPABILITY_ defines for IOCCapabilities field */
  1000. #define MPI2_FW_HEADER_IMAGESIZE_OFFSET (0x2C)
  1001. #define MPI2_FW_HEADER_NEXTIMAGE_OFFSET (0x30)
  1002. #define MPI2_FW_HEADER_VERNMHWAT_OFFSET (0x64)
  1003. #define MPI2_FW_HEADER_WHAT_SIGNATURE (0x29232840)
  1004. #define MPI2_FW_HEADER_SIZE (0x100)
  1005. /* Extended Image Header */
  1006. typedef struct _MPI2_EXT_IMAGE_HEADER
  1007. {
  1008. U8 ImageType; /* 0x00 */
  1009. U8 Reserved1; /* 0x01 */
  1010. U16 Reserved2; /* 0x02 */
  1011. U32 Checksum; /* 0x04 */
  1012. U32 ImageSize; /* 0x08 */
  1013. U32 NextImageHeaderOffset; /* 0x0C */
  1014. U32 PackageVersion; /* 0x10 */
  1015. U32 Reserved3; /* 0x14 */
  1016. U32 Reserved4; /* 0x18 */
  1017. U32 Reserved5; /* 0x1C */
  1018. U8 IdentifyString[32]; /* 0x20 */
  1019. } MPI2_EXT_IMAGE_HEADER, MPI2_POINTER PTR_MPI2_EXT_IMAGE_HEADER,
  1020. Mpi2ExtImageHeader_t, MPI2_POINTER pMpi2ExtImageHeader_t;
  1021. /* useful offsets */
  1022. #define MPI2_EXT_IMAGE_IMAGETYPE_OFFSET (0x00)
  1023. #define MPI2_EXT_IMAGE_IMAGESIZE_OFFSET (0x08)
  1024. #define MPI2_EXT_IMAGE_NEXTIMAGE_OFFSET (0x0C)
  1025. #define MPI2_EXT_IMAGE_HEADER_SIZE (0x40)
  1026. /* defines for the ImageType field */
  1027. #define MPI2_EXT_IMAGE_TYPE_UNSPECIFIED (0x00)
  1028. #define MPI2_EXT_IMAGE_TYPE_FW (0x01)
  1029. #define MPI2_EXT_IMAGE_TYPE_NVDATA (0x03)
  1030. #define MPI2_EXT_IMAGE_TYPE_BOOTLOADER (0x04)
  1031. #define MPI2_EXT_IMAGE_TYPE_INITIALIZATION (0x05)
  1032. #define MPI2_EXT_IMAGE_TYPE_FLASH_LAYOUT (0x06)
  1033. #define MPI2_EXT_IMAGE_TYPE_SUPPORTED_DEVICES (0x07)
  1034. #define MPI2_EXT_IMAGE_TYPE_MEGARAID (0x08)
  1035. #define MPI2_EXT_IMAGE_TYPE_MAX (MPI2_EXT_IMAGE_TYPE_MEGARAID)
  1036. /* FLASH Layout Extended Image Data */
  1037. /*
  1038. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  1039. * one and check RegionsPerLayout at runtime.
  1040. */
  1041. #ifndef MPI2_FLASH_NUMBER_OF_REGIONS
  1042. #define MPI2_FLASH_NUMBER_OF_REGIONS (1)
  1043. #endif
  1044. /*
  1045. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  1046. * one and check NumberOfLayouts at runtime.
  1047. */
  1048. #ifndef MPI2_FLASH_NUMBER_OF_LAYOUTS
  1049. #define MPI2_FLASH_NUMBER_OF_LAYOUTS (1)
  1050. #endif
  1051. typedef struct _MPI2_FLASH_REGION
  1052. {
  1053. U8 RegionType; /* 0x00 */
  1054. U8 Reserved1; /* 0x01 */
  1055. U16 Reserved2; /* 0x02 */
  1056. U32 RegionOffset; /* 0x04 */
  1057. U32 RegionSize; /* 0x08 */
  1058. U32 Reserved3; /* 0x0C */
  1059. } MPI2_FLASH_REGION, MPI2_POINTER PTR_MPI2_FLASH_REGION,
  1060. Mpi2FlashRegion_t, MPI2_POINTER pMpi2FlashRegion_t;
  1061. typedef struct _MPI2_FLASH_LAYOUT
  1062. {
  1063. U32 FlashSize; /* 0x00 */
  1064. U32 Reserved1; /* 0x04 */
  1065. U32 Reserved2; /* 0x08 */
  1066. U32 Reserved3; /* 0x0C */
  1067. MPI2_FLASH_REGION Region[MPI2_FLASH_NUMBER_OF_REGIONS];/* 0x10 */
  1068. } MPI2_FLASH_LAYOUT, MPI2_POINTER PTR_MPI2_FLASH_LAYOUT,
  1069. Mpi2FlashLayout_t, MPI2_POINTER pMpi2FlashLayout_t;
  1070. typedef struct _MPI2_FLASH_LAYOUT_DATA
  1071. {
  1072. U8 ImageRevision; /* 0x00 */
  1073. U8 Reserved1; /* 0x01 */
  1074. U8 SizeOfRegion; /* 0x02 */
  1075. U8 Reserved2; /* 0x03 */
  1076. U16 NumberOfLayouts; /* 0x04 */
  1077. U16 RegionsPerLayout; /* 0x06 */
  1078. U16 MinimumSectorAlignment; /* 0x08 */
  1079. U16 Reserved3; /* 0x0A */
  1080. U32 Reserved4; /* 0x0C */
  1081. MPI2_FLASH_LAYOUT Layout[MPI2_FLASH_NUMBER_OF_LAYOUTS];/* 0x10 */
  1082. } MPI2_FLASH_LAYOUT_DATA, MPI2_POINTER PTR_MPI2_FLASH_LAYOUT_DATA,
  1083. Mpi2FlashLayoutData_t, MPI2_POINTER pMpi2FlashLayoutData_t;
  1084. /* defines for the RegionType field */
  1085. #define MPI2_FLASH_REGION_UNUSED (0x00)
  1086. #define MPI2_FLASH_REGION_FIRMWARE (0x01)
  1087. #define MPI2_FLASH_REGION_BIOS (0x02)
  1088. #define MPI2_FLASH_REGION_NVDATA (0x03)
  1089. #define MPI2_FLASH_REGION_FIRMWARE_BACKUP (0x05)
  1090. #define MPI2_FLASH_REGION_MFG_INFORMATION (0x06)
  1091. #define MPI2_FLASH_REGION_CONFIG_1 (0x07)
  1092. #define MPI2_FLASH_REGION_CONFIG_2 (0x08)
  1093. #define MPI2_FLASH_REGION_MEGARAID (0x09)
  1094. #define MPI2_FLASH_REGION_INIT (0x0A)
  1095. /* ImageRevision */
  1096. #define MPI2_FLASH_LAYOUT_IMAGE_REVISION (0x00)
  1097. /* Supported Devices Extended Image Data */
  1098. /*
  1099. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  1100. * one and check NumberOfDevices at runtime.
  1101. */
  1102. #ifndef MPI2_SUPPORTED_DEVICES_IMAGE_NUM_DEVICES
  1103. #define MPI2_SUPPORTED_DEVICES_IMAGE_NUM_DEVICES (1)
  1104. #endif
  1105. typedef struct _MPI2_SUPPORTED_DEVICE
  1106. {
  1107. U16 DeviceID; /* 0x00 */
  1108. U16 VendorID; /* 0x02 */
  1109. U16 DeviceIDMask; /* 0x04 */
  1110. U16 Reserved1; /* 0x06 */
  1111. U8 LowPCIRev; /* 0x08 */
  1112. U8 HighPCIRev; /* 0x09 */
  1113. U16 Reserved2; /* 0x0A */
  1114. U32 Reserved3; /* 0x0C */
  1115. } MPI2_SUPPORTED_DEVICE, MPI2_POINTER PTR_MPI2_SUPPORTED_DEVICE,
  1116. Mpi2SupportedDevice_t, MPI2_POINTER pMpi2SupportedDevice_t;
  1117. typedef struct _MPI2_SUPPORTED_DEVICES_DATA
  1118. {
  1119. U8 ImageRevision; /* 0x00 */
  1120. U8 Reserved1; /* 0x01 */
  1121. U8 NumberOfDevices; /* 0x02 */
  1122. U8 Reserved2; /* 0x03 */
  1123. U32 Reserved3; /* 0x04 */
  1124. MPI2_SUPPORTED_DEVICE SupportedDevice[MPI2_SUPPORTED_DEVICES_IMAGE_NUM_DEVICES]; /* 0x08 */
  1125. } MPI2_SUPPORTED_DEVICES_DATA, MPI2_POINTER PTR_MPI2_SUPPORTED_DEVICES_DATA,
  1126. Mpi2SupportedDevicesData_t, MPI2_POINTER pMpi2SupportedDevicesData_t;
  1127. /* ImageRevision */
  1128. #define MPI2_SUPPORTED_DEVICES_IMAGE_REVISION (0x00)
  1129. /* Init Extended Image Data */
  1130. typedef struct _MPI2_INIT_IMAGE_FOOTER
  1131. {
  1132. U32 BootFlags; /* 0x00 */
  1133. U32 ImageSize; /* 0x04 */
  1134. U32 Signature0; /* 0x08 */
  1135. U32 Signature1; /* 0x0C */
  1136. U32 Signature2; /* 0x10 */
  1137. U32 ResetVector; /* 0x14 */
  1138. } MPI2_INIT_IMAGE_FOOTER, MPI2_POINTER PTR_MPI2_INIT_IMAGE_FOOTER,
  1139. Mpi2InitImageFooter_t, MPI2_POINTER pMpi2InitImageFooter_t;
  1140. /* defines for the BootFlags field */
  1141. #define MPI2_INIT_IMAGE_BOOTFLAGS_OFFSET (0x00)
  1142. /* defines for the ImageSize field */
  1143. #define MPI2_INIT_IMAGE_IMAGESIZE_OFFSET (0x04)
  1144. /* defines for the Signature0 field */
  1145. #define MPI2_INIT_IMAGE_SIGNATURE0_OFFSET (0x08)
  1146. #define MPI2_INIT_IMAGE_SIGNATURE0 (0x5AA55AEA)
  1147. /* defines for the Signature1 field */
  1148. #define MPI2_INIT_IMAGE_SIGNATURE1_OFFSET (0x0C)
  1149. #define MPI2_INIT_IMAGE_SIGNATURE1 (0xA55AEAA5)
  1150. /* defines for the Signature2 field */
  1151. #define MPI2_INIT_IMAGE_SIGNATURE2_OFFSET (0x10)
  1152. #define MPI2_INIT_IMAGE_SIGNATURE2 (0x5AEAA55A)
  1153. /* Signature fields as individual bytes */
  1154. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_0 (0xEA)
  1155. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_1 (0x5A)
  1156. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_2 (0xA5)
  1157. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_3 (0x5A)
  1158. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_4 (0xA5)
  1159. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_5 (0xEA)
  1160. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_6 (0x5A)
  1161. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_7 (0xA5)
  1162. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_8 (0x5A)
  1163. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_9 (0xA5)
  1164. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_A (0xEA)
  1165. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_B (0x5A)
  1166. /* defines for the ResetVector field */
  1167. #define MPI2_INIT_IMAGE_RESETVECTOR_OFFSET (0x14)
  1168. #endif