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.w...@intel.com>
Cc: Liming Gao <gaolim...@byosoft.com.cn>
Cc: Dandan Bi <dandan...@intel.com>
Cc: Debkumar De <debkumar...@intel.com>
Cc: Catharine West <catharine.w...@intel.com>

Co-authored-by: John Schock <josch...@microsoft.com>
Signed-off-by: Kun Qin <kuqi...@gmail.com>
---

Notes:
    v2:
    - Fix up author

 MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c 
b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
index f7f4cce84174..bec829dc17f3 100644
--- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
@@ -2013,7 +2013,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));
 }
 
 /**
-- 
2.42.0.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109470): https://edk2.groups.io/g/devel/message/109470
Mute This Topic: https://groups.io/mt/101865811/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to