BaseTools: Fix an issue in HiiPcd generation

DynamicHiiPcd may be used by PEIM or DXE driver.
All used DynamicHiiPcd value should be collected and placed into
the default setting PCD PcdNvStoreDefaultValueBuffer.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
This commit is contained in:
BobCF 2018-01-02 08:58:33 +08:00 committed by Liming Gao
parent a099239015
commit a3623244b9
1 changed files with 2 additions and 3 deletions

View File

@ -1405,9 +1405,8 @@ class PlatformAutoGen(AutoGen):
if len(Sku.VariableName) > 0:
VariableGuidStructure = Sku.VariableGuidValue
VariableGuid = GuidStructureStringToGuidString(VariableGuidStructure)
if Pcd.Phase == "DXE":
for StorageName in Sku.DefaultStoreDict:
VariableInfo.append_variable(var_info(Index,pcdname,StorageName,SkuName, StringToArray(Sku.VariableName),VariableGuid, Sku.VariableAttribute , Sku.HiiDefaultValue,Sku.DefaultStoreDict[StorageName],Pcd.DatumType))
for StorageName in Sku.DefaultStoreDict:
VariableInfo.append_variable(var_info(Index,pcdname,StorageName,SkuName, StringToArray(Sku.VariableName),VariableGuid, Sku.VariableAttribute , Sku.HiiDefaultValue,Sku.DefaultStoreDict[StorageName],Pcd.DatumType))
Index += 1
return VariableInfo