X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FBus%2FUsb%2FUsbMassStorageDxe%2FUsbMassBoot.h;h=13a926035ceb4b6b5709ea3c86f6ea9b8134be5f;hp=a39782cf8fdc5ae39a7b8fcfc2f8d2038dfcf30b;hb=275b96da6081b05f515aea775bec8bef9bfeac88;hpb=39840c50c1a7cc727fb60cce044b0e956f94deb3 diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h index a39782cf8f..13a926035c 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h @@ -2,7 +2,7 @@ Definition of the command set of USB Mass Storage Specification for Bootability, Revision 1.0. -Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2017, 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 which accompanies this distribution. The full text of the license may be found at @@ -51,9 +51,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define USB_BOOT_SENSE_VOLUME_OVERFLOW 0x0D ///< Partition overflow #define USB_BOOT_SENSE_MISCOMPARE 0x0E ///< Source data mis-match while verfying. -#define USB_BOOT_ASC_NOT_READY 0x04 -#define USB_BOOT_ASC_NO_MEDIA 0x3A -#define USB_BOOT_ASC_MEDIA_CHANGE 0x28 +#define USB_BOOT_ASC_NO_ADDITIONAL_SENSE_INFORMATION 0x00 +#define USB_BOOT_ASC_NOT_READY 0x04 +#define USB_BOOT_ASC_NO_MEDIA 0x3A +#define USB_BOOT_ASC_MEDIA_CHANGE 0x28 // // Supported PDT codes, or Peripheral Device Type @@ -72,7 +73,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // Retry mass command times, set by experience // #define USB_BOOT_COMMAND_RETRY 5 -#define USB_BOOT_INIT_MEDIA_RETRY 5 // // Wait for unit ready command, set by experience @@ -311,6 +311,47 @@ UsbBootWriteBlocks ( IN UINT8 *Buffer ); +/** + Read some blocks from the device by SCSI 16 byte cmd. + + @param UsbMass The USB mass storage device to read from + @param Lba The start block number + @param TotalBlock Total block number to read + @param Buffer The buffer to read to + + @retval EFI_SUCCESS Data are read into the buffer + @retval Others Failed to read all the data + +**/ +EFI_STATUS +UsbBootReadBlocks16 ( + IN USB_MASS_DEVICE *UsbMass, + IN UINT64 Lba, + IN UINTN TotalBlock, + OUT UINT8 *Buffer + ); + +/** + Write some blocks to the device by SCSI 16 byte cmd. + + @param UsbMass The USB mass storage device to write to + @param Lba The start block number + @param TotalBlock Total block number to write + @param Buffer Pointer to the source buffer for the data. + + @retval EFI_SUCCESS Data are written into the buffer + @retval Others Failed to write all the data + +**/ +EFI_STATUS +UsbBootWriteBlocks16 ( + IN USB_MASS_DEVICE *UsbMass, + IN UINT64 Lba, + IN UINTN TotalBlock, + IN UINT8 *Buffer + ); + + /** Use the USB clear feature control transfer to clear the endpoint stall condition.