From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id E23F47803CC for ; Tue, 12 Sep 2023 01:42:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=zjLnstScGVmeCv+caKSPFo48vlJUEqm4/JWyPmJzO3o=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1694482932; v=1; b=nB+t8vpLXfljH9iT18McWqLbrN3nqeaN4Q1nUGy2o2fiN1QNm/l7Xg2HR6j/Ydy/BKHqd8zw ywrH9luD5vX33mzzs1ilVLso1oYJRkdnnRZqDMg+IFNIzXJUYJp9z+B5Wb7cnLVbMJnBOeU/RNp sELlM3B/PyZi87o+Wh9PBCSU= X-Received: by 127.0.0.2 with SMTP id i6IJYY7687511xbcCQFTQFlf; Mon, 11 Sep 2023 18:42:12 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.15909.1694482931603524524 for ; Mon, 11 Sep 2023 18:42:11 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10830"; a="382063384" X-IronPort-AV: E=Sophos;i="6.02,244,1688454000"; d="scan'208";a="382063384" X-Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2023 18:42:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10830"; a="809038446" X-IronPort-AV: E=Sophos;i="6.02,244,1688454000"; d="scan'208";a="809038446" X-Received: from linusliu-desk1.gar.corp.intel.com ([10.5.215.134]) by fmsmga008.fm.intel.com with ESMTP; 11 Sep 2023 18:42:06 -0700 From: "Linus Liu" To: devel@edk2.groups.io Cc: Linus Liu , Qi Zhang , Rahul Kumar , Jiewen Yao , Tina Chen , Xiao X Chen Subject: [edk2-devel] [PATCH v3] Pyrite support - Secure erase is only available if encryption is supported. Date: Mon, 11 Sep 2023 18:41:59 -0700 Message-Id: <20230912014159.513-1-linus.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,linus.liu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: CZxEadW57vnbhnfQGrlQD3L9x7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=nB+t8vpL; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io From: Linus Liu https://bugzilla.tianocore.org/show_bug.cgi?id=3D3004 Cc: Qi Zhang Cc: Rahul Kumar Cc: Jiewen Yao Cc: Tina Chen Cc: Xiao X Chen Signed-off-by: Linus Liu --- 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/T= cg/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=0D // this is only available if encryption is supported=0D //=0D - AvalDiskActions->SecureErase =3D 1;=0D + if (SupportedAttributes->MediaEncryption) {=0D + AvalDiskActions->SecureErase =3D 1;=0D + } else {=0D + AvalDiskActions->SecureErase =3D 0;=0D + }=0D } else {=0D AvalDiskActions->PsidRevert =3D 0;=0D AvalDiskActions->SecureErase =3D 0;=0D --=20 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/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-