From nobody Wed May 15 04:59:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+108368+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+108368+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1694077342; cv=none; d=zohomail.com; s=zohoarc; b=NID4r1IxCw6PG/1VrdzTjXNFxkm4RJp8yRe0js+qqadkCp0Oba579UQa2LHSAAgN3V3x1KvFFl6z7wmgvYc+yS+HkYS31oeCeI0HeLB+TkbKC+RixSdV2Y/RmjobpkRiOPioHjt66hi7D+SijEHWpUVcRP3OSa9TS2RhPkTA7XM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694077342; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=9qWX3bsVrFRNu5+jVInnQdbZ47nRpHjWP1eiVvNEGc0=; b=dNrODnT7YUexP/VDXf6bJh8Qd7FgieuUzY7SvyQHqf6PrrYciKnuwMyXgcpA7VTPT4915QHbKXvPPXfdd6JteThY+dLMNL+Xc2SgY1FHCrjHVEb+JUEKlvq3SQvWDL9xUnPIp13lhcbRLFoa2sJ4uOCr+a3ibabiZb5N/C3A8t4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+108368+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1694077341957764.9160336534947; Thu, 7 Sep 2023 02:02:21 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=CxXT9fDYCbs6eo0WLyZoy1T3EJCNv0AcS2UZcsX+U5M=; 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=1694077341; v=1; b=BjQYXWnZIY0IlI4jgGNqUc2rtlWNOAosBrMDOPRV/9gPdYzcIHnkKkoL3tQjXrvE6Zl0HJGt WggiuKtDsQ6FW8XpPXdG7brAIxWeJxFrC0vAKtjV427Ba7iAP8eie2kCrxYJTxNamG9K7LSjTcd dTS0atKCJokpq2Rlal+Vyo2o= X-Received: by 127.0.0.2 with SMTP id 7n0oYY1788612xQ1U2s17VTj; Thu, 07 Sep 2023 02:02:21 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.8849.1694077340180478488 for ; Thu, 07 Sep 2023 02:02:20 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="380015620" X-IronPort-AV: E=Sophos;i="6.02,234,1688454000"; d="scan'208";a="380015620" X-Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2023 02:02:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="735421166" X-IronPort-AV: E=Sophos;i="6.02,234,1688454000"; d="scan'208";a="735421166" X-Received: from linusliu-desk1.gar.corp.intel.com ([10.5.215.134]) by orsmga007.jf.intel.com with ESMTP; 07 Sep 2023 02:02:17 -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 v2] Pyrite support - Secure erase is only available if encryption is supported. Date: Thu, 7 Sep 2023 02:02:12 -0700 Message-Id: <20230907090212.485-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: twqbMSyHhKMlnIGjPLmLczjtx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1694077343871100001 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Jiewen Yao --- 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 // this is only available if encryption is supported // - AvalDiskActions->SecureErase =3D 1; + if (SupportedAttributes->MediaEncryption) { + AvalDiskActions->SecureErase =3D 1; + } else { + AvalDiskActions->SecureErase =3D 0; + } } else { AvalDiskActions->PsidRevert =3D 0; AvalDiskActions->SecureErase =3D 0; --=20 2.39.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108368): https://edk2.groups.io/g/devel/message/108368 Mute This Topic: https://groups.io/mt/101210886/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-