MdeModulePkg: Support customized FV Migration Information

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4533

There are use cases which not all FVs need be migrated from TempRam to
permanent memory before TempRam tears down. This new guid is introduced
to avoid unnecessary FV migration to improve boot performance. Platform
can publish MigrationInfo hob with this guid to customize FV migration
info, and PeiCore will only migrate FVs indicated by this Hob info.

This is a backwards compatible change, PeiCore will check MigrationInfo
hob before migration. If MigrationInfo hobs exists, only migrate FVs
recorded by hobs. If MigrationInfo hobs not exists, migrate all FVs to
permanent memory.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Cheng Sun <chengx.sun@intel.com>
This commit is contained in:
Cheng Sun
2023-12-21 10:45:22 +08:00
committed by Liming Gao
parent d01defe06b
commit 1065536c64
6 changed files with 106 additions and 75 deletions

View File

@ -1046,17 +1046,6 @@ MigrateMemoryPages (
IN BOOLEAN TemporaryRamMigrated
);
/**
Removes any FV HOBs whose base address is not in PEI installed memory.
@param[in] Private Pointer to PeiCore's private data structure.
**/
VOID
RemoveFvHobsInTemporaryMemory (
IN PEI_CORE_INSTANCE *Private
);
/**
Migrate the base address in firmware volume allocation HOBs
from temporary memory to PEI installed memory.