Reviewed-by: Yonghong Zhu
Best Regards,
Zhu Yonghong
-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yonghong
Zhu
Sent: Wednesday, September 05, 2018 10:52 AM
To: edk2-devel@lists.01.org
Cc: Gao, Liming
Subject: [edk2] [Patch] BaseTools: Fix a bug about list the PCD in "not used"
section
From: zhijufan
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
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan
---
BaseTools/Source/Python/build/BuildReport.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/BaseTools/Source/Python/build/BuildReport.py
b/BaseTools/Source/Python/build/BuildReport.py
index deb88a7..a598d64 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -817,10 +817,13 @@ class PcdReport(object):
if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, PcdType)
in package.Pcds:
Pcd.DatumType = package.Pcds[(Pcd.TokenCName,
Pcd.TokenSpaceGuidCName, PcdType)].DatumType
break
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:
UnusedPcdFullList.append(Pcd)
if len(Pcd.TokenCName) > self.MaxLen:
self.MaxLen = len(Pcd.TokenCName)
--
2.6.1.windows.1
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel