mpi2_tool.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. /*
  2. * Copyright (c) 2000-2010 LSI Corporation.
  3. *
  4. *
  5. * Name: mpi2_tool.h
  6. * Title: MPI diagnostic tool structures and definitions
  7. * Creation Date: March 26, 2007
  8. *
  9. * mpi2_tool.h Version: 02.00.04
  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. * 12-18-07 02.00.01 Added Diagnostic Buffer Post and Diagnostic Release
  18. * structures and defines.
  19. * 02-29-08 02.00.02 Modified various names to make them 32-character unique.
  20. * 05-06-09 02.00.03 Added ISTWI Read Write Tool and Diagnostic CLI Tool.
  21. * 07-30-09 02.00.04 Added ExtendedType field to DiagnosticBufferPost request
  22. * and reply messages.
  23. * Added MPI2_DIAG_BUF_TYPE_EXTENDED.
  24. * Incremented MPI2_DIAG_BUF_TYPE_COUNT.
  25. * --------------------------------------------------------------------------
  26. */
  27. #ifndef MPI2_TOOL_H
  28. #define MPI2_TOOL_H
  29. /*****************************************************************************
  30. *
  31. * Toolbox Messages
  32. *
  33. *****************************************************************************/
  34. /* defines for the Tools */
  35. #define MPI2_TOOLBOX_CLEAN_TOOL (0x00)
  36. #define MPI2_TOOLBOX_MEMORY_MOVE_TOOL (0x01)
  37. #define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)
  38. #define MPI2_TOOLBOX_BEACON_TOOL (0x05)
  39. #define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL (0x06)
  40. /****************************************************************************
  41. * Toolbox reply
  42. ****************************************************************************/
  43. typedef struct _MPI2_TOOLBOX_REPLY
  44. {
  45. U8 Tool; /* 0x00 */
  46. U8 Reserved1; /* 0x01 */
  47. U8 MsgLength; /* 0x02 */
  48. U8 Function; /* 0x03 */
  49. U16 Reserved2; /* 0x04 */
  50. U8 Reserved3; /* 0x06 */
  51. U8 MsgFlags; /* 0x07 */
  52. U8 VP_ID; /* 0x08 */
  53. U8 VF_ID; /* 0x09 */
  54. U16 Reserved4; /* 0x0A */
  55. U16 Reserved5; /* 0x0C */
  56. U16 IOCStatus; /* 0x0E */
  57. U32 IOCLogInfo; /* 0x10 */
  58. } MPI2_TOOLBOX_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_REPLY,
  59. Mpi2ToolboxReply_t, MPI2_POINTER pMpi2ToolboxReply_t;
  60. /****************************************************************************
  61. * Toolbox Clean Tool request
  62. ****************************************************************************/
  63. typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST
  64. {
  65. U8 Tool; /* 0x00 */
  66. U8 Reserved1; /* 0x01 */
  67. U8 ChainOffset; /* 0x02 */
  68. U8 Function; /* 0x03 */
  69. U16 Reserved2; /* 0x04 */
  70. U8 Reserved3; /* 0x06 */
  71. U8 MsgFlags; /* 0x07 */
  72. U8 VP_ID; /* 0x08 */
  73. U8 VF_ID; /* 0x09 */
  74. U16 Reserved4; /* 0x0A */
  75. U32 Flags; /* 0x0C */
  76. } MPI2_TOOLBOX_CLEAN_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
  77. Mpi2ToolboxCleanRequest_t, MPI2_POINTER pMpi2ToolboxCleanRequest_t;
  78. /* values for the Flags field */
  79. #define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES (0x80000000)
  80. #define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES (0x40000000)
  81. #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES (0x20000000)
  82. #define MPI2_TOOLBOX_CLEAN_FW_CURRENT (0x10000000)
  83. #define MPI2_TOOLBOX_CLEAN_FW_BACKUP (0x08000000)
  84. #define MPI2_TOOLBOX_CLEAN_MEGARAID (0x02000000)
  85. #define MPI2_TOOLBOX_CLEAN_INITIALIZATION (0x01000000)
  86. #define MPI2_TOOLBOX_CLEAN_FLASH (0x00000004)
  87. #define MPI2_TOOLBOX_CLEAN_SEEPROM (0x00000002)
  88. #define MPI2_TOOLBOX_CLEAN_NVSRAM (0x00000001)
  89. /****************************************************************************
  90. * Toolbox Memory Move request
  91. ****************************************************************************/
  92. typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST
  93. {
  94. U8 Tool; /* 0x00 */
  95. U8 Reserved1; /* 0x01 */
  96. U8 ChainOffset; /* 0x02 */
  97. U8 Function; /* 0x03 */
  98. U16 Reserved2; /* 0x04 */
  99. U8 Reserved3; /* 0x06 */
  100. U8 MsgFlags; /* 0x07 */
  101. U8 VP_ID; /* 0x08 */
  102. U8 VF_ID; /* 0x09 */
  103. U16 Reserved4; /* 0x0A */
  104. MPI2_SGE_SIMPLE_UNION SGL; /* 0x0C */
  105. } MPI2_TOOLBOX_MEM_MOVE_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
  106. Mpi2ToolboxMemMoveRequest_t, MPI2_POINTER pMpi2ToolboxMemMoveRequest_t;
  107. /****************************************************************************
  108. * Toolbox ISTWI Read Write Tool
  109. ****************************************************************************/
  110. /* Toolbox ISTWI Read Write Tool request message */
  111. typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST {
  112. U8 Tool; /* 0x00 */
  113. U8 Reserved1; /* 0x01 */
  114. U8 ChainOffset; /* 0x02 */
  115. U8 Function; /* 0x03 */
  116. U16 Reserved2; /* 0x04 */
  117. U8 Reserved3; /* 0x06 */
  118. U8 MsgFlags; /* 0x07 */
  119. U8 VP_ID; /* 0x08 */
  120. U8 VF_ID; /* 0x09 */
  121. U16 Reserved4; /* 0x0A */
  122. U32 Reserved5; /* 0x0C */
  123. U32 Reserved6; /* 0x10 */
  124. U8 DevIndex; /* 0x14 */
  125. U8 Action; /* 0x15 */
  126. U8 SGLFlags; /* 0x16 */
  127. U8 Reserved7; /* 0x17 */
  128. U16 TxDataLength; /* 0x18 */
  129. U16 RxDataLength; /* 0x1A */
  130. U32 Reserved8; /* 0x1C */
  131. U32 Reserved9; /* 0x20 */
  132. U32 Reserved10; /* 0x24 */
  133. U32 Reserved11; /* 0x28 */
  134. U32 Reserved12; /* 0x2C */
  135. MPI2_SGE_SIMPLE_UNION SGL; /* 0x30 */
  136. } MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
  137. MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
  138. Mpi2ToolboxIstwiReadWriteRequest_t,
  139. MPI2_POINTER pMpi2ToolboxIstwiReadWriteRequest_t;
  140. /* values for the Action field */
  141. #define MPI2_TOOL_ISTWI_ACTION_READ_DATA (0x01)
  142. #define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA (0x02)
  143. #define MPI2_TOOL_ISTWI_ACTION_SEQUENCE (0x03)
  144. #define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS (0x10)
  145. #define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS (0x11)
  146. #define MPI2_TOOL_ISTWI_ACTION_RESET (0x12)
  147. /* values for SGLFlags field are in the SGL section of mpi2.h */
  148. /* Toolbox ISTWI Read Write Tool reply message */
  149. typedef struct _MPI2_TOOLBOX_ISTWI_REPLY {
  150. U8 Tool; /* 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. U8 DevIndex; /* 0x14 */
  164. U8 Action; /* 0x15 */
  165. U8 IstwiStatus; /* 0x16 */
  166. U8 Reserved6; /* 0x17 */
  167. U16 TxDataCount; /* 0x18 */
  168. U16 RxDataCount; /* 0x1A */
  169. } MPI2_TOOLBOX_ISTWI_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_REPLY,
  170. Mpi2ToolboxIstwiReply_t, MPI2_POINTER pMpi2ToolboxIstwiReply_t;
  171. /****************************************************************************
  172. * Toolbox Beacon Tool request
  173. ****************************************************************************/
  174. typedef struct _MPI2_TOOLBOX_BEACON_REQUEST
  175. {
  176. U8 Tool; /* 0x00 */
  177. U8 Reserved1; /* 0x01 */
  178. U8 ChainOffset; /* 0x02 */
  179. U8 Function; /* 0x03 */
  180. U16 Reserved2; /* 0x04 */
  181. U8 Reserved3; /* 0x06 */
  182. U8 MsgFlags; /* 0x07 */
  183. U8 VP_ID; /* 0x08 */
  184. U8 VF_ID; /* 0x09 */
  185. U16 Reserved4; /* 0x0A */
  186. U8 Reserved5; /* 0x0C */
  187. U8 PhysicalPort; /* 0x0D */
  188. U8 Reserved6; /* 0x0E */
  189. U8 Flags; /* 0x0F */
  190. } MPI2_TOOLBOX_BEACON_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_BEACON_REQUEST,
  191. Mpi2ToolboxBeaconRequest_t, MPI2_POINTER pMpi2ToolboxBeaconRequest_t;
  192. /* values for the Flags field */
  193. #define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF (0x00)
  194. #define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON (0x01)
  195. /****************************************************************************
  196. * Toolbox Diagnostic CLI Tool
  197. ****************************************************************************/
  198. #define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH (0x5C)
  199. /* Toolbox Diagnostic CLI Tool request message */
  200. typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
  201. U8 Tool; /* 0x00 */
  202. U8 Reserved1; /* 0x01 */
  203. U8 ChainOffset; /* 0x02 */
  204. U8 Function; /* 0x03 */
  205. U16 Reserved2; /* 0x04 */
  206. U8 Reserved3; /* 0x06 */
  207. U8 MsgFlags; /* 0x07 */
  208. U8 VP_ID; /* 0x08 */
  209. U8 VF_ID; /* 0x09 */
  210. U16 Reserved4; /* 0x0A */
  211. U8 SGLFlags; /* 0x0C */
  212. U8 Reserved5; /* 0x0D */
  213. U16 Reserved6; /* 0x0E */
  214. U32 DataLength; /* 0x10 */
  215. U8 DiagnosticCliCommand
  216. [MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH]; /* 0x14 */
  217. MPI2_SGE_SIMPLE_UNION SGL; /* 0x70 */
  218. } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
  219. MPI2_POINTER PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
  220. Mpi2ToolboxDiagnosticCliRequest_t,
  221. MPI2_POINTER pMpi2ToolboxDiagnosticCliRequest_t;
  222. /* values for SGLFlags field are in the SGL section of mpi2.h */
  223. /* Toolbox Diagnostic CLI Tool reply message */
  224. typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY {
  225. U8 Tool; /* 0x00 */
  226. U8 Reserved1; /* 0x01 */
  227. U8 MsgLength; /* 0x02 */
  228. U8 Function; /* 0x03 */
  229. U16 Reserved2; /* 0x04 */
  230. U8 Reserved3; /* 0x06 */
  231. U8 MsgFlags; /* 0x07 */
  232. U8 VP_ID; /* 0x08 */
  233. U8 VF_ID; /* 0x09 */
  234. U16 Reserved4; /* 0x0A */
  235. U16 Reserved5; /* 0x0C */
  236. U16 IOCStatus; /* 0x0E */
  237. U32 IOCLogInfo; /* 0x10 */
  238. U32 ReturnedDataLength; /* 0x14 */
  239. } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
  240. MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
  241. Mpi2ToolboxDiagnosticCliReply_t,
  242. MPI2_POINTER pMpi2ToolboxDiagnosticCliReply_t;
  243. /*****************************************************************************
  244. *
  245. * Diagnostic Buffer Messages
  246. *
  247. *****************************************************************************/
  248. /****************************************************************************
  249. * Diagnostic Buffer Post request
  250. ****************************************************************************/
  251. typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST
  252. {
  253. U8 ExtendedType; /* 0x00 */
  254. U8 BufferType; /* 0x01 */
  255. U8 ChainOffset; /* 0x02 */
  256. U8 Function; /* 0x03 */
  257. U16 Reserved2; /* 0x04 */
  258. U8 Reserved3; /* 0x06 */
  259. U8 MsgFlags; /* 0x07 */
  260. U8 VP_ID; /* 0x08 */
  261. U8 VF_ID; /* 0x09 */
  262. U16 Reserved4; /* 0x0A */
  263. U64 BufferAddress; /* 0x0C */
  264. U32 BufferLength; /* 0x14 */
  265. U32 Reserved5; /* 0x18 */
  266. U32 Reserved6; /* 0x1C */
  267. U32 Flags; /* 0x20 */
  268. U32 ProductSpecific[23]; /* 0x24 */
  269. } MPI2_DIAG_BUFFER_POST_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
  270. Mpi2DiagBufferPostRequest_t, MPI2_POINTER pMpi2DiagBufferPostRequest_t;
  271. /* values for the ExtendedType field */
  272. #define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION (0x02)
  273. /* values for the BufferType field */
  274. #define MPI2_DIAG_BUF_TYPE_TRACE (0x00)
  275. #define MPI2_DIAG_BUF_TYPE_SNAPSHOT (0x01)
  276. #define MPI2_DIAG_BUF_TYPE_EXTENDED (0x02)
  277. /* count of the number of buffer types */
  278. #define MPI2_DIAG_BUF_TYPE_COUNT (0x03)
  279. /****************************************************************************
  280. * Diagnostic Buffer Post reply
  281. ****************************************************************************/
  282. typedef struct _MPI2_DIAG_BUFFER_POST_REPLY
  283. {
  284. U8 ExtendedType; /* 0x00 */
  285. U8 BufferType; /* 0x01 */
  286. U8 MsgLength; /* 0x02 */
  287. U8 Function; /* 0x03 */
  288. U16 Reserved2; /* 0x04 */
  289. U8 Reserved3; /* 0x06 */
  290. U8 MsgFlags; /* 0x07 */
  291. U8 VP_ID; /* 0x08 */
  292. U8 VF_ID; /* 0x09 */
  293. U16 Reserved4; /* 0x0A */
  294. U16 Reserved5; /* 0x0C */
  295. U16 IOCStatus; /* 0x0E */
  296. U32 IOCLogInfo; /* 0x10 */
  297. U32 TransferLength; /* 0x14 */
  298. } MPI2_DIAG_BUFFER_POST_REPLY, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REPLY,
  299. Mpi2DiagBufferPostReply_t, MPI2_POINTER pMpi2DiagBufferPostReply_t;
  300. /****************************************************************************
  301. * Diagnostic Release request
  302. ****************************************************************************/
  303. typedef struct _MPI2_DIAG_RELEASE_REQUEST
  304. {
  305. U8 Reserved1; /* 0x00 */
  306. U8 BufferType; /* 0x01 */
  307. U8 ChainOffset; /* 0x02 */
  308. U8 Function; /* 0x03 */
  309. U16 Reserved2; /* 0x04 */
  310. U8 Reserved3; /* 0x06 */
  311. U8 MsgFlags; /* 0x07 */
  312. U8 VP_ID; /* 0x08 */
  313. U8 VF_ID; /* 0x09 */
  314. U16 Reserved4; /* 0x0A */
  315. } MPI2_DIAG_RELEASE_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REQUEST,
  316. Mpi2DiagReleaseRequest_t, MPI2_POINTER pMpi2DiagReleaseRequest_t;
  317. /****************************************************************************
  318. * Diagnostic Buffer Post reply
  319. ****************************************************************************/
  320. typedef struct _MPI2_DIAG_RELEASE_REPLY
  321. {
  322. U8 Reserved1; /* 0x00 */
  323. U8 BufferType; /* 0x01 */
  324. U8 MsgLength; /* 0x02 */
  325. U8 Function; /* 0x03 */
  326. U16 Reserved2; /* 0x04 */
  327. U8 Reserved3; /* 0x06 */
  328. U8 MsgFlags; /* 0x07 */
  329. U8 VP_ID; /* 0x08 */
  330. U8 VF_ID; /* 0x09 */
  331. U16 Reserved4; /* 0x0A */
  332. U16 Reserved5; /* 0x0C */
  333. U16 IOCStatus; /* 0x0E */
  334. U32 IOCLogInfo; /* 0x10 */
  335. } MPI2_DIAG_RELEASE_REPLY, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REPLY,
  336. Mpi2DiagReleaseReply_t, MPI2_POINTER pMpi2DiagReleaseReply_t;
  337. #endif