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 27D859415CC for ; Mon, 4 Sep 2023 08:38:42 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=8RCfQq5B0vzGVFnnWxjPcF/BIlDwPKHKuV0JZnrIejU=; 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=1693816721; v=1; b=DKypv9624MmaTMIZYtIa5KXvbgznJYHt+qkJPmviA2iKXiH27aCtfT14/HYWVJPdhZCwlvqW Etc/sas5dradTITPfHvKip2yqzXHmRsk9y4HOxElNdXPJ9YnLmIk8pTreiB6kdAaW0v7ZYpNqSv HoUZJKgB1PQnyqwkS7l6r4bs= X-Received: by 127.0.0.2 with SMTP id huwVYY7687511xPyRWFigGIQ; Mon, 04 Sep 2023 01:38:41 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.43729.1693816720908354538 for ; Mon, 04 Sep 2023 01:38:41 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10822"; a="361573832" X-IronPort-AV: E=Sophos;i="6.02,225,1688454000"; d="scan'208";a="361573832" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2023 01:38:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10822"; a="769908221" X-IronPort-AV: E=Sophos;i="6.02,225,1688454000"; d="scan'208";a="769908221" X-Received: from linusliu-desk1.gar.corp.intel.com ([10.5.215.134]) by orsmga008.jf.intel.com with ESMTP; 04 Sep 2023 01:38:38 -0700 From: "Linus Liu" To: devel@edk2.groups.io Cc: Linus Liu , Qi Zhang , Rahul Kumar , Jiewen Yao Subject: [edk2-devel] [PATCH v1] Pyrite support - Secure erase is only available if encryption is supported. Date: Mon, 4 Sep 2023 01:38:15 -0700 Message-Id: <20230904083815.412-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: cwM97qD60XyMJ2JCMrFBomXsx7686176AA= 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=DKypv962; 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 --- 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/T= cg/Opal/OpalPassword/OpalDriver.c index e2e77cbc24..88650a28dc 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c @@ -87,7 +87,9 @@ 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 + }=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 (#108253): https://edk2.groups.io/g/devel/message/108253 Mute This Topic: https://groups.io/mt/101144585/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-