:p
atchew
Login
From: Linus Liu <linus.liu@intel.com> https://bugzilla.tianocore.org/show_bug.cgi?id=3004 Cc: Qi Zhang <qi1.zhang@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> --- SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c index XXXXXXX..XXXXXXX 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c @@ -XXX,XX +XXX,XX @@ OpalSupportGetAvailableActions ( // Secure erase is performed by generating a new encryption key // this is only available if encryption is supported // - AvalDiskActions->SecureErase = 1; + if (SupportedAttributes->MediaEncryption) { + AvalDiskActions->SecureErase = 1; + } } else { AvalDiskActions->PsidRevert = 0; AvalDiskActions->SecureErase = 0; -- 2.39.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108253): https://edk2.groups.io/g/devel/message/108253 Mute This Topic: https://groups.io/mt/101144585/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
From: Linus Liu <linus.liu@intel.com> https://bugzilla.tianocore.org/show_bug.cgi?id=3004 Cc: Qi Zhang <qi1.zhang@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tina Chen <tina.chen@intel.com> Cc: Xiao X Chen <xiao.x.chen@intel.com> Signed-off-by: Linus Liu <linus.liu@intel.com> --- SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c index XXXXXXX..XXXXXXX 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c @@ -XXX,XX +XXX,XX @@ OpalSupportGetAvailableActions ( // Secure erase is performed by generating a new encryption key // this is only available if encryption is supported // - AvalDiskActions->SecureErase = 1; + if (SupportedAttributes->MediaEncryption) { + AvalDiskActions->SecureErase = 1; + } else { + AvalDiskActions->SecureErase = 0; + } } else { AvalDiskActions->PsidRevert = 0; AvalDiskActions->SecureErase = 0; -- 2.39.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108511): https://edk2.groups.io/g/devel/message/108511 Mute This Topic: https://groups.io/mt/101307436/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-