From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 9D54981F9B for ; Wed, 25 Jan 2017 18:04:20 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP; 25 Jan 2017 18:04:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,287,1477983600"; d="scan'208";a="217732327" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 25 Jan 2017 18:04:20 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 25 Jan 2017 18:04:20 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 25 Jan 2017 18:04:19 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Thu, 26 Jan 2017 10:04:17 +0800 From: "Yao, Jiewen" To: "Zhang, Chao B" , "edk2-devel@lists.01.org" CC: "Zhang, Chao B" , "Zeng, Star" Thread-Topic: [edk2] [PATCH] SecurityPkg: Tcg2Dxe: Update PCR[4] measure logic Thread-Index: AQHSds3WRxtpMzU6J02pajM2blY/oKFKA1Rw Date: Thu, 26 Jan 2017 02:04:16 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A8E5A1A@shsmsx102.ccr.corp.intel.com> References: <20170125054228.15256-1-chao.b.zhang@intel.com> In-Reply-To: <20170125054228.15256-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: Tcg2Dxe: Update PCR[4] measure logic 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: Thu, 26 Jan 2017 02:04:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 UmV2aWV3ZWQtYnk6IGppZXdlbi55YW9AaW50ZWwuY29tDQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNz YWdlLS0tLS0NCj4gRnJvbTogZWRrMi1kZXZlbCBbbWFpbHRvOmVkazItZGV2ZWwtYm91bmNlc0Bs aXN0cy4wMS5vcmddIE9uIEJlaGFsZiBPZiBaaGFuZywNCj4gQ2hhbyBCDQo+IFNlbnQ6IFdlZG5l c2RheSwgSmFudWFyeSAyNSwgMjAxNyAxOjQyIFBNDQo+IFRvOiBlZGsyLWRldmVsQGxpc3RzLjAx Lm9yZw0KPiBDYzogWWFvLCBKaWV3ZW4gPGppZXdlbi55YW9AaW50ZWwuY29tPjsgWmhhbmcsIENo YW8gQg0KPiA8Y2hhby5iLnpoYW5nQGludGVsLmNvbT47IFplbmcsIFN0YXIgPHN0YXIuemVuZ0Bp bnRlbC5jb20+DQo+IFN1YmplY3Q6IFtlZGsyXSBbUEFUQ0hdIFNlY3VyaXR5UGtnOiBUY2cyRHhl OiBVcGRhdGUgUENSWzRdIG1lYXN1cmUgbG9naWMNCj4gDQo+IFVwZGF0ZSBQQ1JbNF0gbWVhc3Vy ZSBsb2dpYyBmb3IgZWFjaCBib290IGF0dGVtcHQuDQo+IDEuIE1lYXN1cmUgZXZlbnQgdG8gUENS WzRdIGluc3RlYWQgb2YgUENSWzVdDQo+IDIuIE1lYXN1cmUg4oCcQ2FsbGluZyBVRUZJIEFwcGxp Y2F0aW9uIGZyb20g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