mpi2_tool.h 15 KB

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