From nobody Tue May 7 10:31:15 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; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1526434514261836.1304146784902; Tue, 15 May 2018 18:35:14 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D109F203B85B4; Tue, 15 May 2018 18:35:10 -0700 (PDT) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 D1527203B85AB for ; Tue, 15 May 2018 18:35:09 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 May 2018 18:35:08 -0700 Received: from lgao4-mobl1.ccr.corp.intel.com ([10.255.31.83]) by fmsmga006.fm.intel.com with ESMTP; 15 May 2018 18:35:08 -0700 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=192.55.52.93; helo=mga11.intel.com; envelope-from=liming.gao@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.49,404,1520924400"; d="scan'208";a="228913897" From: Liming Gao To: edk2-devel@lists.01.org Date: Wed, 16 May 2018 09:35:01 +0800 Message-Id: <20180516013501.3472-1-liming.gao@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 Subject: [edk2] [Patch] MdeModulePkg PeiCore: FvCount to be checked for the registered for shadow PEIM X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Star Zeng 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" The PEIM in all cached FV image may be in registered for shadow status. Current logic CurrentPeimFvCount is not enough. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Star Zeng Reviewed-by: Star Zeng --- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/C= ore/Pei/Dispatcher/Dispatcher.c index 027176d872..0ac3fdde6a 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -976,7 +976,7 @@ PeiDispatcher ( SaveCurrentFvCount =3D Private->CurrentPeimFvCount; SaveCurrentFileHandle =3D Private->CurrentFileHandle; =20 - for (Index1 =3D 0; Index1 <=3D SaveCurrentFvCount; Index1++) { + for (Index1 =3D 0; Index1 < Private->FvCount; Index1++) { for (Index2 =3D 0; (Index2 < PcdGet32 (PcdPeiCoreMaxPeimPerFv)) && (= Private->Fv[Index1].FvFileHandles[Index2] !=3D NULL); Index2++) { if (Private->Fv[Index1].PeimState[Index2] =3D=3D PEIM_STATE_REGIST= ER_FOR_SHADOW) { PeimFileHandle =3D Private->Fv[Index1].FvFileHandles[Index2]; --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel