Skip to content

Commit

Permalink
MdeModulePkg/Core/Pei: set AprioriCount=0 before walking through next FV
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Tim Lewis <[email protected]>
Reported-by: Esther Lee <[email protected]>
Signed-off-by: Wendy Liao <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
  • Loading branch information
wendyliao8731 authored and mergify[bot] committed May 24, 2023
1 parent 5ce29ae commit ba91d02
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -1630,6 +1630,7 @@ PeiDispatcher (
Private->CurrentFileHandle = NULL;
Private->CurrentPeimCount = 0;
Private->CurrentFvFileHandles = NULL;
Private->AprioriCount = 0;
}

//
Expand Down

0 comments on commit ba91d02

Please sign in to comment.