MdeModulePkg PeiCore: Remove the using of PcdPeiCoreMaxFvSupported
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1405 Background as below. Problem: As static configuration from the PCDs, the binary PeiCore (for example in FSP binary with dispatch mode) could not predict how many FVs, Files or PPIs for different platforms. Burden: Platform developers need configure the PCDs accordingly for different platforms. To solve the problem and remove the burden, we can update PeiCore to remove the using of PcdPeiCoreMaxFvSupported, PcdPeiCoreMaxPeimPerFv and PcdPeiCoreMaxPpiSupported by extending buffer dynamically for FV, File and PPI management. This patch removes the using of PcdPeiCoreMaxFvSupported in PeiCore. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
This commit is contained in:
@@ -107,6 +107,11 @@ typedef struct {
|
||||
#define PEIM_STATE_REGISTER_FOR_SHADOW 0x02
|
||||
#define PEIM_STATE_DONE 0x03
|
||||
|
||||
//
|
||||
// Number of FV instances to grow by each time we run out of room
|
||||
//
|
||||
#define FV_GROWTH_STEP 8
|
||||
|
||||
typedef struct {
|
||||
EFI_FIRMWARE_VOLUME_HEADER *FvHeader;
|
||||
EFI_PEI_FIRMWARE_VOLUME_PPI *FvPpi;
|
||||
@@ -202,16 +207,22 @@ struct _PEI_CORE_INSTANCE {
|
||||
UINTN FvCount;
|
||||
|
||||
///
|
||||
/// Pointer to the buffer with the PcdPeiCoreMaxFvSupported number of entries.
|
||||
/// The max count of FVs which contains FFS and could be dispatched by PeiCore.
|
||||
///
|
||||
UINTN MaxFvCount;
|
||||
|
||||
///
|
||||
/// Pointer to the buffer with the MaxFvCount number of entries.
|
||||
/// Each entry is for one FV which contains FFS and could be dispatched by PeiCore.
|
||||
///
|
||||
PEI_CORE_FV_HANDLE *Fv;
|
||||
|
||||
///
|
||||
/// Pointer to the buffer with the PcdPeiCoreMaxFvSupported number of entries.
|
||||
/// Pointer to the buffer with the MaxUnknownFvInfoCount number of entries.
|
||||
/// Each entry is for one FV which could not be dispatched by PeiCore.
|
||||
///
|
||||
PEI_CORE_UNKNOW_FORMAT_FV_INFO *UnknownFvInfo;
|
||||
UINTN MaxUnknownFvInfoCount;
|
||||
UINTN UnknownFvInfoCount;
|
||||
|
||||
///
|
||||
|
Reference in New Issue
Block a user