9#ifndef __ATA_ATAPI_PASS_THRU_H__
10#define __ATA_ATAPI_PASS_THRU_H__
46#define ATA_ATAPI_PASS_THRU_SIGNATURE SIGNATURE_32 ('a', 'a', 'p', 't')
47#define ATA_ATAPI_DEVICE_SIGNATURE SIGNATURE_32 ('a', 'd', 'e', 'v')
48#define ATA_NONBLOCKING_TASK_SIGNATURE SIGNATURE_32 ('a', 't', 's', 'k')
57} EFI_ATA_HC_WORK_MODE;
74 UINT16 PortMultiplier;
75 EFI_ATA_DEVICE_TYPE Type;
92 EFI_ATA_HC_WORK_MODE Mode;
101 UINT64 EnabledPciAttributes;
102 UINT64 OriginalPciAttributes;
109 UINT16 PreviousPortMultiplier;
114 UINT16 PreviousTargetId;
132 UINT16 PortMultiplier;
137 BOOLEAN InfiniteWait;
148#define ATA_ATAPI_TIMEOUT EFI_TIMER_PERIOD_SECONDS(3)
149#define ATA_SPINUP_TIMEOUT EFI_TIMER_PERIOD_SECONDS(10)
151#define ATA_PASS_THRU_PRIVATE_DATA_FROM_THIS(a) \
153 ATA_ATAPI_PASS_THRU_INSTANCE, \
155 ATA_ATAPI_PASS_THRU_SIGNATURE \
158#define EXT_SCSI_PASS_THRU_PRIVATE_DATA_FROM_THIS(a) \
160 ATA_ATAPI_PASS_THRU_INSTANCE, \
162 ATA_ATAPI_PASS_THRU_SIGNATURE \
165#define ATA_ATAPI_DEVICE_INFO_FROM_THIS(a) \
167 EFI_ATA_DEVICE_INFO, \
169 ATA_ATAPI_DEVICE_SIGNATURE \
172#define ATA_NON_BLOCK_TASK_FROM_ENTRY(a) \
176 ATA_NONBLOCKING_TASK_SIGNATURE \
223 OUT CHAR16 **DriverName
301 OUT CHAR16 **ControllerName
449 IN UINT16 PortMultiplier,
450 IN EFI_ATA_DEVICE_TYPE DeviceType
473 IN UINT16 PortMultiplier,
474 IN EFI_ATA_DEVICE_TYPE DeviceType,
502 IN BOOLEAN IsSigEvent
571 IN UINT16 PortMultiplierPort,
661 IN OUT UINT16 *PortMultiplierPort
701 IN UINT16 PortMultiplierPort,
748 OUT UINT16 *PortMultiplierPort
818 IN UINT16 PortMultiplierPort
902 IN OUT UINT8 **Target,
1040 IN OUT UINT8 **Target
1099 IN UINT8 PortMultiplier,
1101 IN UINT8 AtapiCommandLength,
1139 IN UINT8 PortMultiplier,
1141 IN UINT8 AtapiCommandLength,
1145 IN OUT VOID *MemoryAddr,
1146 IN UINT32 DataCount,
1182 IN UINT8 PortMultiplier,
1184 IN UINT8 AtapiCommandLength,
1188 IN OUT VOID *MemoryAddr,
1189 IN UINT32 DataCount,
1253 IN VOID *DataBuffer,
1254 IN UINT64 DataLength,
1288 IN OUT VOID *Buffer,
1289 IN UINT64 ByteCount,
EFI_STATUS EFIAPI AtaPioDataInOut(IN EFI_PCI_IO_PROTOCOL *PciIo, IN EFI_IDE_REGISTERS *IdeRegisters, IN OUT VOID *Buffer, IN UINT64 ByteCount, IN BOOLEAN Read, IN EFI_ATA_COMMAND_BLOCK *AtaCommandBlock, IN OUT EFI_ATA_STATUS_BLOCK *AtaStatusBlock, IN UINT64 Timeout, IN ATA_NONBLOCK_TASK *Task)
VOID EFIAPI AsyncNonBlockingTransferRoutine(EFI_EVENT Event, VOID *Context)
EFI_STATUS EFIAPI ExtScsiPassThruGetTargetLun(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT UINT8 **Target, OUT UINT64 *Lun)
EFI_STATUS EFIAPI AtaAtapiPassThruSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI ExtScsiPassThruResetTargetLun(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN UINT8 *Target, IN UINT64 Lun)
EFI_STATUS EFIAPI ExtScsiPassThruBuildDevicePath(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN UINT8 *Target, IN UINT64 Lun, IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
EFI_STATUS EFIAPI ExtScsiPassThruGetNextTargetLun(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN OUT UINT8 **Target, IN OUT UINT64 *Lun)
EFI_STATUS EFIAPI AhciModeInitialization(IN ATA_ATAPI_PASS_THRU_INSTANCE *Instance)
EFI_STATUS EFIAPI AhciDmaTransfer(IN ATA_ATAPI_PASS_THRU_INSTANCE *Instance, IN EFI_AHCI_REGISTERS *AhciRegisters, IN UINT8 Port, IN UINT8 PortMultiplier, IN EFI_AHCI_ATAPI_COMMAND *AtapiCommand OPTIONAL, IN UINT8 AtapiCommandLength, IN BOOLEAN Read, IN EFI_ATA_COMMAND_BLOCK *AtaCommandBlock, IN OUT EFI_ATA_STATUS_BLOCK *AtaStatusBlock, IN OUT VOID *MemoryAddr, IN UINT32 DataCount, IN UINT64 Timeout, IN ATA_NONBLOCK_TASK *Task)
EFI_STATUS EFIAPI AtaPassThruGetNextDevice(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port, IN OUT UINT16 *PortMultiplierPort)
EFI_STATUS EFIAPI AtaPassThruPassThru(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port, IN UINT16 PortMultiplierPort, IN OUT EFI_ATA_PASS_THRU_COMMAND_PACKET *Packet, IN EFI_EVENT Event OPTIONAL)
EFI_STATUS EFIAPI AtaAtapiPassThruStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI AtaNonDataCommandIn(IN EFI_PCI_IO_PROTOCOL *PciIo, IN EFI_IDE_REGISTERS *IdeRegisters, IN EFI_ATA_COMMAND_BLOCK *AtaCommandBlock, IN OUT EFI_ATA_STATUS_BLOCK *AtaStatusBlock, IN UINT64 Timeout, IN ATA_NONBLOCK_TASK *Task)
EFI_STATUS EFIAPI AtaPassThruResetPort(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port)
EFI_STATUS EFIAPI AhciPioTransfer(IN EFI_PCI_IO_PROTOCOL *PciIo, IN EFI_AHCI_REGISTERS *AhciRegisters, IN UINT8 Port, IN UINT8 PortMultiplier, IN EFI_AHCI_ATAPI_COMMAND *AtapiCommand OPTIONAL, IN UINT8 AtapiCommandLength, IN BOOLEAN Read, IN EFI_ATA_COMMAND_BLOCK *AtaCommandBlock, IN OUT EFI_ATA_STATUS_BLOCK *AtaStatusBlock, IN OUT VOID *MemoryAddr, IN UINT32 DataCount, IN UINT64 Timeout, IN ATA_NONBLOCK_TASK *Task)
EFI_STATUS EFIAPI ExtScsiPassThruResetChannel(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This)
EFI_STATUS EFIAPI AtaAtapiPassThruComponentNameGetControllerName(IN EFI_COMPONENT_NAME_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN CHAR8 *Language, OUT CHAR16 **ControllerName)
VOID EFIAPI DestroyDeviceInfoList(IN ATA_ATAPI_PASS_THRU_INSTANCE *Instance)
EFI_STATUS EFIAPI EnumerateAttachedDevice(IN ATA_ATAPI_PASS_THRU_INSTANCE *Instance)
VOID EFIAPI DestroyAsynTaskList(IN ATA_ATAPI_PASS_THRU_INSTANCE *Instance, IN BOOLEAN IsSigEvent)
EFI_STATUS EFIAPI ExtScsiPassThruGetNextTarget(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN OUT UINT8 **Target)
EFI_STATUS EFIAPI AtaAtapiPassThruComponentNameGetDriverName(IN EFI_COMPONENT_NAME_PROTOCOL *This, IN CHAR8 *Language, OUT CHAR16 **DriverName)
EFI_STATUS EFIAPI AtaPassThruBuildDevicePath(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port, IN UINT16 PortMultiplierPort, IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
EFI_STATUS EFIAPI AtaPassThruGetNextPort(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN OUT UINT16 *Port)
EFI_STATUS EFIAPI AtaUdmaInOut(IN ATA_ATAPI_PASS_THRU_INSTANCE *Instance, IN EFI_IDE_REGISTERS *IdeRegisters, IN BOOLEAN Read, IN VOID *DataBuffer, IN UINT64 DataLength, IN EFI_ATA_COMMAND_BLOCK *AtaCommandBlock, IN OUT EFI_ATA_STATUS_BLOCK *AtaStatusBlock, IN UINT64 Timeout, IN ATA_NONBLOCK_TASK *Task)
EFI_STATUS EFIAPI CreateNewDeviceInfo(IN ATA_ATAPI_PASS_THRU_INSTANCE *Instance, IN UINT16 Port, IN UINT16 PortMultiplier, IN EFI_ATA_DEVICE_TYPE DeviceType, IN EFI_IDENTIFY_DATA *IdentifyData)
EFI_STATUS EFIAPI AtaAtapiPassThruStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
EFI_STATUS EFIAPI IdeModeInitialization(IN ATA_ATAPI_PASS_THRU_INSTANCE *Instance)
EFI_STATUS EFIAPI AtaPassThruGetDevice(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT UINT16 *Port, OUT UINT16 *PortMultiplierPort)
EFI_STATUS EFIAPI AtaPassThruResetDevice(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port, IN UINT16 PortMultiplierPort)
LIST_ENTRY *EFIAPI SearchDeviceInfoList(IN ATA_ATAPI_PASS_THRU_INSTANCE *Instance, IN UINT16 Port, IN UINT16 PortMultiplier, IN EFI_ATA_DEVICE_TYPE DeviceType)
EFI_STATUS EFIAPI AhciNonDataTransfer(IN EFI_PCI_IO_PROTOCOL *PciIo, IN EFI_AHCI_REGISTERS *AhciRegisters, IN UINT8 Port, IN UINT8 PortMultiplier, IN EFI_AHCI_ATAPI_COMMAND *AtapiCommand OPTIONAL, IN UINT8 AtapiCommandLength, IN EFI_ATA_COMMAND_BLOCK *AtaCommandBlock, IN OUT EFI_ATA_STATUS_BLOCK *AtaStatusBlock, IN UINT64 Timeout, IN ATA_NONBLOCK_TASK *Task)
EFI_STATUS EFIAPI ExtScsiPassThruPassThru(IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This, IN UINT8 *Target, IN UINT64 Lun, IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet, IN EFI_EVENT Event OPTIONAL)