The VPD size is incorrect if that VPD is not used in Module. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Feng Bob C <bob.c.f...@intel.com> Reviewed-by: Liming Gao <liming....@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index ce8bc64ca5..848378f3d4 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -1744,18 +1744,16 @@ class PlatformAutoGen(AutoGen): # Not found, it should be signature if not FoundFlag : # just pick the a value to determine whether is unicode string type SkuValueMap = {} + SkuObjList = DscPcdEntry.SkuInfoList.items() DefaultSku = DscPcdEntry.SkuInfoList.get('DEFAULT') if DefaultSku: - PcdValue = DefaultSku.DefaultValue - if PcdValue not in SkuValueMap: - SkuValueMap[PcdValue] = [] - VpdFile.Add(DscPcdEntry, 'DEFAULT',DefaultSku.VpdOffset) - SkuValueMap[PcdValue].append(DefaultSku) - for (SkuName,Sku) in DscPcdEntry.SkuInfoList.items(): + defaultindex = SkuObjList.index(('DEFAULT',DefaultSku)) + SkuObjList[0],SkuObjList[defaultindex] = SkuObjList[defaultindex],SkuObjList[0] + for (SkuName,Sku) in SkuObjList: Sku.VpdOffset = Sku.VpdOffset.strip() # Need to iterate DEC pcd information to get the value & datumtype for eachDec in self.PackageList: for DecPcd in eachDec.Pcds: -- 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel