From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from walk.intel-email.com (walk.intel-email.com [101.227.64.242]) by mx.groups.io with SMTP id smtpd.web11.35119.1683768727934978418 for ; Wed, 10 May 2023 18:32:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=d7cYZ3uP; spf=pass (domain: byosoft.com.cn, ip: 101.227.64.242, mailfrom: gaoliming@byosoft.com.cn) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id BA5C9CD1F773 for ; Thu, 11 May 2023 09:32:04 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1683768724; bh=jFFHNBnZY4fesuH4yN9i/t6PY2yxWhXeT/55JllCdP4=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=d7cYZ3uPlQAJH5AIexAn02wk+QJUfzV443ir8Kbjh6ZwufkQUbXNsU0CaRiLXQgNU mshtdxCsCWyT+sJjVRUJVluHq22WbpgMuwll/9b69lJjR+GUf2UNAL7TduRmaPWnXV TwTouz42BRxYOlc/Q6TEh6rmh9y3fHTZIO3R0Pf8= Received: from localhost (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id B6545CD1F6E4 for ; Thu, 11 May 2023 09:32:04 +0800 (CST) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 8E60CCD1F6AF for ; Thu, 11 May 2023 09:32:04 +0800 (CST) Authentication-Results: walk.intel-email.com; none Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by walk.intel-email.com (Postfix) with SMTP id 2DF03CD1F73E for ; Thu, 11 May 2023 09:32:01 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Thu, 11 May 2023 09:31:57 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , Cc: "'Leon Chen'" , "'Tim Lewis'" References: In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIXSBNZGVNb2R1bGVQa2cvQ29yZS9QZWk6IHNldCBBcHJpb3JpQ291bnQ9MCBiZWZvcmUgd2Fsa2luZyB0aHJvdWdoIG5leHQgRlY=?= Date: Thu, 11 May 2023 09:32:01 +0800 Message-ID: <009501d983a8$6295f740$27c1e5c0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQH2yNGBCnpIRGUa2a6teZxJdqoDya8ZvjsQ Sender: "gaoliming" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Wendy: DiscoverPeimsAndOrderWithApriori () has the logic to reset Private->Aprio= riCount as zero.=20 It will set the real AprioriCount for each FV when this FV first scans, t= hen dispatch the peims in the apriori list.=20 So, I don't think there is the issue here. Do you find the real functiona= lity issue? Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Wendy Liao > via groups.io > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B45=E6=9C=8810=E6=97=A5 = 14:23 > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io > =E6=8A=84=E9=80=81: Leon Chen ; Tim Lewis > > =E4=B8=BB=E9=A2=98: [edk2-devel] [PATCH] MdeModulePkg/Core/Pei: set Aprio= riCount=3D0 > before walking through next FV >=20 >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D4438 >=20 > The main dispatch loop in PeiDispatcher() goes through each FV and > calls DiscoverPeimsAndOrderWithApriori() to search Apriori file to > reorder all PEIMs then do the PEIM dispatched. >=20 > DiscoverPeimsAndOrderWithApriori() calculates Apriori file count for > every FV once and set Private->AprioriCount, but Private->AprioriCount > doesn't be set to 0 before dispatch loop walking through the next FV. >=20 > It causes the peim which sort on less than Private->AprioriCount and > depex is not satisfied would be dispatched when dispatch loop go through > to a scaned FV, even the peim is not set in APRIORI file. >=20 > Cc: Leon Chen > Cc: Tim Lewis > Reported-by: Esther Lee > Signed-off-by: Wendy Liao >=20 > --- > MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c > b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c > index d8284f9f4f..5f32ebb560 100644 > --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c > +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c > @@ -1630,6 +1630,7 @@ PeiDispatcher ( > Private->CurrentFileHandle =3D NULL; > Private->CurrentPeimCount =3D 0; > Private->CurrentFvFileHandles =3D NULL; > + Private->AprioriCount =3D 0; > } >=20 > // > -- > 2.29.2.windows.2 >=20 >=20 >=20 >=20 >=20 >=20