summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Workspace/DscBuildData.py
diff options
context:
space:
mode:
authorZhao, ZhiqiangX <zhiqiangx.zhao@intel.com>2018-09-04 14:59:39 +0800
committerLiming Gao <liming.gao@intel.com>2018-09-12 11:25:22 +0800
commitced8685838bd5a9b091fdc537c494e36450b05f5 (patch)
tree8ad4f730aa1152ebf6f64aa71b18879f5033e5b4 /BaseTools/Source/Python/Workspace/DscBuildData.py
parentcfed8a37ec3cf974e4eaaa298da6704133b00019 (diff)
downloadedk2-ced8685838bd5a9b091fdc537c494e36450b05f5.tar.gz
edk2-ced8685838bd5a9b091fdc537c494e36450b05f5.tar.bz2
edk2-ced8685838bd5a9b091fdc537c494e36450b05f5.zip
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>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/DscBuildData.py')
-rw-r--r--BaseTools/Source/Python/Workspace/DscBuildData.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 19ab2215b3..9c9dce4c53 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -2521,6 +2521,7 @@ class DscBuildData(PlatformBuildClassObject):
VariableAttrs = {}
Pcds = OrderedDict()
+ UserDefinedDefaultStores = []
#
# tdict is a special dict kind of type, used for selecting correct
# PCD settings for certain ARCH and SKU
@@ -2538,6 +2539,9 @@ class DscBuildData(PlatformBuildClassObject):
DefaultStore = DefaultStore.upper()
if DefaultStore == TAB_COMMON:
DefaultStore = TAB_DEFAULT_STORES_DEFAULT
+ else:
+ #The end user define [DefaultStores] and [SKUID_IDENTIFIER.Menufacturing] in DSC
+ UserDefinedDefaultStores.append((PcdCName, TokenSpaceGuid))
if SkuName not in AvailableSkuIdSet:
EdkLogger.error('build', PARAMETER_INVALID, 'Sku %s is not defined in [SkuIds] section' % SkuName,
File=self.MetaFile, Line=Dummy5)
@@ -2600,7 +2604,7 @@ class DscBuildData(PlatformBuildClassObject):
pcdObject.SkuInfoList[SkuName] = SkuInfo
else:
SkuInfo = SkuInfoClass(SkuName, self.SkuIds[SkuName][0], VariableName, VariableGuid, VariableOffset, DefaultValue, VariableAttribute=VarAttribute, DefaultStore={DefaultStore:DefaultValue})
- Pcds[PcdCName, TokenSpaceGuid] = PcdClassObject(
+ PcdClassObj = PcdClassObject(
PcdCName,
TokenSpaceGuid,
self._PCD_TYPE_STRING_[Type],
@@ -2615,6 +2619,9 @@ class DscBuildData(PlatformBuildClassObject):
pcdDecObject.validlists,
pcdDecObject.expressions,
IsDsc=True)
+ if (PcdCName, TokenSpaceGuid) in UserDefinedDefaultStores:
+ PcdClassObj.UserDefinedDefaultStoresFlag = True
+ Pcds[PcdCName, TokenSpaceGuid] = PcdClassObj
if SkuName not in Pcds[PcdCName, TokenSpaceGuid].DscRawValue:
Pcds[PcdCName, TokenSpaceGuid].DscRawValue[SkuName] = {}