TianoCore EDK2 master
Loading...
Searching...
No Matches
AtaPassThru.h
Go to the documentation of this file.
1
14#ifndef __ATA_PASS_THROUGH_H__
15#define __ATA_PASS_THROUGH_H__
16
17#define EFI_ATA_PASS_THRU_PROTOCOL_GUID \
18 { \
19 0x1d3de7f0, 0x807, 0x424f, {0xaa, 0x69, 0x11, 0xa5, 0x4e, 0x19, 0xa4, 0x6f } \
20 }
21
23
24typedef struct {
25 UINT32 Attributes;
26 UINT32 IoAlign;
28
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
45
46typedef struct _EFI_ATA_COMMAND_BLOCK {
47 UINT8 Reserved1[2];
48 UINT8 AtaCommand;
49 UINT8 AtaFeatures;
50 UINT8 AtaSectorNumber;
51 UINT8 AtaCylinderLow;
52 UINT8 AtaCylinderHigh;
53 UINT8 AtaDeviceHead;
54 UINT8 AtaSectorNumberExp;
55 UINT8 AtaCylinderLowExp;
56 UINT8 AtaCylinderHighExp;
57 UINT8 AtaFeaturesExp;
58 UINT8 AtaSectorCount;
59 UINT8 AtaSectorCountExp;
60 UINT8 Reserved2[6];
62
63typedef struct _EFI_ATA_STATUS_BLOCK {
64 UINT8 Reserved1[2];
65 UINT8 AtaStatus;
66 UINT8 AtaError;
67 UINT8 AtaSectorNumber;
68 UINT8 AtaCylinderLow;
69 UINT8 AtaCylinderHigh;
70 UINT8 AtaDeviceHead;
71 UINT8 AtaSectorNumberExp;
72 UINT8 AtaCylinderLowExp;
73 UINT8 AtaCylinderHighExp;
74 UINT8 Reserved2;
75 UINT8 AtaSectorCount;
76 UINT8 AtaSectorCountExp;
77 UINT8 Reserved3[6];
79
80typedef UINT8 EFI_ATA_PASS_THRU_CMD_PROTOCOL;
81
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
95
96typedef UINT8 EFI_ATA_PASS_THRU_LENGTH;
97
98#define EFI_ATA_PASS_THRU_LENGTH_BYTES 0x80
99
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
105
106#define EFI_ATA_PASS_THRU_LENGTH_COUNT 0x0F
107
108typedef struct {
127 UINT64 Timeout;
163 EFI_ATA_PASS_THRU_CMD_PROTOCOL Protocol;
167 EFI_ATA_PASS_THRU_LENGTH Length;
169
199typedef
203 IN UINT16 Port,
204 IN UINT16 PortMultiplierPort,
206 IN EFI_EVENT Event OPTIONAL
207 );
208
240typedef
244 IN OUT UINT16 *Port
245 );
246
289typedef
293 IN UINT16 Port,
294 IN OUT UINT16 *PortMultiplierPort
295 );
296
329typedef
333 IN UINT16 Port,
334 IN UINT16 PortMultiplierPort,
335 OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
336 );
337
374typedef
378 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
379 OUT UINT16 *Port,
380 OUT UINT16 *PortMultiplierPort
381 );
382
407typedef
411 IN UINT16 Port
412 );
413
445typedef
449 IN UINT16 Port,
450 IN UINT16 PortMultiplierPort
451 );
452
462};
463
464extern EFI_GUID gEfiAtaPassThruProtocolGuid;
465
466#endif
#define OPTIONAL
Definition: Base.h:290
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS(EFIAPI * EFI_ATA_PASS_THRU_RESET_DEVICE)(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port, IN UINT16 PortMultiplierPort)
Definition: AtaPassThru.h:447
EFI_STATUS(EFIAPI * EFI_ATA_PASS_THRU_RESET_PORT)(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port)
Definition: AtaPassThru.h:409
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)
Definition: AtaPassThru.h:331
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)
Definition: AtaPassThru.h:376
EFI_STATUS(EFIAPI * EFI_ATA_PASS_THRU_GET_NEXT_PORT)(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN OUT UINT16 *Port)
Definition: AtaPassThru.h:242
EFI_STATUS(EFIAPI * EFI_ATA_PASS_THRU_GET_NEXT_DEVICE)(IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port, IN OUT UINT16 *PortMultiplierPort)
Definition: AtaPassThru.h:291
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)
Definition: AtaPassThru.h:201
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
EFI_ATA_STATUS_BLOCK * Asb
Definition: AtaPassThru.h:114
EFI_ATA_PASS_THRU_LENGTH Length
Definition: AtaPassThru.h:167
EFI_ATA_PASS_THRU_CMD_PROTOCOL Protocol
Definition: AtaPassThru.h:163
EFI_ATA_COMMAND_BLOCK * Acb
Definition: AtaPassThru.h:119
Definition: Base.h:213