mpi2_tool.h 19 KB

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