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 BC8D8D80122 for ; Thu, 7 Sep 2023 09:02:22 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=pXLWLq8LoUDs7J3JJYEkBaz6CRRIy15VoQlCcVxWL6s=; 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=WWh8m7xJFGiKeEDIbOZbUdoANfd6MaA+x+qVHogO5x5ZRYDCmvSKNjssV+o03jeRz+W3W6X7 1drHh436TLl9xyZ5QIZcikC/j62YeWmaDhM8diDq2CwKqkDcT5jk+jc8rh9bCZXlz2Pbq72N9KA qNyVA6PNBTprfI4umkhBDlTw= X-Received: by 127.0.0.2 with SMTP id g05mYY7687511xrCB9fSXHrp; 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: Mwrt2MgmNipKeBSDQdAdfiXjx7686176AA= 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=WWh8m7xJ; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none) 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 --- 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 (#108368): https://edk2.groups.io/g/devel/message/108368 Mute This Topic: https://groups.io/mt/101210886/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-