X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FLibrary%2FUefiScsiLib.h;h=7d27a2a0b0e1bb32b85fc0a63eb9d85b5a5956ed;hb=ccb491c862cf5137fd4645f83adf529f17313858;hp=b990cfded58f5e0356c45fcb180bb74405ba4fd2;hpb=adde977ad413073801212f78950cdaab046b9ead;p=mirror_edk2.git diff --git a/MdePkg/Include/Library/UefiScsiLib.h b/MdePkg/Include/Library/UefiScsiLib.h index b990cfded5..7d27a2a0b0 100644 --- a/MdePkg/Include/Library/UefiScsiLib.h +++ b/MdePkg/Include/Library/UefiScsiLib.h @@ -1,7 +1,10 @@ /** @file - Provides the functions to submit Scsi commands defined in SCSI-2 specification for scsi device. + This library class provides the functions to submit SCSI commands defined in SCSI-2 specification + for hard drive, CD and DVD devices that are the most common SCSI boot targets used by UEFI platforms. + This library class depends on SCSI I/O Protocol defined in UEFI Specification and SCSI-2 industry standard. + Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -45,7 +48,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. If SenseDataLength is 0, then this parameter is optional and may be NULL. @param[in, out] SenseDataLength On input, a pointer to the length in bytes of - the SenseData buffer. On output, a poiinter to + the SenseData buffer. On output, a pointer to the number of bytes written to the SenseData buffer. @param[out] HostAdapterStatus The status of the SCSI Host Controller that produces the SCSI bus containing the SCSI target specified by @@ -53,7 +56,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. See the EFI SCSI I/O Protocol in the UEFI Specification for details on the possible return values. @param[out] TargetStatus The status returned by the SCSI target specified - by ScsiIo when the SCSI Request Packat was executed + by ScsiIo when the SCSI Request Packet was executed on the SCSI Host Controller. See the EFI SCSI I/O Protocol in the UEFI Specification for details on the possible return values. @@ -79,10 +82,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Packet to execute. See HostAdapterStatus, TargetStatus, SenseDataLength, and SenseData in that order for additional status information. - @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, - but the entire DataBuffer could not be transferred. - The actual number of bytes transferred is returned - in InTransferLength. **/ EFI_STATUS @@ -132,7 +131,7 @@ ScsiTestUnitReadyCommand ( SCSI I/O Protocol in the UEFI Specification for details on the possible return values. @param[out] TargetStatus The status returned by the SCSI target specified - by ScsiIo when the SCSI Request Packat was + by ScsiIo when the SCSI Request Packet was executed on the SCSI Host Controller. See the EFI SCSI I/O Protocol in the UEFI Specification for details on the possible @@ -228,7 +227,7 @@ ScsiInquiryCommand ( UEFI Specification for details on the possible return values. @param[out] TargetStatus The status returned by the SCSI target specified - by ScsiIo when the SCSI Request Packat was executed + by ScsiIo when the SCSI Request Packet was executed on the SCSI Host Controller. See the EFI SCSI I/O Protocol in the UEFI Specification for details on the possible return values. @@ -378,6 +377,53 @@ ScsiReadCapacityCommand ( ); +/** + Function to submit read capacity16 command. + + @param ScsiIo A pointer to SCSI IO protocol. + @param Timeout The length of timeout period. + @param SenseData A pointer to output sense data. + @param SenseDataLength The length of output sense data. + @param HostAdapterStatus The status of Host Adapter. + @param TargetStatus The status of the target. + @param DataBuffer A pointer to a data buffer. + @param DataLength The length of data buffer. + @param PMI Partial medium indicator. + + @retval EFI_SUCCESS The status of the unit is tested successfully. + @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, + but the entire DataBuffer could not be transferred. + The actual number of bytes transferred is returned + in TransferLength. + @retval EFI_NOT_READY The SCSI Request Packet could not be sent because + there are too many SCSI Command Packets already + queued. + @retval EFI_DEVICE_ERROR A device error occurred while attempting to send + the SCSI Request Packet. + @retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid. + @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet + is not supported by the SCSI initiator(i.e., SCSI + Host Controller). + @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI + Request Packet to execute. + +**/ + +EFI_STATUS +EFIAPI +ScsiReadCapacity16Command ( + IN EFI_SCSI_IO_PROTOCOL *ScsiIo, + IN UINT64 Timeout, + IN VOID *SenseData, + IN OUT UINT8 *SenseDataLength, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, + OUT VOID *DataBuffer, + IN OUT UINT32 *DataLength, + IN BOOLEAN PMI + ); + + /** Execute Read(10) SCSI command on a specific SCSI target.