BaseTools: Fix a bug about list the PCD in "not used" section

Defined a pcd in Ovmf.dec and used that pcd in AcpiPlatformDxe.inf,
then assign a value to that pcd from DSC, then build Ovmf platform
successfully. But this Pcd was wrongly listed into not used section
in the report.txt file.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
zhijufan 2018-09-01 23:45:52 +08:00 committed by Yonghong Zhu
parent e23d9c3ed8
commit ac4578af36
1 changed files with 3 additions and 0 deletions

View File

@ -819,6 +819,9 @@ class PcdReport(object):
break break
PcdList = self.AllPcds.setdefault(Pcd.TokenSpaceGuidCName, {}).setdefault(Pcd.Type, []) PcdList = self.AllPcds.setdefault(Pcd.TokenSpaceGuidCName, {}).setdefault(Pcd.Type, [])
UnusedPcdList = self.UnusedPcds.setdefault(Pcd.TokenSpaceGuidCName, {}).setdefault(Pcd.Type, [])
if Pcd in UnusedPcdList:
UnusedPcdList.remove(Pcd)
if Pcd not in PcdList and Pcd not in UnusedPcdFullList: if Pcd not in PcdList and Pcd not in UnusedPcdFullList:
UnusedPcdFullList.append(Pcd) UnusedPcdFullList.append(Pcd)
if len(Pcd.TokenCName) > self.MaxLen: if len(Pcd.TokenCName) > self.MaxLen: