Yes, I agree it's weird. 

We are looking at this and will get back to you if we have findings.

Thanks
Feng

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ramesh R.
Sent: Thursday, August 25, 2016 4:44 PM
To: edk2-devel <edk2-devel@lists.01.org>
Subject: [edk2] BootableImageSupportTest\StorageSecurityCommandProtocolTest

Hi,

   When the we run the 
"BootableImageSupportTest\StorageSecurityCommandProtocolTest" test on the NVME 
devices we are getting into error because of the below testing code.

    //
    // According to TCG definition, when the Security Protocol field is set to 
00h, and SP
    // Specific is set to 0000h in a TRUSTED RECEIVE command, return security 
protocol
    // information. This Command is not associated with a security send command
    //
    Status = StorageSecurityCommand->ReceiveData (
                                       StorageSecurityCommand,
                                       BlockIo->Media->MediaId,
                                       100000000,                    // Timeout 
10-sec
                                       0,                            // 
SecurityProtocol
                                       0,                            // 
SecurityProtocolSpecifcData
                                       10,                           // 
PayloadBufferSize,
                                       DataBuffer,                   // 
PayloadBuffer
                                       &RcvDataSize
                                       );
    //
    // for ATA8-ACS SecurityProtocol, 512 byte is a request
    //
    if (IsAtaDevice) {
      if((Status == EFI_DEVICE_ERROR) || (Status == EFI_WARN_BUFFER_TOO_SMALL)){
        AssertionType = EFI_TEST_ASSERTION_PASSED;
      } else {
        AssertionType = EFI_TEST_ASSERTION_FAILED;
      }
    } else {
      if((!EFI_ERROR(Status)) || (Status == EFI_WARN_BUFFER_TOO_SMALL)){
        AssertionType = EFI_TEST_ASSERTION_PASSED;
      } else {
        AssertionType = EFI_TEST_ASSERTION_FAILED;
      }
    }

For Ata devices, EFI_DEVICE_ERROR considered as valid error case and for the 
Nvme ( Non ATA) device it's considered as error. Could you please let us know 
why there is difference in this case ?.

Thanks,
Ramesh


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to