mpi2_tool.h 21 KB

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