From nobody Mon Feb 9 19:53:21 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+63393+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+63393+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1595924451; cv=none; d=zohomail.com; s=zohoarc; b=Cl4saAlidA1DtHDHkB4uH02Libjnwu8Aj9niM16z6jdbGv6uf3Y3vKcz3p6VjtGw4wUlzy1U0IWgfOCyPmzvQtRHhBDzttW5GciLwrg7gCOWEBHNC644cH+m56bvrakGXy5WPF531jS5EtPbmqCnps+G65YjRmI8OoMJvtNhl28= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595924451; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=/atVC4anNjxmrnXVG1YIoJq8nRlWTB/RDUk8BW1x2kk=; b=jrplvjf5TNmuIvbO24JWZBmKpBZcbMpc3UabpAdEbEyzaFwAZ2wf6gk3xLEkjofKvUuymYGe24LYTkiQ67BjtktNEK6pAaFjLKxcwC9/CEk80RLc/RNKyTSXZ+WsPRWt/kXS/DudXBsmEcOz1/76+iv0rmUuCE7ktpShTXgSido= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+63393+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 15959244510421023.3423593093369; Tue, 28 Jul 2020 01:20:51 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ZN9uYY1788612xUMC8THlqu3; Tue, 28 Jul 2020 01:20:50 -0700 X-Received: from mga18.intel.com (mga18.intel.com []) by mx.groups.io with SMTP id smtpd.web10.7977.1595924447539035211 for ; Tue, 28 Jul 2020 01:20:50 -0700 IronPort-SDR: /LZ6PZaC7qcJ+02r2hvDbyHPH9D/uBqrQi0IVyj34uJ43M/GAWWIrtL31eMuoYWUbmMpSBylJ4 uQqceP3tQE7Q== X-IronPort-AV: E=McAfee;i="6000,8403,9695"; a="138686528" X-IronPort-AV: E=Sophos;i="5.75,405,1589266800"; d="scan'208";a="138686528" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2020 01:20:49 -0700 IronPort-SDR: jIDViJzie75qd9GtDzeA+nWLHEKdFP2cj9dL9NVi5OV3T3OKrLyw+5Xb2ihGz9hPXI1d164xzd vFfHTZoKfL7A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,405,1589266800"; d="scan'208";a="272245537" X-Received: from shwdesssddpdqi.ccr.corp.intel.com ([10.239.9.10]) by fmsmga007.fm.intel.com with ESMTP; 28 Jul 2020 01:20:48 -0700 From: "Qi Zhang" To: devel@edk2.groups.io Cc: Qi Zhang , Jiewen Yao , Jian J Wang , Chao Zhang , Rahul Kumar Subject: [edk2-devel] [PATCH v4 2/2] SecurityPkg/Tcg2Config: remove TPM2_ChangEPS if it is not supported. Date: Tue, 28 Jul 2020 16:20:40 +0800 Message-Id: <20200728082040.13955-3-qi1.zhang@intel.com> In-Reply-To: <20200728082040.13955-1-qi1.zhang@intel.com> References: <20200728082040.13955-1-qi1.zhang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,qi1.zhang@intel.com X-Gm-Message-State: zB4O2bY5P42JzOGo6ID2uykix1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1595924450; bh=x9jcRLY4GLSiowwtKVb4f4Bk42jI3y98XtVd+mrybZk=; h=Cc:Date:From:Reply-To:Subject:To; b=BscubuGwXsM+f4y04tEczP6nudg++i7dpFm5kPVtpo0kb8oPV4zkakzcCnLG5jD2MCY VwTXsTnT951qwHy/tJOegMqEBDLX1ve7HI1PdQYbJhFGBMORo6Mdr/IDuLdLasPuO0gif 7gRh8XppAtISJjDHfybJpkcLZQnYTPRk8H0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2793 In current implementation TPM2_ChangeEPS command is always available in the TPM2 operation pull down list in TCG2 Configuration, which is confusing when the command is not supported by specific TPM chip. As a user experience improvement, TPM2_ChangeEPS command should be removed from the list when it is not supported. Cc: Jiewen Yao Cc: Jian J Wang Cc: Chao Zhang Cc: Rahul Kumar Signed-off-by: Qi Zhang Reviewed-by: Jian J Wang --- SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr | 2 ++ SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | 7 +++++++ SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigNvData.h | 1 + 3 files changed, 10 insertions(+) diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr b/SecurityPkg/Tcg/Tc= g2Config/Tcg2Config.vfr index 91a463997c..47d63b009d 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr @@ -144,7 +144,9 @@ formset option text =3D STRING_TOKEN(STR_TCG2_DISABLE), value =3D TCG2= _PHYSICAL_PRESENCE_DISABLE, flags =3D RESET_REQUIRED; option text =3D STRING_TOKEN(STR_TCG2_CLEAR), value =3D TCG2_P= HYSICAL_PRESENCE_CLEAR, flags =3D RESET_REQUIRED; option text =3D STRING_TOKEN(STR_TCG2_SET_PCD_BANKS), value = =3D TCG2_PHYSICAL_PRESENCE_SET_PCR_BANKS, flags =3D RESET_REQUIRED; + suppressif ideqval TCG2_CONFIGURATION_INFO.ChangeEPSSupported = =3D=3D 0; option text =3D STRING_TOKEN(STR_TCG2_CHANGE_EPS), value =3D T= CG2_PHYSICAL_PRESENCE_CHANGE_EPS, flags =3D RESET_REQUIRED; + endif option text =3D STRING_TOKEN(STR_TCG2_LOG_ALL_DIGESTS), value = =3D TCG2_PHYSICAL_PRESENCE_LOG_ALL_DIGESTS, flags =3D RESET_REQUIRED; option text =3D STRING_TOKEN(STR_TCG2_DISABLE_ENDORSEMENT_ENAB= LE_STORAGE_HIERARCHY), value =3D TCG2_PHYSICAL_PRESENCE_DISABLE_ENDORSEMENT= _ENABLE_STORAGE_HIERARCHY, flags =3D RESET_REQUIRED; endoneof; diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c b/SecurityPkg/Tcg/= Tcg2Config/Tcg2ConfigImpl.c index baa8fcd08d..2946f95db0 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c @@ -788,6 +788,7 @@ InstallTcg2ConfigForm ( CHAR16 TempBuffer[1024]; TCG2_CONFIGURATION_INFO Tcg2ConfigInfo; TPM2_PTP_INTERFACE_TYPE TpmDeviceInterfaceDetected; + BOOLEAN IsCmdImp =3D FALSE; =20 DriverHandle =3D NULL; ConfigAccess =3D &PrivateData->ConfigAccess; @@ -870,6 +871,12 @@ InstallTcg2ConfigForm ( HiiSetString (PrivateData->HiiHandle, STRING_TOKEN (STR_TPM2_SUPPORTED= _HASH_ALGO_CONTENT), TempBuffer, NULL); } =20 + Status =3D Tpm2GetCapabilityIsCommandImplemented (TPM_CC_ChangeEPS, &IsC= mdImp); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "Tpm2GetCapabilityIsCmdImpl fails %r\n", Status)); + } + Tcg2ConfigInfo.ChangeEPSSupported =3D IsCmdImp; + FillBufferWithBootHashAlg (TempBuffer, sizeof(TempBuffer), PcdGet32 (Pcd= Tcg2HashAlgorithmBitmap)); HiiSetString (PrivateData->HiiHandle, STRING_TOKEN (STR_BIOS_HASH_ALGO_C= ONTENT), TempBuffer, NULL); =20 diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigNvData.h b/SecurityPkg/Tc= g/Tcg2Config/Tcg2ConfigNvData.h index a91c052850..b84af40a04 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigNvData.h +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigNvData.h @@ -70,6 +70,7 @@ typedef struct { UINT8 TpmDeviceInterfaceAttempt; BOOLEAN TpmDeviceInterfacePtpFifoSupported; BOOLEAN TpmDeviceInterfacePtpCrbSupported; + BOOLEAN ChangeEPSSupported; } TCG2_CONFIGURATION_INFO; =20 // --=20 2.26.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 (#63393): https://edk2.groups.io/g/devel/message/63393 Mute This Topic: https://groups.io/mt/75840054/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-