MdeModulePkg: PeiMain: Updated dispatcher for delayed dispatch

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

This change adds a check for PEI dispatcher to continue dispatching when
there are still pending delayed dispatch requests, to be compatible with
newly integrated Delayed Dispatcher PPI interface.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Debkumar De <debkumar.de@intel.com>
Cc: Catharine West <catharine.west@intel.com>

Co-authored-by: John Schock <joschock@microsoft.com>
Signed-off-by: Kun Qin <kuqin12@gmail.com>
This commit is contained in:
Kun Qin 2022-08-10 22:56:34 -07:00 committed by mergify[bot]
parent d64d1e195c
commit 79598f34fa

View File

@ -2109,7 +2109,10 @@ PeiDispatcher (
// pass. If we did not dispatch a PEIM/FV there is no point in trying again
// as it will fail the next time too (nothing has changed).
//
} while (Private->PeimNeedingDispatch && Private->PeimDispatchOnThisPass);
// Also continue dispatch loop if there are outstanding delay-
// dispatch registrations still running.
} while ((Private->PeimNeedingDispatch && Private->PeimDispatchOnThisPass) ||
(Private->DelayedDispatchTable->Count > 0));
}
/**