Re: [edk2] [PATCH] MdeModulePkg: ScsiDiskDxe: fix to support EFI_ERASE_BLOCK_PROTOCOL

2017-04-18 Thread Paolo Bonzini
On 15/04/2017 15:44, Haojian Zhuang wrote: > If bit TPZ and bit TPRZ are set, the erase feature is implemented. > If bit TPZ is set and bit TPRZ is clear, the discard feature is > implemented. And discard is a non-secure variant of the erase > functionality. > > So the detecting operation of EFI

Re: [edk2] [PATCH] MdeModulePkg: ScsiDiskDxe: fix to support EFI_ERASE_BLOCK_PROTOCOL

2017-04-18 Thread Haojian Zhuang
Hi Hao, I tried to edit bProvisioningType. And I finially found that it’s the read-only bit. And my understanding on “return any data by discard operation” is implemented by vendor. I think it means returning any random data by controller, not original programmed data from UFS device. Best Re

Re: [edk2] [PATCH] MdeModulePkg: ScsiDiskDxe: fix to support EFI_ERASE_BLOCK_PROTOCOL

2017-04-18 Thread Wu, Hao A
Hi Haojian, I checked the UFS 2.0 spec, in Section 12.1 UFS Security Feature Support Requirements: The security features outlined in this specification are mandatory for all devices. and the 'Erase Operation' is listed under section 12.2.2.2, which makes me think that the erase option should be

Re: [edk2] [PATCH] MdeModulePkg: ScsiDiskDxe: fix to support EFI_ERASE_BLOCK_PROTOCOL

2017-04-17 Thread Haojian Zhuang
Hi Hao, I tried the discard operation on my UFS device. It just return 0. And erase operation isn’t supported on my UFS device. If I don’t support discard operation, I can’t erase blocks at all. Best Regards Haojian From: Wu, Hao A Sent: 2017年4月17日 9:59 To: Haojian Z

Re: [edk2] [PATCH] MdeModulePkg: ScsiDiskDxe: fix to support EFI_ERASE_BLOCK_PROTOCOL

2017-04-16 Thread Wu, Hao A
Hi Haojian, The reason for me to check both bits TPE and TPRZ being set when determining whether the Erase Block Protocol should be produced is: According to the Universal Flash Storage (UFS) Version 2.0 spec Section 12.2.3.2 Discard: Since the TPRZ bit is set to zero if the discard functionality

[edk2] [PATCH] MdeModulePkg: ScsiDiskDxe: fix to support EFI_ERASE_BLOCK_PROTOCOL

2017-04-15 Thread Haojian Zhuang
If bit TPZ and bit TPRZ are set, the erase feature is implemented. If bit TPZ is set and bit TPRZ is clear, the discard feature is implemented. And discard is a non-secure variant of the erase functionality. So the detecting operation of EFI_ERASE_BLOCK_PROTOCOL, we should consider to support both