mpi2_tool.h 22 KB

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