From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6AD3B201B0403 for ; Tue, 19 Feb 2019 19:12:20 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Feb 2019 19:12:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,388,1544515200"; d="scan'208";a="134834499" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 19 Feb 2019 19:12:19 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 19 Feb 2019 19:12:19 -0800 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 19 Feb 2019 19:12:18 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.207]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.190]) with mapi id 14.03.0415.000; Wed, 20 Feb 2019 11:12:16 +0800 From: "Yao, Jiewen" To: "Gonzalez Del Cueto, Rodrigo" , "edk2-devel@lists.01.org" CC: "Zhang, Chao B" Thread-Topic: [PATCH] SecurityPkg/TcgConfigDxe: Allow enabling TPM 1.2 device from disabled state. Thread-Index: AQHUvE/hjneLXqzn60WqU5Xj8MXONqXoG3Jg Date: Wed, 20 Feb 2019 03:12:15 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503F5190C2@shsmsx102.ccr.corp.intel.com> References: <20190204060657.38860-1-rodrigo.gonzalez.del.cueto@intel.com> In-Reply-To: <20190204060657.38860-1-rodrigo.gonzalez.del.cueto@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOGZhM2EwMmItMmU3ZC00MzhkLTk1MmItNzkxNGUyOTZhMGFmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNFdZV3NKeERhaGF4SThFTjUyZFd0eXRpZ2lCZDdOOTJXNTJZY1prcGQ0TkNweVZaMVk1U2ozaHBlTUxyN0FzRiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] SecurityPkg/TcgConfigDxe: Allow enabling TPM 1.2 device from disabled state. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2019 03:12:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks for the enhancement. Reviewed-by: Jiewen.yao@intel.com > -----Original Message----- > From: Gonzalez Del Cueto, Rodrigo > Sent: Monday, February 4, 2019 2:07 PM > To: edk2-devel@lists.01.org > Cc: Gonzalez Del Cueto, Rodrigo ; > Zhang, Chao B ; Yao, Jiewen > > Subject: [PATCH] SecurityPkg/TcgConfigDxe: Allow enabling TPM 1.2 device > from disabled state. >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1511 >=20 > Currently the TCG config setup form defaults the physical presence action= to > PHYSICAL_PRESENCE_ENABLE, this prevents the action from being called. > When a TPM > 1.2 device is in Disabled and Activated state it is not possible to issue= the > PHYSICAL_PRESENCE_ENABLE using the menu action. >=20 > By having the form default to PHYSICAL_PRESENCE_NO_ACTION, the user is > now able > to select PHYSICAL_PRESENCE_ENABLE and toggle the TPM 1.2 device > enable state. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 >=20 > Signed-off-by: Rodrigo Gonzalez del Cueto > > Cc: Chao Zhang > Cc: Jiewen Yao > --- > SecurityPkg/Tcg/TcgConfigDxe/TcgConfig.vfr | 8 ++++++-- > SecurityPkg/Tcg/TcgConfigDxe/TcgConfigImpl.c | 4 ++-- > SecurityPkg/Tcg/TcgConfigDxe/TcgConfigStrings.uni | 3 ++- > 3 files changed, 10 insertions(+), 5 deletions(-) >=20 > diff --git a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfig.vfr > b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfig.vfr > index b0a7bf6f47..1047475cef 100644 > --- a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfig.vfr > +++ b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfig.vfr > @@ -1,7 +1,7 @@ > /** @file > VFR file used by the TCG configuration component. >=20 > -Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
> +Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the BS= D > License > which accompanies this distribution. The full text of the license may b= e > found at > @@ -43,6 +43,10 @@ formset > help =3D STRING_TOKEN(STR_TPM_OPERATION_HELP), > flags =3D INTERACTIVE | RESET_REQUIRED, > // > + // Default the form to NO ACTION to allow toggling other > options > + // > + option text =3D STRING_TOKEN(STR_NO_ACTION), value =3D > PHYSICAL_PRESENCE_NO_ACTION, flags =3D DEFAULT; > + // > // Disable (TPM_ORD_PhysicalDisable) command is not > available when disabled. > // Activate/deactivate (TPM_ORD_physicalSetDeactivated) > command is not available when disabled. > // > @@ -61,7 +65,7 @@ formset > option text =3D > STRING_TOKEN(STR_TPM_CLEAR_ENABLE_ACTIVATE), value =3D > PHYSICAL_PRESENCE_CLEAR_ENABLE_ACTIVATE, flags =3D 0; > endif >=20 > - option text =3D STRING_TOKEN(STR_ENABLE), value =3D > PHYSICAL_PRESENCE_ENABLE, flags =3D DEFAULT; > + option text =3D STRING_TOKEN(STR_ENABLE), value =3D > PHYSICAL_PRESENCE_ENABLE, flags =3D 0; > option text =3D STRING_TOKEN(STR_TPM_ENABLE_ACTIVATE), > value =3D PHYSICAL_PRESENCE_ENABLE_ACTIVATE, flags =3D 0; > option text =3D > STRING_TOKEN(STR_TPM_ENABLE_ACTIVATE_CLEAR), value =3D > PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR, flags =3D 0; > option text =3D > STRING_TOKEN(STR_TPM_ENABLE_ACTIVATE_CLEAR_E_A), value =3D > PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR_ENABLE_ACTIVATE, flags > =3D 0; > diff --git a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigImpl.c > b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigImpl.c > index a306bbbb5c..4455fd2b48 100644 > --- a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigImpl.c > +++ b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigImpl.c > @@ -1,7 +1,7 @@ > /** @file > HII Config Access protocol implementation of TCG configuration module. >=20 > -Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
> +Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the BS= D > License > which accompanies this distribution. The full text of the license may b= e > found at > @@ -176,7 +176,7 @@ TcgExtractConfig ( > // > // Convert buffer data to by helper function > BlockToConfig() > // > - PrivateData->Configuration->TpmOperation =3D > PHYSICAL_PRESENCE_ENABLE; > + PrivateData->Configuration->TpmOperation =3D > PHYSICAL_PRESENCE_NO_ACTION; >=20 > // > // Get current TPM state. > diff --git a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigStrings.uni > b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigStrings.uni > index 7a84462a6e..3c3f0f7ddb 100644 > --- a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigStrings.uni > +++ b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigStrings.uni > @@ -1,7 +1,7 @@ > /** @file > String definitions for TCG configuration form. >=20 > -Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
> +Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the BS= D > License > which accompanies this distribution. The full text of the license may b= e > found at > @@ -23,6 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF > ANY KIND, EITHER EXPRESS OR IMPLIED. > #string STR_TPM_OPERATION #language en-US "TPM > Operation" > #string STR_TPM_OPERATION_HELP #language en-US > "Select one of the supported operation to change TPM state." >=20 > +#string STR_NO_ACTION #language en-US "No > Action" > #string STR_ENABLE #language en-US > "Enable" > #string STR_DISABLE #language en-US > "Disable" > #string STR_TPM_ACTIVATE #language en-US > "Activate" > -- > 2.20.1.windows.1