mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
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>
This commit is contained in:
parent
69cd129471
commit
3f250a944d
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user