BaseTools:StructurePCD value display incorrect in "Not used" section.

StructurePCD value display incorrect in "Not used" section,
that the value defined in structure does not show.

StructurePCD will not display in "Not Used" section if
main structure not define in dsc and pcd not in inf

Cc: Bob Feng <[email protected]>
Cc: Liming Gao <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <[email protected]>
Reviewed-by: Bob Feng <[email protected]>
This commit is contained in:
Fan, ZhijuX authored and Feng, Bob C committed 2019-02-02 10:28:56 +08:00
1 parent 4a6b179f4f
commit 97c8f5b9e7
2 files changed
+9 -2

No files matched your search

@@ -1519,9 +1519,9 @@ class DscBuildData(PlatformBuildClassObject):
else:
str_pcd_obj_str.DefaultFromDSC = {skuname:{defaultstore: str_pcd_obj.SkuInfoList[skuname].DefaultStoreDict.get(defaultstore, str_pcd_obj.SkuInfoList[skuname].DefaultValue) for defaultstore in DefaultStores} for skuname in str_pcd_obj.SkuInfoList}
S_pcd_set[Pcd] = str_pcd_obj_str
self.FilterStrcturePcd(S_pcd_set)
if S_pcd_set:
GlobalData.gStructurePcd[self.Arch] = S_pcd_set
GlobalData.gStructurePcd[self.Arch] = S_pcd_set.copy()
self.FilterStrcturePcd(S_pcd_set)
for stru_pcd in S_pcd_set.values():
for skuid in SkuIds:
if skuid in stru_pcd.SkuOverrideValues:
@@ -780,6 +780,13 @@ class PcdReport(object):
# Collect the PCD defined in DSC/FDF file, but not used in module
#
UnusedPcdFullList = []
StructPcdDict = GlobalData.gStructurePcd[self.Arch]
for Name, Guid in StructPcdDict:
if (Name, Guid) not in Pa.Platform.Pcds:
Pcd = StructPcdDict[(Name, Guid)]
PcdList = self.AllPcds.setdefault(Guid, {}).setdefault(Pcd.Type, [])
if Pcd not in PcdList and Pcd not in UnusedPcdFullList:
UnusedPcdFullList.append(Pcd)
for item in Pa.Platform.Pcds:
Pcd = Pa.Platform.Pcds[item]
if not Pcd.Type: