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.65; helo=mga03.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org 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 8A47821F0DA59 for ; Tue, 6 Feb 2018 16:36:46 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Feb 2018 16:42:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,471,1511856000"; d="scan'208";a="16475297" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga006.jf.intel.com with ESMTP; 06 Feb 2018 16:42:29 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 6 Feb 2018 16:42:29 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 6 Feb 2018 16:42:28 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.125]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.116]) with mapi id 14.03.0319.002; Wed, 7 Feb 2018 08:42:27 +0800 From: "Gao, Liming" To: "Zhang, Chao B" , "edk2-devel@lists.01.org" CC: "Bi, Dandan" Thread-Topic: [PATCH] SecurityPkg:Tcg2Smm: Fix compile issue Thread-Index: AQHTn1a12JoDe/tMo0Oh/ZHU7tPX9KOYGl1Q Date: Wed, 7 Feb 2018 00:42:27 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1C872B@SHSMSX104.ccr.corp.intel.com> References: <20180206142800.8980-1-chao.b.zhang@intel.com> In-Reply-To: <20180206142800.8980-1-chao.b.zhang@intel.com> Accept-Language: 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:Tcg2Smm: Fix compile issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Feb 2018 00:36:47 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Zhang, Chao B >Sent: Tuesday, February 06, 2018 10:28 PM >To: edk2-devel@lists.01.org >Cc: Gao, Liming ; Bi, Dandan ; >Zhang, Chao B >Subject: [PATCH] SecurityPkg:Tcg2Smm: Fix compile issue > >Update Tcg2Smm _PRS patching logic to fix compile issue > >Cc: Liming Gao >Cc: Dandan Bi >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Chao Zhang >--- > SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c >b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c >index e3938cb..6eb62ae 100644 >--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c >+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c >@@ -539,10 +539,11 @@ UpdatePossibleResource ( > *(DataPtr + 1) =3D 0; > > // >- // 5. Jump over whole ResourceTemplate. Stuff rest bytes to NOOP >+ // 5. Jump over new ResourceTemplate. Stuff rest bytes to NOOP > // >- for (DataPtr +=3D 2; DataPtr < DataEndPtr; DataPtr++) { >- *DataPtr =3D AML_NOOP_OP; >+ DataPtr +=3D 2; >+ if (DataPtr < DataEndPtr) { >+ SetMem(DataPtr, (UINTN)(DataEndPtr - DataPtr), AML_NOOP_OP); > } > > return EFI_SUCCESS; >-- >1.9.5.msysgit.1