BaseTools: Check PcdNvStoreDefaultValueBuffer.
Build tool should report warning if a platform defines [DefaultStores] but forgets to defined PcdNvStoreDefaultValueBuffer as PcdsDynamicExVpd in dsc file. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: ZhiqiangX Zhao <zhiqiangx.zhao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
committed by
Liming Gao
parent
cfed8a37ec
commit
ced8685838
@ -1451,7 +1451,10 @@ class PlatformAutoGen(AutoGen):
|
||||
for skuname in PcdNvStoreDfBuffer.SkuInfoList:
|
||||
PcdNvStoreDfBuffer.SkuInfoList[skuname].DefaultValue = vardump
|
||||
PcdNvStoreDfBuffer.MaxDatumSize = str(len(vardump.split(",")))
|
||||
|
||||
else:
|
||||
#If the end user define [DefaultStores] and [XXX.Menufacturing] in DSC, but forget to configure PcdNvStoreDefaultValueBuffer to PcdsDynamicVpd
|
||||
if [Pcd for Pcd in self._DynamicPcdList if Pcd.UserDefinedDefaultStoresFlag]:
|
||||
EdkLogger.warn("build", "PcdNvStoreDefaultValueBuffer should be defined as PcdsDynamicExVpd in dsc file since the DefaultStores is enabled for this platform.\n%s" %self.Platform.MetaFile.Path)
|
||||
PlatformPcds = sorted(self._PlatformPcds.keys())
|
||||
#
|
||||
# Add VPD type PCD into VpdFile and determine whether the VPD PCD need to be fixed up.
|
||||
@ -2091,6 +2094,8 @@ class PlatformAutoGen(AutoGen):
|
||||
ToPcd.DatumType = FromPcd.DatumType
|
||||
if FromPcd.SkuInfoList:
|
||||
ToPcd.SkuInfoList = FromPcd.SkuInfoList
|
||||
if FromPcd.UserDefinedDefaultStoresFlag:
|
||||
ToPcd.UserDefinedDefaultStoresFlag = FromPcd.UserDefinedDefaultStoresFlag
|
||||
# Add Flexible PCD format parse
|
||||
if ToPcd.DefaultValue:
|
||||
try:
|
||||
|
Reference in New Issue
Block a user