mpi2_ioc.h 66 KB

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