17c478bd9Sstevel@tonic-gate /* 2*9c8b6a95Sjw219769 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 37c478bd9Sstevel@tonic-gate * Use is subject to license terms. 47c478bd9Sstevel@tonic-gate */ 57c478bd9Sstevel@tonic-gate 67c478bd9Sstevel@tonic-gate #ifndef _SYS_MPI_IOC_H 77c478bd9Sstevel@tonic-gate #define _SYS_MPI_IOC_H 87c478bd9Sstevel@tonic-gate 97c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 107c478bd9Sstevel@tonic-gate 117c478bd9Sstevel@tonic-gate #ifdef __cplusplus 127c478bd9Sstevel@tonic-gate extern "C" { 137c478bd9Sstevel@tonic-gate #endif 147c478bd9Sstevel@tonic-gate 157c478bd9Sstevel@tonic-gate /* 167c478bd9Sstevel@tonic-gate * IOCInit message 177c478bd9Sstevel@tonic-gate */ 187c478bd9Sstevel@tonic-gate typedef struct msg_ioc_init { 197c478bd9Sstevel@tonic-gate uint8_t WhoInit; 207c478bd9Sstevel@tonic-gate uint8_t Reserved; 217c478bd9Sstevel@tonic-gate uint8_t ChainOffset; 227c478bd9Sstevel@tonic-gate uint8_t Function; 237c478bd9Sstevel@tonic-gate uint8_t Flags; 247c478bd9Sstevel@tonic-gate uint8_t MaxDevices; 257c478bd9Sstevel@tonic-gate uint8_t MaxBuses; 267c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 277c478bd9Sstevel@tonic-gate uint32_t MsgContext; 287c478bd9Sstevel@tonic-gate uint16_t ReplyFrameSize; 297c478bd9Sstevel@tonic-gate uint8_t Reserved1[2]; 307c478bd9Sstevel@tonic-gate uint32_t HostMfaHighAddr; 317c478bd9Sstevel@tonic-gate uint32_t SenseBufferHighAddr; 327c478bd9Sstevel@tonic-gate /* following used in new mpi implementations */ 337c478bd9Sstevel@tonic-gate uint32_t ReplyFifoHostSignalingAddr; 347c478bd9Sstevel@tonic-gate sge_simple_union_t HostPageBufferSGE; 357c478bd9Sstevel@tonic-gate uint16_t MsgVersion; 367c478bd9Sstevel@tonic-gate uint16_t HeaderVersion; 377c478bd9Sstevel@tonic-gate } msg_ioc_init_t; 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gate typedef struct msg_ioc_init_reply { 407c478bd9Sstevel@tonic-gate uint8_t WhoInit; 417c478bd9Sstevel@tonic-gate uint8_t Reserved; 427c478bd9Sstevel@tonic-gate uint8_t MsgLength; 437c478bd9Sstevel@tonic-gate uint8_t Function; 447c478bd9Sstevel@tonic-gate uint8_t Flags; 457c478bd9Sstevel@tonic-gate uint8_t MaxDevices; 467c478bd9Sstevel@tonic-gate uint8_t MaxBuses; 477c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 487c478bd9Sstevel@tonic-gate uint32_t MsgContext; 497c478bd9Sstevel@tonic-gate uint16_t Reserved2; 507c478bd9Sstevel@tonic-gate uint16_t IOCStatus; 517c478bd9Sstevel@tonic-gate uint32_t IOCLogInfo; 527c478bd9Sstevel@tonic-gate } msg_ioc_init_reply_t; 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gate /* 557c478bd9Sstevel@tonic-gate * WhoInit values 567c478bd9Sstevel@tonic-gate */ 577c478bd9Sstevel@tonic-gate #define MPI_WHOINIT_NO_ONE 0x00 587c478bd9Sstevel@tonic-gate #define MPI_WHOINIT_SYSTEM_BIOS 0x01 597c478bd9Sstevel@tonic-gate #define MPI_WHOINIT_ROM_BIOS 0x02 607c478bd9Sstevel@tonic-gate #define MPI_WHOINIT_PCI_PEER 0x03 617c478bd9Sstevel@tonic-gate #define MPI_WHOINIT_HOST_DRIVER 0x04 627c478bd9Sstevel@tonic-gate #define MPI_WHOINIT_MANUFACTURER 0x05 637c478bd9Sstevel@tonic-gate 647c478bd9Sstevel@tonic-gate /* 657c478bd9Sstevel@tonic-gate * Flags values 667c478bd9Sstevel@tonic-gate */ 677c478bd9Sstevel@tonic-gate #define MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE 0x01 687c478bd9Sstevel@tonic-gate #define MPI_IOCINIT_FLAGS_REPLY_FIFO_HOST_SIGNAL 0x02 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gate #define MPI_IOCINIT_MSGVERSION_MAJOR_MASK (0xFF00) 717c478bd9Sstevel@tonic-gate #define MPI_IOCINIT_MSGVERSION_MAJOR_SHIFT (8) 727c478bd9Sstevel@tonic-gate #define MPI_IOCINIT_MSGVERSION_MINOR_MASK (0x00FF) 737c478bd9Sstevel@tonic-gate #define MPI_IOCINIT_MSGVERSION_MINOR_SHIFT (0) 747c478bd9Sstevel@tonic-gate 757c478bd9Sstevel@tonic-gate #define MPI_IOCINIT_HEADERVERSION_UNIT_MASK (0xFF00) 767c478bd9Sstevel@tonic-gate #define MPI_IOCINIT_HEADERVERSION_UNIT_SHIFT (8) 777c478bd9Sstevel@tonic-gate #define MPI_IOCINIT_HEADERVERSION_DEV_MASK (0x00FF) 787c478bd9Sstevel@tonic-gate #define MPI_IOCINIT_HEADERVERSION_DEV_SHIFT (0) 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate /* 827c478bd9Sstevel@tonic-gate * IOC Facts message 837c478bd9Sstevel@tonic-gate */ 847c478bd9Sstevel@tonic-gate typedef struct msg_ioc_facts { 857c478bd9Sstevel@tonic-gate uint8_t Reserved[2]; 867c478bd9Sstevel@tonic-gate uint8_t ChainOffset; 877c478bd9Sstevel@tonic-gate uint8_t Function; 887c478bd9Sstevel@tonic-gate uint8_t Reserved1[3]; 897c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 907c478bd9Sstevel@tonic-gate uint32_t MsgContext; 917c478bd9Sstevel@tonic-gate } msg_ioc_facts_t; 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate /* 947c478bd9Sstevel@tonic-gate * FW version 957c478bd9Sstevel@tonic-gate */ 967c478bd9Sstevel@tonic-gate typedef struct mpi_fw_version_struct { 977c478bd9Sstevel@tonic-gate uint8_t Dev; 987c478bd9Sstevel@tonic-gate uint8_t Unit; 997c478bd9Sstevel@tonic-gate uint8_t Minor; 1007c478bd9Sstevel@tonic-gate uint8_t Major; 1017c478bd9Sstevel@tonic-gate } mpi_fw_version_struct_t; 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate typedef union mpi_fw_version { 1047c478bd9Sstevel@tonic-gate mpi_fw_version_struct_t Struct; 1057c478bd9Sstevel@tonic-gate uint32_t Word; 1067c478bd9Sstevel@tonic-gate } mpi_fw_version_t; 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate /* 1097c478bd9Sstevel@tonic-gate * IOC Facts Reply 1107c478bd9Sstevel@tonic-gate */ 1117c478bd9Sstevel@tonic-gate typedef struct msg_ioc_facts_reply { 1127c478bd9Sstevel@tonic-gate uint16_t MsgVersion; 1137c478bd9Sstevel@tonic-gate uint8_t MsgLength; 1147c478bd9Sstevel@tonic-gate uint8_t Function; 1157c478bd9Sstevel@tonic-gate uint16_t HeaderVersion; 1167c478bd9Sstevel@tonic-gate uint8_t IOCNumber; 1177c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 1187c478bd9Sstevel@tonic-gate uint32_t MsgContext; 1197c478bd9Sstevel@tonic-gate uint16_t IOCExceptions; 1207c478bd9Sstevel@tonic-gate uint16_t IOCStatus; 1217c478bd9Sstevel@tonic-gate uint32_t IOCLogInfo; 1227c478bd9Sstevel@tonic-gate uint8_t MaxChainDepth; 1237c478bd9Sstevel@tonic-gate uint8_t WhoInit; 1247c478bd9Sstevel@tonic-gate uint8_t BlockSize; 1257c478bd9Sstevel@tonic-gate uint8_t Flags; 1267c478bd9Sstevel@tonic-gate uint16_t ReplyQueueDepth; 1277c478bd9Sstevel@tonic-gate uint16_t RequestFrameSize; 1287c478bd9Sstevel@tonic-gate uint16_t Reserved_0101_FWVersion; /* obsolete */ 1297c478bd9Sstevel@tonic-gate uint16_t ProductID; 1307c478bd9Sstevel@tonic-gate uint32_t CurrentHostMfaHighAddr; 1317c478bd9Sstevel@tonic-gate uint16_t GlobalCredits; 1327c478bd9Sstevel@tonic-gate uint8_t NumberOfPorts; 1337c478bd9Sstevel@tonic-gate uint8_t EventState; 1347c478bd9Sstevel@tonic-gate uint32_t CurrentSenseBufferHighAddr; 1357c478bd9Sstevel@tonic-gate uint16_t CurReplyFrameSize; 1367c478bd9Sstevel@tonic-gate uint8_t MaxDevices; 1377c478bd9Sstevel@tonic-gate uint8_t MaxBuses; 1387c478bd9Sstevel@tonic-gate uint32_t FWImageSize; 1397c478bd9Sstevel@tonic-gate uint32_t IOCCapabilities; 1407c478bd9Sstevel@tonic-gate mpi_fw_version_t FWVersion; 1417c478bd9Sstevel@tonic-gate /* following used in newer mpi implementations */ 1427c478bd9Sstevel@tonic-gate uint16_t HighPriorityQueueDepth; 1437c478bd9Sstevel@tonic-gate uint16_t Reserved2; 1447c478bd9Sstevel@tonic-gate sge_simple_union_t HostPageBufferSGE; 1457c478bd9Sstevel@tonic-gate } msg_ioc_facts_reply_t; 1467c478bd9Sstevel@tonic-gate 1477c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_MSGVERSION_MAJOR_MASK 0xFF00 1487c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_MSGVERSION_MINOR_MASK 0x00FF 1497c478bd9Sstevel@tonic-gate 1507c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_HEADERVERSION_UNIT_MASK 0xFF00 1517c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_HEADERVERSION_DEV_MASK 0x00FF 1527c478bd9Sstevel@tonic-gate 1537c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL 0x0001 1547c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID 0x0002 1557c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL 0x0004 1567c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_EXCEPT_PERSISTENT_TABLE_FULL 0x0008 1577c478bd9Sstevel@tonic-gate 1587c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT 0x01 1597c478bd9Sstevel@tonic-gate 1607c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_EVENTSTATE_DISABLED 0x00 1617c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_EVENTSTATE_ENABLED 0x01 1627c478bd9Sstevel@tonic-gate 1637c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q 0x00000001 1647c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_CAPABILITY_REPLY_HOST_SIGNAL 0x00000002 1657c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_CAPABILITY_QUEUE_FULL_HANDLING 0x00000004 1667c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER 0x00000008 1677c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER 0x00000010 1687c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_CAPABILITY_EXTENDED_BUFFER 0x00000020 1697c478bd9Sstevel@tonic-gate #define MPI_IOCFACTS_CAPABILITY_EEDP 0x00000040 1707c478bd9Sstevel@tonic-gate 1717c478bd9Sstevel@tonic-gate /* 1727c478bd9Sstevel@tonic-gate * Port Facts message and Reply 1737c478bd9Sstevel@tonic-gate */ 1747c478bd9Sstevel@tonic-gate typedef struct msg_port_facts { 1757c478bd9Sstevel@tonic-gate uint8_t Reserved[2]; 1767c478bd9Sstevel@tonic-gate uint8_t ChainOffset; 1777c478bd9Sstevel@tonic-gate uint8_t Function; 1787c478bd9Sstevel@tonic-gate uint8_t Reserved1[2]; 1797c478bd9Sstevel@tonic-gate uint8_t PortNumber; 1807c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 1817c478bd9Sstevel@tonic-gate uint32_t MsgContext; 1827c478bd9Sstevel@tonic-gate } msg_port_facts_t; 1837c478bd9Sstevel@tonic-gate 1847c478bd9Sstevel@tonic-gate typedef struct msg_port_facts_reply { 1857c478bd9Sstevel@tonic-gate uint16_t Reserved; 1867c478bd9Sstevel@tonic-gate uint8_t MsgLength; 1877c478bd9Sstevel@tonic-gate uint8_t Function; 1887c478bd9Sstevel@tonic-gate uint16_t Reserved1; 1897c478bd9Sstevel@tonic-gate uint8_t PortNumber; 1907c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 1917c478bd9Sstevel@tonic-gate uint32_t MsgContext; 1927c478bd9Sstevel@tonic-gate uint16_t Reserved2; 1937c478bd9Sstevel@tonic-gate uint16_t IOCStatus; 1947c478bd9Sstevel@tonic-gate uint32_t IOCLogInfo; 1957c478bd9Sstevel@tonic-gate uint8_t Reserved3; 1967c478bd9Sstevel@tonic-gate uint8_t PortType; 1977c478bd9Sstevel@tonic-gate uint16_t MaxDevices; 1987c478bd9Sstevel@tonic-gate uint16_t PortSCSIID; 1997c478bd9Sstevel@tonic-gate uint16_t ProtocolFlags; 2007c478bd9Sstevel@tonic-gate uint16_t MaxPostedCmdBuffers; 2017c478bd9Sstevel@tonic-gate uint16_t MaxPersistentIDs; 2027c478bd9Sstevel@tonic-gate uint16_t MaxLanBuckets; 2037c478bd9Sstevel@tonic-gate uint16_t Reserved4; 2047c478bd9Sstevel@tonic-gate uint32_t Reserved5; 2057c478bd9Sstevel@tonic-gate } msg_port_facts_reply_t; 2067c478bd9Sstevel@tonic-gate 2077c478bd9Sstevel@tonic-gate /* 2087c478bd9Sstevel@tonic-gate * PortTypes values 2097c478bd9Sstevel@tonic-gate */ 2107c478bd9Sstevel@tonic-gate #define MPI_PORTFACTS_PORTTYPE_INACTIVE 0x00 2117c478bd9Sstevel@tonic-gate #define MPI_PORTFACTS_PORTTYPE_SCSI 0x01 2127c478bd9Sstevel@tonic-gate #define MPI_PORTFACTS_PORTTYPE_FC 0x10 2137c478bd9Sstevel@tonic-gate #define MPI_PORTFACTS_PORTTYPE_ISCSI 0x20 2147c478bd9Sstevel@tonic-gate #define MPI_PORTFACTS_PORTTYPE_SAS 0x30 2157c478bd9Sstevel@tonic-gate 2167c478bd9Sstevel@tonic-gate /* 2177c478bd9Sstevel@tonic-gate * ProtocolFlags values 2187c478bd9Sstevel@tonic-gate */ 2197c478bd9Sstevel@tonic-gate #define MPI_PORTFACTS_PROTOCOL_LOGBUSADDR 0x01 2207c478bd9Sstevel@tonic-gate #define MPI_PORTFACTS_PROTOCOL_LAN 0x02 2217c478bd9Sstevel@tonic-gate #define MPI_PORTFACTS_PROTOCOL_TARGET 0x04 2227c478bd9Sstevel@tonic-gate #define MPI_PORTFACTS_PROTOCOL_INITIATOR 0x08 2237c478bd9Sstevel@tonic-gate 2247c478bd9Sstevel@tonic-gate /* 2257c478bd9Sstevel@tonic-gate * Port Enable Message 2267c478bd9Sstevel@tonic-gate */ 2277c478bd9Sstevel@tonic-gate typedef struct msg_port_enable { 2287c478bd9Sstevel@tonic-gate uint8_t Reserved[2]; 2297c478bd9Sstevel@tonic-gate uint8_t ChainOffset; 2307c478bd9Sstevel@tonic-gate uint8_t Function; 2317c478bd9Sstevel@tonic-gate uint8_t Reserved1[2]; 2327c478bd9Sstevel@tonic-gate uint8_t PortNumber; 2337c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 2347c478bd9Sstevel@tonic-gate uint32_t MsgContext; 2357c478bd9Sstevel@tonic-gate } msg_port_enable_t; 2367c478bd9Sstevel@tonic-gate 2377c478bd9Sstevel@tonic-gate typedef struct msg_port_enable_reply { 2387c478bd9Sstevel@tonic-gate uint8_t Reserved[2]; 2397c478bd9Sstevel@tonic-gate uint8_t MsgLength; 2407c478bd9Sstevel@tonic-gate uint8_t Function; 2417c478bd9Sstevel@tonic-gate uint8_t Reserved1[2]; 2427c478bd9Sstevel@tonic-gate uint8_t PortNumber; 2437c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 2447c478bd9Sstevel@tonic-gate uint32_t MsgContext; 2457c478bd9Sstevel@tonic-gate uint16_t Reserved2; 2467c478bd9Sstevel@tonic-gate uint16_t IOCStatus; 2477c478bd9Sstevel@tonic-gate uint32_t IOCLogInfo; 2487c478bd9Sstevel@tonic-gate } msg_port_enable_reply_t; 2497c478bd9Sstevel@tonic-gate 2507c478bd9Sstevel@tonic-gate 2517c478bd9Sstevel@tonic-gate /* 2527c478bd9Sstevel@tonic-gate * Event Notification messages 2537c478bd9Sstevel@tonic-gate */ 2547c478bd9Sstevel@tonic-gate typedef struct msg_event_notify { 2557c478bd9Sstevel@tonic-gate uint8_t Switch; 2567c478bd9Sstevel@tonic-gate uint8_t Reserved; 2577c478bd9Sstevel@tonic-gate uint8_t ChainOffset; 2587c478bd9Sstevel@tonic-gate uint8_t Function; 2597c478bd9Sstevel@tonic-gate uint8_t Reserved1[3]; 2607c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 2617c478bd9Sstevel@tonic-gate uint32_t MsgContext; 2627c478bd9Sstevel@tonic-gate } msg_event_notify_t; 2637c478bd9Sstevel@tonic-gate 2647c478bd9Sstevel@tonic-gate /* 2657c478bd9Sstevel@tonic-gate * Event Notification Reply 2667c478bd9Sstevel@tonic-gate */ 2677c478bd9Sstevel@tonic-gate typedef struct msg_event_notify_reply { 2687c478bd9Sstevel@tonic-gate uint16_t EventDataLength; 2697c478bd9Sstevel@tonic-gate uint8_t MsgLength; 2707c478bd9Sstevel@tonic-gate uint8_t Function; 2717c478bd9Sstevel@tonic-gate uint8_t Reserved1[2]; 2727c478bd9Sstevel@tonic-gate uint8_t AckRequired; 2737c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 2747c478bd9Sstevel@tonic-gate uint32_t MsgContext; 2757c478bd9Sstevel@tonic-gate uint8_t Reserved2[2]; 2767c478bd9Sstevel@tonic-gate uint16_t IOCStatus; 2777c478bd9Sstevel@tonic-gate uint32_t IOCLogInfo; 2787c478bd9Sstevel@tonic-gate uint32_t Event; 2797c478bd9Sstevel@tonic-gate uint32_t EventContext; 2807c478bd9Sstevel@tonic-gate uint32_t Data[1]; 2817c478bd9Sstevel@tonic-gate } msg_event_notify_reply_t; 2827c478bd9Sstevel@tonic-gate 2837c478bd9Sstevel@tonic-gate /* 2847c478bd9Sstevel@tonic-gate * Event Acknowledge 2857c478bd9Sstevel@tonic-gate */ 2867c478bd9Sstevel@tonic-gate typedef struct msg_event_ack { 2877c478bd9Sstevel@tonic-gate uint8_t Reserved[2]; 2887c478bd9Sstevel@tonic-gate uint8_t ChainOffset; 2897c478bd9Sstevel@tonic-gate uint8_t Function; 2907c478bd9Sstevel@tonic-gate uint8_t Reserved1[3]; 2917c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 2927c478bd9Sstevel@tonic-gate uint32_t MsgContext; 2937c478bd9Sstevel@tonic-gate uint32_t Event; 2947c478bd9Sstevel@tonic-gate uint32_t EventContext; 2957c478bd9Sstevel@tonic-gate } msg_event_ack_t; 2967c478bd9Sstevel@tonic-gate 2977c478bd9Sstevel@tonic-gate typedef struct msg_event_ack_reply { 2987c478bd9Sstevel@tonic-gate uint8_t Reserved[2]; 2997c478bd9Sstevel@tonic-gate uint8_t Function; 3007c478bd9Sstevel@tonic-gate uint8_t MsgLength; 3017c478bd9Sstevel@tonic-gate uint8_t Reserved1[3]; 3027c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 3037c478bd9Sstevel@tonic-gate uint32_t MsgContext; 3047c478bd9Sstevel@tonic-gate uint16_t Reserved2; 3057c478bd9Sstevel@tonic-gate uint16_t IOCStatus; 3067c478bd9Sstevel@tonic-gate uint32_t IOCLogInfo; 3077c478bd9Sstevel@tonic-gate } msg_event_ack_reply_t; 3087c478bd9Sstevel@tonic-gate 3097c478bd9Sstevel@tonic-gate /* 3107c478bd9Sstevel@tonic-gate * Switch 3117c478bd9Sstevel@tonic-gate */ 3127c478bd9Sstevel@tonic-gate #define MPI_EVENT_NOTIFICATION_SWITCH_OFF 0x00 3137c478bd9Sstevel@tonic-gate #define MPI_EVENT_NOTIFICATION_SWITCH_ON 0x01 3147c478bd9Sstevel@tonic-gate 3157c478bd9Sstevel@tonic-gate /* 3167c478bd9Sstevel@tonic-gate * Event 3177c478bd9Sstevel@tonic-gate */ 3187c478bd9Sstevel@tonic-gate #define MPI_EVENT_NONE 0x00000000 3197c478bd9Sstevel@tonic-gate #define MPI_EVENT_LOG_DATA 0x00000001 3207c478bd9Sstevel@tonic-gate #define MPI_EVENT_STATE_CHANGE 0x00000002 3217c478bd9Sstevel@tonic-gate #define MPI_EVENT_UNIT_ATTENTION 0x00000003 3227c478bd9Sstevel@tonic-gate #define MPI_EVENT_IOC_BUS_RESET 0x00000004 3237c478bd9Sstevel@tonic-gate #define MPI_EVENT_EXT_BUS_RESET 0x00000005 3247c478bd9Sstevel@tonic-gate #define MPI_EVENT_RESCAN 0x00000006 3257c478bd9Sstevel@tonic-gate #define MPI_EVENT_LINK_STATUS_CHANGE 0x00000007 3267c478bd9Sstevel@tonic-gate #define MPI_EVENT_LOOP_STATE_CHANGE 0x00000008 3277c478bd9Sstevel@tonic-gate #define MPI_EVENT_LOGOUT 0x00000009 3287c478bd9Sstevel@tonic-gate #define MPI_EVENT_EVENT_CHANGE 0x0000000A 3297c478bd9Sstevel@tonic-gate #define MPI_EVENT_INTEGRATED_RAID 0x0000000B 3307c478bd9Sstevel@tonic-gate #define MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE 0x0000000C 3317c478bd9Sstevel@tonic-gate #define MPI_EVENT_ON_BUS_TIMER_EXPIRED 0x0000000D 3327c478bd9Sstevel@tonic-gate #define MPI_EVENT_QUEUE_FULL 0x0000000E 3337c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_DEVICE_STATUS_CHANGE 0x0000000F 3347c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_SES 0x00000010 3357c478bd9Sstevel@tonic-gate #define MPI_EVENT_PERSISTENT_TABLE_FULL 0x00000011 3367c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_PHY_LINK_STATUS 0x00000012 3377c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_DISCOVERY_ERROR 0x00000013 3386fec3791Sjesseb #define MPI_EVENT_IR_RESYNC_UPDATE 0x00000014 3396fec3791Sjesseb #define MPI_EVENT_IR2 0x00000015 3406fec3791Sjesseb #define MPI_EVENT_SAS_DISCOVERY 0x00000016 341936b7af6Sjw149990 #define MPI_EVENT_SAS_BROADCAST_PRIMITIVE 0x00000017 342936b7af6Sjw149990 #define MPI_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE 0x00000018 343936b7af6Sjw149990 #define MPI_EVENT_SAS_INIT_TABLE_OVERFLOW 0x00000019 344936b7af6Sjw149990 #define MPI_EVENT_SAS_SMP_ERROR 0x0000001A 345936b7af6Sjw149990 #define MPI_EVENT_SAS_EXPANDER_STATUS_CHANGE 0x0000001B 3466fec3791Sjesseb #define MPI_EVENT_LOG_ENTRY_ADDED 0x00000021 3477c478bd9Sstevel@tonic-gate 3487c478bd9Sstevel@tonic-gate /* 3497c478bd9Sstevel@tonic-gate * AckRequired field values 3507c478bd9Sstevel@tonic-gate */ 3517c478bd9Sstevel@tonic-gate #define MPI_EVENT_NOTIFICATION_ACK_NOT_REQUIRED 0x00 3527c478bd9Sstevel@tonic-gate #define MPI_EVENT_NOTIFICATION_ACK_REQUIRED 0x01 3537c478bd9Sstevel@tonic-gate 3547c478bd9Sstevel@tonic-gate /* 3557c478bd9Sstevel@tonic-gate * Eventchange event data 3567c478bd9Sstevel@tonic-gate */ 3577c478bd9Sstevel@tonic-gate typedef struct event_data_event_change { 3587c478bd9Sstevel@tonic-gate uint8_t EventState; 3597c478bd9Sstevel@tonic-gate uint8_t Reserved; 3607c478bd9Sstevel@tonic-gate uint16_t Reserved1; 3617c478bd9Sstevel@tonic-gate } event_data_event_change_t; 3627c478bd9Sstevel@tonic-gate 3637c478bd9Sstevel@tonic-gate /* 3647c478bd9Sstevel@tonic-gate * SCSI Event data for Port, Bus and Device forms) 3657c478bd9Sstevel@tonic-gate */ 3667c478bd9Sstevel@tonic-gate typedef struct event_data_scsi { 3677c478bd9Sstevel@tonic-gate uint8_t TargetID; 3687c478bd9Sstevel@tonic-gate uint8_t BusPort; 3697c478bd9Sstevel@tonic-gate uint16_t Reserved; 3707c478bd9Sstevel@tonic-gate } event_data_scsi_t; 3717c478bd9Sstevel@tonic-gate 3727c478bd9Sstevel@tonic-gate /* 3737c478bd9Sstevel@tonic-gate * SCSI Device Status Change Event data 3747c478bd9Sstevel@tonic-gate */ 3757c478bd9Sstevel@tonic-gate typedef struct event_data_scsi_device_status_change { 3767c478bd9Sstevel@tonic-gate uint8_t TargetID; 3777c478bd9Sstevel@tonic-gate uint8_t Bus; 3787c478bd9Sstevel@tonic-gate uint8_t ReasonCode; 3797c478bd9Sstevel@tonic-gate uint8_t LUN; 3807c478bd9Sstevel@tonic-gate uint8_t ASC; 3817c478bd9Sstevel@tonic-gate uint8_t ASCQ; 3827c478bd9Sstevel@tonic-gate uint16_t Reserved; 3837c478bd9Sstevel@tonic-gate } event_data_scsi_device_status_change_t; 3847c478bd9Sstevel@tonic-gate 3857c478bd9Sstevel@tonic-gate /* 3867c478bd9Sstevel@tonic-gate * SCSI Device Status Change Event data ReasonCode values 3877c478bd9Sstevel@tonic-gate */ 3887c478bd9Sstevel@tonic-gate #define MPI_EVENT_SCSI_DEV_STAT_RC_ADDED 0x03 3897c478bd9Sstevel@tonic-gate #define MPI_EVENT_SCSI_DEV_STAT_RC_NOT_RESPONDING 0x04 3907c478bd9Sstevel@tonic-gate #define MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA 0x05 3917c478bd9Sstevel@tonic-gate 3927c478bd9Sstevel@tonic-gate /* 3937c478bd9Sstevel@tonic-gate * SAS Device Status Change event data 3947c478bd9Sstevel@tonic-gate */ 3957c478bd9Sstevel@tonic-gate typedef struct event_data_sas_device_status_change { 3967c478bd9Sstevel@tonic-gate uint8_t TargetID; 3977c478bd9Sstevel@tonic-gate uint8_t Bus; 3987c478bd9Sstevel@tonic-gate uint8_t ReasonCode; 3997c478bd9Sstevel@tonic-gate uint8_t Reserved; 4007c478bd9Sstevel@tonic-gate uint8_t ASC; 4017c478bd9Sstevel@tonic-gate uint8_t ASCQ; 4027c478bd9Sstevel@tonic-gate uint16_t DevHandle; 4037c478bd9Sstevel@tonic-gate uint32_t DeviceInfo; 4047c478bd9Sstevel@tonic-gate uint16_t ParentDevHandle; 4057c478bd9Sstevel@tonic-gate uint8_t PhyNum; 4067c478bd9Sstevel@tonic-gate uint8_t Reserved1; 4077c478bd9Sstevel@tonic-gate uint64_t SASAddress; 4087c478bd9Sstevel@tonic-gate } event_data_sas_device_status_change_t; 4097c478bd9Sstevel@tonic-gate 4107c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_DEV_STAT_RC_ADDED 0x03 4117c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING 0x04 4127c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA 0x05 4137c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED 0x06 4147c478bd9Sstevel@tonic-gate 4157c478bd9Sstevel@tonic-gate /* 4167c478bd9Sstevel@tonic-gate * SCSI event data for queue full event 4177c478bd9Sstevel@tonic-gate */ 4187c478bd9Sstevel@tonic-gate typedef struct event_data_queue_full { 4197c478bd9Sstevel@tonic-gate uint8_t TargetID; 4207c478bd9Sstevel@tonic-gate uint8_t Bus; 4217c478bd9Sstevel@tonic-gate uint16_t CurrentDepth; 4227c478bd9Sstevel@tonic-gate } event_data_queue_full_t; 4237c478bd9Sstevel@tonic-gate 4247c478bd9Sstevel@tonic-gate /* 4257c478bd9Sstevel@tonic-gate * MPI Link Status Change Event data 4267c478bd9Sstevel@tonic-gate */ 4277c478bd9Sstevel@tonic-gate typedef struct event_data_link_status { 4287c478bd9Sstevel@tonic-gate uint8_t State; 4297c478bd9Sstevel@tonic-gate uint8_t Reserved; 4307c478bd9Sstevel@tonic-gate uint16_t Reserved1; 4317c478bd9Sstevel@tonic-gate uint8_t Reserved2; 4327c478bd9Sstevel@tonic-gate uint8_t Port; 4337c478bd9Sstevel@tonic-gate uint16_t Reserved3; 4347c478bd9Sstevel@tonic-gate } event_data_link_status_t; 4357c478bd9Sstevel@tonic-gate 4367c478bd9Sstevel@tonic-gate #define MPI_EVENT_LINK_STATUS_FAILURE 0x00000000 4377c478bd9Sstevel@tonic-gate #define MPI_EVENT_LINK_STATUS_ACTIVE 0x00000001 4387c478bd9Sstevel@tonic-gate 4397c478bd9Sstevel@tonic-gate /* MPI Loop State Change Event data */ 4407c478bd9Sstevel@tonic-gate 4417c478bd9Sstevel@tonic-gate typedef struct event_data_loop_state { 4427c478bd9Sstevel@tonic-gate uint8_t Character4; 4437c478bd9Sstevel@tonic-gate uint8_t Character3; 4447c478bd9Sstevel@tonic-gate uint8_t Type; 4457c478bd9Sstevel@tonic-gate uint8_t Reserved; 4467c478bd9Sstevel@tonic-gate uint8_t Reserved1; 4477c478bd9Sstevel@tonic-gate uint8_t Port; 4487c478bd9Sstevel@tonic-gate uint16_t Reserved2; 4497c478bd9Sstevel@tonic-gate } event_data_loop_state_t; 4507c478bd9Sstevel@tonic-gate 4517c478bd9Sstevel@tonic-gate #define MPI_EVENT_LOOP_STATE_CHANGE_LIP 0x0001 4527c478bd9Sstevel@tonic-gate #define MPI_EVENT_LOOP_STATE_CHANGE_LPE 0x0002 4537c478bd9Sstevel@tonic-gate #define MPI_EVENT_LOOP_STATE_CHANGE_LPB 0x0003 4547c478bd9Sstevel@tonic-gate 4557c478bd9Sstevel@tonic-gate /* 4567c478bd9Sstevel@tonic-gate * MPI LOGOUT Event data 4577c478bd9Sstevel@tonic-gate */ 4587c478bd9Sstevel@tonic-gate typedef struct event_data_logout { 4597c478bd9Sstevel@tonic-gate uint32_t NPortID; 4607c478bd9Sstevel@tonic-gate uint8_t Reserved; 4617c478bd9Sstevel@tonic-gate uint8_t Port; 4627c478bd9Sstevel@tonic-gate uint16_t Reserved1; 4637c478bd9Sstevel@tonic-gate } event_data_logout_t; 4647c478bd9Sstevel@tonic-gate 4657c478bd9Sstevel@tonic-gate /* 4667c478bd9Sstevel@tonic-gate * MPI RAID Status Change Event Data 4677c478bd9Sstevel@tonic-gate */ 4687c478bd9Sstevel@tonic-gate typedef struct event_data_raid { 4697c478bd9Sstevel@tonic-gate uint8_t VolumeID; 4707c478bd9Sstevel@tonic-gate uint8_t VolumeBus; 4717c478bd9Sstevel@tonic-gate uint8_t ReasonCode; 4727c478bd9Sstevel@tonic-gate uint8_t PhysDiskNum; 4737c478bd9Sstevel@tonic-gate uint8_t ASC; 4747c478bd9Sstevel@tonic-gate uint8_t ASCQ; 4757c478bd9Sstevel@tonic-gate uint16_t Reserved; 4767c478bd9Sstevel@tonic-gate uint32_t SettingsStatus; 4777c478bd9Sstevel@tonic-gate } event_data_raid_t; 4787c478bd9Sstevel@tonic-gate 4797c478bd9Sstevel@tonic-gate /* MPI RAID Status Change Event data ReasonCode values */ 4807c478bd9Sstevel@tonic-gate #define MPI_EVENT_RAID_RC_VOLUME_CREATED 0x00 4817c478bd9Sstevel@tonic-gate #define MPI_EVENT_RAID_RC_VOLUME_DELETED 0x01 4827c478bd9Sstevel@tonic-gate #define MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED 0x02 4837c478bd9Sstevel@tonic-gate #define MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED 0x03 4847c478bd9Sstevel@tonic-gate #define MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED 0x04 4857c478bd9Sstevel@tonic-gate #define MPI_EVENT_RAID_RC_PHYSDISK_CREATED 0x05 4867c478bd9Sstevel@tonic-gate #define MPI_EVENT_RAID_RC_PHYSDISK_DELETED 0x06 4877c478bd9Sstevel@tonic-gate #define MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED 0x07 4887c478bd9Sstevel@tonic-gate #define MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED 0x08 4897c478bd9Sstevel@tonic-gate #define MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED 0x09 4907c478bd9Sstevel@tonic-gate #define MPI_EVENT_RAID_RC_SMART_DATA 0x0A 4917c478bd9Sstevel@tonic-gate #define MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED 0x0B 4927c478bd9Sstevel@tonic-gate 4937c478bd9Sstevel@tonic-gate /* 4947c478bd9Sstevel@tonic-gate * SAS Phy link down event data 4957c478bd9Sstevel@tonic-gate */ 4967c478bd9Sstevel@tonic-gate typedef struct event_data_sas_phy_link_status { 4977c478bd9Sstevel@tonic-gate uint8_t PhyNum; 4987c478bd9Sstevel@tonic-gate uint8_t LinkRates; 4997c478bd9Sstevel@tonic-gate uint16_t DevHandle; 5007c478bd9Sstevel@tonic-gate uint64_t SASAddress; 5017c478bd9Sstevel@tonic-gate } event_data_sas_phy_link_status_t; 5027c478bd9Sstevel@tonic-gate 5037c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_PLS_LR_CURRENT_MASK 0xF0 5047c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_PLS_LR_CURRENT_SHIFT 4 5057c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_PLS_LR_PREVIOUS_MASK 0x0F 5067c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_PLS_LR_PREVIOUS_SHIFT 0 5077c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_PLS_LR_RATE_UNKNOWN 0x00 5087c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_PLS_LR_RATE_PHY_DISABLED 0x01 5097c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_PLS_LR_RATE_FAILED_SPEED_NEGOTIATION 0x02 5107c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_PLS_LR_RATE_SATA_OOB_COMPLETE 0x03 5117c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_PLS_LR_RATE_1_5 0x08 5127c478bd9Sstevel@tonic-gate #define MPI_EVENT_SAS_PLS_LR_RATE_3_0 0x09 5137c478bd9Sstevel@tonic-gate 514*9c8b6a95Sjw219769 /* 515*9c8b6a95Sjw219769 * sas discovery error structure 516*9c8b6a95Sjw219769 */ 517*9c8b6a95Sjw219769 typedef struct event_data_sas_discovery_error { 518*9c8b6a95Sjw219769 uint32_t DiscoveryStatus; 519*9c8b6a95Sjw219769 uint8_t Port; 520*9c8b6a95Sjw219769 uint8_t Reserved[3]; 521*9c8b6a95Sjw219769 } event_data_sas_discovery_error_t; 522*9c8b6a95Sjw219769 523*9c8b6a95Sjw219769 /* 524*9c8b6a95Sjw219769 * values for DiscoveryStatus field of SAS Discovery Error Event Data 525*9c8b6a95Sjw219769 */ 526*9c8b6a95Sjw219769 527*9c8b6a95Sjw219769 #define MPI_EVENT_SAS_DE_DS_LOOP_DETECTED 0x00000001 528*9c8b6a95Sjw219769 #define MPI_EVENT_SAS_DE_DS_UNADDRESSABLE_DEVICE 0x00000002 529*9c8b6a95Sjw219769 #define MPI_EVENT_SAS_DE_DS_MULTIPLE_PORTS 0x00000004 530*9c8b6a95Sjw219769 #define MPI_EVENT_SAS_DE_DS_EXPANDER_ERR 0x00000008 531*9c8b6a95Sjw219769 #define MPI_EVENT_SAS_DE_DS_SMP_TIMEOUT 0x00000010 532*9c8b6a95Sjw219769 #define MPI_EVENT_SAS_DE_DS_OUT_ROUTE_ENTRIES 0x00000020 533*9c8b6a95Sjw219769 #define MPI_EVENT_SAS_DE_DS_INDEX_NOT_EXIST 0x00000040 534*9c8b6a95Sjw219769 #define MPI_EVENT_SAS_DE_DS_SMP_FUNCTION_FAILED 0x00000080 535*9c8b6a95Sjw219769 #define MPI_EVENT_SAS_DE_DS_SMP_CRC_ERR 0x00000100 536*9c8b6a95Sjw219769 #define MPI_EVENT_SAS_DE_DS_MULTIPLE_SUBTRACTIVE 0x00000200 537*9c8b6a95Sjw219769 #define MPI_EVENT_SAS_DE_DS_TABLE_TO_TABLE 0x00000400 538*9c8b6a95Sjw219769 #define MPI_EVENT_SAS_DE_DS_MULTIPLE_PATHS 0x00000800 539*9c8b6a95Sjw219769 #define MPI_EVENT_SAS_DE_DS_MAX_SATA_TARGS 0x00001000 540*9c8b6a95Sjw219769 541936b7af6Sjw149990 typedef struct event_data_sas_expander_status_change { 542936b7af6Sjw149990 uint8_t ReasonCode; 543936b7af6Sjw149990 uint8_t Reserved1; 544936b7af6Sjw149990 uint16_t Reserved2; 545936b7af6Sjw149990 uint8_t PhysicalPort; 546936b7af6Sjw149990 uint8_t Reserved3; 547936b7af6Sjw149990 uint16_t EnclosureHandle; 548936b7af6Sjw149990 uint64_t SASAddress; 549936b7af6Sjw149990 uint32_t DiscoveryStatus; 550936b7af6Sjw149990 uint16_t DevHandle; 551936b7af6Sjw149990 uint16_t ParentDevHandle; 552936b7af6Sjw149990 uint16_t ExpanderChangeCount; 553936b7af6Sjw149990 uint16_t ExpanderRouteIndexes; 554936b7af6Sjw149990 uint8_t NumPhys; 555936b7af6Sjw149990 uint8_t SASLevel; 556936b7af6Sjw149990 uint8_t Flags; 557936b7af6Sjw149990 uint8_t Reserved4; 558936b7af6Sjw149990 } event_data_sas_expander_status_change_t; 559936b7af6Sjw149990 560936b7af6Sjw149990 /* 561936b7af6Sjw149990 * values for ReasonCode field of SAS Expander Status Change Event data 562936b7af6Sjw149990 */ 563936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_RC_ADDED 0x00 564936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_RC_NOT_RESPONDING 0x01 565936b7af6Sjw149990 566936b7af6Sjw149990 /* 567936b7af6Sjw149990 * values for DiscoveryStatus field of SAS Expander Status Change Event data 568936b7af6Sjw149990 */ 569936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_DS_LOOP_DETECTED 0x00000001 570936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_DS_UNADDRESSABLE_DEVICE 0x00000002 571936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_DS_MULTIPLE_PORTS 0x00000004 572936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_DS_EXPANDER_ERR 0x00000008 573936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_DS_SMP_TIMEOUT 0x00000010 574936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_DS_OUT_ROUTE_ENTRIES 0x00000020 575936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_DS_INDEX_NOT_EXIST 0x00000040 576936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_DS_SMP_FUNCTION_FAILED 0x00000080 577936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_DS_SMP_CRC_ERROR 0x00000100 578936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_DS_SUBTRACTIVE_LINK 0x00000200 579936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_DS_TABLE_LINK 0x00000400 580936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_DS_UNSUPPORTED_DEVICE 0x00000800 581936b7af6Sjw149990 582936b7af6Sjw149990 /* 583936b7af6Sjw149990 * values for Flags field of SAS Expander Status Change Event data 584936b7af6Sjw149990 */ 585936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_FLAGS_ROUTE_TABLE_CONFIG 0x02 586936b7af6Sjw149990 #define MPI_EVENT_SAS_EXP_FLAGS_CONFIG_IN_PROGRESS 0x01 587936b7af6Sjw149990 588936b7af6Sjw149990 5897c478bd9Sstevel@tonic-gate /* 5907c478bd9Sstevel@tonic-gate * Firmware Load Messages 5917c478bd9Sstevel@tonic-gate */ 5927c478bd9Sstevel@tonic-gate 5937c478bd9Sstevel@tonic-gate /* 5947c478bd9Sstevel@tonic-gate * Firmware download message and associated structures 5957c478bd9Sstevel@tonic-gate */ 5967c478bd9Sstevel@tonic-gate typedef struct msg_fw_download { 5977c478bd9Sstevel@tonic-gate uint8_t ImageType; 5987c478bd9Sstevel@tonic-gate uint8_t Reserved; 5997c478bd9Sstevel@tonic-gate uint8_t ChainOffset; 6007c478bd9Sstevel@tonic-gate uint8_t Function; 6017c478bd9Sstevel@tonic-gate uint8_t Reserved1[3]; 6027c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 6037c478bd9Sstevel@tonic-gate uint32_t MsgContext; 6047c478bd9Sstevel@tonic-gate sge_mpi_union_t SGL; 6057c478bd9Sstevel@tonic-gate } msg_fw_download_t; 6067c478bd9Sstevel@tonic-gate 6077c478bd9Sstevel@tonic-gate #define MPI_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT 0x01 6087c478bd9Sstevel@tonic-gate 6097c478bd9Sstevel@tonic-gate #define MPI_FW_DOWNLOAD_ITYPE_RESERVED 0x00 6107c478bd9Sstevel@tonic-gate #define MPI_FW_DOWNLOAD_ITYPE_FW 0x01 6117c478bd9Sstevel@tonic-gate #define MPI_FW_DOWNLOAD_ITYPE_BIOS 0x02 6127c478bd9Sstevel@tonic-gate #define MPI_FW_DOWNLOAD_ITYPE_NVDATA 0x03 6137c478bd9Sstevel@tonic-gate #define MPI_FW_DOWNLOAD_ITYPE_BOOTLOADER 0x04 6147c478bd9Sstevel@tonic-gate 6157c478bd9Sstevel@tonic-gate typedef struct fw_download_tcsge { 6167c478bd9Sstevel@tonic-gate uint8_t Reserved; 6177c478bd9Sstevel@tonic-gate uint8_t ContextSize; 6187c478bd9Sstevel@tonic-gate uint8_t DetailsLength; 6197c478bd9Sstevel@tonic-gate uint8_t Flags; 6207c478bd9Sstevel@tonic-gate uint32_t Reserved_0100_Checksum; /* obsolete */ 6217c478bd9Sstevel@tonic-gate uint32_t ImageOffset; 6227c478bd9Sstevel@tonic-gate uint32_t ImageSize; 6237c478bd9Sstevel@tonic-gate } fw_download_tcsge_t; 6247c478bd9Sstevel@tonic-gate 6257c478bd9Sstevel@tonic-gate typedef struct msg_fw_download_reply { 6267c478bd9Sstevel@tonic-gate uint8_t ImageType; 6277c478bd9Sstevel@tonic-gate uint8_t Reserved; 6287c478bd9Sstevel@tonic-gate uint8_t MsgLength; 6297c478bd9Sstevel@tonic-gate uint8_t Function; 6307c478bd9Sstevel@tonic-gate uint8_t Reserved1[3]; 6317c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 6327c478bd9Sstevel@tonic-gate uint32_t MsgContext; 6337c478bd9Sstevel@tonic-gate uint16_t Reserved2; 6347c478bd9Sstevel@tonic-gate uint16_t IOCStatus; 6357c478bd9Sstevel@tonic-gate uint32_t IOCLogInfo; 6367c478bd9Sstevel@tonic-gate } msg_fw_download_reply_t; 6377c478bd9Sstevel@tonic-gate 6387c478bd9Sstevel@tonic-gate /* 6397c478bd9Sstevel@tonic-gate * Firmware upload messages and associated structures 6407c478bd9Sstevel@tonic-gate */ 6417c478bd9Sstevel@tonic-gate typedef struct msg_fw_upload { 6427c478bd9Sstevel@tonic-gate uint8_t ImageType; 6437c478bd9Sstevel@tonic-gate uint8_t Reserved; 6447c478bd9Sstevel@tonic-gate uint8_t ChainOffset; 6457c478bd9Sstevel@tonic-gate uint8_t Function; 6467c478bd9Sstevel@tonic-gate uint8_t Reserved1[3]; 6477c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 6487c478bd9Sstevel@tonic-gate uint32_t MsgContext; 6497c478bd9Sstevel@tonic-gate sge_mpi_union_t SGL; 6507c478bd9Sstevel@tonic-gate } msg_fw_upload_t; 6517c478bd9Sstevel@tonic-gate 6527c478bd9Sstevel@tonic-gate #define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM 0x00 6537c478bd9Sstevel@tonic-gate #define MPI_FW_UPLOAD_ITYPE_FW_FLASH 0x01 6547c478bd9Sstevel@tonic-gate #define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH 0x02 6557c478bd9Sstevel@tonic-gate #define MPI_FW_UPLOAD_ITYPE_NVDATA 0x03 6567c478bd9Sstevel@tonic-gate #define MPI_FW_UPLOAD_ITYPE_BOOTLOADER 0x04 6577c478bd9Sstevel@tonic-gate 6587c478bd9Sstevel@tonic-gate typedef struct fw_upload_tcsge { 6597c478bd9Sstevel@tonic-gate uint8_t Reserved; 6607c478bd9Sstevel@tonic-gate uint8_t ContextSize; 6617c478bd9Sstevel@tonic-gate uint8_t DetailsLength; 6627c478bd9Sstevel@tonic-gate uint8_t Flags; 6637c478bd9Sstevel@tonic-gate uint32_t Reserved1; 6647c478bd9Sstevel@tonic-gate uint32_t ImageOffset; 6657c478bd9Sstevel@tonic-gate uint32_t ImageSize; 6667c478bd9Sstevel@tonic-gate } fw_upload_tcsge_t; 6677c478bd9Sstevel@tonic-gate 6687c478bd9Sstevel@tonic-gate typedef struct msg_fw_upload_reply { 6697c478bd9Sstevel@tonic-gate uint8_t ImageType; 6707c478bd9Sstevel@tonic-gate uint8_t Reserved; 6717c478bd9Sstevel@tonic-gate uint8_t MsgLength; 6727c478bd9Sstevel@tonic-gate uint8_t Function; 6737c478bd9Sstevel@tonic-gate uint8_t Reserved1[3]; 6747c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 6757c478bd9Sstevel@tonic-gate uint32_t MsgContext; 6767c478bd9Sstevel@tonic-gate uint16_t Reserved2; 6777c478bd9Sstevel@tonic-gate uint16_t IOCStatus; 6787c478bd9Sstevel@tonic-gate uint32_t IOCLogInfo; 6797c478bd9Sstevel@tonic-gate uint32_t ActualImageSize; 6807c478bd9Sstevel@tonic-gate } msg_fw_upload_reply_t; 6817c478bd9Sstevel@tonic-gate 6827c478bd9Sstevel@tonic-gate typedef struct msg_fw_header { 6837c478bd9Sstevel@tonic-gate uint32_t ArmBranchInstruction0; 6847c478bd9Sstevel@tonic-gate uint32_t Signature0; 6857c478bd9Sstevel@tonic-gate uint32_t Signature1; 6867c478bd9Sstevel@tonic-gate uint32_t Signature2; 6877c478bd9Sstevel@tonic-gate uint32_t ArmBranchInstruction1; 6887c478bd9Sstevel@tonic-gate uint32_t ArmBranchInstruction2; 6897c478bd9Sstevel@tonic-gate uint32_t Reserved; 6907c478bd9Sstevel@tonic-gate uint32_t Checksum; 6917c478bd9Sstevel@tonic-gate uint16_t VendorId; 6927c478bd9Sstevel@tonic-gate uint16_t ProductId; 6937c478bd9Sstevel@tonic-gate mpi_fw_version_t FWVersion; 6947c478bd9Sstevel@tonic-gate uint32_t SeqCodeVersion; 6957c478bd9Sstevel@tonic-gate uint32_t ImageSize; 6967c478bd9Sstevel@tonic-gate uint32_t NextImageHeaderOffset; 6977c478bd9Sstevel@tonic-gate uint32_t LoadStartAddress; 6987c478bd9Sstevel@tonic-gate uint32_t IopResetVectorValue; 6997c478bd9Sstevel@tonic-gate uint32_t IopResetRegAddr; 7007c478bd9Sstevel@tonic-gate uint32_t VersionNameWhat; 7017c478bd9Sstevel@tonic-gate uint8_t VersionName[32]; 7027c478bd9Sstevel@tonic-gate uint32_t VendorNameWhat; 7037c478bd9Sstevel@tonic-gate uint8_t VendorName[32]; 7047c478bd9Sstevel@tonic-gate } msg_fw_header_t; 7057c478bd9Sstevel@tonic-gate 7067c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_WHAT_SIGNATURE 0x29232840 7077c478bd9Sstevel@tonic-gate 7087c478bd9Sstevel@tonic-gate /* defines for using the ProductId field */ 7097c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_TYPE_MASK 0xF000 7107c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_TYPE_SCSI 0x0000 7117c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_TYPE_FC 0x1000 7127c478bd9Sstevel@tonic-gate 7137c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_PROD_MASK 0x0F00 7147c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_PROD_INITIATOR_SCSI 0x0100 7157c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI 0x0200 7167c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_PROD_TARGET_SCSI 0x0300 7177c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_PROD_IM_SCSI 0x0400 7187c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_PROD_IS_SCSI 0x0500 7197c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_PROD_CTX_SCSI 0x0600 7207c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_PROD_IR_SCSI 0x0700 7217c478bd9Sstevel@tonic-gate 7227c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_MASK 0x00FF 7237c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_1030A0_SCSI 0x0001 7247c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_1030B0_SCSI 0x0002 7257c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_1030B1_SCSI 0x0003 7267c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_1030C0_SCSI 0x0004 7277c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_1020A0_SCSI 0x0005 7287c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_1020B0_SCSI 0x0006 7297c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_1020B1_SCSI 0x0007 7307c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_1020C0_SCSI 0x0008 7317c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_1035A0_SCSI 0x0009 7327c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_1035B0_SCSI 0x000A 7337c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_1030TA0_SCSI 0x000B 7347c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_1020TA0_SCSI 0x000C 7357c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_909_FC 0x0000 7367c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_919_FC 0x0001 7377c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_919X_FC 0x0002 7387c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_1064_SAS 0x0001 7397c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_1068_SAS 0x0002 7407c478bd9Sstevel@tonic-gate #define MPI_FW_HEADER_PID_FAMILY_1078_SAS 0x0003 7417c478bd9Sstevel@tonic-gate 7427c478bd9Sstevel@tonic-gate typedef struct mpi_ext_image_header { 7437c478bd9Sstevel@tonic-gate uint8_t ImageType; 7447c478bd9Sstevel@tonic-gate uint8_t Reserved; 7457c478bd9Sstevel@tonic-gate uint16_t Reserved1; 7467c478bd9Sstevel@tonic-gate uint32_t Checksum; 7477c478bd9Sstevel@tonic-gate uint32_t ImageSize; 7487c478bd9Sstevel@tonic-gate uint32_t NextImageHeaderOffset; 7497c478bd9Sstevel@tonic-gate uint32_t LoadStartAddress; 7507c478bd9Sstevel@tonic-gate uint32_t Reserved2; 7517c478bd9Sstevel@tonic-gate } mpi_ext_image_header_t; 7527c478bd9Sstevel@tonic-gate 7537c478bd9Sstevel@tonic-gate #define MPI_EXT_IMAGE_TYPE_UNSPECIFIED 0x00 7547c478bd9Sstevel@tonic-gate #define MPI_EXT_IMAGE_TYPE_FW 0x01 7557c478bd9Sstevel@tonic-gate #define MPI_EXT_IMAGE_TYPE_NVDATA 0x03 7567c478bd9Sstevel@tonic-gate #define MPI_EXT_IMAGE_TYPE_BOOTLOADER 0x04 7577c478bd9Sstevel@tonic-gate 7587c478bd9Sstevel@tonic-gate #ifdef __cplusplus 7597c478bd9Sstevel@tonic-gate } 7607c478bd9Sstevel@tonic-gate #endif 7617c478bd9Sstevel@tonic-gate 7627c478bd9Sstevel@tonic-gate #endif /* _SYS_MPI_IOC_H */ 763