typedef struct _EFI_ATA_PASS_THRU_PROTOCOL EFI_ATA_PASS_THRU_PROTOCOL;\r
\r
typedef struct {\r
- UINT32 Attributes;\r
- UINT32 IoAlign;\r
+ UINT32 Attributes;\r
+ UINT32 IoAlign;\r
} EFI_ATA_PASS_THRU_MODE;\r
\r
///\r
/// If this bit is set, then the EFI_ATA_PASS_THRU_PROTOCOL interface is for physical\r
/// devices on the ATA controller.\r
///\r
-#define EFI_ATA_PASS_THRU_ATTRIBUTES_PHYSICAL 0x0001\r
+#define EFI_ATA_PASS_THRU_ATTRIBUTES_PHYSICAL 0x0001\r
///\r
/// If this bit is set, then the EFI_ATA_PASS_THRU_PROTOCOL interface is for logical\r
/// devices on the ATA controller.\r
///\r
-#define EFI_ATA_PASS_THRU_ATTRIBUTES_LOGICAL 0x0002\r
+#define EFI_ATA_PASS_THRU_ATTRIBUTES_LOGICAL 0x0002\r
///\r
/// If this bit is set, then the EFI_ATA_PASS_THRU_PROTOCOL interface supports non blocking\r
/// I/O. Every EFI_ATA_PASS_THRU_PROTOCOL must support blocking I/O. The support of non-blocking\r
/// I/O is optional.\r
///\r
-#define EFI_ATA_PASS_THRU_ATTRIBUTES_NONBLOCKIO 0x0004\r
+#define EFI_ATA_PASS_THRU_ATTRIBUTES_NONBLOCKIO 0x0004\r
\r
typedef struct _EFI_ATA_COMMAND_BLOCK {\r
- UINT8 Reserved1[2];\r
- UINT8 AtaCommand;\r
- UINT8 AtaFeatures;\r
- UINT8 AtaSectorNumber;\r
- UINT8 AtaCylinderLow;\r
- UINT8 AtaCylinderHigh;\r
- UINT8 AtaDeviceHead;\r
- UINT8 AtaSectorNumberExp;\r
- UINT8 AtaCylinderLowExp;\r
- UINT8 AtaCylinderHighExp;\r
- UINT8 AtaFeaturesExp;\r
- UINT8 AtaSectorCount;\r
- UINT8 AtaSectorCountExp;\r
- UINT8 Reserved2[6];\r
+ UINT8 Reserved1[2];\r
+ UINT8 AtaCommand;\r
+ UINT8 AtaFeatures;\r
+ UINT8 AtaSectorNumber;\r
+ UINT8 AtaCylinderLow;\r
+ UINT8 AtaCylinderHigh;\r
+ UINT8 AtaDeviceHead;\r
+ UINT8 AtaSectorNumberExp;\r
+ UINT8 AtaCylinderLowExp;\r
+ UINT8 AtaCylinderHighExp;\r
+ UINT8 AtaFeaturesExp;\r
+ UINT8 AtaSectorCount;\r
+ UINT8 AtaSectorCountExp;\r
+ UINT8 Reserved2[6];\r
} EFI_ATA_COMMAND_BLOCK;\r
\r
typedef struct _EFI_ATA_STATUS_BLOCK {\r
- UINT8 Reserved1[2];\r
- UINT8 AtaStatus;\r
- UINT8 AtaError;\r
- UINT8 AtaSectorNumber;\r
- UINT8 AtaCylinderLow;\r
- UINT8 AtaCylinderHigh;\r
- UINT8 AtaDeviceHead;\r
- UINT8 AtaSectorNumberExp;\r
- UINT8 AtaCylinderLowExp;\r
- UINT8 AtaCylinderHighExp;\r
- UINT8 Reserved2;\r
- UINT8 AtaSectorCount;\r
- UINT8 AtaSectorCountExp;\r
- UINT8 Reserved3[6];\r
+ UINT8 Reserved1[2];\r
+ UINT8 AtaStatus;\r
+ UINT8 AtaError;\r
+ UINT8 AtaSectorNumber;\r
+ UINT8 AtaCylinderLow;\r
+ UINT8 AtaCylinderHigh;\r
+ UINT8 AtaDeviceHead;\r
+ UINT8 AtaSectorNumberExp;\r
+ UINT8 AtaCylinderLowExp;\r
+ UINT8 AtaCylinderHighExp;\r
+ UINT8 Reserved2;\r
+ UINT8 AtaSectorCount;\r
+ UINT8 AtaSectorCountExp;\r
+ UINT8 Reserved3[6];\r
} EFI_ATA_STATUS_BLOCK;\r
\r
typedef UINT8 EFI_ATA_PASS_THRU_CMD_PROTOCOL;\r
\r
-#define EFI_ATA_PASS_THRU_PROTOCOL_ATA_HARDWARE_RESET 0x00\r
-#define EFI_ATA_PASS_THRU_PROTOCOL_ATA_SOFTWARE_RESET 0x01\r
-#define EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA 0x02\r
-#define EFI_ATA_PASS_THRU_PROTOCOL_PIO_DATA_IN 0x04\r
-#define EFI_ATA_PASS_THRU_PROTOCOL_PIO_DATA_OUT 0x05\r
-#define EFI_ATA_PASS_THRU_PROTOCOL_DMA 0x06\r
-#define EFI_ATA_PASS_THRU_PROTOCOL_DMA_QUEUED 0x07\r
-#define EFI_ATA_PASS_THRU_PROTOCOL_DEVICE_DIAGNOSTIC 0x08\r
-#define EFI_ATA_PASS_THRU_PROTOCOL_DEVICE_RESET 0x09\r
-#define EFI_ATA_PASS_THRU_PROTOCOL_UDMA_DATA_IN 0x0A\r
-#define EFI_ATA_PASS_THRU_PROTOCOL_UDMA_DATA_OUT 0x0B\r
-#define EFI_ATA_PASS_THRU_PROTOCOL_FPDMA 0x0C\r
-#define EFI_ATA_PASS_THRU_PROTOCOL_RETURN_RESPONSE 0xFF\r
+#define EFI_ATA_PASS_THRU_PROTOCOL_ATA_HARDWARE_RESET 0x00\r
+#define EFI_ATA_PASS_THRU_PROTOCOL_ATA_SOFTWARE_RESET 0x01\r
+#define EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA 0x02\r
+#define EFI_ATA_PASS_THRU_PROTOCOL_PIO_DATA_IN 0x04\r
+#define EFI_ATA_PASS_THRU_PROTOCOL_PIO_DATA_OUT 0x05\r
+#define EFI_ATA_PASS_THRU_PROTOCOL_DMA 0x06\r
+#define EFI_ATA_PASS_THRU_PROTOCOL_DMA_QUEUED 0x07\r
+#define EFI_ATA_PASS_THRU_PROTOCOL_DEVICE_DIAGNOSTIC 0x08\r
+#define EFI_ATA_PASS_THRU_PROTOCOL_DEVICE_RESET 0x09\r
+#define EFI_ATA_PASS_THRU_PROTOCOL_UDMA_DATA_IN 0x0A\r
+#define EFI_ATA_PASS_THRU_PROTOCOL_UDMA_DATA_OUT 0x0B\r
+#define EFI_ATA_PASS_THRU_PROTOCOL_FPDMA 0x0C\r
+#define EFI_ATA_PASS_THRU_PROTOCOL_RETURN_RESPONSE 0xFF\r
\r
typedef UINT8 EFI_ATA_PASS_THRU_LENGTH;\r
\r
-#define EFI_ATA_PASS_THRU_LENGTH_BYTES 0x80\r
+#define EFI_ATA_PASS_THRU_LENGTH_BYTES 0x80\r
\r
+#define EFI_ATA_PASS_THRU_LENGTH_MASK 0x70\r
+#define EFI_ATA_PASS_THRU_LENGTH_NO_DATA_TRANSFER 0x00\r
+#define EFI_ATA_PASS_THRU_LENGTH_FEATURES 0x10\r
+#define EFI_ATA_PASS_THRU_LENGTH_SECTOR_COUNT 0x20\r
+#define EFI_ATA_PASS_THRU_LENGTH_TPSIU 0x30\r
\r
-#define EFI_ATA_PASS_THRU_LENGTH_MASK 0x70\r
-#define EFI_ATA_PASS_THRU_LENGTH_NO_DATA_TRANSFER 0x00\r
-#define EFI_ATA_PASS_THRU_LENGTH_FEATURES 0x10\r
-#define EFI_ATA_PASS_THRU_LENGTH_SECTOR_COUNT 0x20\r
-#define EFI_ATA_PASS_THRU_LENGTH_TPSIU 0x30\r
-\r
-#define EFI_ATA_PASS_THRU_LENGTH_COUNT 0x0F\r
+#define EFI_ATA_PASS_THRU_LENGTH_COUNT 0x0F\r
\r
typedef struct {\r
///\r
/// command. It must be aligned to the boundary specified in the IoAlign field\r
/// in the EFI_ATA_PASS_THRU_MODE structure.\r
///\r
- EFI_ATA_STATUS_BLOCK *Asb;\r
+ EFI_ATA_STATUS_BLOCK *Asb;\r
///\r
/// A pointer to buffer that contains the Command Data Block to send to the ATA\r
/// device specified by Port and PortMultiplierPort.\r
///\r
- EFI_ATA_COMMAND_BLOCK *Acb;\r
+ EFI_ATA_COMMAND_BLOCK *Acb;\r
///\r
/// The timeout, in 100 ns units, to use for the execution of this ATA command.\r
/// A Timeout value of 0 means that this function will wait indefinitely for the\r
/// will return EFI_TIMEOUT if the time required to execute the ATA command is\r
/// greater than Timeout.\r
///\r
- UINT64 Timeout;\r
+ UINT64 Timeout;\r
///\r
/// A pointer to the data buffer to transfer between the ATA controller and the\r
/// ATA device for read and bidirectional commands. For all write and non data\r
/// If this field is not NULL, then it must be aligned on the boundary specified\r
/// by the IoAlign field in the EFI_ATA_PASS_THRU_MODE structure.\r
///\r
- VOID *InDataBuffer;\r
+ VOID *InDataBuffer;\r
///\r
/// A pointer to the data buffer to transfer between the ATA controller and the\r
/// ATA device for write or bidirectional commands. For all read and non data\r
/// If this field is not NULL, then it must be aligned on the boundary specified\r
/// by the IoAlign field in the EFI_ATA_PASS_THRU_MODE structure.\r
///\r
- VOID *OutDataBuffer;\r
+ VOID *OutDataBuffer;\r
///\r
/// On input, the size, in bytes, of InDataBuffer. On output, the number of bytes\r
/// transferred between the ATA controller and the ATA device. If InTransferLength\r
/// InTransferLength will be updated to contain the number of bytes that the ATA\r
/// controller is able to transfer, and EFI_BAD_BUFFER_SIZE will be returned.\r
///\r
- UINT32 InTransferLength;\r
+ UINT32 InTransferLength;\r
///\r
/// On Input, the size, in bytes of OutDataBuffer. On Output, the Number of bytes\r
/// transferred between ATA Controller and the ATA device. If OutTransferLength is\r
/// OutTransferLength will be updated to contain the number of bytes that the ATA\r
/// controller is able to transfer, and EFI_BAD_BUFFER_SIZE will be returned.\r
///\r
- UINT32 OutTransferLength;\r
+ UINT32 OutTransferLength;\r
///\r
/// Specifies the protocol used when the ATA device executes the command.\r
///\r
- EFI_ATA_PASS_THRU_CMD_PROTOCOL Protocol;\r
+ EFI_ATA_PASS_THRU_CMD_PROTOCOL Protocol;\r
///\r
/// Specifies the way in which the ATA command length is encoded.\r
///\r
- EFI_ATA_PASS_THRU_LENGTH Length;\r
+ EFI_ATA_PASS_THRU_LENGTH Length;\r
} EFI_ATA_PASS_THRU_COMMAND_PACKET;\r
\r
-\r
/**\r
Sends an ATA command to an ATA device that is attached to the ATA controller. This function\r
supports both blocking I/O and non-blocking I/O. The blocking I/O functionality is required,\r
);\r
\r
struct _EFI_ATA_PASS_THRU_PROTOCOL {\r
- EFI_ATA_PASS_THRU_MODE *Mode;\r
- EFI_ATA_PASS_THRU_PASSTHRU PassThru;\r
- EFI_ATA_PASS_THRU_GET_NEXT_PORT GetNextPort;\r
- EFI_ATA_PASS_THRU_GET_NEXT_DEVICE GetNextDevice;\r
- EFI_ATA_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath;\r
- EFI_ATA_PASS_THRU_GET_DEVICE GetDevice;\r
- EFI_ATA_PASS_THRU_RESET_PORT ResetPort;\r
- EFI_ATA_PASS_THRU_RESET_DEVICE ResetDevice;\r
+ EFI_ATA_PASS_THRU_MODE *Mode;\r
+ EFI_ATA_PASS_THRU_PASSTHRU PassThru;\r
+ EFI_ATA_PASS_THRU_GET_NEXT_PORT GetNextPort;\r
+ EFI_ATA_PASS_THRU_GET_NEXT_DEVICE GetNextDevice;\r
+ EFI_ATA_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath;\r
+ EFI_ATA_PASS_THRU_GET_DEVICE GetDevice;\r
+ EFI_ATA_PASS_THRU_RESET_PORT ResetPort;\r
+ EFI_ATA_PASS_THRU_RESET_DEVICE ResetDevice;\r
};\r
\r
-extern EFI_GUID gEfiAtaPassThruProtocolGuid;\r
+extern EFI_GUID gEfiAtaPassThruProtocolGuid;\r
\r
#endif\r