diff options
author | Linus Liu <linus.liu@intel.com> | 2023-09-12 09:41:59 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-09-13 06:35:02 +0000 |
commit | cdfe4310dda2a30b0ca05c8ede6896edce37a656 (patch) | |
tree | 865d31a072af7563e6209fa1ad26d7a4592f8da5 /SecurityPkg | |
parent | 4a1afea6f7361fd65e9d4ba34eaac48ec8bb2867 (diff) | |
download | edk2-cdfe4310dda2a30b0ca05c8ede6896edce37a656.zip edk2-cdfe4310dda2a30b0ca05c8ede6896edce37a656.tar.gz edk2-cdfe4310dda2a30b0ca05c8ede6896edce37a656.tar.bz2 |
Pyrite support - Secure erase is only available if encryption is supported.
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>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'SecurityPkg')
-rw-r--r-- | SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c index e2e77cb..ba9fa66 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;
|