mpi2_tool.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. /*
  2. * Copyright (c) 2000-2013 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.10
  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. * 05-12-10 02.00.05 Added Diagnostic Data Upload tool.
  26. * 08-11-10 02.00.06 Added defines that were missing for Diagnostic Buffer
  27. * Post Request.
  28. * 05-25-11 02.00.07 Added Flags field and related defines to
  29. * MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST.
  30. * 11-18-11 02.00.08 Incorporating additions for MPI v2.5.
  31. * 07-10-12 02.00.09 Add MPI v2.5 Toolbox Diagnostic CLI Tool Request
  32. * message.
  33. * 07-26-12 02.00.10 Modified MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST so that
  34. * it uses MPI Chain SGE as well as MPI Simple SGE.
  35. * --------------------------------------------------------------------------
  36. */
  37. #ifndef MPI2_TOOL_H
  38. #define MPI2_TOOL_H
  39. /*****************************************************************************
  40. *
  41. * Toolbox Messages
  42. *
  43. *****************************************************************************/
  44. /*defines for the Tools */
  45. #define MPI2_TOOLBOX_CLEAN_TOOL (0x00)
  46. #define MPI2_TOOLBOX_MEMORY_MOVE_TOOL (0x01)
  47. #define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL (0x02)
  48. #define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)
  49. #define MPI2_TOOLBOX_BEACON_TOOL (0x05)
  50. #define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL (0x06)
  51. /****************************************************************************
  52. * Toolbox reply
  53. ****************************************************************************/
  54. typedef struct _MPI2_TOOLBOX_REPLY {
  55. U8 Tool; /*0x00 */
  56. U8 Reserved1; /*0x01 */
  57. U8 MsgLength; /*0x02 */
  58. U8 Function; /*0x03 */
  59. U16 Reserved2; /*0x04 */
  60. U8 Reserved3; /*0x06 */
  61. U8 MsgFlags; /*0x07 */
  62. U8 VP_ID; /*0x08 */
  63. U8 VF_ID; /*0x09 */
  64. U16 Reserved4; /*0x0A */
  65. U16 Reserved5; /*0x0C */
  66. U16 IOCStatus; /*0x0E */
  67. U32 IOCLogInfo; /*0x10 */
  68. } MPI2_TOOLBOX_REPLY, *PTR_MPI2_TOOLBOX_REPLY,
  69. Mpi2ToolboxReply_t, *pMpi2ToolboxReply_t;
  70. /****************************************************************************
  71. * Toolbox Clean Tool request
  72. ****************************************************************************/
  73. typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST {
  74. U8 Tool; /*0x00 */
  75. U8 Reserved1; /*0x01 */
  76. U8 ChainOffset; /*0x02 */
  77. U8 Function; /*0x03 */
  78. U16 Reserved2; /*0x04 */
  79. U8 Reserved3; /*0x06 */
  80. U8 MsgFlags; /*0x07 */
  81. U8 VP_ID; /*0x08 */
  82. U8 VF_ID; /*0x09 */
  83. U16 Reserved4; /*0x0A */
  84. U32 Flags; /*0x0C */
  85. } MPI2_TOOLBOX_CLEAN_REQUEST, *PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
  86. Mpi2ToolboxCleanRequest_t, *pMpi2ToolboxCleanRequest_t;
  87. /*values for the Flags field */
  88. #define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES (0x80000000)
  89. #define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES (0x40000000)
  90. #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES (0x20000000)
  91. #define MPI2_TOOLBOX_CLEAN_FW_CURRENT (0x10000000)
  92. #define MPI2_TOOLBOX_CLEAN_FW_BACKUP (0x08000000)
  93. #define MPI2_TOOLBOX_CLEAN_MEGARAID (0x02000000)
  94. #define MPI2_TOOLBOX_CLEAN_INITIALIZATION (0x01000000)
  95. #define MPI2_TOOLBOX_CLEAN_FLASH (0x00000004)
  96. #define MPI2_TOOLBOX_CLEAN_SEEPROM (0x00000002)
  97. #define MPI2_TOOLBOX_CLEAN_NVSRAM (0x00000001)
  98. /****************************************************************************
  99. * Toolbox Memory Move request
  100. ****************************************************************************/
  101. typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST {
  102. U8 Tool; /*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. MPI2_SGE_SIMPLE_UNION SGL; /*0x0C */
  113. } MPI2_TOOLBOX_MEM_MOVE_REQUEST, *PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
  114. Mpi2ToolboxMemMoveRequest_t, *pMpi2ToolboxMemMoveRequest_t;
  115. /****************************************************************************
  116. * Toolbox Diagnostic Data Upload request
  117. ****************************************************************************/
  118. typedef struct _MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST {
  119. U8 Tool; /*0x00 */
  120. U8 Reserved1; /*0x01 */
  121. U8 ChainOffset; /*0x02 */
  122. U8 Function; /*0x03 */
  123. U16 Reserved2; /*0x04 */
  124. U8 Reserved3; /*0x06 */
  125. U8 MsgFlags; /*0x07 */
  126. U8 VP_ID; /*0x08 */
  127. U8 VF_ID; /*0x09 */
  128. U16 Reserved4; /*0x0A */
  129. U8 SGLFlags; /*0x0C */
  130. U8 Reserved5; /*0x0D */
  131. U16 Reserved6; /*0x0E */
  132. U32 Flags; /*0x10 */
  133. U32 DataLength; /*0x14 */
  134. MPI2_SGE_SIMPLE_UNION SGL; /*0x18 */
  135. } MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
  136. *PTR_MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
  137. Mpi2ToolboxDiagDataUploadRequest_t,
  138. *pMpi2ToolboxDiagDataUploadRequest_t;
  139. /*use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
  140. typedef struct _MPI2_DIAG_DATA_UPLOAD_HEADER {
  141. U32 DiagDataLength; /*00h */
  142. U8 FormatCode; /*04h */
  143. U8 Reserved1; /*05h */
  144. U16 Reserved2; /*06h */
  145. } MPI2_DIAG_DATA_UPLOAD_HEADER, *PTR_MPI2_DIAG_DATA_UPLOAD_HEADER,
  146. Mpi2DiagDataUploadHeader_t, *pMpi2DiagDataUploadHeader_t;
  147. /****************************************************************************
  148. * Toolbox ISTWI Read Write Tool
  149. ****************************************************************************/
  150. /*Toolbox ISTWI Read Write Tool request message */
  151. typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST {
  152. U8 Tool; /*0x00 */
  153. U8 Reserved1; /*0x01 */
  154. U8 ChainOffset; /*0x02 */
  155. U8 Function; /*0x03 */
  156. U16 Reserved2; /*0x04 */
  157. U8 Reserved3; /*0x06 */
  158. U8 MsgFlags; /*0x07 */
  159. U8 VP_ID; /*0x08 */
  160. U8 VF_ID; /*0x09 */
  161. U16 Reserved4; /*0x0A */
  162. U32 Reserved5; /*0x0C */
  163. U32 Reserved6; /*0x10 */
  164. U8 DevIndex; /*0x14 */
  165. U8 Action; /*0x15 */
  166. U8 SGLFlags; /*0x16 */
  167. U8 Flags; /*0x17 */
  168. U16 TxDataLength; /*0x18 */
  169. U16 RxDataLength; /*0x1A */
  170. U32 Reserved8; /*0x1C */
  171. U32 Reserved9; /*0x20 */
  172. U32 Reserved10; /*0x24 */
  173. U32 Reserved11; /*0x28 */
  174. U32 Reserved12; /*0x2C */
  175. MPI2_SGE_SIMPLE_UNION SGL; /*0x30 */
  176. } MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
  177. *PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
  178. Mpi2ToolboxIstwiReadWriteRequest_t,
  179. *pMpi2ToolboxIstwiReadWriteRequest_t;
  180. /*values for the Action field */
  181. #define MPI2_TOOL_ISTWI_ACTION_READ_DATA (0x01)
  182. #define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA (0x02)
  183. #define MPI2_TOOL_ISTWI_ACTION_SEQUENCE (0x03)
  184. #define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS (0x10)
  185. #define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS (0x11)
  186. #define MPI2_TOOL_ISTWI_ACTION_RESET (0x12)
  187. /*use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
  188. /*values for the Flags field */
  189. #define MPI2_TOOL_ISTWI_FLAG_AUTO_RESERVE_RELEASE (0x80)
  190. #define MPI2_TOOL_ISTWI_FLAG_PAGE_ADDR_MASK (0x07)
  191. /*Toolbox ISTWI Read Write Tool reply message */
  192. typedef struct _MPI2_TOOLBOX_ISTWI_REPLY {
  193. U8 Tool; /*0x00 */
  194. U8 Reserved1; /*0x01 */
  195. U8 MsgLength; /*0x02 */
  196. U8 Function; /*0x03 */
  197. U16 Reserved2; /*0x04 */
  198. U8 Reserved3; /*0x06 */
  199. U8 MsgFlags; /*0x07 */
  200. U8 VP_ID; /*0x08 */
  201. U8 VF_ID; /*0x09 */
  202. U16 Reserved4; /*0x0A */
  203. U16 Reserved5; /*0x0C */
  204. U16 IOCStatus; /*0x0E */
  205. U32 IOCLogInfo; /*0x10 */
  206. U8 DevIndex; /*0x14 */
  207. U8 Action; /*0x15 */
  208. U8 IstwiStatus; /*0x16 */
  209. U8 Reserved6; /*0x17 */
  210. U16 TxDataCount; /*0x18 */
  211. U16 RxDataCount; /*0x1A */
  212. } MPI2_TOOLBOX_ISTWI_REPLY, *PTR_MPI2_TOOLBOX_ISTWI_REPLY,
  213. Mpi2ToolboxIstwiReply_t, *pMpi2ToolboxIstwiReply_t;
  214. /****************************************************************************
  215. * Toolbox Beacon Tool request
  216. ****************************************************************************/
  217. typedef struct _MPI2_TOOLBOX_BEACON_REQUEST {
  218. U8 Tool; /*0x00 */
  219. U8 Reserved1; /*0x01 */
  220. U8 ChainOffset; /*0x02 */
  221. U8 Function; /*0x03 */
  222. U16 Reserved2; /*0x04 */
  223. U8 Reserved3; /*0x06 */
  224. U8 MsgFlags; /*0x07 */
  225. U8 VP_ID; /*0x08 */
  226. U8 VF_ID; /*0x09 */
  227. U16 Reserved4; /*0x0A */
  228. U8 Reserved5; /*0x0C */
  229. U8 PhysicalPort; /*0x0D */
  230. U8 Reserved6; /*0x0E */
  231. U8 Flags; /*0x0F */
  232. } MPI2_TOOLBOX_BEACON_REQUEST, *PTR_MPI2_TOOLBOX_BEACON_REQUEST,
  233. Mpi2ToolboxBeaconRequest_t, *pMpi2ToolboxBeaconRequest_t;
  234. /*values for the Flags field */
  235. #define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF (0x00)
  236. #define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON (0x01)
  237. /****************************************************************************
  238. * Toolbox Diagnostic CLI Tool
  239. ****************************************************************************/
  240. #define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH (0x5C)
  241. /*MPI v2.0 Toolbox Diagnostic CLI Tool request message */
  242. typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
  243. U8 Tool; /*0x00 */
  244. U8 Reserved1; /*0x01 */
  245. U8 ChainOffset; /*0x02 */
  246. U8 Function; /*0x03 */
  247. U16 Reserved2; /*0x04 */
  248. U8 Reserved3; /*0x06 */
  249. U8 MsgFlags; /*0x07 */
  250. U8 VP_ID; /*0x08 */
  251. U8 VF_ID; /*0x09 */
  252. U16 Reserved4; /*0x0A */
  253. U8 SGLFlags; /*0x0C */
  254. U8 Reserved5; /*0x0D */
  255. U16 Reserved6; /*0x0E */
  256. U32 DataLength; /*0x10 */
  257. U8 DiagnosticCliCommand[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH];/*0x14 */
  258. MPI2_MPI_SGE_IO_UNION SGL; /*0x70 */
  259. } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
  260. *PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
  261. Mpi2ToolboxDiagnosticCliRequest_t,
  262. *pMpi2ToolboxDiagnosticCliRequest_t;
  263. /*use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
  264. /*MPI v2.5 Toolbox Diagnostic CLI Tool request message */
  265. typedef struct _MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
  266. U8 Tool; /*0x00 */
  267. U8 Reserved1; /*0x01 */
  268. U8 ChainOffset; /*0x02 */
  269. U8 Function; /*0x03 */
  270. U16 Reserved2; /*0x04 */
  271. U8 Reserved3; /*0x06 */
  272. U8 MsgFlags; /*0x07 */
  273. U8 VP_ID; /*0x08 */
  274. U8 VF_ID; /*0x09 */
  275. U16 Reserved4; /*0x0A */
  276. U32 Reserved5; /*0x0C */
  277. U32 DataLength; /*0x10 */
  278. U8 DiagnosticCliCommand[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH];/*0x14 */
  279. MPI25_SGE_IO_UNION SGL; /* 0x70 */
  280. } MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
  281. *PTR_MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
  282. Mpi25ToolboxDiagnosticCliRequest_t,
  283. *pMpi25ToolboxDiagnosticCliRequest_t;
  284. /*Toolbox Diagnostic CLI Tool reply message */
  285. typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY {
  286. U8 Tool; /*0x00 */
  287. U8 Reserved1; /*0x01 */
  288. U8 MsgLength; /*0x02 */
  289. U8 Function; /*0x03 */
  290. U16 Reserved2; /*0x04 */
  291. U8 Reserved3; /*0x06 */
  292. U8 MsgFlags; /*0x07 */
  293. U8 VP_ID; /*0x08 */
  294. U8 VF_ID; /*0x09 */
  295. U16 Reserved4; /*0x0A */
  296. U16 Reserved5; /*0x0C */
  297. U16 IOCStatus; /*0x0E */
  298. U32 IOCLogInfo; /*0x10 */
  299. U32 ReturnedDataLength; /*0x14 */
  300. } MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
  301. *PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
  302. Mpi2ToolboxDiagnosticCliReply_t,
  303. *pMpi2ToolboxDiagnosticCliReply_t;
  304. /*****************************************************************************
  305. *
  306. * Diagnostic Buffer Messages
  307. *
  308. *****************************************************************************/
  309. /****************************************************************************
  310. * Diagnostic Buffer Post request
  311. ****************************************************************************/
  312. typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST {
  313. U8 ExtendedType; /*0x00 */
  314. U8 BufferType; /*0x01 */
  315. U8 ChainOffset; /*0x02 */
  316. U8 Function; /*0x03 */
  317. U16 Reserved2; /*0x04 */
  318. U8 Reserved3; /*0x06 */
  319. U8 MsgFlags; /*0x07 */
  320. U8 VP_ID; /*0x08 */
  321. U8 VF_ID; /*0x09 */
  322. U16 Reserved4; /*0x0A */
  323. U64 BufferAddress; /*0x0C */
  324. U32 BufferLength; /*0x14 */
  325. U32 Reserved5; /*0x18 */
  326. U32 Reserved6; /*0x1C */
  327. U32 Flags; /*0x20 */
  328. U32 ProductSpecific[23]; /*0x24 */
  329. } MPI2_DIAG_BUFFER_POST_REQUEST, *PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
  330. Mpi2DiagBufferPostRequest_t, *pMpi2DiagBufferPostRequest_t;
  331. /*values for the ExtendedType field */
  332. #define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION (0x02)
  333. /*values for the BufferType field */
  334. #define MPI2_DIAG_BUF_TYPE_TRACE (0x00)
  335. #define MPI2_DIAG_BUF_TYPE_SNAPSHOT (0x01)
  336. #define MPI2_DIAG_BUF_TYPE_EXTENDED (0x02)
  337. /*count of the number of buffer types */
  338. #define MPI2_DIAG_BUF_TYPE_COUNT (0x03)
  339. /*values for the Flags field */
  340. #define MPI2_DIAG_BUF_FLAG_RELEASE_ON_FULL (0x00000002)
  341. #define MPI2_DIAG_BUF_FLAG_IMMEDIATE_RELEASE (0x00000001)
  342. /****************************************************************************
  343. * Diagnostic Buffer Post reply
  344. ****************************************************************************/
  345. typedef struct _MPI2_DIAG_BUFFER_POST_REPLY {
  346. U8 ExtendedType; /*0x00 */
  347. U8 BufferType; /*0x01 */
  348. U8 MsgLength; /*0x02 */
  349. U8 Function; /*0x03 */
  350. U16 Reserved2; /*0x04 */
  351. U8 Reserved3; /*0x06 */
  352. U8 MsgFlags; /*0x07 */
  353. U8 VP_ID; /*0x08 */
  354. U8 VF_ID; /*0x09 */
  355. U16 Reserved4; /*0x0A */
  356. U16 Reserved5; /*0x0C */
  357. U16 IOCStatus; /*0x0E */
  358. U32 IOCLogInfo; /*0x10 */
  359. U32 TransferLength; /*0x14 */
  360. } MPI2_DIAG_BUFFER_POST_REPLY, *PTR_MPI2_DIAG_BUFFER_POST_REPLY,
  361. Mpi2DiagBufferPostReply_t, *pMpi2DiagBufferPostReply_t;
  362. /****************************************************************************
  363. * Diagnostic Release request
  364. ****************************************************************************/
  365. typedef struct _MPI2_DIAG_RELEASE_REQUEST {
  366. U8 Reserved1; /*0x00 */
  367. U8 BufferType; /*0x01 */
  368. U8 ChainOffset; /*0x02 */
  369. U8 Function; /*0x03 */
  370. U16 Reserved2; /*0x04 */
  371. U8 Reserved3; /*0x06 */
  372. U8 MsgFlags; /*0x07 */
  373. U8 VP_ID; /*0x08 */
  374. U8 VF_ID; /*0x09 */
  375. U16 Reserved4; /*0x0A */
  376. } MPI2_DIAG_RELEASE_REQUEST, *PTR_MPI2_DIAG_RELEASE_REQUEST,
  377. Mpi2DiagReleaseRequest_t, *pMpi2DiagReleaseRequest_t;
  378. /****************************************************************************
  379. * Diagnostic Buffer Post reply
  380. ****************************************************************************/
  381. typedef struct _MPI2_DIAG_RELEASE_REPLY {
  382. U8 Reserved1; /*0x00 */
  383. U8 BufferType; /*0x01 */
  384. U8 MsgLength; /*0x02 */
  385. U8 Function; /*0x03 */
  386. U16 Reserved2; /*0x04 */
  387. U8 Reserved3; /*0x06 */
  388. U8 MsgFlags; /*0x07 */
  389. U8 VP_ID; /*0x08 */
  390. U8 VF_ID; /*0x09 */
  391. U16 Reserved4; /*0x0A */
  392. U16 Reserved5; /*0x0C */
  393. U16 IOCStatus; /*0x0E */
  394. U32 IOCLogInfo; /*0x10 */
  395. } MPI2_DIAG_RELEASE_REPLY, *PTR_MPI2_DIAG_RELEASE_REPLY,
  396. Mpi2DiagReleaseReply_t, *pMpi2DiagReleaseReply_t;
  397. #endif