mirror of https://github.com/acidanthera/audk.git
Add compatibility logic to handle framework fvhob and install FvInfo ppi. And remove the unused Pcd from MdeModulePkg.dec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5704 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
bb8fb476e1
commit
2a00326e8e
|
@ -347,7 +347,10 @@ PeiDispatcher (
|
||||||
|
|
||||||
for (FvCount = Private->CurrentPeimFvCount; FvCount < Private->FvCount; FvCount++) {
|
for (FvCount = Private->CurrentPeimFvCount; FvCount < Private->FvCount; FvCount++) {
|
||||||
Private->CurrentPeimFvCount = FvCount;
|
Private->CurrentPeimFvCount = FvCount;
|
||||||
VolumeHandle = Private->Fv[FvCount].FvHeader;
|
//
|
||||||
|
// Get this Fv Handle by PeiService FvFindNextVolume.
|
||||||
|
//
|
||||||
|
PeiFvFindNextVolume (PeiServices, FvCount, &VolumeHandle);
|
||||||
|
|
||||||
if (Private->CurrentPeimCount == 0) {
|
if (Private->CurrentPeimCount == 0) {
|
||||||
//
|
//
|
||||||
|
|
|
@ -618,12 +618,46 @@ PeiFvFindNextVolume (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
PEI_CORE_INSTANCE *Private;
|
PEI_CORE_INSTANCE *Private;
|
||||||
|
UINTN Index;
|
||||||
|
BOOLEAN Match;
|
||||||
|
EFI_HOB_FIRMWARE_VOLUME *FvHob;
|
||||||
|
|
||||||
Private = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);
|
Private = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);
|
||||||
if (VolumeHandle == NULL) {
|
if (VolumeHandle == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Handle Framework FvHob and Install FvInfo Ppi for it.
|
||||||
|
//
|
||||||
|
if (FeaturePcdGet (PcdFrameworkFvHobCompatibilitySupport)) {
|
||||||
|
//
|
||||||
|
// Loop to search the wanted FirmwareVolume which supports FFS
|
||||||
|
//
|
||||||
|
FvHob = (EFI_HOB_FIRMWARE_VOLUME *)GetFirstHob (EFI_HOB_TYPE_FV);
|
||||||
|
while (FvHob != NULL) {
|
||||||
|
for (Index = 0, Match = FALSE; Index < Private->AllFvCount; Index++) {
|
||||||
|
if ((EFI_PEI_FV_HANDLE)(UINTN)FvHob->BaseAddress == Private->AllFv[Index]) {
|
||||||
|
Match = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// If Not Found, Install FvInfo Ppi for it.
|
||||||
|
//
|
||||||
|
if (!Match) {
|
||||||
|
PiLibInstallFvInfoPpi (
|
||||||
|
NULL,
|
||||||
|
(VOID *)(UINTN)FvHob->BaseAddress,
|
||||||
|
(UINT32)FvHob->Length,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
FvHob = (EFI_HOB_FIRMWARE_VOLUME *)GetNextHob (EFI_HOB_TYPE_FV, (VOID *)((UINTN)FvHob + FvHob->Header.HobLength));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Instance >= Private->AllFvCount) {
|
if (Instance >= Private->AllFvCount) {
|
||||||
VolumeHandle = NULL;
|
VolumeHandle = NULL;
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
|
|
|
@ -95,3 +95,5 @@
|
||||||
|
|
||||||
[FeaturePcd.common]
|
[FeaturePcd.common]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkFvHobCompatibilitySupport
|
||||||
|
|
|
@ -237,18 +237,6 @@
|
||||||
## This feature flag can be used to enable or disable the PCD service PEIM to handle DynamicEX PCD.
|
## This feature flag can be used to enable or disable the PCD service PEIM to handle DynamicEX PCD.
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiPcdDatabaseExEnabled|TRUE|BOOLEAN|0x00010033
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiPcdDatabaseExEnabled|TRUE|BOOLEAN|0x00010033
|
||||||
|
|
||||||
## If this feature is enabled, then the DXE IPL must support decompressing files compressed with the EFI Compression algorithm.
|
|
||||||
# This feature flag is deprecated.
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportEfiDecompress|TRUE|BOOLEAN|0x00010034
|
|
||||||
|
|
||||||
## If this feature is enabled, then the DXE IPL must support decompressing files compressed with the Tiano Compression algorithm.
|
|
||||||
# This feature flag is deprecated.
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportTianoDecompress|TRUE|BOOLEAN|0x00010035
|
|
||||||
|
|
||||||
## If this feature is enabled, then the DXE IPL must support decompressing files compressed with the Custom Compression algorithm.
|
|
||||||
# This feature flag is deprecated.
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportCustomDecompress|TRUE|BOOLEAN|0x00010036
|
|
||||||
|
|
||||||
## If TRUE, then the Device Path To Text Protocol should be produced by the platform.
|
## If TRUE, then the Device Path To Text Protocol should be produced by the platform.
|
||||||
# It can be disabled to save size.
|
# It can be disabled to save size.
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDevicePathSupportDevicePathToText|TRUE|BOOLEAN|0x00010037
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDevicePathSupportDevicePathToText|TRUE|BOOLEAN|0x00010037
|
||||||
|
@ -257,9 +245,6 @@
|
||||||
# It can be disabled to save size.
|
# It can be disabled to save size.
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDevicePathSupportDevicePathFromText|TRUE|BOOLEAN|0x00010038
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDevicePathSupportDevicePathFromText|TRUE|BOOLEAN|0x00010038
|
||||||
|
|
||||||
## If this feature is enabled, DXE IPL will build a series of HOBs to share code with DXE Core.
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplBuildShareCodeHobs|FALSE|BOOLEAN|0x0001003c
|
|
||||||
|
|
||||||
## If this PCD is set as TRUE, the code specific to NT emulator will be endabled.
|
## If this PCD is set as TRUE, the code specific to NT emulator will be endabled.
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdNtEmulatorEnable|FALSE|BOOLEAN|0x0001003e
|
gEfiMdeModulePkgTokenSpaceGuid.PcdNtEmulatorEnable|FALSE|BOOLEAN|0x0001003e
|
||||||
|
|
||||||
|
@ -304,6 +289,9 @@
|
||||||
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkHiiCompatibilitySupport|TRUE|BOOLEAN|0x00012008
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkHiiCompatibilitySupport|TRUE|BOOLEAN|0x00012008
|
||||||
|
|
||||||
|
## IF TRUE, the PeiCore will handle the framework FvHob and install FvInfo PPI for it.
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkFvHobCompatibilitySupport|FALSE|BOOLEAN|0x00012009
|
||||||
|
|
||||||
[PcdsFixedAtBuild.common]
|
[PcdsFixedAtBuild.common]
|
||||||
## Dynamic type PCD can be registered callback function for Pcd setting action.
|
## Dynamic type PCD can be registered callback function for Pcd setting action.
|
||||||
# PcdMaxPeiPcdCallBackNumberPerPcdEntry indicate maximum number of callback function
|
# PcdMaxPeiPcdCallBackNumberPerPcdEntry indicate maximum number of callback function
|
||||||
|
|
Loading…
Reference in New Issue