28 IN UINTN TrustComputingDeviceIndex
35 while (!
IsNull (&Private->DeviceList, Node)) {
36 DeviceData = AHCI_PEI_ATA_DEVICE_INFO_FROM_THIS (Node);
38 if (DeviceData->TrustComputingDeviceIndex == TrustComputingDeviceIndex) {
67 if ((This ==
NULL) || (NumberofDevices ==
NULL)) {
68 return EFI_INVALID_PARAMETER;
71 Private = GET_AHCI_PEIM_HC_PRIVATE_DATA_FROM_THIS_STROAGE_SECURITY (This);
72 *NumberofDevices = Private->TrustComputingDevices;
115 if ((This ==
NULL) || (DevicePathLength ==
NULL) || (DevicePath ==
NULL)) {
116 return EFI_INVALID_PARAMETER;
119 Private = GET_AHCI_PEIM_HC_PRIVATE_DATA_FROM_THIS_STROAGE_SECURITY (This);
120 if ((DeviceIndex == 0) || (DeviceIndex > Private->TrustComputingDevices)) {
121 return EFI_INVALID_PARAMETER;
125 if (DeviceData ==
NULL) {
126 return EFI_NOT_FOUND;
132 DeviceData->PortMultiplier,
136 if (EFI_ERROR (Status)) {
235 IN UINT8 SecurityProtocolId,
236 IN UINT16 SecurityProtocolSpecificData,
238 OUT VOID *PayloadBuffer,
245 if ((PayloadBuffer ==
NULL) || (PayloadTransferSize ==
NULL) || (PayloadBufferSize == 0)) {
246 return EFI_INVALID_PARAMETER;
249 Private = GET_AHCI_PEIM_HC_PRIVATE_DATA_FROM_THIS_STROAGE_SECURITY (This);
250 if ((DeviceIndex == 0) || (DeviceIndex > Private->TrustComputingDevices)) {
251 return EFI_INVALID_PARAMETER;
255 if (DeviceData ==
NULL) {
256 return EFI_NOT_FOUND;
259 ASSERT ((DeviceData->IdentifyData->trusted_computing_support & BIT0) != 0);
260 if ((DeviceData->IdentifyData->trusted_computing_support & BIT0) == 0) {
261 return EFI_UNSUPPORTED;
268 SecurityProtocolSpecificData,
346 IN UINT8 SecurityProtocolId,
347 IN UINT16 SecurityProtocolSpecificData,
349 IN VOID *PayloadBuffer
355 if ((PayloadBuffer ==
NULL) && (PayloadBufferSize != 0)) {
356 return EFI_INVALID_PARAMETER;
359 Private = GET_AHCI_PEIM_HC_PRIVATE_DATA_FROM_THIS_STROAGE_SECURITY (This);
360 if ((DeviceIndex == 0) || (DeviceIndex > Private->TrustComputingDevices)) {
361 return EFI_INVALID_PARAMETER;
365 if (DeviceData ==
NULL) {
366 return EFI_NOT_FOUND;
369 ASSERT ((DeviceData->IdentifyData->trusted_computing_support & BIT0) != 0);
370 if ((DeviceData->IdentifyData->trusted_computing_support & BIT0) == 0) {
371 return EFI_UNSUPPORTED;
378 SecurityProtocolSpecificData,
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)
EFI_STATUS AhciBuildDevicePath(IN PEI_AHCI_CONTROLLER_PRIVATE_DATA *Private, IN UINT16 Port, IN UINT16 PortMultiplierPort, OUT UINTN *DevicePathLength, OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
EFI_STATUS EFIAPI AhciStorageSecurityGetDevicePath(IN EDKII_PEI_STORAGE_SECURITY_CMD_PPI *This, IN UINTN DeviceIndex, OUT UINTN *DevicePathLength, OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
EFI_STATUS EFIAPI AhciStorageSecuritySendData(IN EDKII_PEI_STORAGE_SECURITY_CMD_PPI *This, IN UINTN DeviceIndex, IN UINT64 Timeout, IN UINT8 SecurityProtocolId, IN UINT16 SecurityProtocolSpecificData, IN UINTN PayloadBufferSize, IN VOID *PayloadBuffer)
EFI_STATUS EFIAPI AhciStorageSecurityReceiveData(IN EDKII_PEI_STORAGE_SECURITY_CMD_PPI *This, IN UINTN DeviceIndex, IN UINT64 Timeout, IN UINT8 SecurityProtocolId, IN UINT16 SecurityProtocolSpecificData, IN UINTN PayloadBufferSize, OUT VOID *PayloadBuffer, OUT UINTN *PayloadTransferSize)
EFI_STATUS EFIAPI AhciStorageSecurityGetDeviceNo(IN EDKII_PEI_STORAGE_SECURITY_CMD_PPI *This, OUT UINTN *NumberofDevices)
PEI_AHCI_ATA_DEVICE_DATA * SearchTrustComputingDeviceByIndex(IN PEI_AHCI_CONTROLLER_PRIVATE_DATA *Private, IN UINTN TrustComputingDeviceIndex)
BOOLEAN EFIAPI IsNull(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
LIST_ENTRY *EFIAPI GetNextNode(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
LIST_ENTRY *EFIAPI GetFirstNode(IN CONST LIST_ENTRY *List)