mpi_tool.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. /*
  2. * Copyright (c) 2001-2008 LSI Corporation.
  3. *
  4. *
  5. * Name: mpi_tool.h
  6. * Title: MPI Toolbox structures and definitions
  7. * Creation Date: July 30, 2001
  8. *
  9. * mpi_tool.h Version: 01.05.03
  10. *
  11. * Version History
  12. * ---------------
  13. *
  14. * Date Version Description
  15. * -------- -------- ------------------------------------------------------
  16. * 08-08-01 01.02.01 Original release.
  17. * 08-29-01 01.02.02 Added DIAG_DATA_UPLOAD_HEADER and related defines.
  18. * 01-16-04 01.02.03 Added defines and structures for new tools
  19. *. MPI_TOOLBOX_ISTWI_READ_WRITE_TOOL and
  20. * MPI_TOOLBOX_FC_MANAGEMENT_TOOL.
  21. * 04-29-04 01.02.04 Added message structures for Diagnostic Buffer Post and
  22. * Diagnostic Release requests and replies.
  23. * 05-11-04 01.03.01 Original release for MPI v1.3.
  24. * 08-19-04 01.05.01 Original release for MPI v1.5.
  25. * 10-06-04 01.05.02 Added define for MPI_DIAG_BUF_TYPE_COUNT.
  26. * 02-09-05 01.05.03 Added frame size option to FC management tool.
  27. * Added Beacon tool to the Toolbox.
  28. * --------------------------------------------------------------------------
  29. */
  30. #ifndef MPI_TOOL_H
  31. #define MPI_TOOL_H
  32. #define MPI_TOOLBOX_CLEAN_TOOL (0x00)
  33. #define MPI_TOOLBOX_MEMORY_MOVE_TOOL (0x01)
  34. #define MPI_TOOLBOX_DIAG_DATA_UPLOAD_TOOL (0x02)
  35. #define MPI_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)
  36. #define MPI_TOOLBOX_FC_MANAGEMENT_TOOL (0x04)
  37. #define MPI_TOOLBOX_BEACON_TOOL (0x05)
  38. /****************************************************************************/
  39. /* Toolbox reply */
  40. /****************************************************************************/
  41. typedef struct _MSG_TOOLBOX_REPLY
  42. {
  43. U8 Tool; /* 00h */
  44. U8 Reserved; /* 01h */
  45. U8 MsgLength; /* 02h */
  46. U8 Function; /* 03h */
  47. U16 Reserved1; /* 04h */
  48. U8 Reserved2; /* 06h */
  49. U8 MsgFlags; /* 07h */
  50. U32 MsgContext; /* 08h */
  51. U16 Reserved3; /* 0Ch */
  52. U16 IOCStatus; /* 0Eh */
  53. U32 IOCLogInfo; /* 10h */
  54. } MSG_TOOLBOX_REPLY, MPI_POINTER PTR_MSG_TOOLBOX_REPLY,
  55. ToolboxReply_t, MPI_POINTER pToolboxReply_t;
  56. /****************************************************************************/
  57. /* Toolbox Clean Tool request */
  58. /****************************************************************************/
  59. typedef struct _MSG_TOOLBOX_CLEAN_REQUEST
  60. {
  61. U8 Tool; /* 00h */
  62. U8 Reserved; /* 01h */
  63. U8 ChainOffset; /* 02h */
  64. U8 Function; /* 03h */
  65. U16 Reserved1; /* 04h */
  66. U8 Reserved2; /* 06h */
  67. U8 MsgFlags; /* 07h */
  68. U32 MsgContext; /* 08h */
  69. U32 Flags; /* 0Ch */
  70. } MSG_TOOLBOX_CLEAN_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_CLEAN_REQUEST,
  71. ToolboxCleanRequest_t, MPI_POINTER pToolboxCleanRequest_t;
  72. #define MPI_TOOLBOX_CLEAN_NVSRAM (0x00000001)
  73. #define MPI_TOOLBOX_CLEAN_SEEPROM (0x00000002)
  74. #define MPI_TOOLBOX_CLEAN_FLASH (0x00000004)
  75. #define MPI_TOOLBOX_CLEAN_BOOTLOADER (0x04000000)
  76. #define MPI_TOOLBOX_CLEAN_FW_BACKUP (0x08000000)
  77. #define MPI_TOOLBOX_CLEAN_FW_CURRENT (0x10000000)
  78. #define MPI_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES (0x20000000)
  79. #define MPI_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES (0x40000000)
  80. #define MPI_TOOLBOX_CLEAN_BOOT_SERVICES (0x80000000)
  81. /****************************************************************************/
  82. /* Toolbox Memory Move request */
  83. /****************************************************************************/
  84. typedef struct _MSG_TOOLBOX_MEM_MOVE_REQUEST
  85. {
  86. U8 Tool; /* 00h */
  87. U8 Reserved; /* 01h */
  88. U8 ChainOffset; /* 02h */
  89. U8 Function; /* 03h */
  90. U16 Reserved1; /* 04h */
  91. U8 Reserved2; /* 06h */
  92. U8 MsgFlags; /* 07h */
  93. U32 MsgContext; /* 08h */
  94. SGE_SIMPLE_UNION SGL; /* 0Ch */
  95. } MSG_TOOLBOX_MEM_MOVE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_MEM_MOVE_REQUEST,
  96. ToolboxMemMoveRequest_t, MPI_POINTER pToolboxMemMoveRequest_t;
  97. /****************************************************************************/
  98. /* Toolbox Diagnostic Data Upload request */
  99. /****************************************************************************/
  100. typedef struct _MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST
  101. {
  102. U8 Tool; /* 00h */
  103. U8 Reserved; /* 01h */
  104. U8 ChainOffset; /* 02h */
  105. U8 Function; /* 03h */
  106. U16 Reserved1; /* 04h */
  107. U8 Reserved2; /* 06h */
  108. U8 MsgFlags; /* 07h */
  109. U32 MsgContext; /* 08h */
  110. U32 Flags; /* 0Ch */
  111. U32 Reserved3; /* 10h */
  112. SGE_SIMPLE_UNION SGL; /* 14h */
  113. } MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
  114. ToolboxDiagDataUploadRequest_t, MPI_POINTER pToolboxDiagDataUploadRequest_t;
  115. typedef struct _DIAG_DATA_UPLOAD_HEADER
  116. {
  117. U32 DiagDataLength; /* 00h */
  118. U8 FormatCode; /* 04h */
  119. U8 Reserved; /* 05h */
  120. U16 Reserved1; /* 06h */
  121. } DIAG_DATA_UPLOAD_HEADER, MPI_POINTER PTR_DIAG_DATA_UPLOAD_HEADER,
  122. DiagDataUploadHeader_t, MPI_POINTER pDiagDataUploadHeader_t;
  123. #define MPI_TB_DIAG_FORMAT_SCSI_PRINTF_1 (0x01)
  124. #define MPI_TB_DIAG_FORMAT_SCSI_2 (0x02)
  125. #define MPI_TB_DIAG_FORMAT_SCSI_3 (0x03)
  126. #define MPI_TB_DIAG_FORMAT_FC_TRACE_1 (0x04)
  127. /****************************************************************************/
  128. /* Toolbox ISTWI Read Write request */
  129. /****************************************************************************/
  130. typedef struct _MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST
  131. {
  132. U8 Tool; /* 00h */
  133. U8 Reserved; /* 01h */
  134. U8 ChainOffset; /* 02h */
  135. U8 Function; /* 03h */
  136. U16 Reserved1; /* 04h */
  137. U8 Reserved2; /* 06h */
  138. U8 MsgFlags; /* 07h */
  139. U32 MsgContext; /* 08h */
  140. U8 Flags; /* 0Ch */
  141. U8 BusNum; /* 0Dh */
  142. U16 Reserved3; /* 0Eh */
  143. U8 NumAddressBytes; /* 10h */
  144. U8 Reserved4; /* 11h */
  145. U16 DataLength; /* 12h */
  146. U8 DeviceAddr; /* 14h */
  147. U8 Addr1; /* 15h */
  148. U8 Addr2; /* 16h */
  149. U8 Addr3; /* 17h */
  150. U32 Reserved5; /* 18h */
  151. SGE_SIMPLE_UNION SGL; /* 1Ch */
  152. } MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
  153. ToolboxIstwiReadWriteRequest_t, MPI_POINTER pToolboxIstwiReadWriteRequest_t;
  154. #define MPI_TB_ISTWI_FLAGS_WRITE (0x00)
  155. #define MPI_TB_ISTWI_FLAGS_READ (0x01)
  156. /****************************************************************************/
  157. /* Toolbox FC Management request */
  158. /****************************************************************************/
  159. /* ActionInfo for Bus and TargetId */
  160. typedef struct _MPI_TB_FC_MANAGE_BUS_TID_AI
  161. {
  162. U16 Reserved; /* 00h */
  163. U8 Bus; /* 02h */
  164. U8 TargetId; /* 03h */
  165. } MPI_TB_FC_MANAGE_BUS_TID_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_BUS_TID_AI,
  166. MpiTbFcManageBusTidAi_t, MPI_POINTER pMpiTbFcManageBusTidAi_t;
  167. /* ActionInfo for port identifier */
  168. typedef struct _MPI_TB_FC_MANAGE_PID_AI
  169. {
  170. U32 PortIdentifier; /* 00h */
  171. } MPI_TB_FC_MANAGE_PID_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_PID_AI,
  172. MpiTbFcManagePidAi_t, MPI_POINTER pMpiTbFcManagePidAi_t;
  173. /* ActionInfo for set max frame size */
  174. typedef struct _MPI_TB_FC_MANAGE_FRAME_SIZE_AI
  175. {
  176. U16 FrameSize; /* 00h */
  177. U8 PortNum; /* 02h */
  178. U8 Reserved1; /* 03h */
  179. } MPI_TB_FC_MANAGE_FRAME_SIZE_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_FRAME_SIZE_AI,
  180. MpiTbFcManageFrameSizeAi_t, MPI_POINTER pMpiTbFcManageFrameSizeAi_t;
  181. /* union of ActionInfo */
  182. typedef union _MPI_TB_FC_MANAGE_AI_UNION
  183. {
  184. MPI_TB_FC_MANAGE_BUS_TID_AI BusTid;
  185. MPI_TB_FC_MANAGE_PID_AI Port;
  186. MPI_TB_FC_MANAGE_FRAME_SIZE_AI FrameSize;
  187. } MPI_TB_FC_MANAGE_AI_UNION, MPI_POINTER PTR_MPI_TB_FC_MANAGE_AI_UNION,
  188. MpiTbFcManageAiUnion_t, MPI_POINTER pMpiTbFcManageAiUnion_t;
  189. typedef struct _MSG_TOOLBOX_FC_MANAGE_REQUEST
  190. {
  191. U8 Tool; /* 00h */
  192. U8 Reserved; /* 01h */
  193. U8 ChainOffset; /* 02h */
  194. U8 Function; /* 03h */
  195. U16 Reserved1; /* 04h */
  196. U8 Reserved2; /* 06h */
  197. U8 MsgFlags; /* 07h */
  198. U32 MsgContext; /* 08h */
  199. U8 Action; /* 0Ch */
  200. U8 Reserved3; /* 0Dh */
  201. U16 Reserved4; /* 0Eh */
  202. MPI_TB_FC_MANAGE_AI_UNION ActionInfo; /* 10h */
  203. } MSG_TOOLBOX_FC_MANAGE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_FC_MANAGE_REQUEST,
  204. ToolboxFcManageRequest_t, MPI_POINTER pToolboxFcManageRequest_t;
  205. /* defines for the Action field */
  206. #define MPI_TB_FC_MANAGE_ACTION_DISC_ALL (0x00)
  207. #define MPI_TB_FC_MANAGE_ACTION_DISC_PID (0x01)
  208. #define MPI_TB_FC_MANAGE_ACTION_DISC_BUS_TID (0x02)
  209. #define MPI_TB_FC_MANAGE_ACTION_SET_MAX_FRAME_SIZE (0x03)
  210. /****************************************************************************/
  211. /* Toolbox Beacon Tool request */
  212. /****************************************************************************/
  213. typedef struct _MSG_TOOLBOX_BEACON_REQUEST
  214. {
  215. U8 Tool; /* 00h */
  216. U8 Reserved; /* 01h */
  217. U8 ChainOffset; /* 02h */
  218. U8 Function; /* 03h */
  219. U16 Reserved1; /* 04h */
  220. U8 Reserved2; /* 06h */
  221. U8 MsgFlags; /* 07h */
  222. U32 MsgContext; /* 08h */
  223. U8 ConnectNum; /* 0Ch */
  224. U8 PortNum; /* 0Dh */
  225. U8 Reserved3; /* 0Eh */
  226. U8 Flags; /* 0Fh */
  227. } MSG_TOOLBOX_BEACON_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_BEACON_REQUEST,
  228. ToolboxBeaconRequest_t, MPI_POINTER pToolboxBeaconRequest_t;
  229. #define MPI_TOOLBOX_FLAGS_BEACON_MODE_OFF (0x00)
  230. #define MPI_TOOLBOX_FLAGS_BEACON_MODE_ON (0x01)
  231. /****************************************************************************/
  232. /* Diagnostic Buffer Post request */
  233. /****************************************************************************/
  234. typedef struct _MSG_DIAG_BUFFER_POST_REQUEST
  235. {
  236. U8 TraceLevel; /* 00h */
  237. U8 BufferType; /* 01h */
  238. U8 ChainOffset; /* 02h */
  239. U8 Function; /* 03h */
  240. U16 Reserved1; /* 04h */
  241. U8 Reserved2; /* 06h */
  242. U8 MsgFlags; /* 07h */
  243. U32 MsgContext; /* 08h */
  244. U32 ExtendedType; /* 0Ch */
  245. U32 BufferLength; /* 10h */
  246. U32 ProductSpecific[4]; /* 14h */
  247. U32 Reserved3; /* 24h */
  248. U64 BufferAddress; /* 28h */
  249. } MSG_DIAG_BUFFER_POST_REQUEST, MPI_POINTER PTR_MSG_DIAG_BUFFER_POST_REQUEST,
  250. DiagBufferPostRequest_t, MPI_POINTER pDiagBufferPostRequest_t;
  251. #define MPI_DIAG_BUF_TYPE_TRACE (0x00)
  252. #define MPI_DIAG_BUF_TYPE_SNAPSHOT (0x01)
  253. #define MPI_DIAG_BUF_TYPE_EXTENDED (0x02)
  254. /* count of the number of buffer types */
  255. #define MPI_DIAG_BUF_TYPE_COUNT (0x03)
  256. #define MPI_DIAG_EXTENDED_QTAG (0x00000001)
  257. /* Diagnostic Buffer Post reply */
  258. typedef struct _MSG_DIAG_BUFFER_POST_REPLY
  259. {
  260. U8 Reserved1; /* 00h */
  261. U8 BufferType; /* 01h */
  262. U8 MsgLength; /* 02h */
  263. U8 Function; /* 03h */
  264. U16 Reserved2; /* 04h */
  265. U8 Reserved3; /* 06h */
  266. U8 MsgFlags; /* 07h */
  267. U32 MsgContext; /* 08h */
  268. U16 Reserved4; /* 0Ch */
  269. U16 IOCStatus; /* 0Eh */
  270. U32 IOCLogInfo; /* 10h */
  271. U32 TransferLength; /* 14h */
  272. } MSG_DIAG_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_DIAG_BUFFER_POST_REPLY,
  273. DiagBufferPostReply_t, MPI_POINTER pDiagBufferPostReply_t;
  274. /****************************************************************************/
  275. /* Diagnostic Release request */
  276. /****************************************************************************/
  277. typedef struct _MSG_DIAG_RELEASE_REQUEST
  278. {
  279. U8 Reserved1; /* 00h */
  280. U8 BufferType; /* 01h */
  281. U8 ChainOffset; /* 02h */
  282. U8 Function; /* 03h */
  283. U16 Reserved2; /* 04h */
  284. U8 Reserved3; /* 06h */
  285. U8 MsgFlags; /* 07h */
  286. U32 MsgContext; /* 08h */
  287. } MSG_DIAG_RELEASE_REQUEST, MPI_POINTER PTR_MSG_DIAG_RELEASE_REQUEST,
  288. DiagReleaseRequest_t, MPI_POINTER pDiagReleaseRequest_t;
  289. /* Diagnostic Release reply */
  290. typedef struct _MSG_DIAG_RELEASE_REPLY
  291. {
  292. U8 Reserved1; /* 00h */
  293. U8 BufferType; /* 01h */
  294. U8 MsgLength; /* 02h */
  295. U8 Function; /* 03h */
  296. U16 Reserved2; /* 04h */
  297. U8 Reserved3; /* 06h */
  298. U8 MsgFlags; /* 07h */
  299. U32 MsgContext; /* 08h */
  300. U16 Reserved4; /* 0Ch */
  301. U16 IOCStatus; /* 0Eh */
  302. U32 IOCLogInfo; /* 10h */
  303. } MSG_DIAG_RELEASE_REPLY, MPI_POINTER PTR_MSG_DIAG_RELEASE_REPLY,
  304. DiagReleaseReply_t, MPI_POINTER pDiagReleaseReply_t;
  305. #endif