]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
MdeModulePkg PeiCore: PEI dispatcher need retry to process NOT_DISPATCHED FV
[mirror_edk2.git] / MdeModulePkg / Core / Pei / Dispatcher / Dispatcher.c
index 7480b662c579cbb86a0c915736f5d38480566ea7..e7e795d123d6caa9ff1881f00b99aa75c1dcaf4e 100644 (file)
@@ -1056,7 +1056,7 @@ PeiDispatcher (
             ASSERT_EFI_ERROR (Status);\r
             if (FvFileInfo.FileType == EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE) {\r
               //\r
-              // For Fv type file, Produce new FV PPI and FV hob\r
+              // For Fv type file, Produce new FvInfo PPI and FV hob\r
               //\r
               Status = ProcessFvFile (Private, &Private->Fv[FvCount], PeimFileHandle);\r
               if (Status == EFI_SUCCESS) {\r
@@ -1065,6 +1065,13 @@ PeiDispatcher (
                 //\r
                 Private->Fv[FvCount].PeimState[PeimCount]++;\r
                 Private->PeimDispatchOnThisPass = TRUE;\r
+              } else {\r
+                //\r
+                // The related GuidedSectionExtraction/Decompress PPI for the\r
+                // encapsulated FV image section may be installed in the rest\r
+                // of this do-while loop, so need to make another pass.\r
+                //\r
+                Private->PeimNeedingDispatch = TRUE;\r
               }\r
             } else {\r
               //\r
@@ -1192,11 +1199,11 @@ PeiDispatcher (
     Private->CurrentPeimFvCount = 0;\r
 \r
     //\r
-    // PeimNeedingDispatch being TRUE means we found a PEIM that did not get\r
+    // PeimNeedingDispatch being TRUE means we found a PEIM/FV that did not get\r
     //  dispatched. So we need to make another pass\r
     //\r
-    // PeimDispatchOnThisPass being TRUE means we dispatched a PEIM on this\r
-    //  pass. If we did not dispatch a PEIM there is no point in trying again\r
+    // PeimDispatchOnThisPass being TRUE means we dispatched a PEIM/FV on this\r
+    //  pass. If we did not dispatch a PEIM/FV there is no point in trying again\r
     //  as it will fail the next time too (nothing has changed).\r
     //\r
   } while (Private->PeimNeedingDispatch && Private->PeimDispatchOnThisPass);\r