TianoCore EDK2 master
|
#include "AhciPei.h"
Go to the source code of this file.
Macros | |
#define | ATA_CMD_TRUST_NON_DATA 0x5B |
#define | ATA_CMD_TRUST_RECEIVE 0x5C |
#define | ATA_CMD_TRUST_SEND 0x5E |
#define | MAX_28BIT_TRANSFER_BLOCK_NUM 0x100 |
#define | MAX_48BIT_TRANSFER_BLOCK_NUM 0x800 |
#define | MAX_28BIT_ADDRESSING_CAPACITY 0xfffffff |
Functions | |
UINT32 | AhciReadReg (IN UINTN AhciBar, IN UINT32 Offset) |
VOID | AhciWriteReg (IN UINTN AhciBar, IN UINT32 Offset, IN UINT32 Data) |
VOID | AhciAndReg (IN UINTN AhciBar, IN UINT32 Offset, IN UINT32 AndData) |
VOID | AhciOrReg (IN UINTN AhciBar, IN UINT32 Offset, IN UINT32 OrData) |
EFI_STATUS EFIAPI | AhciWaitMmioSet (IN UINTN AhciBar, IN UINT32 Offset, IN UINT32 MaskValue, IN UINT32 TestValue, IN UINT64 Timeout) |
EFI_STATUS | AhciCheckMemSet (IN UINTN Address, IN UINT32 MaskValue, IN UINT32 TestValue) |
EFI_STATUS | AhciWaitMemSet (IN EFI_PHYSICAL_ADDRESS Address, IN UINT32 MaskValue, IN UINT32 TestValue, IN UINT64 Timeout) |
VOID | AhciClearPortStatus (IN UINTN AhciBar, IN UINT8 Port) |
EFI_STATUS | AhciEnableFisReceive (IN UINTN AhciBar, IN UINT8 Port, IN UINT64 Timeout) |
EFI_STATUS | AhciDisableFisReceive (IN UINTN AhciBar, IN UINT8 Port, IN UINT64 Timeout) |
VOID | AhciBuildCommand (IN PEI_AHCI_CONTROLLER_PRIVATE_DATA *Private, IN UINT8 Port, IN UINT8 PortMultiplier, IN UINT8 FisIndex, IN EFI_AHCI_COMMAND_FIS *CommandFis, IN EFI_AHCI_COMMAND_LIST *CommandList, IN UINT8 CommandSlotNumber, IN OUT VOID *DataPhysicalAddr, IN UINT32 DataLength) |
VOID | AhciBuildCommandFis (IN OUT EFI_AHCI_COMMAND_FIS *CmdFis, IN EFI_ATA_COMMAND_BLOCK *AtaCommandBlock) |
EFI_STATUS | AhciStopCommand (IN UINTN AhciBar, IN UINT8 Port, IN UINT64 Timeout) |
EFI_STATUS | AhciStartCommand (IN UINTN AhciBar, IN UINT8 Port, IN UINT8 CommandSlot, IN UINT64 Timeout) |
EFI_STATUS | AhciPioTransfer (IN PEI_AHCI_CONTROLLER_PRIVATE_DATA *Private, IN UINT8 Port, IN UINT8 PortMultiplier, IN UINT8 FisIndex, 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) |
EFI_STATUS | AhciNonDataTransfer (IN PEI_AHCI_CONTROLLER_PRIVATE_DATA *Private, IN UINT8 Port, IN UINT8 PortMultiplier, IN UINT8 FisIndex, IN EFI_ATA_COMMAND_BLOCK *AtaCommandBlock, IN OUT EFI_ATA_STATUS_BLOCK *AtaStatusBlock, IN UINT64 Timeout) |
EFI_STATUS | AhciReset (IN UINTN AhciBar, IN UINT64 Timeout) |
EFI_STATUS | AhciIdentify (IN PEI_AHCI_CONTROLLER_PRIVATE_DATA *Private, IN UINT8 Port, IN UINT8 PortMultiplier, IN UINT8 FisIndex, IN ATA_IDENTIFY_DATA *Buffer) |
UINT8 | AhciGetNumberOfPortsFromMap (IN UINT32 PortBitMap) |
EFI_STATUS | AhciGetPortFromMap (IN UINT32 PortBitMap, IN UINT8 PortIndex, OUT UINT8 *Port) |
EFI_STATUS | AhciCreateTransferDescriptor (IN OUT PEI_AHCI_CONTROLLER_PRIVATE_DATA *Private) |
EFI_LBA | GetAtapi6Capacity (IN ATA_IDENTIFY_DATA *IdentifyData) |
EFI_STATUS | IdentifyAtaDevice (IN OUT PEI_AHCI_ATA_DEVICE_DATA *DeviceData) |
EFI_STATUS | CreateNewDevice (IN OUT PEI_AHCI_CONTROLLER_PRIVATE_DATA *Private, IN UINTN DeviceIndex, IN UINT16 Port, IN UINT16 PortMultiplier, IN UINT8 FisIndex, IN ATA_IDENTIFY_DATA *IdentifyData) |
EFI_STATUS | AhciModeInitialization (IN OUT PEI_AHCI_CONTROLLER_PRIVATE_DATA *Private) |
EFI_STATUS | TransferAtaDevice (IN PEI_AHCI_ATA_DEVICE_DATA *DeviceData, IN OUT VOID *Buffer, IN EFI_LBA StartLba, IN UINT32 TransferLength, IN BOOLEAN IsWrite) |
EFI_STATUS | TrustTransferAtaDevice (IN PEI_AHCI_ATA_DEVICE_DATA *DeviceData, IN OUT VOID *Buffer, IN UINT8 SecurityProtocolId, IN UINT16 SecurityProtocolSpecificData, IN UINTN TransferLength, IN BOOLEAN IsTrustSend, IN UINT64 Timeout, OUT UINTN *TransferLengthOut) |
Variables | |
EFI_ATA_PASS_THRU_CMD_PROTOCOL | mAtaPassThruCmdProtocols [2] |
UINT8 | mAtaCommands [2][2] |
UINT8 | mAtaTrustCommands [2] |
UINT32 | mMaxTransferBlockNumber [2] |
The AhciPei driver is used to manage ATA hard disk device working under AHCI mode at PEI phase.
Copyright (c) 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file AhciMode.c.
#define ATA_CMD_TRUST_NON_DATA 0x5B |
Definition at line 13 of file AhciMode.c.
#define ATA_CMD_TRUST_RECEIVE 0x5C |
Definition at line 14 of file AhciMode.c.
#define ATA_CMD_TRUST_SEND 0x5E |
Definition at line 15 of file AhciMode.c.
#define MAX_28BIT_ADDRESSING_CAPACITY 0xfffffff |
Definition at line 67 of file AhciMode.c.
#define MAX_28BIT_TRANSFER_BLOCK_NUM 0x100 |
Definition at line 50 of file AhciMode.c.
#define MAX_48BIT_TRANSFER_BLOCK_NUM 0x800 |
Definition at line 57 of file AhciMode.c.
Do AND operation with the value of AHCI Operation register.
[in] | AhciBar | AHCI bar address. |
[in] | Offset | The operation register offset. |
[in] | AndData | The data used to do AND operation. |
Definition at line 119 of file AhciMode.c.
VOID AhciBuildCommand | ( | IN PEI_AHCI_CONTROLLER_PRIVATE_DATA * | Private, |
IN UINT8 | Port, | ||
IN UINT8 | PortMultiplier, | ||
IN UINT8 | FisIndex, | ||
IN EFI_AHCI_COMMAND_FIS * | CommandFis, | ||
IN EFI_AHCI_COMMAND_LIST * | CommandList, | ||
IN UINT8 | CommandSlotNumber, | ||
IN OUT VOID * | DataPhysicalAddr, | ||
IN UINT32 | DataLength | ||
) |
Build the command list, command table and prepare the fis receiver.
[in] | Private | The pointer to the PEI_AHCI_CONTROLLER_PRIVATE_DATA. |
[in] | Port | The number of port. |
[in] | PortMultiplier | The number of port multiplier. |
[in] | FisIndex | The offset index of the FIS base address. |
[in] | CommandFis | The control fis will be used for the transfer. |
[in] | CommandList | The command list will be used for the transfer. |
[in] | CommandSlotNumber | The command slot will be used for the transfer. |
[in,out] | DataPhysicalAddr | The pointer to the data buffer pci bus master address. |
[in] | DataLength | The data count to be transferred. |
Definition at line 422 of file AhciMode.c.
VOID AhciBuildCommandFis | ( | IN OUT EFI_AHCI_COMMAND_FIS * | CmdFis, |
IN EFI_ATA_COMMAND_BLOCK * | AtaCommandBlock | ||
) |
Build a command FIS.
[in,out] | CmdFis | A pointer to the EFI_AHCI_COMMAND_FIS data structure. |
[in] | AtaCommandBlock | A pointer to the EFI_ATA_COMMAND_BLOCK data structure. |
Definition at line 529 of file AhciMode.c.
EFI_STATUS AhciCheckMemSet | ( | IN UINTN | Address, |
IN UINT32 | MaskValue, | ||
IN UINT32 | TestValue | ||
) |
Check the memory status to the test value.
[in] | Address | The memory address to test. |
[in] | MaskValue | The mask value of memory. |
[in] | TestValue | The test value of memory. |
EFI_NOT_READY | The memory is not set. |
EFI_SUCCESS | The memory is correct set. |
Definition at line 215 of file AhciMode.c.
Clear the port interrupt and error status. It will also clear HBA interrupt status.
[in] | AhciBar | AHCI bar address. |
[in] | Port | The number of port. |
Definition at line 302 of file AhciMode.c.
EFI_STATUS AhciCreateTransferDescriptor | ( | IN OUT PEI_AHCI_CONTROLLER_PRIVATE_DATA * | Private | ) |
Allocate transfer-related data struct which is used at AHCI mode.
[in,out] | Private | A pointer to the PEI_AHCI_CONTROLLER_PRIVATE_DATA instance. |
EFI_SUCCESS | Data structures are allocated successfully. |
Others | Data structures are not allocated successfully. |
Definition at line 1263 of file AhciMode.c.
EFI_STATUS AhciDisableFisReceive | ( | IN UINTN | AhciBar, |
IN UINT8 | Port, | ||
IN UINT64 | Timeout | ||
) |
Disable the FIS running for giving port.
[in] | AhciBar | AHCI bar address. |
[in] | Port | The number of port. |
[in] | Timeout | The timeout value of disabling FIS, uses 100ns as a unit. |
EFI_DEVICE_ERROR | The FIS disable setting fails. |
EFI_TIMEOUT | The FIS disable setting is time out. |
EFI_UNSUPPORTED | The port is in running state. |
EFI_SUCCESS | The FIS disable successfully. |
Definition at line 368 of file AhciMode.c.
EFI_STATUS AhciEnableFisReceive | ( | IN UINTN | AhciBar, |
IN UINT8 | Port, | ||
IN UINT64 | Timeout | ||
) |
Enable the FIS running for giving port.
[in] | AhciBar | AHCI bar address. |
[in] | Port | The number of port. |
[in] | Timeout | The timeout, in 100ns units, to enabling FIS. |
EFI_DEVICE_ERROR | The FIS enable setting fails. |
EFI_TIMEOUT | The FIS enable setting is time out. |
EFI_SUCCESS | The FIS enable successfully. |
Definition at line 340 of file AhciMode.c.
UINT8 AhciGetNumberOfPortsFromMap | ( | IN UINT32 | PortBitMap | ) |
Collect the number of bits set within a port bitmap.
[in] | PortBitMap | A 32-bit wide bit map of ATA AHCI ports. |
The | number of bits set in the bitmap. |
Definition at line 1190 of file AhciMode.c.
EFI_STATUS AhciGetPortFromMap | ( | IN UINT32 | PortBitMap, |
IN UINT8 | PortIndex, | ||
OUT UINT8 * | Port | ||
) |
Get the specified port number from a port bitmap.
[in] | PortBitMap | A 32-bit wide bit map of ATA AHCI ports. |
[in] | PortIndex | The specified port index. |
[out] | Port | The port number of the port specified by PortIndex. |
EFI_SUCCESS | The specified port is found and its port number is in Port. |
EFI_NOT_FOUND | Cannot find the specified port within the port bitmap. |
Definition at line 1222 of file AhciMode.c.
EFI_STATUS AhciIdentify | ( | IN PEI_AHCI_CONTROLLER_PRIVATE_DATA * | Private, |
IN UINT8 | Port, | ||
IN UINT8 | PortMultiplier, | ||
IN UINT8 | FisIndex, | ||
IN ATA_IDENTIFY_DATA * | Buffer | ||
) |
Send Identify Drive command to a specific device.
[in] | Private | The pointer to the PEI_AHCI_CONTROLLER_PRIVATE_DATA. |
[in] | Port | The number of port. |
[in] | PortMultiplier | The port multiplier port number. |
[in] | FisIndex | The offset index of the FIS base address. |
[in] | Buffer | The data buffer to store IDENTIFY PACKET data. |
EFI_SUCCESS | The cmd executes successfully. |
EFI_INVALID_PARAMETER | Buffer is NULL. |
EFI_DEVICE_ERROR | The cmd abort with error occurs. |
EFI_TIMEOUT | The operation is time out. |
EFI_UNSUPPORTED | The device is not ready for executing. |
Definition at line 1143 of file AhciMode.c.
EFI_STATUS AhciModeInitialization | ( | IN OUT PEI_AHCI_CONTROLLER_PRIVATE_DATA * | Private | ) |
Initialize ATA host controller at AHCI mode.
The function is designed to initialize ATA host controller.
[in,out] | Private | A pointer to the PEI_AHCI_CONTROLLER_PRIVATE_DATA instance. |
EFI_SUCCESS | The ATA AHCI controller is initialized successfully. |
EFI_OUT_OF_RESOURCES | Not enough resource to complete while initializing the controller. |
Others | A device error occurred while initializing the controller. |
Definition at line 1664 of file AhciMode.c.
EFI_STATUS AhciNonDataTransfer | ( | IN PEI_AHCI_CONTROLLER_PRIVATE_DATA * | Private, |
IN UINT8 | Port, | ||
IN UINT8 | PortMultiplier, | ||
IN UINT8 | FisIndex, | ||
IN EFI_ATA_COMMAND_BLOCK * | AtaCommandBlock, | ||
IN OUT EFI_ATA_STATUS_BLOCK * | AtaStatusBlock, | ||
IN UINT64 | Timeout | ||
) |
Start a non data transfer on specific port.
[in] | Private | The pointer to the PEI_AHCI_CONTROLLER_PRIVATE_DATA. |
[in] | Port | The number of port. |
[in] | PortMultiplier | The number of port multiplier. |
[in] | FisIndex | The offset index of the FIS base address. |
[in] | AtaCommandBlock | The EFI_ATA_COMMAND_BLOCK data. |
[in,out] | AtaStatusBlock | The EFI_ATA_STATUS_BLOCK data. |
[in] | Timeout | The timeout value of non data transfer, uses 100ns as a unit. |
EFI_DEVICE_ERROR | The non data transfer abort with error occurs. |
EFI_TIMEOUT | The operation is time out. |
EFI_UNSUPPORTED | The device is not ready for transfer. |
EFI_SUCCESS | The non data transfer executes successfully. |
Definition at line 981 of file AhciMode.c.
Do OR operation with the Value of AHCI Operation register.
[in] | AhciBar | AHCI bar address. |
[in] | Offset | The operation register offset. |
[in] | OrData | The Data used to do OR operation. |
Definition at line 142 of file AhciMode.c.
EFI_STATUS AhciPioTransfer | ( | IN PEI_AHCI_CONTROLLER_PRIVATE_DATA * | Private, |
IN UINT8 | Port, | ||
IN UINT8 | PortMultiplier, | ||
IN UINT8 | FisIndex, | ||
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 | ||
) |
Start a PIO Data transfer on specific port.
[in] | Private | The pointer to the PEI_AHCI_CONTROLLER_PRIVATE_DATA. |
[in] | Port | The number of port. |
[in] | PortMultiplier | The number of port multiplier. |
[in] | FisIndex | The offset index of the FIS base address. |
[in] | Read | The transfer direction. |
[in] | AtaCommandBlock | The EFI_ATA_COMMAND_BLOCK data. |
[in,out] | AtaStatusBlock | The EFI_ATA_STATUS_BLOCK data. |
[in,out] | MemoryAddr | The pointer to the data buffer. |
[in] | DataCount | The data count to be transferred. |
[in] | Timeout | The timeout value of PIO data transfer, uses 100ns as a unit. |
EFI_DEVICE_ERROR | The PIO data transfer abort with error occurs. |
EFI_TIMEOUT | The operation is time out. |
EFI_UNSUPPORTED | The device is not ready for transfer. |
EFI_OUT_OF_RESOURCES | The operation fails due to lack of resources. |
EFI_SUCCESS | The PIO data transfer executes successfully. |
Definition at line 717 of file AhciMode.c.
Read AHCI Operation register.
[in] | AhciBar | AHCI bar address. |
[in] | Offset | The operation register offset. |
Definition at line 79 of file AhciMode.c.
EFI_STATUS AhciReset | ( | IN UINTN | AhciBar, |
IN UINT64 | Timeout | ||
) |
Do AHCI HBA reset.
[in] | AhciBar | AHCI bar address. |
[in] | Timeout | The timeout, in 100ns units, to reset. |
EFI_DEVICE_ERROR | AHCI controller is failed to complete hardware reset. |
EFI_TIMEOUT | The reset operation is time out. |
EFI_SUCCESS | AHCI controller is reset successfully. |
Definition at line 1084 of file AhciMode.c.
EFI_STATUS AhciStartCommand | ( | IN UINTN | AhciBar, |
IN UINT8 | Port, | ||
IN UINT8 | CommandSlot, | ||
IN UINT64 | Timeout | ||
) |
Start command for give slot on specific port.
[in] | AhciBar | AHCI bar address. |
[in] | Port | The number of port. |
[in] | CommandSlot | The number of Command Slot. |
[in] | Timeout | The timeout value, in 100ns units, to start. |
EFI_DEVICE_ERROR | The command start unsuccessfully. |
EFI_TIMEOUT | The operation is time out. |
EFI_SUCCESS | The command start successfully. |
Definition at line 617 of file AhciMode.c.
EFI_STATUS AhciStopCommand | ( | IN UINTN | AhciBar, |
IN UINT8 | Port, | ||
IN UINT64 | Timeout | ||
) |
Stop command running for giving port
[in] | AhciBar | AHCI bar address. |
[in] | Port | The number of port. |
[in] | Timeout | The timeout value, in 100ns units, to stop. |
EFI_DEVICE_ERROR | The command stop unsuccessfully. |
EFI_TIMEOUT | The operation is time out. |
EFI_SUCCESS | The command stop successfully. |
Definition at line 574 of file AhciMode.c.
EFI_STATUS AhciWaitMemSet | ( | IN EFI_PHYSICAL_ADDRESS | Address, |
IN UINT32 | MaskValue, | ||
IN UINT32 | TestValue, | ||
IN UINT64 | Timeout | ||
) |
Wait for the value of the specified system memory set to the test value.
[in] | Address | The system memory address to test. |
[in] | MaskValue | The mask value of memory. |
[in] | TestValue | The test value of memory. |
[in] | Timeout | The timeout, in 100ns units, for wait memory set. |
EFI_TIMEOUT | The system memory setting is time out. |
EFI_SUCCESS | The system memory is correct set. |
Definition at line 246 of file AhciMode.c.
EFI_STATUS EFIAPI AhciWaitMmioSet | ( | IN UINTN | AhciBar, |
IN UINT32 | Offset, | ||
IN UINT32 | MaskValue, | ||
IN UINT32 | TestValue, | ||
IN UINT64 | Timeout | ||
) |
Wait for memory set to the test Value.
[in] | AhciBar | AHCI bar address. |
[in] | Offset | The memory offset to test. |
[in] | MaskValue | The mask Value of memory. |
[in] | TestValue | The test Value of memory. |
[in] | Timeout | The timeout, in 100ns units, for wait memory set. |
EFI_DEVICE_ERROR | The memory is not set. |
EFI_TIMEOUT | The memory setting is time out. |
EFI_SUCCESS | The memory is correct set. |
Definition at line 172 of file AhciMode.c.
Write AHCI Operation register.
[in] | AhciBar | AHCI bar address. |
[in] | Offset | The operation register offset. |
[in] | Data | The Data used to write down. |
Definition at line 101 of file AhciMode.c.
EFI_STATUS CreateNewDevice | ( | IN OUT PEI_AHCI_CONTROLLER_PRIVATE_DATA * | Private, |
IN UINTN | DeviceIndex, | ||
IN UINT16 | Port, | ||
IN UINT16 | PortMultiplier, | ||
IN UINT8 | FisIndex, | ||
IN ATA_IDENTIFY_DATA * | IdentifyData | ||
) |
Allocate device information data structure to contain device information. And insert the data structure to the tail of device list for tracing.
[in,out] | Private | A pointer to the PEI_AHCI_CONTROLLER_PRIVATE_DATA instance. |
[in] | DeviceIndex | The device index. |
[in] | Port | The port number of the ATA device to send the command. |
[in] | PortMultiplierPort | The port multiplier port number of the ATA device to send the command. If there is no port multiplier, then specify 0xFFFF. |
[in] | FisIndex | The index of the FIS of the ATA device to send the command. |
[in] | IdentifyData | The data buffer to store the output of the IDENTIFY command. |
EFI_SUCCESS | Successfully insert the ATA device to the tail of device list. |
EFI_OUT_OF_RESOURCES | Not enough resource. |
Definition at line 1602 of file AhciMode.c.
EFI_LBA GetAtapi6Capacity | ( | IN ATA_IDENTIFY_DATA * | IdentifyData | ) |
Gets ATA device Capacity according to ATA 6.
This function returns the capacity of the ATA device if it follows ATA 6 to support 48 bit addressing.
[in] | IdentifyData | A pointer to ATA_IDENTIFY_DATA structure. |
Definition at line 1415 of file AhciMode.c.
EFI_STATUS IdentifyAtaDevice | ( | IN OUT PEI_AHCI_ATA_DEVICE_DATA * | DeviceData | ) |
Identifies ATA device via the Identify data.
This function identifies the ATA device and initializes the media information.
The Identify Drive command response data from an ATA device is the peripheral hardware input, so this routine will do basic validation for the Identify Drive command response data.
[in,out] | DeviceData | A pointer to PEI_AHCI_ATA_DEVICE_DATA structure. |
EFI_SUCCESS | The device is successfully identified and media information is correctly initialized. |
EFI_UNSUPPORTED | The device is not a valid ATA device (hard disk). |
Definition at line 1465 of file AhciMode.c.
EFI_STATUS TransferAtaDevice | ( | IN PEI_AHCI_ATA_DEVICE_DATA * | DeviceData, |
IN OUT VOID * | Buffer, | ||
IN EFI_LBA | StartLba, | ||
IN UINT32 | TransferLength, | ||
IN BOOLEAN | IsWrite | ||
) |
Transfer data from ATA device.
This function performs one ATA pass through transaction to transfer data from/to ATA device. It chooses the appropriate ATA command and protocol to invoke PassThru interface of ATA pass through.
[in] | DeviceData | A pointer to PEI_AHCI_ATA_DEVICE_DATA structure. |
[in,out] | Buffer | The pointer to the current transaction buffer. |
[in] | StartLba | The starting logical block address to be accessed. |
[in] | TransferLength | The block number or sector count of the transfer. |
[in] | IsWrite | Indicates whether it is a write operation. |
EFI_SUCCESS | The data transfer is complete successfully. |
Definition at line 1924 of file AhciMode.c.
EFI_STATUS TrustTransferAtaDevice | ( | IN PEI_AHCI_ATA_DEVICE_DATA * | DeviceData, |
IN OUT VOID * | Buffer, | ||
IN UINT8 | SecurityProtocolId, | ||
IN UINT16 | SecurityProtocolSpecificData, | ||
IN UINTN | TransferLength, | ||
IN BOOLEAN | IsTrustSend, | ||
IN UINT64 | Timeout, | ||
OUT UINTN * | TransferLengthOut | ||
) |
Trust transfer data from/to ATA device.
This function performs one ATA pass through transaction to do a trust transfer from/to ATA device. It chooses the appropriate ATA command and protocol to invoke PassThru interface of ATA pass through.
[in] | DeviceData | Pointer to PEI_AHCI_ATA_DEVICE_DATA structure. |
[in,out] | Buffer | The pointer to the current transaction buffer. |
[in] | SecurityProtocolId | The value of the "Security Protocol" parameter of the security protocol command to be sent. |
[in] | SecurityProtocolSpecificData | The value of the "Security Protocol Specific" parameter of the security protocol command to be sent. |
[in] | TransferLength | The block number or sector count of the transfer. |
[in] | IsTrustSend | Indicates whether it is a trust send operation or not. |
[in] | Timeout | The timeout, in 100ns units, to use for the execution of the security protocol command. A Timeout value of 0 means that this function will wait indefinitely for the security protocol command to execute. If Timeout is greater than zero, then this function will return EFI_TIMEOUT if the time required to execute the receive data command is greater than Timeout. |
[out] | TransferLengthOut | A pointer to a buffer to store the size in bytes of the data written to the buffer. Ignore it when IsTrustSend is TRUE. |
EFI_SUCCESS | The data transfer is complete successfully. |
Definition at line 2063 of file AhciMode.c.
UINT8 mAtaCommands[2][2] |
Definition at line 28 of file AhciMode.c.
EFI_ATA_PASS_THRU_CMD_PROTOCOL mAtaPassThruCmdProtocols[2] |
Definition at line 20 of file AhciMode.c.
UINT8 mAtaTrustCommands[2] |
Definition at line 42 of file AhciMode.c.
UINT32 mMaxTransferBlockNumber[2] |
Definition at line 59 of file AhciMode.c.