summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2018-10-19 15:10:30 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-10-23 10:40:31 +0800
commita6a326770b0e9e209c604d26fd861a9714c36bef (patch)
tree65a34a3835eacaa2cc2c74d8fee7fe324c97a6c4 /BaseTools
parent0dab57708de64284ac83f0632daba4d9e1cb1135 (diff)
downloadedk2-a6a326770b0e9e209c604d26fd861a9714c36bef.tar.gz
edk2-a6a326770b0e9e209c604d26fd861a9714c36bef.tar.bz2
edk2-a6a326770b0e9e209c604d26fd861a9714c36bef.zip
BaseTools: Fix the *B and *F Flag display for Structure Pcd
Because of we newly add the PcdFieldValueFromComm and PcdFieldValueFromFdf in early parser phase, so in the report we use the saved value in this two variables to print it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/build/BuildReport.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index a66adfb167..de8f0fb087 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -1074,9 +1074,13 @@ class PcdReport(object):
Pcd.DatumType = Pcd.StructName
if TypeName in ('DYNVPD', 'DEXVPD'):
Pcd.SkuInfoList = SkuInfoList
- if Pcd.PcdFieldValueFromComm:
+ if Pcd.PcdValueFromComm or Pcd.PcdFieldValueFromComm:
BuildOptionMatch = True
DecMatch = False
+ elif Pcd.PcdValueFromFdf or Pcd.PcdFieldValueFromFdf:
+ DscDefaultValue = True
+ DscMatch = True
+ DecMatch = False
elif Pcd.SkuOverrideValues:
DscOverride = False
if Pcd.DefaultFromDSC:
@@ -1266,6 +1270,7 @@ class PcdReport(object):
Value = "0x{:X} ({})".format(int(Value, 0), Value)
FileWrite(File, ' %-*s : %6s %10s = %s' % (self.MaxLen, Flag + ' ' + PcdTokenCName, TypeName, '(' + Pcd.DatumType + ')', Value))
if IsStructure:
+ FiledOverrideFlag = False
OverrideValues = Pcd.SkuOverrideValues
if OverrideValues:
for Data in OverrideValues.values():
@@ -1273,7 +1278,11 @@ class PcdReport(object):
if Struct:
OverrideFieldStruct = self.OverrideFieldValue(Pcd, Struct[0])
self.PrintStructureInfo(File, OverrideFieldStruct)
+ FiledOverrideFlag = True
break
+ if not FiledOverrideFlag and (Pcd.PcdFieldValueFromComm or Pcd.PcdFieldValueFromFdf):
+ OverrideFieldStruct = self.OverrideFieldValue(Pcd, {})
+ self.PrintStructureInfo(File, OverrideFieldStruct)
self.PrintPcdDefault(File, Pcd, IsStructure, DscMatch, DscDefaultValue, InfMatch, InfDefaultValue, DecMatch, DecDefaultValue)
else:
FirstPrint = True
@@ -1393,11 +1402,16 @@ class PcdReport(object):
if TypeName in ('DYNVPD', 'DEXVPD'):
FileWrite(File, '%*s' % (self.MaxLen + 4, SkuInfo.VpdOffset))
if IsStructure:
+ FiledOverrideFlag = False
OverrideValues = Pcd.SkuOverrideValues[Sku]
if OverrideValues:
Keys = OverrideValues.keys()
OverrideFieldStruct = self.OverrideFieldValue(Pcd, OverrideValues[Keys[0]])
self.PrintStructureInfo(File, OverrideFieldStruct)
+ FiledOverrideFlag = True
+ if not FiledOverrideFlag and (Pcd.PcdFieldValueFromComm or Pcd.PcdFieldValueFromFdf):
+ OverrideFieldStruct = self.OverrideFieldValue(Pcd, {})
+ self.PrintStructureInfo(File, OverrideFieldStruct)
self.PrintPcdDefault(File, Pcd, IsStructure, DscMatch, DscDefaultValue, InfMatch, InfDefaultValue, DecMatch, DecDefaultValue)
def OverrideFieldValue(self, Pcd, OverrideStruct):