summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
authorzhijufan <zhijux.fan@intel.com>2018-08-28 10:08:08 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-08-30 20:59:18 +0800
commit0fece18d6df83cede91a4c8644c2278e63794a62 (patch)
tree79611cfe203fb75b7dd9e9698a0b688376e874e8 /BaseTools
parent36faa23c46824e3cf9beff8648a56816cbf58f49 (diff)
downloadedk2-0fece18d6df83cede91a4c8644c2278e63794a62.zip
edk2-0fece18d6df83cede91a4c8644c2278e63794a62.tar.gz
edk2-0fece18d6df83cede91a4c8644c2278e63794a62.tar.bz2
BaseTools: include variable namespace GUIDs of HII PCDs in Guid.xref
[PcdsDynamicHii] gFooTokenSpaceGuid.PcdBar|L"Variable"|gVarNameSpaceGuid|0x0|FALSE|NV,BS This patch add the variable namespace GUIDs in "Guid.xref" that are used with dynamic HII PCDs. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=452 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>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/GenFds/GenFds.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py
index 2307a19..9dec9c5 100644
--- a/BaseTools/Source/Python/GenFds/GenFds.py
+++ b/BaseTools/Source/Python/GenFds/GenFds.py
@@ -603,12 +603,23 @@ class GenFds :
def GenerateGuidXRefFile(BuildDb, ArchList, FdfParserObj):
GuidXRefFileName = os.path.join(GenFdsGlobalVariable.FvDir, "Guid.xref")
GuidXRefFile = BytesIO('')
+ PkgGuidDict = {}
GuidDict = {}
ModuleList = []
FileGuidList = []
GuidPattern = gGuidPattern
for Arch in ArchList:
PlatformDataBase = BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
+ PkgList = GenFdsGlobalVariable.WorkSpace.GetPackageList(GenFdsGlobalVariable.ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag)
+ for P in PkgList:
+ PkgGuidDict.update(P.Guids)
+ for Name, Guid in PlatformDataBase.Pcds:
+ Pcd = PlatformDataBase.Pcds[Name, Guid]
+ if Pcd.Type in [TAB_PCDS_DYNAMIC_HII, TAB_PCDS_DYNAMIC_EX_HII]:
+ for SkuId in Pcd.SkuInfoList:
+ Sku = Pcd.SkuInfoList[SkuId]
+ if Sku.VariableGuid and Sku.VariableGuid in PkgGuidDict.keys():
+ GuidDict[Sku.VariableGuid] = PkgGuidDict[Sku.VariableGuid]
for ModuleFile in PlatformDataBase.Modules:
Module = BuildDb.BuildObject[ModuleFile, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
if Module in ModuleList: