EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

MdePkg/Include/Protocol/ScsiIo.h

Go to the documentation of this file.
00001 
00018 #ifndef __EFI_SCSI_IO_PROTOCOL_H__
00019 #define __EFI_SCSI_IO_PROTOCOL_H__
00020 
00021 #define EFI_SCSI_IO_PROTOCOL_GUID \
00022   { \
00023     0x932f47e6, 0x2362, 0x4002, {0x80, 0x3e, 0x3c, 0xd5, 0x4b, 0x13, 0x8f, 0x85 } \
00024   }
00025 
00029 typedef struct _EFI_SCSI_IO_PROTOCOL EFI_SCSI_IO_PROTOCOL;
00030 
00031 //
00032 // SCSI Data Direction definition
00033 //
00034 #define EFI_SCSI_IO_DATA_DIRECTION_READ                        0
00035 #define EFI_SCSI_IO_DATA_DIRECTION_WRITE                       1
00036 #define EFI_SCSI_IO_DATA_DIRECTION_BIDIRECTIONAL               2
00037 
00038 //
00039 // SCSI Host Adapter Status definition
00040 //
00041 #define EFI_SCSI_IO_STATUS_HOST_ADAPTER_OK                     0x00
00042 #define EFI_SCSI_IO_STATUS_HOST_ADAPTER_TIMEOUT_COMMAND        0x09    ///< timeout when processing the command
00043 #define EFI_SCSI_IO_STATUS_HOST_ADAPTER_TIMEOUT                0x0b    ///< timeout when waiting for the command processing
00044 #define EFI_SCSI_IO_STATUS_HOST_ADAPTER_MESSAGE_REJECT         0x0d    ///< a message reject was received when processing command
00045 #define EFI_SCSI_IO_STATUS_HOST_ADAPTER_BUS_RESET              0x0e    ///< a bus reset was detected
00046 #define EFI_SCSI_IO_STATUS_HOST_ADAPTER_PARITY_ERROR           0x0f
00047 #define EFI_SCSI_IO_STATUS_HOST_ADAPTER_REQUEST_SENSE_FAILED   0x10    ///< the adapter failed in issuing request sense command
00048 #define EFI_SCSI_IO_STATUS_HOST_ADAPTER_SELECTION_TIMEOUT      0x11    ///< selection timeout
00049 #define EFI_SCSI_IO_STATUS_HOST_ADAPTER_DATA_OVERRUN_UNDERRUN  0x12    ///< data overrun or data underrun
00050 #define EFI_SCSI_IO_STATUS_HOST_ADAPTER_BUS_FREE               0x13    ///< Unexepected bus free
00051 #define EFI_SCSI_IO_STATUS_HOST_ADAPTER_PHASE_ERROR            0x14    ///< Target bus phase sequence failure
00052 #define EFI_SCSI_IO_STATUS_HOST_ADAPTER_OTHER                  0x7f
00053 
00054 
00055 //
00056 // SCSI Target Status definition
00057 //
00058 #define EFI_SCSI_IO_STATUS_TARGET_GOOD                         0x00
00059 #define EFI_SCSI_IO_STATUS_TARGET_CHECK_CONDITION              0x02    ///< check condition
00060 #define EFI_SCSI_IO_STATUS_TARGET_CONDITION_MET                0x04    ///< condition met
00061 #define EFI_SCSI_IO_STATUS_TARGET_BUSY                         0x08    ///< busy
00062 #define EFI_SCSI_IO_STATUS_TARGET_INTERMEDIATE                 0x10    ///< intermediate
00063 #define EFI_SCSI_IO_STATUS_TARGET_INTERMEDIATE_CONDITION_MET   0x14    ///< intermediate-condition met
00064 #define EFI_SCSI_IO_STATUS_TARGET_RESERVATION_CONFLICT         0x18    ///< reservation conflict
00065 #define EFI_SCSI_IO_STATUS_TARGET_COMMOND_TERMINATED           0x22    ///< command terminated
00066 #define EFI_SCSI_IO_STATUS_TARGET_QUEUE_FULL                   0x28    ///< queue full
00067 
00068 typedef struct {
00077   UINT64                              Timeout;
00082   VOID                                *InDataBuffer;
00087   VOID                                *OutDataBuffer;
00092   VOID                                *SenseData;
00097   VOID                                *Cdb;
00102   UINT32                              InTransferLength;
00107   UINT32                              OutTransferLength;
00112   UINT8                               CdbLength;
00117   UINT8                               DataDirection;
00123   UINT8                               HostAdapterStatus;
00128   UINT8                               TargetStatus;
00133   UINT8                               SenseDataLength;
00134 } EFI_SCSI_IO_SCSI_REQUEST_PACKET;
00135 
00147 typedef
00148 EFI_STATUS
00149 (EFIAPI *EFI_SCSI_IO_PROTOCOL_GET_DEVICE_TYPE)(
00150   IN  EFI_SCSI_IO_PROTOCOL            *This,
00151   OUT UINT8                           *DeviceType
00152   );
00153 
00167 typedef
00168 EFI_STATUS
00169 (EFIAPI *EFI_SCSI_IO_PROTOCOL_GET_DEVICE_LOCATION)(
00170   IN EFI_SCSI_IO_PROTOCOL           *This,
00171   IN OUT UINT8                      **Target,
00172   OUT UINT64                        *Lun
00173   );
00174 
00188 typedef
00189 EFI_STATUS
00190 (EFIAPI *EFI_SCSI_IO_PROTOCOL_RESET_BUS)(
00191   IN EFI_SCSI_IO_PROTOCOL     *This
00192   );
00193 
00208 typedef
00209 EFI_STATUS
00210 (EFIAPI *EFI_SCSI_IO_PROTOCOL_RESET_DEVICE)(
00211   IN EFI_SCSI_IO_PROTOCOL     *This
00212   );
00213 
00214 
00263 typedef
00264 EFI_STATUS
00265 (EFIAPI *EFI_SCSI_IO_PROTOCOL_EXEC_SCSI_COMMAND)(
00266   IN EFI_SCSI_IO_PROTOCOL                   *This,
00267   IN OUT  EFI_SCSI_IO_SCSI_REQUEST_PACKET   *Packet,
00268   IN EFI_EVENT                              Event  OPTIONAL
00269   );
00270 
00274 struct _EFI_SCSI_IO_PROTOCOL {
00275   EFI_SCSI_IO_PROTOCOL_GET_DEVICE_TYPE      GetDeviceType;
00276   EFI_SCSI_IO_PROTOCOL_GET_DEVICE_LOCATION  GetDeviceLocation;
00277   EFI_SCSI_IO_PROTOCOL_RESET_BUS            ResetBus;
00278   EFI_SCSI_IO_PROTOCOL_RESET_DEVICE         ResetDevice;
00279   EFI_SCSI_IO_PROTOCOL_EXEC_SCSI_COMMAND    ExecuteScsiCommand;    
00280 
00287   UINT32                                    IoAlign;
00288 };
00289 
00290 extern EFI_GUID gEfiScsiIoProtocolGuid;
00291 
00292 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines