diff options
author | Eric Dong <eric.dong@intel.com> | 2016-05-04 12:50:48 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-07-06 16:20:27 +0800 |
commit | 78e11556837e96e76caa7ad8885651f565cd72c7 (patch) | |
tree | 40598218c60986e2d43e7075d3f6e266e4e4a853 | |
parent | c07eb50a207be12e29d3be3cdaf906a5e729aebe (diff) | |
download | edk2-platforms-78e11556837e96e76caa7ad8885651f565cd72c7.tar.xz |
SecurityPkg OpalPasswordSmm: Always execute BlockSid command.
The BlockSid feature is not depend on lock status,
so move the send BlockSid command out of unlock process.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
(cherry picked from commit 3f250a944d691d2169fa3834c89eed7235b735ae)
-rw-r--r-- | SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.c b/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.c index 46311bd8a0..47b570f343 100644 --- a/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.c +++ b/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.c @@ -442,19 +442,19 @@ SmmUnlockOpalPassword ( Session.MediaId = 0;
Session.OpalBaseComId = OpalDev->OpalBaseComId;
- if (mSendBlockSID && BlockSidSupport) {
- Result = OpalBlockSid (&Session, TRUE);
- if (Result != TcgResultSuccess) {
- break;
- }
- }
-
Result = OpalSupportUnlock (&Session, OpalDev->Password, OpalDev->PasswordLength, NULL);
if (Result == TcgResultSuccess) {
Status = EFI_SUCCESS;
}
}
+ if (mSendBlockSID && BlockSidSupport) {
+ Result = OpalBlockSid (&Session, TRUE);
+ if (Result != TcgResultSuccess) {
+ break;
+ }
+ }
+
if (OpalDev->DeviceType == OPAL_DEVICE_TYPE_NVME) {
if (SubClassCode == PCI_CLASS_MASS_STORAGE_NVM) {
Status = NvmeControllerExit (&mNvmeContext);
|