/* $Id$ */
/** @file
* VBox storage devices: LsiLogic LSI53c1030 SCSI controller - Defines and structures.
*/
/*
* Copyright (C) 2006-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef __DEVLSILOGICSCSI_H__
#define __DEVLSILOGICSCSI_H__
/*
* Custom fixed I/O ports for BIOS controller access. Note that these should
* not be in the ISA range (below 400h) to avoid conflicts with ISA device
* probing. Addresses in the 300h-340h range should be especially avoided.
*/
/** Equal for all devices */
/** SPI SCSI controller (LSI53C1030) */
#define LSILOGICSCSI_PCI_SPI_DEVICES_MAX (LSILOGICSCSI_PCI_SPI_BUSES_MAX*LSILOGICSCSI_PCI_SPI_DEVICES_PER_BUS_MAX)
/** SAS SCSI controller (SAS1068 PCI-X Fusion-MPT SAS) */
#define LSILOGICSCSI_PCI_SAS_DEVICES_MAX (LSILOGICSCSI_PCI_SAS_PORTS_MAX * LSILOGICSCSI_PCI_SAS_DEVICES_PER_PORT_MAX)
/**
* A SAS address.
*/
#pragma pack(1)
typedef union SASADDRESS
{
/** 64bit view. */
/** 32bit view. */
/** 16bit view. */
/** Byte view. */
#pragma pack()
/**
* Possible device types we support.
*/
typedef enum LSILOGICCTRLTYPE
{
/** SPI SCSI controller (PCI dev id 0x0030) */
/** SAS SCSI controller (PCI dev id 0x0054) */
/** 32bit hack */
/**
* A simple SG element for a 64bit address.
*/
#pragma pack(1)
typedef struct MptSGEntrySimple64
{
/** Length of the buffer this entry describes. */
/** Flag whether this element is the end of the list. */
/** Flag whether the address is 32bit or 64bits wide. */
/** Flag whether this buffer contains data to be transferred or is the destination. */
/** Flag whether this is a local address or a system address. */
/** Element type. */
/** Flag whether this is the last element of the buffer. */
/** Flag whether this is the last element of the current segment. */
/** Lower 32bits of the address of the data buffer. */
/** Upper 32bits of the address of the data buffer. */
#pragma pack()
/**
* A simple SG element for a 32bit address.
*/
#pragma pack(1)
typedef struct MptSGEntrySimple32
{
/** Length of the buffer this entry describes. */
/** Flag whether this element is the end of the list. */
/** Flag whether the address is 32bit or 64bits wide. */
/** Flag whether this buffer contains data to be transferred or is the destination. */
/** Flag whether this is a local address or a system address. */
/** Element type. */
/** Flag whether this is the last element of the buffer. */
/** Flag whether this is the last element of the current segment. */
/** Lower 32bits of the address of the data buffer. */
#pragma pack()
/**
* A chain SG element.
*/
#pragma pack(1)
typedef struct MptSGEntryChain
{
/** Size of the segment. */
/** Offset in 32bit words of the next chain element in the segment
* identified by this element. */
/** Reserved. */
/** Flag whether the address is 32bit or 64bits wide. */
/** Reserved. */
/** Flag whether this is a local address or a system address. */
/** Element type. */
/** Flag whether this is the last element of the buffer. */
/** Lower 32bits of the address of the data buffer. */
/** Upper 32bits of the address of the data buffer. */
#pragma pack()
typedef union MptSGEntryUnion
{
/**
* MPT Fusion message header - Common for all message frames.
* This is filled in by the guest.
*/
#pragma pack(1)
typedef struct MptMessageHdr
{
/** Function dependent data. */
/** Chain offset. */
/** The function code. */
/** Function dependent data. */
/** Message flags. */
/** Message context - Unique ID from the guest unmodified by the device. */
#pragma pack()
/** Defined function codes found in the message header. */
#ifdef DEBUG
/**
* Function names
*/
static const char * const g_apszMPTFunctionNames[] =
{
"SCSI I/O Request",
"SCSI Task Management",
"IOC Init",
"IOC Facts",
"Config",
"Port Facts",
"Port Enable",
"Event Notification",
"Event Ack",
"Firmware Download"
};
#endif
/**
* Default reply message.
* Send from the device to the guest upon completion of a request.
*/
#pragma pack(1)
typedef struct MptDefaultReplyMessage
{
/** Function dependent data. */
/** Length of the message in 32bit DWords. */
/** Function which completed. */
/** Function dependent. */
/** Message flags. */
/** Message context given in the request. */
/** Function dependent status code. */
/** Status of the IOC. */
/** Additional log info. */
#pragma pack()
/**
* IO controller init request.
*/
#pragma pack(1)
typedef struct MptIOCInitRequest
{
/** Which system send this init request. */
/** Reserved */
/** Chain offset in the SG list. */
/** Function to execute. */
/** Flags */
/** Maximum number of devices the driver can handle. */
/** Maximum number of buses the driver can handle. */
/** Message flags. */
/** Message context ID. */
/** Reply frame size. */
/** Reserved */
/** Upper 32bit part of the 64bit address the message frames are in.
* That means all frames must be in the same 4GB segment. */
/** Upper 32bit of the sense buffer. */
#pragma pack()
/**
* IO controller init reply.
*/
#pragma pack(1)
typedef struct MptIOCInitReply
{
/** Which subsystem send this init request. */
/** Reserved */
/** Message length */
/** Function. */
/** Flags */
/** Maximum number of devices the driver can handle. */
/** Maximum number of busses the driver can handle. */
/** Message flags. */
/** Message context ID */
/** Reserved */
/** IO controller status. */
/** IO controller log information. */
#pragma pack()
/**
* IO controller facts request.
*/
#pragma pack(1)
typedef struct MptIOCFactsRequest
{
/** Reserved. */
/** Chain offset in SG list. */
/** Function number. */
/** Reserved */
/** Message flags. */
/** Message context ID. */
#pragma pack()
/**
* IO controller facts reply.
*/
#pragma pack(1)
typedef struct MptIOCFactsReply
{
/** Message version. */
/** Message length. */
/** Function number. */
/** Reserved */
/** IO controller number */
/** Message flags. */
/** Message context ID. */
/** IO controller exceptions */
/** IO controller status. */
/** IO controller log information. */
/** Maximum chain depth. */
/** The current value of the WhoInit field. */
/** Block size. */
/** Flags. */
/** Depth of the reply queue. */
/** Size of a request frame. */
/** Reserved */
/** Product ID. */
/** Current value of the high 32bit MFA address. */
/** Global credits - Number of entries allocated to queues */
/** Number of ports on the IO controller */
/** Event state. */
/** Current value of the high 32bit sense buffer address. */
/** Current reply frame size. */
/** Maximum number of devices. */
/** Maximum number of buses. */
/** Size of the firmware image. */
/** Reserved. */
/** Firmware version */
#pragma pack()
/**
* Port facts request
*/
#pragma pack(1)
typedef struct MptPortFactsRequest
{
/** Reserved */
/** Message length. */
/** Function number. */
/** Reserved */
/** Port number to get facts for. */
/** Message flags. */
/** Message context ID. */
#pragma pack()
/**
* Port facts reply.
*/
#pragma pack(1)
typedef struct MptPortFactsReply
{
/** Reserved. */
/** Message length. */
/** Function number. */
/** Reserved */
/** Port number the facts are for. */
/** Message flags. */
/** Message context ID. */
/** Reserved. */
/** IO controller status. */
/** IO controller log information. */
/** Reserved */
/** Port type */
/** Maximum number of devices on this port. */
/** SCSI ID of this port on the attached bus. */
/** Protocol flags. */
/** Maximum number of target command buffers which can be posted to this port at a time. */
/** Maximum number of LAN buckets. */
/** Reserved. */
/** Reserved. */
#pragma pack()
/**
* Port Enable request.
*/
#pragma pack(1)
typedef struct MptPortEnableRequest
{
/** Reserved. */
/** Message length. */
/** Function number. */
/** Reserved. */
/** Port number to enable. */
/** Message flags. */
/** Message context ID. */
#pragma pack()
/**
* Port enable reply.
*/
#pragma pack(1)
typedef struct MptPortEnableReply
{
/** Reserved. */
/** Message length. */
/** Function number. */
/** Reserved */
/** Port number which was enabled. */
/** Message flags. */
/** Message context ID. */
/** Reserved. */
/** IO controller status */
/** IO controller log information. */
#pragma pack()
/**
* Event notification request.
*/
#pragma pack(1)
typedef struct MptEventNotificationRequest
{
/** Switch - Turns event notification on and off. */
/** Reserved. */
/** Chain offset. */
/** Function number. */
/** Reserved. */
/** Message flags. */
/** Message context ID. */
#pragma pack()
/**
* Event notification reply.
*/
#pragma pack(1)
typedef struct MptEventNotificationReply
{
/** Event data length. */
/** Message length. */
/** Function number. */
/** Reserved. */
/** Ack required. */
/** Message flags. */
/** Message context ID. */
/** Reserved. */
/** IO controller status. */
/** IO controller log information. */
/** Notification event. */
/** Event context. */
/** Event data. */
#pragma pack()
/**
* FW download request.
*/
#pragma pack(1)
typedef struct MptFWDownloadRequest
{
/** Switch - Turns event notification on and off. */
/** Reserved. */
/** Chain offset. */
/** Function number. */
/** Reserved. */
/** Message flags. */
/** Message context ID. */
#pragma pack()
/**
* FW download reply.
*/
#pragma pack(1)
typedef struct MptFWDownloadReply
{
/** Reserved. */
/** Message length. */
/** Function number. */
/** Reserved. */
/** Message flags. */
/** Message context ID. */
/** Reserved. */
/** IO controller status. */
/** IO controller log information. */
#pragma pack()
/**
* FW upload request.
*/
#pragma pack(1)
typedef struct MptFWUploadRequest
{
/** Requested image type. */
/** Reserved. */
/** Chain offset. */
/** Function number. */
/** Reserved. */
/** Message flags. */
/** Message context ID. */
#pragma pack()
/**
* FW upload reply.
*/
#pragma pack(1)
typedef struct MptFWUploadReply
{
/** Image type. */
/** Reserved. */
/** Message length. */
/** Function number. */
/** Reserved. */
/** Message flags. */
/** Message context ID. */
/** Reserved. */
/** IO controller status. */
/** IO controller log information. */
/** Uploaded image size. */
#pragma pack()
/**
* SCSI IO Request
*/
#pragma pack(1)
typedef struct MptSCSIIORequest
{
/** Target ID */
/** Bus number */
/** Chain offset */
/** Function number. */
/** CDB length. */
/** Sense buffer length. */
/** Reserved */
/** Message flags. */
/** Message context ID. */
/** LUN */
/** Control values. */
/** The CDB. */
/** Data length. */
/** Sense buffer low 32bit address. */
#pragma pack()
/**
* SCSI IO error reply.
*/
#pragma pack(1)
typedef struct MptSCSIIOErrorReply
{
/** Target ID */
/** Bus number */
/** Message length. */
/** Function number. */
/** CDB length */
/** Sense buffer length */
/** Reserved */
/** Message flags */
/** Message context ID */
/** SCSI status. */
/** SCSI state */
/** IO controller status */
/** IO controller log information */
/** Transfer count */
/** Sense count */
/** Response information */
#pragma pack()
/**
* IOC status codes specific to the SCSI I/O error reply.
*/
/**
* SCSI task management request.
*/
#pragma pack(1)
typedef struct MptSCSITaskManagementRequest
{
/** Target ID */
/** Bus number */
/** Chain offset */
/** Function number */
/** Reserved */
/** Task type */
/** Reserved */
/** Message flags */
/** Message context ID */
/** LUN */
/** Reserved */
/** Task message context ID. */
#pragma pack()
/**
* SCSI task management reply.
*/
#pragma pack(1)
typedef struct MptSCSITaskManagementReply
{
/** Target ID */
/** Bus number */
/** Message length */
/** Function number */
/** Reserved */
/** Task type */
/** Reserved */
/** Message flags */
/** Message context ID */
/** Reserved */
/** IO controller status */
/** IO controller log information */
/** Termination count */
#pragma pack()
/**
* Page address for SAS expander page types.
*/
#pragma pack(1)
typedef union MptConfigurationPageAddressSASExpander
{
struct
{
} Form0And2;
struct
{
} Form1;
#pragma pack()
/**
* Page address for SAS device page types.
*/
#pragma pack(1)
typedef union MptConfigurationPageAddressSASDevice
{
struct
{
} Form0And2;
struct
{
} Form1;
#pragma pack()
/**
* Page address for SAS PHY page types.
*/
#pragma pack(1)
typedef union MptConfigurationPageAddressSASPHY
{
struct
{
} Form0;
struct
{
} Form1;
#pragma pack()
/**
* Page address for SAS Enclosure page types.
*/
#pragma pack(1)
typedef struct MptConfigurationPageAddressSASEnclosure
{
#pragma pack()
/**
* Union of all possible address types.
*/
#pragma pack(1)
typedef union MptConfigurationPageAddress
{
/** 32bit view. */
struct
{
/** Port number to get the configuration page for. */
/** Reserved. */
struct
{
/** Target ID to get the configuration page for. */
/** Bus number to get the configuration page for. */
/** Reserved. */
#pragma pack()
/**
* Configuration request
*/
#pragma pack(1)
typedef struct MptConfigurationRequest
{
/** Action code. */
/** Reserved. */
/** Chain offset. */
/** Function number. */
/** Extended page length. */
/** Extended page type */
/** Message flags. */
/** Message context ID. */
/** Reserved. */
/** Version number of the page. */
/** Length of the page in 32bit Dwords. */
/** Page number to access. */
/** Type of the page being accessed. */
/** Page type dependent address. */
/** Simple SG element describing the buffer. */
#pragma pack()
/** Possible action codes. */
/** Page type codes. */
/**
* Configuration reply.
*/
#pragma pack(1)
typedef struct MptConfigurationReply
{
/** Action code. */
/** Reserved. */
/** Message length. */
/** Function number. */
/** Extended page length. */
/** Extended page type */
/** Message flags. */
/** Message context ID. */
/** Reserved. */
/** I/O controller status. */
/** I/O controller log information. */
/** Version number of the page. */
/** Length of the page in 32bit Dwords. */
/** Page number to access. */
/** Type of the page being accessed. */
#pragma pack()
/** Additional I/O controller status codes for the configuration reply. */
/**
* Union of all possible request messages.
*/
typedef union MptRequestUnion
{
/**
* Union of all possible reply messages.
*/
typedef union MptReplyUnion
{
/** 16bit view. */
/**
* Firmware image header.
*/
#pragma pack(1)
typedef struct FwImageHdr
{
/** ARM branch instruction. */
/** Signature part 1. */
/** Signature part 2. */
/** Signature part 3. */
/** Another ARM branch instruction. */
/** Yet another ARM branch instruction. */
/** Reserved. */
/** Checksum of the image. */
/** Vendor ID. */
/** Product ID. */
/** Firmware version. */
/** Firmware sequencer Code version. */
/** Image size in bytes including the header. */
/** Offset of the first extended image header. */
/** Start address of the image in IOC memory. */
/** Absolute start address of the Iop ARM. */
/** Address of the IopResetVector register. */
/** Marker value for what utility. */
/** ASCII string of version. */
/** Marker value for what utility. */
/** ASCII string of vendor name. */
#pragma pack()
/** First part of the signature. */
/** Second part of the signature. */
/** Third part of the signature. */
/** Load address of the firmware image to watch for,
* seen used by Solaris 9. When this value is written to the
* diagnostic address register we know a firmware image is downloaded.
*/
/**
* Configuration Page attributes.
*/
/**
* Configuration Page types.
*/
/**
* Extented page types.
*/
/**
* Configuration Page header - Common to all pages.
*/
#pragma pack(1)
typedef struct MptConfigurationPageHeader
{
/** Version of the page. */
/** The length of the page in 32bit D-Words. */
/** Number of the page. */
/** Type of the page. */
#pragma pack()
/**
* Extended configuration page header - Common to all extended pages.
*/
#pragma pack(1)
typedef struct MptExtendedConfigurationPageHeader
{
/** Version of the page. */
/** Reserved. */
/** Number of the page. */
/** Type of the page. */
/** Extended page length. */
/** Extended page type. */
/** Reserved */
#pragma pack()
/**
* Manufacturing page 0. - Readonly.
*/
#pragma pack(1)
typedef struct MptConfigurationPageManufacturing0
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Name of the chip. */
/** Chip revision. */
/** Board name. */
/** Board assembly. */
/** Board tracer number. */
} fields;
} u;
#pragma pack()
/**
* Manufacturing page 1. - Readonly Persistent.
*/
#pragma pack(1)
typedef struct MptConfigurationPageManufacturing1
{
/** Union */
union
{
/** Byte view */
/** Field view */
struct
{
/** The omnipresent header. */
/** VPD info - don't know what belongs here so all zero. */
} fields;
} u;
#pragma pack()
/**
* Manufacturing page 2. - Readonly.
*/
#pragma pack(1)
typedef struct MptConfigurationPageManufacturing2
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** PCI Device ID. */
/** PCI Revision ID. */
/** Reserved. */
/** Hardware specific settings... */
} fields;
} u;
#pragma pack()
/**
* Manufacturing page 3. - Readonly.
*/
#pragma pack(1)
typedef struct MptConfigurationPageManufacturing3
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** PCI Device ID. */
/** PCI Revision ID. */
/** Reserved. */
/** Chip specific settings... */
} fields;
} u;
#pragma pack()
/**
* Manufacturing page 4. - Readonly.
*/
#pragma pack(1)
typedef struct MptConfigurationPageManufacturing4
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Reserved. */
/** InfoOffset0. */
/** Info size. */
/** InfoOffset1. */
/** Info size. */
/** Size of the inquiry data. */
/** Reserved. */
/** Inquiry data. */
/** IS volume settings. */
/** IME volume settings. */
/** IM volume settings. */
} fields;
} u;
#pragma pack()
/**
* Manufacturing page 5 - Readonly.
*/
#pragma pack(1)
typedef struct MptConfigurationPageManufacturing5
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Base WWID. */
/** Flags */
/** Number of ForceWWID fields in this page. */
/** Reserved */
/** Reserved */
/** ForceWWID entries Maximum of 8 because the SAS controller doesn't has more */
} fields;
} u;
#pragma pack()
/**
* Manufacturing page 6 - Readonly.
*/
#pragma pack(1)
typedef struct MptConfigurationPageManufacturing6
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Product specific data - 0 for now */
} fields;
} u;
#pragma pack()
/**
* Manufacutring page 7 - PHY element.
*/
#pragma pack(1)
typedef struct MptConfigurationPageManufacturing7PHY
{
/** Pinout */
/** Connector name */
/** Location */
/** reserved */
/** Slot */
#pragma pack()
/**
* Manufacturing page 7 - Readonly.
*/
#pragma pack(1)
typedef struct MptConfigurationPageManufacturing7
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Reserved */
/** Flags */
/** Enclosure name */
/** Number of PHYs */
/** Reserved */
/** PHY list for the SAS controller - variable depending on the number of ports */
} fields;
} u;
#pragma pack()
AssertCompileSize(MptConfigurationPageManufacturing7, 36+sizeof(MptConfigurationPageManufacturing7PHY));
#define LSILOGICSCSI_MANUFACTURING7_GET_SIZE(ports) (sizeof(MptConfigurationPageManufacturing7) + ((ports) - 1) * sizeof(MptConfigurationPageManufacturing7PHY))
/** Flags for the flags field */
/** Flags for the pinout field */
/** Flags for the location field */
/**
* Manufacturing page 8 - Readonly.
*/
#pragma pack(1)
typedef struct MptConfigurationPageManufacturing8
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Product specific information */
} fields;
} u;
#pragma pack()
/**
* Manufacturing page 9 - Readonly.
*/
#pragma pack(1)
typedef struct MptConfigurationPageManufacturing9
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Product specific information */
} fields;
} u;
#pragma pack()
/**
* Manufacturing page 10 - Readonly.
*/
#pragma pack(1)
typedef struct MptConfigurationPageManufacturing10
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Product specific information */
} fields;
} u;
#pragma pack()
/**
* IO Unit page 0. - Readonly.
*/
#pragma pack(1)
typedef struct MptConfigurationPageIOUnit0
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** A unique identifier. */
} fields;
} u;
#pragma pack()
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageIOUnit1
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Flag whether this is a single function PCI device. */
/** Flag whether all possible paths to a device are mapped. */
/** Reserved. */
/** Flag whether all RAID functionality is disabled. */
/** Flag whether 32bit PCI accesses are forced. */
/** Reserved. */
} fields;
} u;
#pragma pack()
/**
* Adapter Ordering.
*/
#pragma pack(1)
typedef struct MptConfigurationPageIOUnit2AdapterOrdering
{
/** PCI bus number. */
/** PCI device and function number. */
/** Flag whether the adapter is embedded. */
/** Flag whether the adapter is enabled. */
/** Reserved. */
/** Reserved. */
#pragma pack()
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageIOUnit2
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Reserved. */
/** Flag whether Pause on error is enabled. */
/** Flag whether verbose mode is enabled. */
/** Set to disable color video. */
/** Flag whether int 40h is hooked. */
/** Reserved. */
/** Reserved. */
/** BIOS version. */
/** Adapter ordering. */
} fields;
} u;
#pragma pack()
/*
*/
#pragma pack(1)
typedef struct MptConfigurationPageIOUnit3
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Number of GPIO values. */
/** Reserved. */
} fields;
} u;
#pragma pack()
/*
* IO Unit page 4. - Readonly for everyone except the BIOS.
*/
#pragma pack(1)
typedef struct MptConfigurationPageIOUnit4
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Reserved */
/** SG entry describing the Firmware location. */
} fields;
} u;
#pragma pack()
/**
* IOC page 0. - Readonly
*/
#pragma pack(1)
typedef struct MptConfigurationPageIOC0
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Total amount of NV memory in bytes. */
/** Number of free bytes in the NV store. */
/** PCI vendor ID. */
/** PCI device ID. */
/** PCI revision ID. */
/** Reserved. */
/** PCI class code. */
/** Subsystem vendor Id. */
/** Subsystem Id. */
} fields;
} u;
#pragma pack()
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageIOC1
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Flag whether reply coalescing is enabled. */
/** Reserved. */
/** Coalescing Timeout in microseconds. */
/** Coalescing depth. */
/** Reserved. */
} fields;
} u;
#pragma pack()
/**
* IOC page 2. - Readonly
*/
#pragma pack(1)
typedef struct MptConfigurationPageIOC2
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Flag whether striping is supported. */
/** Flag whether enhanced mirroring is supported. */
/** Flag whether mirroring is supported. */
/** Reserved. */
/** Flag whether SES is supported. */
/** Flag whether SAF-TE is supported. */
/** Flag whether cross channel volumes are supported. */
/** Number of active integrated RAID volumes. */
/** Maximum number of integrated RAID volumes supported. */
/** Number of active integrated RAID physical disks. */
/** Maximum number of integrated RAID physical disks supported. */
/** RAID volumes... - not supported. */
} fields;
} u;
#pragma pack()
/**
* IOC page 3. - Readonly
*/
#pragma pack(1)
typedef struct MptConfigurationPageIOC3
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Number of active integrated RAID physical disks. */
/** Reserved. */
} fields;
} u;
#pragma pack()
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageIOC4
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Number of SEP entries in this page. */
/** Maximum number of SEp entries supported. */
/** Reserved. */
/** SEP entries... - not supported. */
} fields;
} u;
#pragma pack()
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageIOC6
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
} fields;
} u;
#pragma pack()
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageBIOS1
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** BIOS options */
/** IOC settings */
/** Reserved */
/** Device settings */
/** Number of devices */
/** Expander spinup */
/** Reserved */
/** I/O timeout of block devices without removable media */
/** I/O timeout sequential */
/** I/O timeout other */
/** I/O timeout of block devices with removable media */
} fields;
} u;
#pragma pack()
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageBIOS2
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Reserved */
/** Format of the boot device field. */
/** Previous format of the boot device field. */
/** Reserved */
/** Boot device fields - dependent on the format */
union
{
/** Device for AdapterNumber:Bus:Target:LUN */
struct
{
/** Target ID */
/** Bus */
/** Adapter Number */
/** Reserved */
/** Reserved */
/** LUN */
/** Reserved */
/** Device for PCIAddress:Bus:Target:LUN */
struct
{
/** Target ID */
/** Bus */
/** Adapter Number */
/** Reserved */
/** LUN */
/** Reserved */
/** Device for PCISlotNo:Bus:Target:LUN */
struct
{
/** Target ID */
/** Bus */
/** PCI Slot Number */
/** Reserved */
/** LUN */
/** Reserved */
/** Device for FC channel world wide name */
struct
{
/** World wide port name low */
/** World wide port name high */
/** Reserved */
/** LUN */
/** Reserved */
/** Device for FC channel world wide name */
struct
{
/** SAS address */
/** Reserved */
/** LUN */
/** Reserved */
struct
{
/** Enclosure logical ID */
/** Reserved */
/** LUN */
/** Reserved */
} BootDevice;
} fields;
} u;
#pragma pack()
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageBIOS4
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Reassignment Base WWID */
} fields;
} u;
#pragma pack()
/**
* SCSI-SPI port page 0. - Readonly
*/
#pragma pack(1)
typedef struct MptConfigurationPageSCSISPIPort0
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Flag whether this port is information unit transfers capable. */
/** Flag whether the port is DT (Dual Transfer) capable. */
/** Flag whether the port is QAS (Quick Arbitrate and Select) capable. */
/** Reserved. */
/** Minimum Synchronous transfer period. */
/** Maximum synchronous offset. */
/** Reserved. */
/** Flag whether indicating the width of the bus - 0 narrow and 1 for wide. */
/** Reserved */
/** Flag whether the port is AIP (Asynchronous Information Protection) capable. */
/** Signaling Type. */
/** Reserved. */
} fields;
} u;
#pragma pack()
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageSCSISPIPort1
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** The SCSI ID of the port. */
/** Reserved. */
/** Port response IDs Bit mask field. */
/** Value for the on BUS timer. */
} fields;
} u;
#pragma pack()
/**
* Device settings for one device.
*/
#pragma pack(1)
typedef struct MptDeviceSettings
{
/** Timeout for I/O in seconds. */
/** Minimum synchronous factor. */
/** Flag whether disconnect is enabled. */
/** Flag whether Scan ID is enabled. */
/** Flag whether Scan LUNs is enabled. */
/** Flag whether tagged queuing is enabled. */
/** Flag whether wide is enabled. */
/** Flag whether this device is bootable. */
/** Reserved. */
#pragma pack()
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageSCSISPIPort2
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Flag indicating the bus scan order. */
/** Reserved. */
/** Flag whether SCSI Bus resets are avoided. */
/** Flag whether alternate CHS is used. */
/** Flag whether termination is disabled. */
/** Reserved. */
/** Host SCSI ID. */
/** Initialize HBA. */
/** Removeable media setting. */
/** Spinup delay. */
/** Negotiating settings. */
/** Reserved. */
/** Device Settings. */
} fields;
} u;
#pragma pack()
/**
* SCSI-SPI device page 0. - Readonly
*/
#pragma pack(1)
typedef struct MptConfigurationPageSCSISPIDevice0
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Negotiated Parameters. */
/** Information Units enabled. */
/** Dual Transfers Enabled. */
/** QAS enabled. */
/** Reserved. */
/** Synchronous Transfer period. */
/** Synchronous offset. */
/** Reserved. */
/** Width - 0 for narrow and 1 for wide. */
/** Reserved. */
/** AIP enabled. */
/** Flag whether negotiation occurred. */
/** Flag whether a SDTR message was rejected. */
/** Flag whether a WDTR message was rejected. */
/** Flag whether a PPR message was rejected. */
/** Reserved. */
} fields;
} u;
#pragma pack()
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageSCSISPIDevice1
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Requested Parameters. */
/** Information Units enable. */
/** Dual Transfers Enable. */
/** QAS enable. */
/** Reserved. */
/** Synchronous Transfer period. */
/** Synchronous offset. */
/** Reserved. */
/** Width - 0 for narrow and 1 for wide. */
/** Reserved. */
/** AIP enable. */
/** Reserved. */
/** WDTR disallowed. */
/** SDTR disallowed. */
/** Reserved. */
} fields;
} u;
#pragma pack()
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageSCSISPIDevice2
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Reserved. */
/** ISI enable. */
/** Secondary driver enable. */
/** Reserved. */
/** Slew create controller. */
/** Primary drive strength controller. */
/** Secondary drive strength controller. */
/** Reserved. */
/** XCLKH_ST. */
/** XCLKS_ST. */
/** XCLKH_DT. */
/** XCLKS_DT. */
/** Parity pipe select. */
/** Reserved. */
/** Data bit pipeline select. */
} fields;
} u;
#pragma pack()
/**
* SCSI-SPI device page 3 (Revision G). - Readonly
*/
#pragma pack(1)
typedef struct MptConfigurationPageSCSISPIDevice3
{
/** Union. */
union
{
/** Byte view. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Number of times the IOC rejected a message because it doesn't support the operation. */
/** Number of times the SCSI bus entered an invalid operation state. */
/** Number of parity errors. */
/** Reserved. */
} fields;
} u;
#pragma pack()
/**
* PHY entry for the SAS I/O unit page 0
*/
#pragma pack(1)
typedef struct MptConfigurationPageSASIOUnit0PHY
{
/** Port number */
/** Port flags */
/** Phy flags */
/** negotiated link rate */
/** Controller phy device info */
/** Attached device handle */
/** Controller device handle */
/** Discovery status */
#pragma pack()
/**
* SAS I/O Unit page 0 - Readonly
*/
#pragma pack(1)
typedef struct MptConfigurationPageSASIOUnit0
{
/** Union. */
union
{
/** Byte view - variable. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Nvdata version default */
/** Nvdata version persistent */
/** Number of physical ports */
/** Reserved */
/** Content for each physical port - variable depending on the amount of ports. */
} fields;
} u;
#pragma pack()
AssertCompileSize(MptConfigurationPageSASIOUnit0, 8+2+2+1+3+sizeof(MptConfigurationPageSASIOUnit0PHY));
#define LSILOGICSCSI_SASIOUNIT0_GET_SIZE(ports) (sizeof(MptConfigurationPageSASIOUnit0) + ((ports) - 1) * sizeof(MptConfigurationPageSASIOUnit0PHY))
/**
* PHY entry for the SAS I/O unit page 1
*/
#pragma pack(1)
typedef struct MptConfigurationPageSASIOUnit1PHY
{
/** Port number */
/** Port flags */
/** Phy flags */
/** Max link rate */
/** Controller phy device info */
/** Maximum target port connect time */
/** Reserved */
#pragma pack()
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageSASIOUnit1
{
/** Union. */
union
{
/** Byte view - variable. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Control flags */
/** maximum number of SATA targets */
/** additional control flags */
/** Reserved */
/** Number of PHYs */
/** maximum SATA queue depth */
/** Delay for reporting missing devices. */
/** I/O device missing delay */
/** Content for each physical port - variable depending on the number of ports */
} fields;
} u;
#pragma pack()
#define LSILOGICSCSI_SASIOUNIT1_GET_SIZE(ports) (sizeof(MptConfigurationPageSASIOUnit1) + ((ports) - 1) * sizeof(MptConfigurationPageSASIOUnit1PHY))
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageSASIOUnit2
{
/** Union. */
union
{
/** Byte view - variable. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Device numbers per enclosure */
/** Boot device wait time */
/** Reserved */
/** Maximum number of persistent Bus and target ID mappings */
/** Number of persistent IDs used */
/** Status */
/** Flags */
/** Maximum number of physical mapped IDs */
} fields;
} u;
#pragma pack()
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageSASIOUnit3
{
/** Union. */
union
{
/** Byte view - variable. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Reserved */
} fields;
} u;
#pragma pack()
/**
* SAS PHY page 0 - Readonly
*/
#pragma pack(1)
typedef struct MptConfigurationPageSASPHY0
{
/** Union. */
union
{
/** Byte view - variable. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Owner dev handle. */
/** Reserved */
/** SAS address */
/** Attached device handle */
/** Attached phy identifier */
/** Reserved */
/** Attached device information */
/** Programmed link rate */
/** Hardware link rate */
/** Change count */
/** Flags */
/** Phy information */
} fields;
} u;
#pragma pack()
/**
* SAS PHY page 1 - Readonly
*/
#pragma pack(1)
typedef struct MptConfigurationPageSASPHY1
{
/** Union. */
union
{
/** Byte view - variable. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Reserved */
} fields;
} u;
#pragma pack()
/**
* SAS Device page 0 - Readonly
*/
#pragma pack(1)
typedef struct MptConfigurationPageSASDevice0
{
/** Union. */
union
{
/** Byte view - variable. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Slot number */
/** Enclosure handle. */
/** SAS address */
/** Parent device handle */
/** Phy number */
/** Access status */
/** Device handle */
/** Target ID */
/** Bus */
/** Device info */
/** Flags */
/** Physical port */
/** Reserved */
} fields;
} u;
#pragma pack()
/**
* SAS Device page 1 - Readonly
*/
#pragma pack(1)
typedef struct MptConfigurationPageSASDevice1
{
/** Union. */
union
{
/** Byte view - variable. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Reserved */
/** SAS address */
/** Reserved */
/** Device handle */
/** Target ID */
/** Bus */
/** Initial REgister device FIS */
} fields;
} u;
#pragma pack()
/**
*/
#pragma pack(1)
typedef struct MptConfigurationPageSASDevice2
{
/** Union. */
union
{
/** Byte view - variable. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Physical identifier */
/** Enclosure mapping */
} fields;
} u;
#pragma pack()
/**
* A device entitiy containing all pages.
*/
typedef struct MptSASDevice
{
/** Pointer to the next device if any. */
/** Pointer to the previous device if any. */
/**
* SAS Expander page 0 - Readonly
*/
#pragma pack(1)
typedef struct MptConfigurationPageSASExpander0
{
/** Union. */
union
{
/** Byte view - variable. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Physical port */
/** Reserved */
/** Enclosure handle */
/** SAS address */
/** Discovery status */
/** Device handle. */
/** Parent device handle */
/** Expander change count */
/** Expander route indexes */
/** Number of PHys in this expander */
/** SAS level */
/** Flags */
/** Reserved */
} fields;
} u;
#pragma pack()
/**
* SAS Expander page 1 - Readonly
*/
#pragma pack(1)
typedef struct MptConfigurationPageSASExpander1
{
/** Union. */
union
{
/** Byte view - variable. */
/** Field view. */
struct
{
/** The omnipresent header. */
/** Physical port */
/** Reserved */
/** Number of PHYs */
/** Number of the Phy the information in this page is for. */
/** Number of routing table entries */
/** Programmed link rate */
/** Hardware link rate */
/** Attached device handle */
/** Phy information */
/** Attached device information */
/** Owner device handle. */
/** Change count */
/** Negotiated link rate */
/** Phy identifier */
/** Attached phy identifier */
/** Reserved */
/** Discovery information */
/** Reserved */
} fields;
} u;
#pragma pack()
/**
* Structure of all supported pages for the SCSI SPI controller.
* Used to load the device state from older versions.
*/
typedef struct MptConfigurationPagesSupported_SSM_V2
{
struct
{
struct
{
struct
{
typedef struct MptConfigurationPagesSpi
{
struct
{
struct
{
struct
{
typedef struct MptPHY
{
#pragma pack(1)
typedef struct MptConfigurationPagesSas
{
/** Size of the manufacturing page 7 */
/** Pointer to the manufacturing page 7 */
/** Size of the I/O unit page 0 */
/** Pointer to the I/O unit page 0 */
/** Size of the I/O unit page 1 */
/** Pointer to the I/O unit page 1 */
/** I/O unit page 2 */
/** I/O unit page 3 */
/** Number of PHYs in the array. */
/** Pointer to an array of per PHYS pages. */
/** Number of devices detected. */
/** Pointer to the first SAS device. */
/** Pointer to the last SAS device. */
#pragma pack()
/**
* Structure of all supported pages for both controllers.
*/
typedef struct MptConfigurationPagesSupported
{
/* BIOS page 0 is not described */
/* BIOS page 3 is not described */
/** Controller dependent data. */
union
{
} u;
/**
* Initializes a page header.
*/
/**
* Initializes a extended page header.
*/
/**
* Possible SG element types.
*/
enum MPTSGENTRYTYPE
{
};
/**
* Register interface.
*/
/**
* Defined states that the SCSI controller can have.
*/
typedef enum LSILOGICSTATE
{
/** Reset state. */
/** Ready state. */
/** Operational state. */
/** Fault state. */
/** 32bit size hack */
/**
* Which entity needs to initialize the controller
* to get into the operational state.
*/
typedef enum LSILOGICWHOINIT
{
/** Not initialized. */
/** System BIOS. */
/** ROM Bios. */
/** PCI Peer. */
/** Host driver. */
/** Manufacturing. */
/** 32bit size hack. */
/**
* Doorbell state.
*/
typedef enum LSILOGICDOORBELLSTATE
{
/** Invalid value. */
/** Doorbell not in use. */
/** Reply frame removal, transfer number of entries, low 16bits. */
/** Reply frame removal, transfer number of entries, high 16bits. */
/** Reply frame removal, remove next free frame, low part. */
/** Reply frame removal, remove next free frame, high part. */
/** Function handshake. */
/** 32bit hack. */
/** Pointer to a doorbell state. */
/**
* IOC status codes.
*/
/**
* Size of the I/O and MMIO space.
*/
/**
* Doorbell register - Used to get the status of the controller and
* initialise it.
*/
# define LSILOGIC_REG_DOORBELL_SET_USED(enmDoorbell) (((enmDoorbell != LSILOGICDOORBELLSTATE_NOT_IN_USE) ? 1 : 0) << 27)
/**
* Functions which can be passed through the system doorbell.
*/
/**
* Write sequence register for the diagnostic register.
*/
/**
* Diagnostic register - used to reset the controller.
*/
/**
* Interrupt status register.
*/
/**
* Interrupt mask register.
*/
/**
* Queue registers.
*/
#endif /* __DEVLSILOGICSCSI_H__ */