[edk2-devel] [PATCH v2] Pyrite support - Secure erase is only available if encryption is supported.
Yao, Jiewen
jiewen.yao at intel.com
Mon Sep 11 12:04:43 UTC 2023
Reviewed-by: Jiewen Yao <Jiewen.yaso at intel.com>
> -----Original Message-----
> From: Liu, Linus <linus.liu at intel.com>
> Sent: Thursday, September 7, 2023 5:02 PM
> To: devel at edk2.groups.io
> Cc: Liu, Linus <linus.liu at intel.com>; Zhang, Qi1 <qi1.zhang at intel.com>; Kumar,
> Rahul R <rahul.r.kumar at intel.com>; Yao, Jiewen <jiewen.yao at intel.com>; Chen,
> Tina <tina.chen at intel.com>; Chen, Xiao X <xiao.x.chen at intel.com>
> Subject: [PATCH v2] Pyrite support - Secure erase is only available if encryption is
> supported.
>
> From: Linus Liu <linus.liu at intel.com>
>
> https://bugzilla.tianocore.org/show_bug.cgi?id=3004
>
> Cc: Qi Zhang <qi1.zhang at intel.com>
> Cc: Rahul Kumar <rahul1.kumar at intel.com>
> Cc: Jiewen Yao <jiewen.yao at intel.com>
> Cc: Tina Chen <tina.chen at intel.com>
> Cc: Xiao X Chen <xiao.x.chen at 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 e2e77cbc24..ba9fa66c60 100644
> --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> @@ -87,7 +87,11 @@ 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 (#108485): https://edk2.groups.io/g/devel/message/108485
Mute This Topic: https://groups.io/mt/101210886/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list