public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg/Core/Pei: set AprioriCount=0 before walking through next FV
@ 2023-05-10  6:22 Wendy Liao
  2023-05-11  1:32 ` 回复: [edk2-devel] " gaoliming
  0 siblings, 1 reply; 6+ messages in thread
From: Wendy Liao @ 2023-05-10  6:22 UTC (permalink / raw)
  To: devel; +Cc: Leon Chen, Tim Lewis


REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4438

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.

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.

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.

Cc: Leon Chen <leon.chen@insyde.com>
Cc: Tim Lewis <tim.lewis@insyde.com>
Reported-by: Esther Lee <esther.lee@insyde.com>
Signed-off-by: Wendy Liao <wendy.liao@insyde.com>

---
  MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 1 +
  1 file changed, 1 insertion(+)

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    = NULL;
        Private->CurrentPeimCount     = 0;
        Private->CurrentFvFileHandles = NULL;
+      Private->AprioriCount         = 0;
      }

      //
-- 
2.29.2.windows.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-16  1:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-10  6:22 [PATCH] MdeModulePkg/Core/Pei: set AprioriCount=0 before walking through next FV Wendy Liao
2023-05-11  1:32 ` 回复: [edk2-devel] " gaoliming
2023-05-11  2:22   ` Wendy Liao
2023-05-11  2:53     ` 回复: " gaoliming
2023-05-15  5:18       ` Wendy Liao
2023-05-16  1:23         ` 回复: 回复: 回复: [edk2-stable202305] " gaoliming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox