14#ifndef __ATA_PASS_THROUGH_H__
15#define __ATA_PASS_THROUGH_H__
17#define EFI_ATA_PASS_THRU_PROTOCOL_GUID \
19 0x1d3de7f0, 0x807, 0x424f, {0xaa, 0x69, 0x11, 0xa5, 0x4e, 0x19, 0xa4, 0x6f } \
33#define EFI_ATA_PASS_THRU_ATTRIBUTES_PHYSICAL 0x0001
38#define EFI_ATA_PASS_THRU_ATTRIBUTES_LOGICAL 0x0002
44#define EFI_ATA_PASS_THRU_ATTRIBUTES_NONBLOCKIO 0x0004
50 UINT8 AtaSectorNumber;
52 UINT8 AtaCylinderHigh;
54 UINT8 AtaSectorNumberExp;
55 UINT8 AtaCylinderLowExp;
56 UINT8 AtaCylinderHighExp;
59 UINT8 AtaSectorCountExp;
67 UINT8 AtaSectorNumber;
69 UINT8 AtaCylinderHigh;
71 UINT8 AtaSectorNumberExp;
72 UINT8 AtaCylinderLowExp;
73 UINT8 AtaCylinderHighExp;
76 UINT8 AtaSectorCountExp;
80typedef UINT8 EFI_ATA_PASS_THRU_CMD_PROTOCOL;
82#define EFI_ATA_PASS_THRU_PROTOCOL_ATA_HARDWARE_RESET 0x00
83#define EFI_ATA_PASS_THRU_PROTOCOL_ATA_SOFTWARE_RESET 0x01
84#define EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA 0x02
85#define EFI_ATA_PASS_THRU_PROTOCOL_PIO_DATA_IN 0x04
86#define EFI_ATA_PASS_THRU_PROTOCOL_PIO_DATA_OUT 0x05
87#define EFI_ATA_PASS_THRU_PROTOCOL_DMA 0x06
88#define EFI_ATA_PASS_THRU_PROTOCOL_DMA_QUEUED 0x07
89#define EFI_ATA_PASS_THRU_PROTOCOL_DEVICE_DIAGNOSTIC 0x08
90#define EFI_ATA_PASS_THRU_PROTOCOL_DEVICE_RESET 0x09
91#define EFI_ATA_PASS_THRU_PROTOCOL_UDMA_DATA_IN 0x0A
92#define EFI_ATA_PASS_THRU_PROTOCOL_UDMA_DATA_OUT 0x0B
93#define EFI_ATA_PASS_THRU_PROTOCOL_FPDMA 0x0C
94#define EFI_ATA_PASS_THRU_PROTOCOL_RETURN_RESPONSE 0xFF
96typedef UINT8 EFI_ATA_PASS_THRU_LENGTH;
98#define EFI_ATA_PASS_THRU_LENGTH_BYTES 0x80
100#define EFI_ATA_PASS_THRU_LENGTH_MASK 0x70
101#define EFI_ATA_PASS_THRU_LENGTH_NO_DATA_TRANSFER 0x00
102#define EFI_ATA_PASS_THRU_LENGTH_FEATURES 0x10
103#define EFI_ATA_PASS_THRU_LENGTH_SECTOR_COUNT 0x20
104#define EFI_ATA_PASS_THRU_LENGTH_TPSIU 0x30
106#define EFI_ATA_PASS_THRU_LENGTH_COUNT 0x0F
204 IN UINT16 PortMultiplierPort,
294 IN OUT UINT16 *PortMultiplierPort
334 IN UINT16 PortMultiplierPort,
380 OUT UINT16 *PortMultiplierPort
450 IN UINT16 PortMultiplierPort
464extern EFI_GUID gEfiAtaPassThruProtocolGuid;
EFI_STATUS(EFIAPI * EFI_ATA_PASS_THRU_RESET_DEVICE)(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port, IN UINT16 PortMultiplierPort)
EFI_STATUS(EFIAPI * EFI_ATA_PASS_THRU_RESET_PORT)(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port)
EFI_STATUS(EFIAPI * EFI_ATA_PASS_THRU_BUILD_DEVICE_PATH)(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port, IN UINT16 PortMultiplierPort, OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
EFI_STATUS(EFIAPI * EFI_ATA_PASS_THRU_GET_DEVICE)(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT UINT16 *Port, OUT UINT16 *PortMultiplierPort)
EFI_STATUS(EFIAPI * EFI_ATA_PASS_THRU_GET_NEXT_PORT)(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN OUT UINT16 *Port)
EFI_STATUS(EFIAPI * EFI_ATA_PASS_THRU_GET_NEXT_DEVICE)(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port, IN OUT UINT16 *PortMultiplierPort)
EFI_STATUS(EFIAPI * EFI_ATA_PASS_THRU_PASSTHRU)(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_ATA_STATUS_BLOCK * Asb
EFI_ATA_PASS_THRU_LENGTH Length
EFI_ATA_PASS_THRU_CMD_PROTOCOL Protocol
EFI_ATA_COMMAND_BLOCK * Acb