mpi_tool.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. /*
  2. * Copyright (c) 2001-2003 LSI Logic 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.xx
  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. * --------------------------------------------------------------------------
  19. */
  20. #ifndef MPI_TOOL_H
  21. #define MPI_TOOL_H
  22. #define MPI_TOOLBOX_CLEAN_TOOL (0x00)
  23. #define MPI_TOOLBOX_MEMORY_MOVE_TOOL (0x01)
  24. #define MPI_TOOLBOX_DIAG_DATA_UPLOAD_TOOL (0x02)
  25. #define MPI_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)
  26. #define MPI_TOOLBOX_FC_MANAGEMENT_TOOL (0x04)
  27. /****************************************************************************/
  28. /* Toolbox reply */
  29. /****************************************************************************/
  30. typedef struct _MSG_TOOLBOX_REPLY
  31. {
  32. U8 Tool; /* 00h */
  33. U8 Reserved; /* 01h */
  34. U8 MsgLength; /* 02h */
  35. U8 Function; /* 03h */
  36. U16 Reserved1; /* 04h */
  37. U8 Reserved2; /* 06h */
  38. U8 MsgFlags; /* 07h */
  39. U32 MsgContext; /* 08h */
  40. U16 Reserved3; /* 0Ch */
  41. U16 IOCStatus; /* 0Eh */
  42. U32 IOCLogInfo; /* 10h */
  43. } MSG_TOOLBOX_REPLY, MPI_POINTER PTR_MSG_TOOLBOX_REPLY,
  44. ToolboxReply_t, MPI_POINTER pToolboxReply_t;
  45. /****************************************************************************/
  46. /* Toolbox Clean Tool request */
  47. /****************************************************************************/
  48. typedef struct _MSG_TOOLBOX_CLEAN_REQUEST
  49. {
  50. U8 Tool; /* 00h */
  51. U8 Reserved; /* 01h */
  52. U8 ChainOffset; /* 02h */
  53. U8 Function; /* 03h */
  54. U16 Reserved1; /* 04h */
  55. U8 Reserved2; /* 06h */
  56. U8 MsgFlags; /* 07h */
  57. U32 MsgContext; /* 08h */
  58. U32 Flags; /* 0Ch */
  59. } MSG_TOOLBOX_CLEAN_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_CLEAN_REQUEST,
  60. ToolboxCleanRequest_t, MPI_POINTER pToolboxCleanRequest_t;
  61. #define MPI_TOOLBOX_CLEAN_NVSRAM (0x00000001)
  62. #define MPI_TOOLBOX_CLEAN_SEEPROM (0x00000002)
  63. #define MPI_TOOLBOX_CLEAN_FLASH (0x00000004)
  64. #define MPI_TOOLBOX_CLEAN_BOOTLOADER (0x04000000)
  65. #define MPI_TOOLBOX_CLEAN_FW_BACKUP (0x08000000)
  66. #define MPI_TOOLBOX_CLEAN_FW_CURRENT (0x10000000)
  67. #define MPI_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES (0x20000000)
  68. #define MPI_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES (0x40000000)
  69. #define MPI_TOOLBOX_CLEAN_BOOT_SERVICES (0x80000000)
  70. /****************************************************************************/
  71. /* Toolbox Memory Move request */
  72. /****************************************************************************/
  73. typedef struct _MSG_TOOLBOX_MEM_MOVE_REQUEST
  74. {
  75. U8 Tool; /* 00h */
  76. U8 Reserved; /* 01h */
  77. U8 ChainOffset; /* 02h */
  78. U8 Function; /* 03h */
  79. U16 Reserved1; /* 04h */
  80. U8 Reserved2; /* 06h */
  81. U8 MsgFlags; /* 07h */
  82. U32 MsgContext; /* 08h */
  83. SGE_SIMPLE_UNION SGL; /* 0Ch */
  84. } MSG_TOOLBOX_MEM_MOVE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_MEM_MOVE_REQUEST,
  85. ToolboxMemMoveRequest_t, MPI_POINTER pToolboxMemMoveRequest_t;
  86. /****************************************************************************/
  87. /* Toolbox Diagnostic Data Upload request */
  88. /****************************************************************************/
  89. typedef struct _MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST
  90. {
  91. U8 Tool; /* 00h */
  92. U8 Reserved; /* 01h */
  93. U8 ChainOffset; /* 02h */
  94. U8 Function; /* 03h */
  95. U16 Reserved1; /* 04h */
  96. U8 Reserved2; /* 06h */
  97. U8 MsgFlags; /* 07h */
  98. U32 MsgContext; /* 08h */
  99. U32 Flags; /* 0Ch */
  100. U32 Reserved3; /* 10h */
  101. SGE_SIMPLE_UNION SGL; /* 14h */
  102. } MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
  103. ToolboxDiagDataUploadRequest_t, MPI_POINTER pToolboxDiagDataUploadRequest_t;
  104. typedef struct _DIAG_DATA_UPLOAD_HEADER
  105. {
  106. U32 DiagDataLength; /* 00h */
  107. U8 FormatCode; /* 04h */
  108. U8 Reserved; /* 05h */
  109. U16 Reserved1; /* 06h */
  110. } DIAG_DATA_UPLOAD_HEADER, MPI_POINTER PTR_DIAG_DATA_UPLOAD_HEADER,
  111. DiagDataUploadHeader_t, MPI_POINTER pDiagDataUploadHeader_t;
  112. #define MPI_TB_DIAG_FORMAT_SCSI_PRINTF_1 (0x01)
  113. #define MPI_TB_DIAG_FORMAT_SCSI_2 (0x02)
  114. #define MPI_TB_DIAG_FORMAT_SCSI_3 (0x03)
  115. #define MPI_TB_DIAG_FORMAT_FC_TRACE_1 (0x04)
  116. /****************************************************************************/
  117. /* Toolbox ISTWI Read Write request */
  118. /****************************************************************************/
  119. typedef struct _MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST
  120. {
  121. U8 Tool; /* 00h */
  122. U8 Reserved; /* 01h */
  123. U8 ChainOffset; /* 02h */
  124. U8 Function; /* 03h */
  125. U16 Reserved1; /* 04h */
  126. U8 Reserved2; /* 06h */
  127. U8 MsgFlags; /* 07h */
  128. U32 MsgContext; /* 08h */
  129. U8 Flags; /* 0Ch */
  130. U8 BusNum; /* 0Dh */
  131. U16 Reserved3; /* 0Eh */
  132. U8 NumAddressBytes; /* 10h */
  133. U8 Reserved4; /* 11h */
  134. U16 DataLength; /* 12h */
  135. U8 DeviceAddr; /* 14h */
  136. U8 Addr1; /* 15h */
  137. U8 Addr2; /* 16h */
  138. U8 Addr3; /* 17h */
  139. U32 Reserved5; /* 18h */
  140. SGE_SIMPLE_UNION SGL; /* 1Ch */
  141. } MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
  142. ToolboxIstwiReadWriteRequest_t, MPI_POINTER pToolboxIstwiReadWriteRequest_t;
  143. #define MPI_TB_ISTWI_FLAGS_WRITE (0x00)
  144. #define MPI_TB_ISTWI_FLAGS_READ (0x01)
  145. /****************************************************************************/
  146. /* Toolbox FC Management request */
  147. /****************************************************************************/
  148. /* ActionInfo for Bus and TargetId */
  149. typedef struct _MPI_TB_FC_MANAGE_BUS_TID_AI
  150. {
  151. U16 Reserved; /* 00h */
  152. U8 Bus; /* 02h */
  153. U8 TargetId; /* 03h */
  154. } MPI_TB_FC_MANAGE_BUS_TID_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_BUS_TID_AI,
  155. MpiTbFcManageBusTidAi_t, MPI_POINTER pMpiTbFcManageBusTidAi_t;
  156. /* ActionInfo for port identifier */
  157. typedef struct _MPI_TB_FC_MANAGE_PID_AI
  158. {
  159. U32 PortIdentifier; /* 00h */
  160. } MPI_TB_FC_MANAGE_PID_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_PID_AI,
  161. MpiTbFcManagePidAi_t, MPI_POINTER pMpiTbFcManagePidAi_t;
  162. /* union of ActionInfo */
  163. typedef union _MPI_TB_FC_MANAGE_AI_UNION
  164. {
  165. MPI_TB_FC_MANAGE_BUS_TID_AI BusTid;
  166. MPI_TB_FC_MANAGE_PID_AI Port;
  167. } MPI_TB_FC_MANAGE_AI_UNION, MPI_POINTER PTR_MPI_TB_FC_MANAGE_AI_UNION,
  168. MpiTbFcManageAiUnion_t, MPI_POINTER pMpiTbFcManageAiUnion_t;
  169. typedef struct _MSG_TOOLBOX_FC_MANAGE_REQUEST
  170. {
  171. U8 Tool; /* 00h */
  172. U8 Reserved; /* 01h */
  173. U8 ChainOffset; /* 02h */
  174. U8 Function; /* 03h */
  175. U16 Reserved1; /* 04h */
  176. U8 Reserved2; /* 06h */
  177. U8 MsgFlags; /* 07h */
  178. U32 MsgContext; /* 08h */
  179. U8 Action; /* 0Ch */
  180. U8 Reserved3; /* 0Dh */
  181. U16 Reserved4; /* 0Eh */
  182. MPI_TB_FC_MANAGE_AI_UNION ActionInfo; /* 10h */
  183. } MSG_TOOLBOX_FC_MANAGE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_FC_MANAGE_REQUEST,
  184. ToolboxFcManageRequest_t, MPI_POINTER pToolboxFcManageRequest_t;
  185. /* defines for the Action field */
  186. #define MPI_TB_FC_MANAGE_ACTION_DISC_ALL (0x00)
  187. #define MPI_TB_FC_MANAGE_ACTION_DISC_PID (0x01)
  188. #define MPI_TB_FC_MANAGE_ACTION_DISC_BUS_TID (0x02)
  189. /****************************************************************************/
  190. /* Diagnostic Buffer Post request */
  191. /****************************************************************************/
  192. typedef struct _MSG_DIAG_BUFFER_POST_REQUEST
  193. {
  194. U8 TraceLevel; /* 00h */
  195. U8 BufferType; /* 01h */
  196. U8 ChainOffset; /* 02h */
  197. U8 Function; /* 03h */
  198. U16 Reserved1; /* 04h */
  199. U8 Reserved2; /* 06h */
  200. U8 MsgFlags; /* 07h */
  201. U32 MsgContext; /* 08h */
  202. U32 ExtendedType; /* 0Ch */
  203. U32 BufferLength; /* 10h */
  204. U32 ProductSpecific[4]; /* 14h */
  205. U32 Reserved3; /* 18h */
  206. SGE_SIMPLE_UNION SGL; /* 28h */
  207. } MSG_DIAG_BUFFER_POST_REQUEST, MPI_POINTER PTR_MSG_DIAG_BUFFER_POST_REQUEST,
  208. DiagBufferPostRequest_t, MPI_POINTER pDiagBufferPostRequest_t;
  209. #define MPI_DIAG_BUF_TYPE_TRACE (0x00)
  210. #define MPI_DIAG_BUF_TYPE_SNAPSHOT (0x01)
  211. #define MPI_DIAG_BUF_TYPE_EXTENDED (0x02)
  212. #define MPI_DIAG_EXTENDED_QTAG (0x00000001)
  213. /* Diagnostic Buffer Post reply */
  214. typedef struct _MSG_DIAG_BUFFER_POST_REPLY
  215. {
  216. U8 Reserved1; /* 00h */
  217. U8 BufferType; /* 01h */
  218. U8 MsgLength; /* 02h */
  219. U8 Function; /* 03h */
  220. U16 Reserved2; /* 04h */
  221. U8 Reserved3; /* 06h */
  222. U8 MsgFlags; /* 07h */
  223. U32 MsgContext; /* 08h */
  224. U16 Reserved4; /* 0Ch */
  225. U16 IOCStatus; /* 0Eh */
  226. U32 IOCLogInfo; /* 10h */
  227. U32 TransferLength; /* 14h */
  228. } MSG_DIAG_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_DIAG_BUFFER_POST_REPLY,
  229. DiagBufferPostReply_t, MPI_POINTER pDiagBufferPostReply_t;
  230. /****************************************************************************/
  231. /* Diagnostic Release request */
  232. /****************************************************************************/
  233. typedef struct _MSG_DIAG_RELEASE_REQUEST
  234. {
  235. U8 Reserved1; /* 00h */
  236. U8 BufferType; /* 01h */
  237. U8 ChainOffset; /* 02h */
  238. U8 Function; /* 03h */
  239. U16 Reserved2; /* 04h */
  240. U8 Reserved3; /* 06h */
  241. U8 MsgFlags; /* 07h */
  242. U32 MsgContext; /* 08h */
  243. } MSG_DIAG_RELEASE_REQUEST, MPI_POINTER PTR_MSG_DIAG_RELEASE_REQUEST,
  244. DiagReleaseRequest_t, MPI_POINTER pDiagReleaseRequest_t;
  245. /* Diagnostic Release reply */
  246. typedef struct _MSG_DIAG_RELEASE_REPLY
  247. {
  248. U8 Reserved1; /* 00h */
  249. U8 BufferType; /* 01h */
  250. U8 MsgLength; /* 02h */
  251. U8 Function; /* 03h */
  252. U16 Reserved2; /* 04h */
  253. U8 Reserved3; /* 06h */
  254. U8 MsgFlags; /* 07h */
  255. U32 MsgContext; /* 08h */
  256. U16 Reserved4; /* 0Ch */
  257. U16 IOCStatus; /* 0Eh */
  258. U32 IOCLogInfo; /* 10h */
  259. } MSG_DIAG_RELEASE_REPLY, MPI_POINTER PTR_MSG_DIAG_RELEASE_REPLY,
  260. DiagReleaseReply_t, MPI_POINTER pDiagReleaseReply_t;
  261. #endif