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