xref: /onnv-gate/usr/src/uts/common/sys/mpt/mpi_ioc.h (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3*0Sstevel@tonic-gate  * Use is subject to license terms.
4*0Sstevel@tonic-gate  */
5*0Sstevel@tonic-gate 
6*0Sstevel@tonic-gate #ifndef _SYS_MPI_IOC_H
7*0Sstevel@tonic-gate #define	_SYS_MPI_IOC_H
8*0Sstevel@tonic-gate 
9*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
10*0Sstevel@tonic-gate 
11*0Sstevel@tonic-gate #ifdef	__cplusplus
12*0Sstevel@tonic-gate extern "C" {
13*0Sstevel@tonic-gate #endif
14*0Sstevel@tonic-gate 
15*0Sstevel@tonic-gate /*
16*0Sstevel@tonic-gate  * IOCInit message
17*0Sstevel@tonic-gate  */
18*0Sstevel@tonic-gate typedef struct msg_ioc_init {
19*0Sstevel@tonic-gate 	uint8_t			WhoInit;
20*0Sstevel@tonic-gate 	uint8_t			Reserved;
21*0Sstevel@tonic-gate 	uint8_t			ChainOffset;
22*0Sstevel@tonic-gate 	uint8_t			Function;
23*0Sstevel@tonic-gate 	uint8_t			Flags;
24*0Sstevel@tonic-gate 	uint8_t			MaxDevices;
25*0Sstevel@tonic-gate 	uint8_t			MaxBuses;
26*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
27*0Sstevel@tonic-gate 	uint32_t		MsgContext;
28*0Sstevel@tonic-gate 	uint16_t		ReplyFrameSize;
29*0Sstevel@tonic-gate 	uint8_t			Reserved1[2];
30*0Sstevel@tonic-gate 	uint32_t		HostMfaHighAddr;
31*0Sstevel@tonic-gate 	uint32_t		SenseBufferHighAddr;
32*0Sstevel@tonic-gate 	/* following used in new mpi implementations */
33*0Sstevel@tonic-gate 	uint32_t		ReplyFifoHostSignalingAddr;
34*0Sstevel@tonic-gate 	sge_simple_union_t	HostPageBufferSGE;
35*0Sstevel@tonic-gate 	uint16_t		MsgVersion;
36*0Sstevel@tonic-gate 	uint16_t		HeaderVersion;
37*0Sstevel@tonic-gate } msg_ioc_init_t;
38*0Sstevel@tonic-gate 
39*0Sstevel@tonic-gate typedef struct msg_ioc_init_reply {
40*0Sstevel@tonic-gate 	uint8_t			WhoInit;
41*0Sstevel@tonic-gate 	uint8_t			Reserved;
42*0Sstevel@tonic-gate 	uint8_t			MsgLength;
43*0Sstevel@tonic-gate 	uint8_t			Function;
44*0Sstevel@tonic-gate 	uint8_t			Flags;
45*0Sstevel@tonic-gate 	uint8_t			MaxDevices;
46*0Sstevel@tonic-gate 	uint8_t			MaxBuses;
47*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
48*0Sstevel@tonic-gate 	uint32_t		MsgContext;
49*0Sstevel@tonic-gate 	uint16_t		Reserved2;
50*0Sstevel@tonic-gate 	uint16_t		IOCStatus;
51*0Sstevel@tonic-gate 	uint32_t		IOCLogInfo;
52*0Sstevel@tonic-gate } msg_ioc_init_reply_t;
53*0Sstevel@tonic-gate 
54*0Sstevel@tonic-gate /*
55*0Sstevel@tonic-gate  *  WhoInit values
56*0Sstevel@tonic-gate  */
57*0Sstevel@tonic-gate #define	MPI_WHOINIT_NO_ONE			0x00
58*0Sstevel@tonic-gate #define	MPI_WHOINIT_SYSTEM_BIOS			0x01
59*0Sstevel@tonic-gate #define	MPI_WHOINIT_ROM_BIOS			0x02
60*0Sstevel@tonic-gate #define	MPI_WHOINIT_PCI_PEER			0x03
61*0Sstevel@tonic-gate #define	MPI_WHOINIT_HOST_DRIVER			0x04
62*0Sstevel@tonic-gate #define	MPI_WHOINIT_MANUFACTURER		0x05
63*0Sstevel@tonic-gate 
64*0Sstevel@tonic-gate /*
65*0Sstevel@tonic-gate  * Flags values
66*0Sstevel@tonic-gate  */
67*0Sstevel@tonic-gate #define	MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE		0x01
68*0Sstevel@tonic-gate #define	MPI_IOCINIT_FLAGS_REPLY_FIFO_HOST_SIGNAL	0x02
69*0Sstevel@tonic-gate 
70*0Sstevel@tonic-gate #define	MPI_IOCINIT_MSGVERSION_MAJOR_MASK	(0xFF00)
71*0Sstevel@tonic-gate #define	MPI_IOCINIT_MSGVERSION_MAJOR_SHIFT	(8)
72*0Sstevel@tonic-gate #define	MPI_IOCINIT_MSGVERSION_MINOR_MASK	(0x00FF)
73*0Sstevel@tonic-gate #define	MPI_IOCINIT_MSGVERSION_MINOR_SHIFT	(0)
74*0Sstevel@tonic-gate 
75*0Sstevel@tonic-gate #define	MPI_IOCINIT_HEADERVERSION_UNIT_MASK	(0xFF00)
76*0Sstevel@tonic-gate #define	MPI_IOCINIT_HEADERVERSION_UNIT_SHIFT	(8)
77*0Sstevel@tonic-gate #define	MPI_IOCINIT_HEADERVERSION_DEV_MASK	(0x00FF)
78*0Sstevel@tonic-gate #define	MPI_IOCINIT_HEADERVERSION_DEV_SHIFT	(0)
79*0Sstevel@tonic-gate 
80*0Sstevel@tonic-gate 
81*0Sstevel@tonic-gate /*
82*0Sstevel@tonic-gate  * IOC Facts message
83*0Sstevel@tonic-gate  */
84*0Sstevel@tonic-gate typedef struct msg_ioc_facts {
85*0Sstevel@tonic-gate 	uint8_t			Reserved[2];
86*0Sstevel@tonic-gate 	uint8_t			ChainOffset;
87*0Sstevel@tonic-gate 	uint8_t			Function;
88*0Sstevel@tonic-gate 	uint8_t			Reserved1[3];
89*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
90*0Sstevel@tonic-gate 	uint32_t		MsgContext;
91*0Sstevel@tonic-gate } msg_ioc_facts_t;
92*0Sstevel@tonic-gate 
93*0Sstevel@tonic-gate /*
94*0Sstevel@tonic-gate  * FW version
95*0Sstevel@tonic-gate  */
96*0Sstevel@tonic-gate typedef struct mpi_fw_version_struct {
97*0Sstevel@tonic-gate 	uint8_t			Dev;
98*0Sstevel@tonic-gate 	uint8_t			Unit;
99*0Sstevel@tonic-gate 	uint8_t			Minor;
100*0Sstevel@tonic-gate 	uint8_t			Major;
101*0Sstevel@tonic-gate } mpi_fw_version_struct_t;
102*0Sstevel@tonic-gate 
103*0Sstevel@tonic-gate typedef union mpi_fw_version {
104*0Sstevel@tonic-gate 	mpi_fw_version_struct_t	Struct;
105*0Sstevel@tonic-gate 	uint32_t		Word;
106*0Sstevel@tonic-gate } mpi_fw_version_t;
107*0Sstevel@tonic-gate 
108*0Sstevel@tonic-gate /*
109*0Sstevel@tonic-gate  * IOC Facts Reply
110*0Sstevel@tonic-gate  */
111*0Sstevel@tonic-gate typedef struct msg_ioc_facts_reply {
112*0Sstevel@tonic-gate 	uint16_t		MsgVersion;
113*0Sstevel@tonic-gate 	uint8_t			MsgLength;
114*0Sstevel@tonic-gate 	uint8_t			Function;
115*0Sstevel@tonic-gate 	uint16_t		HeaderVersion;
116*0Sstevel@tonic-gate 	uint8_t			IOCNumber;
117*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
118*0Sstevel@tonic-gate 	uint32_t		MsgContext;
119*0Sstevel@tonic-gate 	uint16_t		IOCExceptions;
120*0Sstevel@tonic-gate 	uint16_t		IOCStatus;
121*0Sstevel@tonic-gate 	uint32_t		IOCLogInfo;
122*0Sstevel@tonic-gate 	uint8_t			MaxChainDepth;
123*0Sstevel@tonic-gate 	uint8_t			WhoInit;
124*0Sstevel@tonic-gate 	uint8_t			BlockSize;
125*0Sstevel@tonic-gate 	uint8_t			Flags;
126*0Sstevel@tonic-gate 	uint16_t		ReplyQueueDepth;
127*0Sstevel@tonic-gate 	uint16_t		RequestFrameSize;
128*0Sstevel@tonic-gate 	uint16_t		Reserved_0101_FWVersion; /* obsolete */
129*0Sstevel@tonic-gate 	uint16_t		ProductID;
130*0Sstevel@tonic-gate 	uint32_t		CurrentHostMfaHighAddr;
131*0Sstevel@tonic-gate 	uint16_t		GlobalCredits;
132*0Sstevel@tonic-gate 	uint8_t			NumberOfPorts;
133*0Sstevel@tonic-gate 	uint8_t			EventState;
134*0Sstevel@tonic-gate 	uint32_t		CurrentSenseBufferHighAddr;
135*0Sstevel@tonic-gate 	uint16_t		CurReplyFrameSize;
136*0Sstevel@tonic-gate 	uint8_t			MaxDevices;
137*0Sstevel@tonic-gate 	uint8_t			MaxBuses;
138*0Sstevel@tonic-gate 	uint32_t		FWImageSize;
139*0Sstevel@tonic-gate 	uint32_t		IOCCapabilities;
140*0Sstevel@tonic-gate 	mpi_fw_version_t	FWVersion;
141*0Sstevel@tonic-gate 	/* following used in newer mpi implementations */
142*0Sstevel@tonic-gate 	uint16_t		HighPriorityQueueDepth;
143*0Sstevel@tonic-gate 	uint16_t		Reserved2;
144*0Sstevel@tonic-gate 	sge_simple_union_t	HostPageBufferSGE;
145*0Sstevel@tonic-gate } msg_ioc_facts_reply_t;
146*0Sstevel@tonic-gate 
147*0Sstevel@tonic-gate #define	MPI_IOCFACTS_MSGVERSION_MAJOR_MASK	0xFF00
148*0Sstevel@tonic-gate #define	MPI_IOCFACTS_MSGVERSION_MINOR_MASK	0x00FF
149*0Sstevel@tonic-gate 
150*0Sstevel@tonic-gate #define	MPI_IOCFACTS_HEADERVERSION_UNIT_MASK	0xFF00
151*0Sstevel@tonic-gate #define	MPI_IOCFACTS_HEADERVERSION_DEV_MASK	0x00FF
152*0Sstevel@tonic-gate 
153*0Sstevel@tonic-gate #define	MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL	0x0001
154*0Sstevel@tonic-gate #define	MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID		0x0002
155*0Sstevel@tonic-gate #define	MPI_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL		0x0004
156*0Sstevel@tonic-gate #define	MPI_IOCFACTS_EXCEPT_PERSISTENT_TABLE_FULL	0x0008
157*0Sstevel@tonic-gate 
158*0Sstevel@tonic-gate #define	MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT	0x01
159*0Sstevel@tonic-gate 
160*0Sstevel@tonic-gate #define	MPI_IOCFACTS_EVENTSTATE_DISABLED	0x00
161*0Sstevel@tonic-gate #define	MPI_IOCFACTS_EVENTSTATE_ENABLED		0x01
162*0Sstevel@tonic-gate 
163*0Sstevel@tonic-gate #define	MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q		0x00000001
164*0Sstevel@tonic-gate #define	MPI_IOCFACTS_CAPABILITY_REPLY_HOST_SIGNAL	0x00000002
165*0Sstevel@tonic-gate #define	MPI_IOCFACTS_CAPABILITY_QUEUE_FULL_HANDLING	0x00000004
166*0Sstevel@tonic-gate #define	MPI_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER	0x00000008
167*0Sstevel@tonic-gate #define	MPI_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER		0x00000010
168*0Sstevel@tonic-gate #define	MPI_IOCFACTS_CAPABILITY_EXTENDED_BUFFER		0x00000020
169*0Sstevel@tonic-gate #define	MPI_IOCFACTS_CAPABILITY_EEDP			0x00000040
170*0Sstevel@tonic-gate 
171*0Sstevel@tonic-gate /*
172*0Sstevel@tonic-gate  * Port Facts message and Reply
173*0Sstevel@tonic-gate  */
174*0Sstevel@tonic-gate typedef struct msg_port_facts {
175*0Sstevel@tonic-gate 	uint8_t			Reserved[2];
176*0Sstevel@tonic-gate 	uint8_t			ChainOffset;
177*0Sstevel@tonic-gate 	uint8_t			Function;
178*0Sstevel@tonic-gate 	uint8_t			Reserved1[2];
179*0Sstevel@tonic-gate 	uint8_t			PortNumber;
180*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
181*0Sstevel@tonic-gate 	uint32_t		MsgContext;
182*0Sstevel@tonic-gate } msg_port_facts_t;
183*0Sstevel@tonic-gate 
184*0Sstevel@tonic-gate typedef struct msg_port_facts_reply {
185*0Sstevel@tonic-gate 	uint16_t		Reserved;
186*0Sstevel@tonic-gate 	uint8_t			MsgLength;
187*0Sstevel@tonic-gate 	uint8_t			Function;
188*0Sstevel@tonic-gate 	uint16_t		Reserved1;
189*0Sstevel@tonic-gate 	uint8_t			PortNumber;
190*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
191*0Sstevel@tonic-gate 	uint32_t		MsgContext;
192*0Sstevel@tonic-gate 	uint16_t		Reserved2;
193*0Sstevel@tonic-gate 	uint16_t		IOCStatus;
194*0Sstevel@tonic-gate 	uint32_t		IOCLogInfo;
195*0Sstevel@tonic-gate 	uint8_t			Reserved3;
196*0Sstevel@tonic-gate 	uint8_t			PortType;
197*0Sstevel@tonic-gate 	uint16_t		MaxDevices;
198*0Sstevel@tonic-gate 	uint16_t		PortSCSIID;
199*0Sstevel@tonic-gate 	uint16_t		ProtocolFlags;
200*0Sstevel@tonic-gate 	uint16_t		MaxPostedCmdBuffers;
201*0Sstevel@tonic-gate 	uint16_t		MaxPersistentIDs;
202*0Sstevel@tonic-gate 	uint16_t		MaxLanBuckets;
203*0Sstevel@tonic-gate 	uint16_t		Reserved4;
204*0Sstevel@tonic-gate 	uint32_t		Reserved5;
205*0Sstevel@tonic-gate } msg_port_facts_reply_t;
206*0Sstevel@tonic-gate 
207*0Sstevel@tonic-gate /*
208*0Sstevel@tonic-gate  * PortTypes values
209*0Sstevel@tonic-gate  */
210*0Sstevel@tonic-gate #define	MPI_PORTFACTS_PORTTYPE_INACTIVE		0x00
211*0Sstevel@tonic-gate #define	MPI_PORTFACTS_PORTTYPE_SCSI		0x01
212*0Sstevel@tonic-gate #define	MPI_PORTFACTS_PORTTYPE_FC		0x10
213*0Sstevel@tonic-gate #define	MPI_PORTFACTS_PORTTYPE_ISCSI		0x20
214*0Sstevel@tonic-gate #define	MPI_PORTFACTS_PORTTYPE_SAS		0x30
215*0Sstevel@tonic-gate 
216*0Sstevel@tonic-gate /*
217*0Sstevel@tonic-gate  * ProtocolFlags values
218*0Sstevel@tonic-gate  */
219*0Sstevel@tonic-gate #define	MPI_PORTFACTS_PROTOCOL_LOGBUSADDR	0x01
220*0Sstevel@tonic-gate #define	MPI_PORTFACTS_PROTOCOL_LAN		0x02
221*0Sstevel@tonic-gate #define	MPI_PORTFACTS_PROTOCOL_TARGET		0x04
222*0Sstevel@tonic-gate #define	MPI_PORTFACTS_PROTOCOL_INITIATOR	0x08
223*0Sstevel@tonic-gate 
224*0Sstevel@tonic-gate /*
225*0Sstevel@tonic-gate  * Port Enable Message
226*0Sstevel@tonic-gate  */
227*0Sstevel@tonic-gate typedef struct msg_port_enable {
228*0Sstevel@tonic-gate 	uint8_t			Reserved[2];
229*0Sstevel@tonic-gate 	uint8_t			ChainOffset;
230*0Sstevel@tonic-gate 	uint8_t			Function;
231*0Sstevel@tonic-gate 	uint8_t			Reserved1[2];
232*0Sstevel@tonic-gate 	uint8_t			PortNumber;
233*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
234*0Sstevel@tonic-gate 	uint32_t		MsgContext;
235*0Sstevel@tonic-gate } msg_port_enable_t;
236*0Sstevel@tonic-gate 
237*0Sstevel@tonic-gate typedef struct msg_port_enable_reply {
238*0Sstevel@tonic-gate 	uint8_t			Reserved[2];
239*0Sstevel@tonic-gate 	uint8_t			MsgLength;
240*0Sstevel@tonic-gate 	uint8_t			Function;
241*0Sstevel@tonic-gate 	uint8_t			Reserved1[2];
242*0Sstevel@tonic-gate 	uint8_t			PortNumber;
243*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
244*0Sstevel@tonic-gate 	uint32_t		MsgContext;
245*0Sstevel@tonic-gate 	uint16_t		Reserved2;
246*0Sstevel@tonic-gate 	uint16_t		IOCStatus;
247*0Sstevel@tonic-gate 	uint32_t		IOCLogInfo;
248*0Sstevel@tonic-gate } msg_port_enable_reply_t;
249*0Sstevel@tonic-gate 
250*0Sstevel@tonic-gate 
251*0Sstevel@tonic-gate /*
252*0Sstevel@tonic-gate  * Event Notification messages
253*0Sstevel@tonic-gate  */
254*0Sstevel@tonic-gate typedef struct msg_event_notify {
255*0Sstevel@tonic-gate 	uint8_t			Switch;
256*0Sstevel@tonic-gate 	uint8_t			Reserved;
257*0Sstevel@tonic-gate 	uint8_t			ChainOffset;
258*0Sstevel@tonic-gate 	uint8_t			Function;
259*0Sstevel@tonic-gate 	uint8_t			Reserved1[3];
260*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
261*0Sstevel@tonic-gate 	uint32_t		MsgContext;
262*0Sstevel@tonic-gate } msg_event_notify_t;
263*0Sstevel@tonic-gate 
264*0Sstevel@tonic-gate /*
265*0Sstevel@tonic-gate  * Event Notification Reply
266*0Sstevel@tonic-gate  */
267*0Sstevel@tonic-gate typedef struct msg_event_notify_reply {
268*0Sstevel@tonic-gate 	uint16_t		EventDataLength;
269*0Sstevel@tonic-gate 	uint8_t			MsgLength;
270*0Sstevel@tonic-gate 	uint8_t			Function;
271*0Sstevel@tonic-gate 	uint8_t			Reserved1[2];
272*0Sstevel@tonic-gate 	uint8_t			AckRequired;
273*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
274*0Sstevel@tonic-gate 	uint32_t		MsgContext;
275*0Sstevel@tonic-gate 	uint8_t			Reserved2[2];
276*0Sstevel@tonic-gate 	uint16_t		IOCStatus;
277*0Sstevel@tonic-gate 	uint32_t		IOCLogInfo;
278*0Sstevel@tonic-gate 	uint32_t		Event;
279*0Sstevel@tonic-gate 	uint32_t		EventContext;
280*0Sstevel@tonic-gate 	uint32_t		Data[1];
281*0Sstevel@tonic-gate } msg_event_notify_reply_t;
282*0Sstevel@tonic-gate 
283*0Sstevel@tonic-gate /*
284*0Sstevel@tonic-gate  * Event Acknowledge
285*0Sstevel@tonic-gate  */
286*0Sstevel@tonic-gate typedef struct msg_event_ack {
287*0Sstevel@tonic-gate 	uint8_t			Reserved[2];
288*0Sstevel@tonic-gate 	uint8_t			ChainOffset;
289*0Sstevel@tonic-gate 	uint8_t			Function;
290*0Sstevel@tonic-gate 	uint8_t			Reserved1[3];
291*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
292*0Sstevel@tonic-gate 	uint32_t		MsgContext;
293*0Sstevel@tonic-gate 	uint32_t		Event;
294*0Sstevel@tonic-gate 	uint32_t		EventContext;
295*0Sstevel@tonic-gate } msg_event_ack_t;
296*0Sstevel@tonic-gate 
297*0Sstevel@tonic-gate typedef struct msg_event_ack_reply {
298*0Sstevel@tonic-gate 	uint8_t			Reserved[2];
299*0Sstevel@tonic-gate 	uint8_t			Function;
300*0Sstevel@tonic-gate 	uint8_t			MsgLength;
301*0Sstevel@tonic-gate 	uint8_t			Reserved1[3];
302*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
303*0Sstevel@tonic-gate 	uint32_t		MsgContext;
304*0Sstevel@tonic-gate 	uint16_t		Reserved2;
305*0Sstevel@tonic-gate 	uint16_t		IOCStatus;
306*0Sstevel@tonic-gate 	uint32_t		IOCLogInfo;
307*0Sstevel@tonic-gate } msg_event_ack_reply_t;
308*0Sstevel@tonic-gate 
309*0Sstevel@tonic-gate /*
310*0Sstevel@tonic-gate  * Switch
311*0Sstevel@tonic-gate  */
312*0Sstevel@tonic-gate #define	MPI_EVENT_NOTIFICATION_SWITCH_OFF	0x00
313*0Sstevel@tonic-gate #define	MPI_EVENT_NOTIFICATION_SWITCH_ON	0x01
314*0Sstevel@tonic-gate 
315*0Sstevel@tonic-gate /*
316*0Sstevel@tonic-gate  * Event
317*0Sstevel@tonic-gate  */
318*0Sstevel@tonic-gate #define	MPI_EVENT_NONE				0x00000000
319*0Sstevel@tonic-gate #define	MPI_EVENT_LOG_DATA			0x00000001
320*0Sstevel@tonic-gate #define	MPI_EVENT_STATE_CHANGE			0x00000002
321*0Sstevel@tonic-gate #define	MPI_EVENT_UNIT_ATTENTION		0x00000003
322*0Sstevel@tonic-gate #define	MPI_EVENT_IOC_BUS_RESET			0x00000004
323*0Sstevel@tonic-gate #define	MPI_EVENT_EXT_BUS_RESET			0x00000005
324*0Sstevel@tonic-gate #define	MPI_EVENT_RESCAN			0x00000006
325*0Sstevel@tonic-gate #define	MPI_EVENT_LINK_STATUS_CHANGE		0x00000007
326*0Sstevel@tonic-gate #define	MPI_EVENT_LOOP_STATE_CHANGE		0x00000008
327*0Sstevel@tonic-gate #define	MPI_EVENT_LOGOUT			0x00000009
328*0Sstevel@tonic-gate #define	MPI_EVENT_EVENT_CHANGE			0x0000000A
329*0Sstevel@tonic-gate #define	MPI_EVENT_INTEGRATED_RAID		0x0000000B
330*0Sstevel@tonic-gate #define	MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE	0x0000000C
331*0Sstevel@tonic-gate #define	MPI_EVENT_ON_BUS_TIMER_EXPIRED		0x0000000D
332*0Sstevel@tonic-gate #define	MPI_EVENT_QUEUE_FULL			0x0000000E
333*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_DEVICE_STATUS_CHANGE	0x0000000F
334*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_SES			0x00000010
335*0Sstevel@tonic-gate #define	MPI_EVENT_PERSISTENT_TABLE_FULL		0x00000011
336*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_PHY_LINK_STATUS		0x00000012
337*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_DISCOVERY_ERROR		0x00000013
338*0Sstevel@tonic-gate 
339*0Sstevel@tonic-gate /*
340*0Sstevel@tonic-gate  * AckRequired field values
341*0Sstevel@tonic-gate  */
342*0Sstevel@tonic-gate #define	MPI_EVENT_NOTIFICATION_ACK_NOT_REQUIRED	0x00
343*0Sstevel@tonic-gate #define	MPI_EVENT_NOTIFICATION_ACK_REQUIRED	0x01
344*0Sstevel@tonic-gate 
345*0Sstevel@tonic-gate /*
346*0Sstevel@tonic-gate  * Eventchange event data
347*0Sstevel@tonic-gate  */
348*0Sstevel@tonic-gate typedef struct event_data_event_change {
349*0Sstevel@tonic-gate 	uint8_t			EventState;
350*0Sstevel@tonic-gate 	uint8_t			Reserved;
351*0Sstevel@tonic-gate 	uint16_t		Reserved1;
352*0Sstevel@tonic-gate } event_data_event_change_t;
353*0Sstevel@tonic-gate 
354*0Sstevel@tonic-gate /*
355*0Sstevel@tonic-gate  * SCSI Event data for Port, Bus and Device forms)
356*0Sstevel@tonic-gate  */
357*0Sstevel@tonic-gate typedef struct event_data_scsi {
358*0Sstevel@tonic-gate 	uint8_t			TargetID;
359*0Sstevel@tonic-gate 	uint8_t			BusPort;
360*0Sstevel@tonic-gate 	uint16_t		Reserved;
361*0Sstevel@tonic-gate } event_data_scsi_t;
362*0Sstevel@tonic-gate 
363*0Sstevel@tonic-gate /*
364*0Sstevel@tonic-gate  * SCSI Device Status Change Event data
365*0Sstevel@tonic-gate  */
366*0Sstevel@tonic-gate typedef struct event_data_scsi_device_status_change {
367*0Sstevel@tonic-gate 	uint8_t			TargetID;
368*0Sstevel@tonic-gate 	uint8_t			Bus;
369*0Sstevel@tonic-gate 	uint8_t			ReasonCode;
370*0Sstevel@tonic-gate 	uint8_t			LUN;
371*0Sstevel@tonic-gate 	uint8_t			ASC;
372*0Sstevel@tonic-gate 	uint8_t			ASCQ;
373*0Sstevel@tonic-gate 	uint16_t		Reserved;
374*0Sstevel@tonic-gate } event_data_scsi_device_status_change_t;
375*0Sstevel@tonic-gate 
376*0Sstevel@tonic-gate /*
377*0Sstevel@tonic-gate  * SCSI Device Status Change Event data ReasonCode values
378*0Sstevel@tonic-gate  */
379*0Sstevel@tonic-gate #define	MPI_EVENT_SCSI_DEV_STAT_RC_ADDED		0x03
380*0Sstevel@tonic-gate #define	MPI_EVENT_SCSI_DEV_STAT_RC_NOT_RESPONDING	0x04
381*0Sstevel@tonic-gate #define	MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA		0x05
382*0Sstevel@tonic-gate 
383*0Sstevel@tonic-gate /*
384*0Sstevel@tonic-gate  * SAS Device Status Change event data
385*0Sstevel@tonic-gate  */
386*0Sstevel@tonic-gate typedef struct event_data_sas_device_status_change {
387*0Sstevel@tonic-gate 	uint8_t		TargetID;
388*0Sstevel@tonic-gate 	uint8_t		Bus;
389*0Sstevel@tonic-gate 	uint8_t		ReasonCode;
390*0Sstevel@tonic-gate 	uint8_t		Reserved;
391*0Sstevel@tonic-gate 	uint8_t		ASC;
392*0Sstevel@tonic-gate 	uint8_t		ASCQ;
393*0Sstevel@tonic-gate 	uint16_t	DevHandle;
394*0Sstevel@tonic-gate 	uint32_t	DeviceInfo;
395*0Sstevel@tonic-gate 	uint16_t	ParentDevHandle;
396*0Sstevel@tonic-gate 	uint8_t		PhyNum;
397*0Sstevel@tonic-gate 	uint8_t		Reserved1;
398*0Sstevel@tonic-gate 	uint64_t	SASAddress;
399*0Sstevel@tonic-gate } event_data_sas_device_status_change_t;
400*0Sstevel@tonic-gate 
401*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_DEV_STAT_RC_ADDED			0x03
402*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING	0x04
403*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA		0x05
404*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED	0x06
405*0Sstevel@tonic-gate 
406*0Sstevel@tonic-gate /*
407*0Sstevel@tonic-gate  * SCSI event data for queue full event
408*0Sstevel@tonic-gate  */
409*0Sstevel@tonic-gate typedef struct event_data_queue_full {
410*0Sstevel@tonic-gate 	uint8_t		TargetID;
411*0Sstevel@tonic-gate 	uint8_t		Bus;
412*0Sstevel@tonic-gate 	uint16_t	CurrentDepth;
413*0Sstevel@tonic-gate } event_data_queue_full_t;
414*0Sstevel@tonic-gate 
415*0Sstevel@tonic-gate /*
416*0Sstevel@tonic-gate  * MPI Link Status Change Event data
417*0Sstevel@tonic-gate  */
418*0Sstevel@tonic-gate typedef struct event_data_link_status {
419*0Sstevel@tonic-gate 	uint8_t			State;
420*0Sstevel@tonic-gate 	uint8_t			Reserved;
421*0Sstevel@tonic-gate 	uint16_t		Reserved1;
422*0Sstevel@tonic-gate 	uint8_t			Reserved2;
423*0Sstevel@tonic-gate 	uint8_t			Port;
424*0Sstevel@tonic-gate 	uint16_t		Reserved3;
425*0Sstevel@tonic-gate } event_data_link_status_t;
426*0Sstevel@tonic-gate 
427*0Sstevel@tonic-gate #define	MPI_EVENT_LINK_STATUS_FAILURE		0x00000000
428*0Sstevel@tonic-gate #define	MPI_EVENT_LINK_STATUS_ACTIVE		0x00000001
429*0Sstevel@tonic-gate 
430*0Sstevel@tonic-gate /* MPI Loop State Change Event data */
431*0Sstevel@tonic-gate 
432*0Sstevel@tonic-gate typedef struct event_data_loop_state {
433*0Sstevel@tonic-gate 	uint8_t			Character4;
434*0Sstevel@tonic-gate 	uint8_t			Character3;
435*0Sstevel@tonic-gate 	uint8_t			Type;
436*0Sstevel@tonic-gate 	uint8_t			Reserved;
437*0Sstevel@tonic-gate 	uint8_t			Reserved1;
438*0Sstevel@tonic-gate 	uint8_t			Port;
439*0Sstevel@tonic-gate 	uint16_t		Reserved2;
440*0Sstevel@tonic-gate } event_data_loop_state_t;
441*0Sstevel@tonic-gate 
442*0Sstevel@tonic-gate #define	MPI_EVENT_LOOP_STATE_CHANGE_LIP		0x0001
443*0Sstevel@tonic-gate #define	MPI_EVENT_LOOP_STATE_CHANGE_LPE		0x0002
444*0Sstevel@tonic-gate #define	MPI_EVENT_LOOP_STATE_CHANGE_LPB		0x0003
445*0Sstevel@tonic-gate 
446*0Sstevel@tonic-gate /*
447*0Sstevel@tonic-gate  * MPI LOGOUT Event data
448*0Sstevel@tonic-gate  */
449*0Sstevel@tonic-gate typedef struct event_data_logout {
450*0Sstevel@tonic-gate 	uint32_t		NPortID;
451*0Sstevel@tonic-gate 	uint8_t			Reserved;
452*0Sstevel@tonic-gate 	uint8_t			Port;
453*0Sstevel@tonic-gate 	uint16_t		Reserved1;
454*0Sstevel@tonic-gate } event_data_logout_t;
455*0Sstevel@tonic-gate 
456*0Sstevel@tonic-gate /*
457*0Sstevel@tonic-gate  * MPI RAID Status Change Event Data
458*0Sstevel@tonic-gate  */
459*0Sstevel@tonic-gate typedef struct event_data_raid {
460*0Sstevel@tonic-gate 	uint8_t			VolumeID;
461*0Sstevel@tonic-gate 	uint8_t			VolumeBus;
462*0Sstevel@tonic-gate 	uint8_t			ReasonCode;
463*0Sstevel@tonic-gate 	uint8_t			PhysDiskNum;
464*0Sstevel@tonic-gate 	uint8_t			ASC;
465*0Sstevel@tonic-gate 	uint8_t			ASCQ;
466*0Sstevel@tonic-gate 	uint16_t		Reserved;
467*0Sstevel@tonic-gate 	uint32_t		SettingsStatus;
468*0Sstevel@tonic-gate } event_data_raid_t;
469*0Sstevel@tonic-gate 
470*0Sstevel@tonic-gate /* MPI RAID Status Change Event data ReasonCode values */
471*0Sstevel@tonic-gate #define	MPI_EVENT_RAID_RC_VOLUME_CREATED		0x00
472*0Sstevel@tonic-gate #define	MPI_EVENT_RAID_RC_VOLUME_DELETED		0x01
473*0Sstevel@tonic-gate #define	MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED	0x02
474*0Sstevel@tonic-gate #define	MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED		0x03
475*0Sstevel@tonic-gate #define	MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED	0x04
476*0Sstevel@tonic-gate #define	MPI_EVENT_RAID_RC_PHYSDISK_CREATED		0x05
477*0Sstevel@tonic-gate #define	MPI_EVENT_RAID_RC_PHYSDISK_DELETED		0x06
478*0Sstevel@tonic-gate #define	MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED	0x07
479*0Sstevel@tonic-gate #define	MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED	0x08
480*0Sstevel@tonic-gate #define	MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED		0x09
481*0Sstevel@tonic-gate #define	MPI_EVENT_RAID_RC_SMART_DATA			0x0A
482*0Sstevel@tonic-gate #define	MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED	0x0B
483*0Sstevel@tonic-gate 
484*0Sstevel@tonic-gate /*
485*0Sstevel@tonic-gate  * SAS Phy link down event data
486*0Sstevel@tonic-gate  */
487*0Sstevel@tonic-gate typedef struct event_data_sas_phy_link_status {
488*0Sstevel@tonic-gate 	uint8_t		PhyNum;
489*0Sstevel@tonic-gate 	uint8_t		LinkRates;
490*0Sstevel@tonic-gate 	uint16_t	DevHandle;
491*0Sstevel@tonic-gate 	uint64_t	SASAddress;
492*0Sstevel@tonic-gate } event_data_sas_phy_link_status_t;
493*0Sstevel@tonic-gate 
494*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_PLS_LR_CURRENT_MASK			0xF0
495*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_PLS_LR_CURRENT_SHIFT			4
496*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_PLS_LR_PREVIOUS_MASK			0x0F
497*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_PLS_LR_PREVIOUS_SHIFT			0
498*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_PLS_LR_RATE_UNKNOWN			0x00
499*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_PLS_LR_RATE_PHY_DISABLED			0x01
500*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_PLS_LR_RATE_FAILED_SPEED_NEGOTIATION	0x02
501*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_PLS_LR_RATE_SATA_OOB_COMPLETE		0x03
502*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_PLS_LR_RATE_1_5				0x08
503*0Sstevel@tonic-gate #define	MPI_EVENT_SAS_PLS_LR_RATE_3_0				0x09
504*0Sstevel@tonic-gate 
505*0Sstevel@tonic-gate /*
506*0Sstevel@tonic-gate  * Firmware Load Messages
507*0Sstevel@tonic-gate  */
508*0Sstevel@tonic-gate 
509*0Sstevel@tonic-gate /*
510*0Sstevel@tonic-gate  * Firmware download message and associated structures
511*0Sstevel@tonic-gate  */
512*0Sstevel@tonic-gate typedef struct msg_fw_download {
513*0Sstevel@tonic-gate 	uint8_t			ImageType;
514*0Sstevel@tonic-gate 	uint8_t			Reserved;
515*0Sstevel@tonic-gate 	uint8_t			ChainOffset;
516*0Sstevel@tonic-gate 	uint8_t			Function;
517*0Sstevel@tonic-gate 	uint8_t			Reserved1[3];
518*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
519*0Sstevel@tonic-gate 	uint32_t		MsgContext;
520*0Sstevel@tonic-gate 	sge_mpi_union_t		SGL;
521*0Sstevel@tonic-gate } msg_fw_download_t;
522*0Sstevel@tonic-gate 
523*0Sstevel@tonic-gate #define	MPI_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT	0x01
524*0Sstevel@tonic-gate 
525*0Sstevel@tonic-gate #define	MPI_FW_DOWNLOAD_ITYPE_RESERVED		0x00
526*0Sstevel@tonic-gate #define	MPI_FW_DOWNLOAD_ITYPE_FW		0x01
527*0Sstevel@tonic-gate #define	MPI_FW_DOWNLOAD_ITYPE_BIOS		0x02
528*0Sstevel@tonic-gate #define	MPI_FW_DOWNLOAD_ITYPE_NVDATA		0x03
529*0Sstevel@tonic-gate #define	MPI_FW_DOWNLOAD_ITYPE_BOOTLOADER	0x04
530*0Sstevel@tonic-gate 
531*0Sstevel@tonic-gate typedef struct fw_download_tcsge {
532*0Sstevel@tonic-gate 	uint8_t			Reserved;
533*0Sstevel@tonic-gate 	uint8_t			ContextSize;
534*0Sstevel@tonic-gate 	uint8_t			DetailsLength;
535*0Sstevel@tonic-gate 	uint8_t			Flags;
536*0Sstevel@tonic-gate 	uint32_t		Reserved_0100_Checksum; /* obsolete */
537*0Sstevel@tonic-gate 	uint32_t		ImageOffset;
538*0Sstevel@tonic-gate 	uint32_t		ImageSize;
539*0Sstevel@tonic-gate } fw_download_tcsge_t;
540*0Sstevel@tonic-gate 
541*0Sstevel@tonic-gate typedef struct msg_fw_download_reply {
542*0Sstevel@tonic-gate 	uint8_t			ImageType;
543*0Sstevel@tonic-gate 	uint8_t			Reserved;
544*0Sstevel@tonic-gate 	uint8_t			MsgLength;
545*0Sstevel@tonic-gate 	uint8_t			Function;
546*0Sstevel@tonic-gate 	uint8_t			Reserved1[3];
547*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
548*0Sstevel@tonic-gate 	uint32_t		MsgContext;
549*0Sstevel@tonic-gate 	uint16_t		Reserved2;
550*0Sstevel@tonic-gate 	uint16_t		IOCStatus;
551*0Sstevel@tonic-gate 	uint32_t		IOCLogInfo;
552*0Sstevel@tonic-gate } msg_fw_download_reply_t;
553*0Sstevel@tonic-gate 
554*0Sstevel@tonic-gate /*
555*0Sstevel@tonic-gate  * Firmware upload messages and associated structures
556*0Sstevel@tonic-gate  */
557*0Sstevel@tonic-gate typedef struct msg_fw_upload {
558*0Sstevel@tonic-gate 	uint8_t			ImageType;
559*0Sstevel@tonic-gate 	uint8_t			Reserved;
560*0Sstevel@tonic-gate 	uint8_t			ChainOffset;
561*0Sstevel@tonic-gate 	uint8_t			Function;
562*0Sstevel@tonic-gate 	uint8_t			Reserved1[3];
563*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
564*0Sstevel@tonic-gate 	uint32_t		MsgContext;
565*0Sstevel@tonic-gate 	sge_mpi_union_t		SGL;
566*0Sstevel@tonic-gate } msg_fw_upload_t;
567*0Sstevel@tonic-gate 
568*0Sstevel@tonic-gate #define	MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM	0x00
569*0Sstevel@tonic-gate #define	MPI_FW_UPLOAD_ITYPE_FW_FLASH	0x01
570*0Sstevel@tonic-gate #define	MPI_FW_UPLOAD_ITYPE_BIOS_FLASH	0x02
571*0Sstevel@tonic-gate #define	MPI_FW_UPLOAD_ITYPE_NVDATA	0x03
572*0Sstevel@tonic-gate #define	MPI_FW_UPLOAD_ITYPE_BOOTLOADER	0x04
573*0Sstevel@tonic-gate 
574*0Sstevel@tonic-gate typedef struct fw_upload_tcsge {
575*0Sstevel@tonic-gate 	uint8_t			Reserved;
576*0Sstevel@tonic-gate 	uint8_t			ContextSize;
577*0Sstevel@tonic-gate 	uint8_t			DetailsLength;
578*0Sstevel@tonic-gate 	uint8_t			Flags;
579*0Sstevel@tonic-gate 	uint32_t		Reserved1;
580*0Sstevel@tonic-gate 	uint32_t		ImageOffset;
581*0Sstevel@tonic-gate 	uint32_t		ImageSize;
582*0Sstevel@tonic-gate } fw_upload_tcsge_t;
583*0Sstevel@tonic-gate 
584*0Sstevel@tonic-gate typedef struct msg_fw_upload_reply {
585*0Sstevel@tonic-gate 	uint8_t			ImageType;
586*0Sstevel@tonic-gate 	uint8_t			Reserved;
587*0Sstevel@tonic-gate 	uint8_t			MsgLength;
588*0Sstevel@tonic-gate 	uint8_t			Function;
589*0Sstevel@tonic-gate 	uint8_t			Reserved1[3];
590*0Sstevel@tonic-gate 	uint8_t			MsgFlags;
591*0Sstevel@tonic-gate 	uint32_t		MsgContext;
592*0Sstevel@tonic-gate 	uint16_t		Reserved2;
593*0Sstevel@tonic-gate 	uint16_t		IOCStatus;
594*0Sstevel@tonic-gate 	uint32_t		IOCLogInfo;
595*0Sstevel@tonic-gate 	uint32_t		ActualImageSize;
596*0Sstevel@tonic-gate } msg_fw_upload_reply_t;
597*0Sstevel@tonic-gate 
598*0Sstevel@tonic-gate typedef struct msg_fw_header {
599*0Sstevel@tonic-gate 	uint32_t		ArmBranchInstruction0;
600*0Sstevel@tonic-gate 	uint32_t		Signature0;
601*0Sstevel@tonic-gate 	uint32_t		Signature1;
602*0Sstevel@tonic-gate 	uint32_t		Signature2;
603*0Sstevel@tonic-gate 	uint32_t		ArmBranchInstruction1;
604*0Sstevel@tonic-gate 	uint32_t		ArmBranchInstruction2;
605*0Sstevel@tonic-gate 	uint32_t		Reserved;
606*0Sstevel@tonic-gate 	uint32_t		Checksum;
607*0Sstevel@tonic-gate 	uint16_t		VendorId;
608*0Sstevel@tonic-gate 	uint16_t		ProductId;
609*0Sstevel@tonic-gate 	mpi_fw_version_t	FWVersion;
610*0Sstevel@tonic-gate 	uint32_t		SeqCodeVersion;
611*0Sstevel@tonic-gate 	uint32_t		ImageSize;
612*0Sstevel@tonic-gate 	uint32_t		NextImageHeaderOffset;
613*0Sstevel@tonic-gate 	uint32_t		LoadStartAddress;
614*0Sstevel@tonic-gate 	uint32_t		IopResetVectorValue;
615*0Sstevel@tonic-gate 	uint32_t		IopResetRegAddr;
616*0Sstevel@tonic-gate 	uint32_t		VersionNameWhat;
617*0Sstevel@tonic-gate 	uint8_t			VersionName[32];
618*0Sstevel@tonic-gate 	uint32_t		VendorNameWhat;
619*0Sstevel@tonic-gate 	uint8_t			VendorName[32];
620*0Sstevel@tonic-gate } msg_fw_header_t;
621*0Sstevel@tonic-gate 
622*0Sstevel@tonic-gate #define	MPI_FW_HEADER_WHAT_SIGNATURE			0x29232840
623*0Sstevel@tonic-gate 
624*0Sstevel@tonic-gate /* defines for using the ProductId field */
625*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_TYPE_MASK			0xF000
626*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_TYPE_SCSI			0x0000
627*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_TYPE_FC			0x1000
628*0Sstevel@tonic-gate 
629*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_PROD_MASK			0x0F00
630*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_PROD_INITIATOR_SCSI		0x0100
631*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI	0x0200
632*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_PROD_TARGET_SCSI		0x0300
633*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_PROD_IM_SCSI			0x0400
634*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_PROD_IS_SCSI			0x0500
635*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_PROD_CTX_SCSI			0x0600
636*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_PROD_IR_SCSI			0x0700
637*0Sstevel@tonic-gate 
638*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_MASK			0x00FF
639*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_1030A0_SCSI		0x0001
640*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_1030B0_SCSI		0x0002
641*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_1030B1_SCSI		0x0003
642*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_1030C0_SCSI		0x0004
643*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_1020A0_SCSI		0x0005
644*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_1020B0_SCSI		0x0006
645*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_1020B1_SCSI		0x0007
646*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_1020C0_SCSI		0x0008
647*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_1035A0_SCSI		0x0009
648*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_1035B0_SCSI		0x000A
649*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_1030TA0_SCSI		0x000B
650*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_1020TA0_SCSI		0x000C
651*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_909_FC			0x0000
652*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_919_FC			0x0001
653*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_919X_FC		0x0002
654*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_1064_SAS		0x0001
655*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_1068_SAS		0x0002
656*0Sstevel@tonic-gate #define	MPI_FW_HEADER_PID_FAMILY_1078_SAS		0x0003
657*0Sstevel@tonic-gate 
658*0Sstevel@tonic-gate typedef struct mpi_ext_image_header {
659*0Sstevel@tonic-gate 	uint8_t			ImageType;
660*0Sstevel@tonic-gate 	uint8_t			Reserved;
661*0Sstevel@tonic-gate 	uint16_t		Reserved1;
662*0Sstevel@tonic-gate 	uint32_t		Checksum;
663*0Sstevel@tonic-gate 	uint32_t		ImageSize;
664*0Sstevel@tonic-gate 	uint32_t		NextImageHeaderOffset;
665*0Sstevel@tonic-gate 	uint32_t		LoadStartAddress;
666*0Sstevel@tonic-gate 	uint32_t		Reserved2;
667*0Sstevel@tonic-gate } mpi_ext_image_header_t;
668*0Sstevel@tonic-gate 
669*0Sstevel@tonic-gate #define	MPI_EXT_IMAGE_TYPE_UNSPECIFIED			0x00
670*0Sstevel@tonic-gate #define	MPI_EXT_IMAGE_TYPE_FW				0x01
671*0Sstevel@tonic-gate #define	MPI_EXT_IMAGE_TYPE_NVDATA			0x03
672*0Sstevel@tonic-gate #define	MPI_EXT_IMAGE_TYPE_BOOTLOADER			0x04
673*0Sstevel@tonic-gate 
674*0Sstevel@tonic-gate #ifdef	__cplusplus
675*0Sstevel@tonic-gate }
676*0Sstevel@tonic-gate #endif
677*0Sstevel@tonic-gate 
678*0Sstevel@tonic-gate #endif	/* _SYS_MPI_IOC_H */
679