\r
for (FvCount = Private->CurrentPeimFvCount; FvCount < Private->FvCount; FvCount++) {\r
Private->CurrentPeimFvCount = FvCount;\r
- VolumeHandle = Private->Fv[FvCount].FvHeader;\r
+ //\r
+ // Get this Fv Handle by PeiService FvFindNextVolume.\r
+ //\r
+ PeiFvFindNextVolume (PeiServices, FvCount, &VolumeHandle);\r
\r
if (Private->CurrentPeimCount == 0) {\r
//\r
EFI_STATUS \r
EFIAPI\r
PeiFvFindNextVolume (\r
- IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
IN UINTN Instance,\r
IN OUT EFI_PEI_FV_HANDLE *VolumeHandle\r
)\r
{\r
- PEI_CORE_INSTANCE *Private;\r
+ PEI_CORE_INSTANCE *Private;\r
+ UINTN Index;\r
+ BOOLEAN Match;\r
+ EFI_HOB_FIRMWARE_VOLUME *FvHob;\r
\r
Private = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);\r
if (VolumeHandle == NULL) {\r
return EFI_INVALID_PARAMETER;\r
- } \r
+ }\r
+ \r
+ //\r
+ // Handle Framework FvHob and Install FvInfo Ppi for it.\r
+ //\r
+ if (FeaturePcdGet (PcdFrameworkFvHobCompatibilitySupport)) {\r
+ //\r
+ // Loop to search the wanted FirmwareVolume which supports FFS\r
+ //\r
+ FvHob = (EFI_HOB_FIRMWARE_VOLUME *)GetFirstHob (EFI_HOB_TYPE_FV);\r
+ while (FvHob != NULL) {\r
+ for (Index = 0, Match = FALSE; Index < Private->AllFvCount; Index++) {\r
+ if ((EFI_PEI_FV_HANDLE)(UINTN)FvHob->BaseAddress == Private->AllFv[Index]) {\r
+ Match = TRUE;\r
+ break;\r
+ }\r
+ }\r
+ //\r
+ // If Not Found, Install FvInfo Ppi for it.\r
+ //\r
+ if (!Match) {\r
+ PiLibInstallFvInfoPpi (\r
+ NULL,\r
+ (VOID *)(UINTN)FvHob->BaseAddress,\r
+ (UINT32)FvHob->Length,\r
+ NULL,\r
+ NULL\r
+ );\r
+ }\r
+ FvHob = (EFI_HOB_FIRMWARE_VOLUME *)GetNextHob (EFI_HOB_TYPE_FV, (VOID *)((UINTN)FvHob + FvHob->Header.HobLength)); \r
+ }\r
+ }\r
\r
if (Instance >= Private->AllFvCount) {\r
VolumeHandle = NULL;\r
\r
## This feature flag can be used to enable or disable the PCD service PEIM to handle DynamicEX PCD. \r
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiPcdDatabaseExEnabled|TRUE|BOOLEAN|0x00010033\r
- \r
- ## If this feature is enabled, then the DXE IPL must support decompressing files compressed with the EFI Compression algorithm.\r
- # This feature flag is deprecated.\r
- gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportEfiDecompress|TRUE|BOOLEAN|0x00010034\r
- \r
- ## If this feature is enabled, then the DXE IPL must support decompressing files compressed with the Tiano Compression algorithm.\r
- # This feature flag is deprecated.\r
- gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportTianoDecompress|TRUE|BOOLEAN|0x00010035\r
- \r
- ## If this feature is enabled, then the DXE IPL must support decompressing files compressed with the Custom Compression algorithm.\r
- # This feature flag is deprecated.\r
- gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportCustomDecompress|TRUE|BOOLEAN|0x00010036\r
- \r
+ \r
## If TRUE, then the Device Path To Text Protocol should be produced by the platform.\r
# It can be disabled to save size.\r
gEfiMdeModulePkgTokenSpaceGuid.PcdDevicePathSupportDevicePathToText|TRUE|BOOLEAN|0x00010037\r
## If TRUE, then the Device Path From Text Protocol should be produced by the platform.\r
# It can be disabled to save size.\r
gEfiMdeModulePkgTokenSpaceGuid.PcdDevicePathSupportDevicePathFromText|TRUE|BOOLEAN|0x00010038\r
- \r
- ## If this feature is enabled, DXE IPL will build a series of HOBs to share code with DXE Core.\r
- gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplBuildShareCodeHobs|FALSE|BOOLEAN|0x0001003c\r
- \r
+ \r
## If this PCD is set as TRUE, the code specific to NT emulator will be endabled.\r
gEfiMdeModulePkgTokenSpaceGuid.PcdNtEmulatorEnable|FALSE|BOOLEAN|0x0001003e\r
\r
gEfiMdeModulePkgTokenSpaceGuid.PcdDisableDefaultKeyboardLayoutInUsbKbDriver|FALSE|BOOLEAN|0x00010200\r
\r
gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkHiiCompatibilitySupport|TRUE|BOOLEAN|0x00012008\r
+ \r
+ ## IF TRUE, the PeiCore will handle the framework FvHob and install FvInfo PPI for it.\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkFvHobCompatibilitySupport|FALSE|BOOLEAN|0x00012009\r
\r
[PcdsFixedAtBuild.common]\r
## Dynamic type PCD can be registered callback function for Pcd setting action.\r