MdeModulePkg: Update PCD driver to support the optimized PcdDataBase
https://bugzilla.tianocore.org/show_bug.cgi?id=546 BaseTools will generate the optimized PCD database to save the image size at build time for multiple SKUs. The optimized PCD database layout will be like below, the PCD database will be composed of the full default SKU data (PCD_DATABASE_INIT) and the non-default SKU delta data(PCD_DATABASE_SKU_DELTA). PCD driver will build HOB to store the full default SKU data, and patch HOB data based on non-default SKU delta data for the SKU set by SetSku(), it can save memory resource at boot time. // // PCD database layout: // +---------------------------------+ // | PCD_DATABASE_INIT (DEFAULT SKU) | // +---------------------------------+ // | PCD_DATABASE_SKU_DELTA (SKU A) | // +---------------------------------+ // | PCD_DATABASE_SKU_DELTA (SKU B) | // +---------------------------------+ // | ...... | // +---------------------------------+ // BaseTools, PCD database and driver updates are needed for this proposal. For single SKU (default) case, this proposal is expected to have no impact. For multi-SKU case, PCD database format will be changed. So, PcdDataBase Version is also updated from 6 to 7. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -993,21 +993,6 @@ GetExPcdTokenNumber (
|
||||
IN UINTN ExTokenNumber
|
||||
);
|
||||
|
||||
/**
|
||||
Find the local token number according to system SKU ID.
|
||||
|
||||
@param LocalTokenNumber PCD token number
|
||||
@param Size The size of PCD entry.
|
||||
|
||||
@return Token number according to system SKU ID.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
GetSkuEnabledTokenNumber (
|
||||
UINT32 LocalTokenNumber,
|
||||
UINTN Size
|
||||
);
|
||||
|
||||
/**
|
||||
The function registers the CallBackOnSet fucntion
|
||||
according to TokenNumber and EFI_GUID space.
|
||||
@@ -1043,21 +1028,6 @@ BuildPcdDatabase (
|
||||
IN EFI_PEI_FILE_HANDLE FileHandle
|
||||
);
|
||||
|
||||
/**
|
||||
Get SKU ID tabble from PCD database.
|
||||
|
||||
@param LocalTokenNumberTableIdx Index of local token number in token number table.
|
||||
@param Database PCD Database in PEI phase
|
||||
|
||||
@return Pointer to SKU ID array table
|
||||
|
||||
**/
|
||||
SKU_ID *
|
||||
GetSkuIdArray (
|
||||
IN UINTN LocalTokenNumberTableIdx,
|
||||
IN PEI_PCD_DATABASE *Database
|
||||
);
|
||||
|
||||
/**
|
||||
Get index of PCD entry in size table.
|
||||
|
||||
|
Reference in New Issue
Block a user