summaryrefslogtreecommitdiff
path: root/SecurityPkg
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2016-05-04 12:50:48 +0800
committerLiming Gao <liming.gao@intel.com>2016-05-05 12:52:48 +0800
commit3f250a944d691d2169fa3834c89eed7235b735ae (patch)
tree80fd3fcb5986073e5653ed1660df39165aba20ef /SecurityPkg
parent69cd129471c3507d6be0b9e993a020ddef38692e (diff)
downloadedk2-platforms-3f250a944d691d2169fa3834c89eed7235b735ae.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>
Diffstat (limited to 'SecurityPkg')
-rw-r--r--SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.c14
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);