TianoCore EDK2 master
Loading...
Searching...
No Matches
ScsiPassThru.h
Go to the documentation of this file.
1
16#ifndef __SCSI_PASS_THROUGH_H__
17#define __SCSI_PASS_THROUGH_H__
18
19#define EFI_SCSI_PASS_THRU_PROTOCOL_GUID \
20 { \
21 0xa59e8fcf, 0xbda0, 0x43bb, {0x90, 0xb1, 0xd3, 0x73, 0x2e, 0xca, 0xa8, 0x77 } \
22 }
23
28
29#define EFI_SCSI_PASS_THRU_ATTRIBUTES_PHYSICAL 0x0001
30#define EFI_SCSI_PASS_THRU_ATTRIBUTES_LOGICAL 0x0002
31#define EFI_SCSI_PASS_THRU_ATTRIBUTES_NONBLOCKIO 0x0004
32
33//
34// SCSI Host Adapter Status definition
35//
36#define EFI_SCSI_STATUS_HOST_ADAPTER_OK 0x00
37#define EFI_SCSI_STATUS_HOST_ADAPTER_TIMEOUT_COMMAND 0x09 // timeout when processing the command
38#define EFI_SCSI_STATUS_HOST_ADAPTER_TIMEOUT 0x0b // timeout when waiting for the command processing
39#define EFI_SCSI_STATUS_HOST_ADAPTER_MESSAGE_REJECT 0x0d // a message reject was received when processing command
40#define EFI_SCSI_STATUS_HOST_ADAPTER_BUS_RESET 0x0e // a bus reset was detected
41#define EFI_SCSI_STATUS_HOST_ADAPTER_PARITY_ERROR 0x0f
42#define EFI_SCSI_STATUS_HOST_ADAPTER_REQUEST_SENSE_FAILED 0x10 // the adapter failed in issuing request sense command
43#define EFI_SCSI_STATUS_HOST_ADAPTER_SELECTION_TIMEOUT 0x11 // selection timeout
44#define EFI_SCSI_STATUS_HOST_ADAPTER_DATA_OVERRUN_UNDERRUN 0x12 // data overrun or data underrun
45#define EFI_SCSI_STATUS_HOST_ADAPTER_BUS_FREE 0x13 // Unexepected bus free
46#define EFI_SCSI_STATUS_HOST_ADAPTER_PHASE_ERROR 0x14 // Target bus phase sequence failure
47#define EFI_SCSI_STATUS_HOST_ADAPTER_OTHER 0x7f
48
49//
50// SCSI Target Status definition
51//
52#define EFI_SCSI_STATUS_TARGET_GOOD 0x00
53#define EFI_SCSI_STATUS_TARGET_CHECK_CONDITION 0x02 // check condition
54#define EFI_SCSI_STATUS_TARGET_CONDITION_MET 0x04 // condition met
55#define EFI_SCSI_STATUS_TARGET_BUSY 0x08 // busy
56#define EFI_SCSI_STATUS_TARGET_INTERMEDIATE 0x10 // intermediate
57#define EFI_SCSI_STATUS_TARGET_INTERMEDIATE_CONDITION_MET 0x14 // intermediate-condition met
58#define EFI_SCSI_STATUS_TARGET_RESERVATION_CONFLICT 0x18 // reservation conflict
59#define EFI_SCSI_STATUS_TARGET_COMMOND_TERMINATED 0x22 // command terminated
60#define EFI_SCSI_STATUS_TARGET_QUEUE_FULL 0x28 // queue full
61
62typedef struct {
71 UINT64 Timeout;
83 VOID *SenseData;
88 VOID *Cdb;
98 UINT8 CdbLength;
121
122typedef struct {
130 CHAR16 *ChannelName;
134 UINT32 AdapterId;
142 UINT32 IoAlign;
144
197typedef
201 IN UINT32 Target,
202 IN UINT64 Lun,
204 IN EFI_EVENT Event OPTIONAL
205 );
206
231typedef
235 IN OUT UINT32 *Target,
236 IN OUT UINT64 *Lun
237 );
238
266typedef
270 IN UINT32 Target,
271 IN UINT64 Lun,
272 IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
273 );
274
298typedef
302 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
303 OUT UINT32 *Target,
304 OUT UINT64 *Lun
305 );
306
322typedef
326 );
327
347typedef
351 IN UINT32 Target,
352 IN UINT64 Lun
353 );
354
373};
374
375extern EFI_GUID gEfiScsiPassThruProtocolGuid;
376
377#endif
#define OPTIONAL
Definition: Base.h:290
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS(EFIAPI * EFI_SCSI_PASS_THRU_RESET_TARGET)(IN EFI_SCSI_PASS_THRU_PROTOCOL *This, IN UINT32 Target, IN UINT64 Lun)
Definition: ScsiPassThru.h:349
EFI_STATUS(EFIAPI * EFI_SCSI_PASS_THRU_GET_TARGET_LUN)(IN EFI_SCSI_PASS_THRU_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT UINT32 *Target, OUT UINT64 *Lun)
Definition: ScsiPassThru.h:300
EFI_STATUS(EFIAPI * EFI_SCSI_PASS_THRU_PASSTHRU)(IN EFI_SCSI_PASS_THRU_PROTOCOL *This, IN UINT32 Target, IN UINT64 Lun, IN OUT EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet, IN EFI_EVENT Event OPTIONAL)
Definition: ScsiPassThru.h:199
EFI_STATUS(EFIAPI * EFI_SCSI_PASS_THRU_BUILD_DEVICE_PATH)(IN EFI_SCSI_PASS_THRU_PROTOCOL *This, IN UINT32 Target, IN UINT64 Lun, IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
Definition: ScsiPassThru.h:268
EFI_STATUS(EFIAPI * EFI_SCSI_PASS_THRU_RESET_CHANNEL)(IN EFI_SCSI_PASS_THRU_PROTOCOL *This)
Definition: ScsiPassThru.h:324
EFI_STATUS(EFIAPI * EFI_SCSI_PASS_THRU_GET_NEXT_DEVICE)(IN EFI_SCSI_PASS_THRU_PROTOCOL *This, IN OUT UINT32 *Target, IN OUT UINT64 *Lun)
Definition: ScsiPassThru.h:233
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
EFI_SCSI_PASS_THRU_MODE * Mode
Definition: ScsiPassThru.h:366
Definition: Base.h:213