From nobody Mon Dec 23 10:01:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 151792728951143.37474072020257; Tue, 6 Feb 2018 06:28:09 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 666BC223972BA; Tue, 6 Feb 2018 06:22:25 -0800 (PST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 E91A3223972B5 for ; Tue, 6 Feb 2018 06:22:22 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Feb 2018 06:28:03 -0800 Received: from czhan46-mobl1.ccr.corp.intel.com ([10.254.208.55]) by fmsmga006.fm.intel.com with ESMTP; 06 Feb 2018 06:28:02 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=chao.b.zhang@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,469,1511856000"; d="scan'208";a="201789328" From: "Zhang, Chao B" To: edk2-devel@lists.01.org Date: Tue, 6 Feb 2018 22:28:00 +0800 Message-Id: <20180206142800.8980-1-chao.b.zhang@intel.com> X-Mailer: git-send-email 2.11.0.windows.1 Subject: [edk2] [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: , Cc: Dandan Bi , Chao Zhang , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Liming Gao --- 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/Tc= g2Smm.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; =20 // - // 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); } =20 return EFI_SUCCESS; --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel