From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: christopher.j.zurcher@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by groups.io with SMTP; Thu, 26 Sep 2019 19:12:18 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2019 19:12:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,553,1559545200"; d="scan'208";a="193019586" Received: from cjzurch-desk.amr.corp.intel.com ([10.9.70.181]) by orsmga003.jf.intel.com with ESMTP; 26 Sep 2019 19:12:17 -0700 From: "Zurcher, Christopher J" To: devel@edk2.groups.io Cc: Michael D Kinney , Jiewen Yao , Jian J Wang , Liming Gao , Hao A Wu Subject: [PATCH v7 0/4] Add SCSI Support for Storage Security Command Protocol Date: Thu, 26 Sep 2019 19:12:13 -0700 Message-Id: <20190927021217.61744-1-christopher.j.zurcher@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1546 V7 changes: Changed Inc512 behavior to always take DataLength as bytes, and divide by 512 only in the CDB. V6 changes: Restore EFI_SCSI_TYPE defines for ASC IT8 devices. Revert EFI_SCSI_IO_TYPE changes in Protocol\ScsiIo.h. Add INC_512 parameter for SecurityProtocol In/Out commands in UefiScsiLib. Change UINT32 args to UINTN to match the definitions for Storage Security Command Protocol. V5 changes: Split MdeModulePkg changes into separate patches. Add ReinstallProtocol calls for StorageSecurityCommand Protocol. Restore original MediaPresent and ReadCapacity behavior, with new implementation for WLUN type media. Clear temporary aligned buffers before freeing them. V4 changes: Add SSC Protocol in addition to BlockIo instead of in place of BlockIo. Add error handling for (BlockSize == 0) in Read and WriteBlocks commands to handle partitions that do not support ReadCapacity(). V3 changes: Initialize AlignedBuffer variable in ScsiDiskReceiveData and ScsiDiskSendData functions. Remove redundant input validation and debug message in ScsiDiskSendData. V2 changes: Split the patch into separate commits for separate packages. To support RPMB access on UFS devices, support must be added to the ScsiDiskDxe driver for the Storage Security Command Protocol. Cc: Michael D Kinney Cc: Jiewen Yao Cc: Jian J Wang Cc: Liming Gao Cc: Hao A Wu Christopher J Zurcher (4): MdePkg: Implement SCSI commands for Security Protocol In/Out MdeModulePkg/UfsPassThruDxe: Check for RPMB W-LUN (SecurityLun) MdeModulePkg/ScsiBusDxe: Clean up Peripheral Type check MdeModulePkg/ScsiDiskDxe: Support Storage Security Command Protocol MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf | 3 +- MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h | 171 +++++- MdePkg/Include/IndustryStandard/Scsi.h | 48 +- MdePkg/Include/Library/UefiScsiLib.h | 128 +++- MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c | 5 +- MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 616 +++++++++++++++++++- MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | 17 +- MdePkg/Library/UefiScsiLib/UefiScsiLib.c | 229 +++++++- 8 files changed, 1179 insertions(+), 38 deletions(-) -- 2.16.2.windows.1