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
//\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
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