Skip to content

Commit ba91d02

Browse files
wendyliao8731mergify[bot]
authored andcommitted
MdeModulePkg/Core/Pei: set AprioriCount=0 before walking through next FV
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]>
1 parent 5ce29ae commit ba91d02

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,6 +1630,7 @@ PeiDispatcher (
16301630
Private->CurrentFileHandle = NULL;
16311631
Private->CurrentPeimCount = 0;
16321632
Private->CurrentFvFileHandles = NULL;
1633+
Private->AprioriCount = 0;
16331634
}
16341635

16351636
//

0 commit comments

Comments
 (0)