From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 8827981B39 for ; Mon, 9 Jan 2017 22:56:06 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 09 Jan 2017 22:56:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,342,1477983600"; d="scan'208";a="28388989" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 09 Jan 2017 22:56:03 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 9 Jan 2017 22:56:02 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 9 Jan 2017 22:56:02 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.177]) with mapi id 14.03.0248.002; Tue, 10 Jan 2017 14:56:00 +0800 From: "Yao, Jiewen" To: "Zhang, Chao B" , "edk2-devel@lists.01.org" CC: "Zeng, Star" Thread-Topic: [PATCH] SecurityPkg: Tcg2ConfigDxe/Tcg2Smm: Fix TPM2 HID issue Thread-Index: AQHSaw5q/QbeRmXoI0uCeH3hBOMRPaExRwpg Date: Tue, 10 Jan 2017 06:55:59 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A8DDC02@shsmsx102.ccr.corp.intel.com> References: <20170110065422.29472-1-chao.b.zhang@intel.com> In-Reply-To: <20170110065422.29472-1-chao.b.zhang@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] SecurityPkg: Tcg2ConfigDxe/Tcg2Smm: Fix TPM2 HID issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 06:56:06 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiewen.yao@intel.com > -----Original Message----- > From: Zhang, Chao B > Sent: Tuesday, January 10, 2017 2:54 PM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen ; Zeng, Star ; > Zhang, Chao B > Subject: [PATCH] SecurityPkg: Tcg2ConfigDxe/Tcg2Smm: Fix TPM2 HID issue >=20 > Fix wrong TPM2 HID generation logic. >=20 > Cc: Star Zeng > Cc: Yao Jiewen > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Chao Zhang > --- > SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | 4 ++-- > SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c > b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c > index a83000f..b3a849e 100644 > --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c > +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c > @@ -441,9 +441,9 @@ GetTpm2HID( > // #### is Firmware Version 1 > // > if (PnpHID) { > - AsciiSPrint(Hid + 3, TPM_HID_PNP_SIZE - 3, "%02d%02d", > ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF)= ); > + AsciiSPrint(Hid + 3, TPM_HID_PNP_SIZE - 3, "%02d%02d", > ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 & 0x0000FFFF))= ; > } else { > - AsciiSPrint(Hid + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", > ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF)= ); > + AsciiSPrint(Hid + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", > ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 & 0x0000FFFF))= ; > } >=20 > } else { > diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c > b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c > index fa0b6e6..1df2da8 100644 > --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c > +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c > @@ -369,9 +369,9 @@ UpdateHID ( > // #### is Firmware Version 1 > // > if (PnpHID) { > - AsciiSPrint(Hid + 3, TPM_HID_PNP_SIZE - 3, "%02d%02d", > ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF)= ); > + AsciiSPrint(Hid + 3, TPM_HID_PNP_SIZE - 3, "%02d%02d", > ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 & 0x0000FFFF))= ; > } else { > - AsciiSPrint(Hid + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", > ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF)= ); > + AsciiSPrint(Hid + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", > ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 & 0x0000FFFF))= ; > } >=20 > } else { > -- > 1.9.5.msysgit.1