From nobody Mon May 6 18:30:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1517968926840179.90433876564816; Tue, 6 Feb 2018 18:02:06 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3761A21F0DA59; Tue, 6 Feb 2018 17:56:22 -0800 (PST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 421F221E256B5 for ; Tue, 6 Feb 2018 17:56:20 -0800 (PST) Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Feb 2018 18:02:04 -0800 Received: from shwdeopenpsi105.ccr.corp.intel.com ([10.239.9.129]) by orsmga006.jf.intel.com with ESMTP; 06 Feb 2018 18:02:02 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,471,1511856000"; d="scan'208";a="16501223" From: BobCF To: edk2-devel@lists.01.org Date: Wed, 7 Feb 2018 10:01:59 +0800 Message-Id: <20180207020159.12692-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 Subject: [edk2] [Patch] BaseTool: Fixed Pcd issues. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 1. Check variable offset when merging Hii Pcds 2. Fixed the issue of Hii value inherit with default store. 3. Error handling for incorrect structure pcd declare. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao Reviewed-by: Liming Gao --- BaseTools/Source/Python/AutoGen/GenVar.py | 19 ++- .../Source/Python/Workspace/BuildClassObject.py | 1 + BaseTools/Source/Python/Workspace/DecBuildData.py | 7 +- BaseTools/Source/Python/Workspace/DscBuildData.py | 152 +++++++++++------= ---- 4 files changed, 100 insertions(+), 79 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenVar.py b/BaseTools/Source/P= ython/AutoGen/GenVar.py index 1389d7ff62..d222e6ed5e 100644 --- a/BaseTools/Source/Python/AutoGen/GenVar.py +++ b/BaseTools/Source/Python/AutoGen/GenVar.py @@ -102,14 +102,31 @@ class VariableMgr(object): data =3D value_list[0] value_list =3D [] for data_byte in pack(data_flag,int(data,16) if data.u= pper().startswith('0X') else int(data)): value_list +=3D [hex(unpack("B",data_byte)[0])] newvalue[int(item.var_offset,16) if item.var_offset.upper(= ).startswith("0X") else int(item.var_offset)] =3D value_list - newvaluestr =3D "{" + ",".join(reduce(lambda x,y: x+y, [newval= ue[k] for k in sorted(newvalue.keys())] )) +"}" + try: + newvaluestr =3D "{" + ",".join(self.assemble_variable(newv= alue)) +"}" + except: + EdkLogger.error("build", AUTOGEN_ERROR, "Variable offset c= onflict in PCDs: %s \n" % (" and ".join([item.pcdname for item in sku_var_i= nfo_offset_list]))) n =3D sku_var_info_offset_list[0] indexedvarinfo[key] =3D [var_info(n.pcdindex,n.pcdname,n.defa= ultstoragename,n.skuname,n.var_name, n.var_guid, "0x00",n.var_attribute,new= valuestr , newvaluestr , "VOID*")] self.VarInfo =3D [item[0] for item in indexedvarinfo.values()] + + def assemble_variable(self, valuelist): + ordered_value =3D [valuelist[k] for k in sorted(valuelist.keys())] + ordered_offset =3D sorted(valuelist.keys()) + var_value =3D [] + num =3D 0 + for offset in ordered_offset: + if offset < len(var_value): + raise + for _ in xrange(offset - len(var_value)): + var_value.append('0x00') + var_value +=3D ordered_value[num] + num +=3D1 + return var_value def process_variable_data(self): =20 var_data =3D dict() =20 indexedvarinfo =3D collections.OrderedDict() diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py b/BaseTo= ols/Source/Python/Workspace/BuildClassObject.py index 0e1161c96f..f499cbd58b 100644 --- a/BaseTools/Source/Python/Workspace/BuildClassObject.py +++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py @@ -112,10 +112,11 @@ class StructurePcd(PcdClassObject): def __init__(self, StructuredPcdIncludeFile=3DNone, Packages=3DNone, N= ame=3DNone, Guid=3DNone, Type=3DNone, DatumType=3DNone, Value=3DNone, Token= =3DNone, MaxDatumSize=3DNone, SkuInfoList=3DNone, IsOverrided=3DFalse, Guid= Value=3DNone, validateranges=3DNone, validlists=3DNone, expressions=3DNone,= default_store =3D TAB_DEFAULT_STORES_DEFAULT): if SkuInfoList is None: SkuInfoList=3D{} if validateranges is None: validateranges=3D[] if validlists is None: validlists=3D[] if expressions is None : expressions=3D[] + if Packages is None : Packages =3D [] super(StructurePcd, self).__init__(Name, Guid, Type, DatumType, Va= lue, Token, MaxDatumSize, SkuInfoList, IsOverrided, GuidValue, validaterang= es, validlists, expressions) self.StructuredPcdIncludeFile =3D [] if StructuredPcdIncludeFile i= s None else StructuredPcdIncludeFile self.PackageDecs =3D Packages self.DefaultStoreName =3D [default_store] self.DefaultValues =3D collections.OrderedDict({}) diff --git a/BaseTools/Source/Python/Workspace/DecBuildData.py b/BaseTools/= Source/Python/Workspace/DecBuildData.py index 2266b0b7a6..99c3bf14f1 100644 --- a/BaseTools/Source/Python/Workspace/DecBuildData.py +++ b/BaseTools/Source/Python/Workspace/DecBuildData.py @@ -387,10 +387,12 @@ class DecBuildData(PackageBuildClassObject): struct_pcd.PkgPath =3D self.MetaFile.File else: struct_pcd.AddDefaultValue(item.TokenCName, item.Defau= ltValue,self.MetaFile.File,LineNo) =20 struct_pcd.PackageDecs =3D dep_pkgs + if not struct_pcd.StructuredPcdIncludeFile: + EdkLogger.error("build", PCD_STRUCTURE_PCD_ERROR, "The str= ucture Pcd %s.%s header file is not found in %s line %s \n" % (struct_pcd.T= okenSpaceGuidCName, struct_pcd.TokenCName,self.MetaFile.File,LineNo )) =20 str_pcd_set.append(struct_pcd) =20 return str_pcd_set =20 @@ -421,15 +423,10 @@ class DecBuildData(PackageBuildClassObject): Setting,LineNo =3D PcdDict[self._Arch, PcdCName, TokenSpaceGui= d] if Setting =3D=3D None: continue =20 DefaultValue, DatumType, TokenNumber =3D AnalyzePcdData(Settin= g) - if DatumType not in [TAB_UINT8, TAB_UINT16, TAB_UINT32, TAB_UI= NT64, TAB_VOID, "BOOLEAN"]: - StructPattern =3D re.compile(r'[_a-zA-Z][0-9A-Za-z_]*$') - if StructPattern.match(DatumType) =3D=3D None: - EdkLogger.error('build', FORMAT_INVALID, "DatumType on= ly support BOOLEAN, UINT8, UINT16, UINT32, UINT64, VOID* or a valid struct = name.", File=3Dself.MetaFile, Line=3DLineNo) - validateranges, validlists, expressions =3D self._RawData.GetV= alidExpression(TokenSpaceGuid, PcdCName) PcdObj =3D PcdClassObject( PcdCName, TokenSpaceGuid, self._PCD_TYPE_STRING_[Type], diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index 6e3cd0f3f1..87e79e8f92 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1520,10 +1520,11 @@ class DscBuildData(PlatformBuildClassObject): # the flexible array member. The flexible array member must b= e the last field # in a structure. The size formula for this case is: # OFFSET_OF(FlexbleArrayField) + sizeof(FlexibleArray[0]) * (H= ighestIndex + 1) # CApp =3D CApp + ' Size =3D sizeof(%s);\n' % (Pcd.DatumType) + CApp =3D CApp + "// Default Value in Dec \n" for FieldList in [Pcd.DefaultValues]: if not FieldList: continue for FieldName in FieldList: FieldName =3D "." + FieldName @@ -1547,35 +1548,38 @@ class DscBuildData(PlatformBuildClassObject): while '[' in FieldName: FieldName =3D FieldName.rsplit('[', 1)[0] CApp =3D CApp + ' __FLEXIBLE_SIZE(Size, %s, %= s, %d); // From %s Line %d Value %s\n' % (Pcd.DatumType, FieldName.strip(".= "), ArrayIndex + 1, FieldList[FieldName_ori][1], FieldList[FieldName_ori][2= ], FieldList[FieldName_ori][0]) for skuname in self.SkuIdMgr.GetSkuChain(SkuName): inherit_OverrideValues =3D Pcd.SkuOverrideValues[skuname] - for FieldList in [inherit_OverrideValues.get(DefaultStoreN= ame)]: - if not FieldList: - continue - for FieldName in FieldList: - FieldName =3D "." + FieldName - IsArray =3D self.IsFieldValueAnArray(FieldList[Fie= ldName.strip(".")][0]) - if IsArray: - try: - Value =3D ValueExpressionEx(FieldList[Fiel= dName.strip(".")][0], "VOID*", self._GuidDict)(True) - except BadExpression: - EdkLogger.error('Build', FORMAT_INVALID, "= Invalid value format for %s. From %s Line %d " % - (".".join((Pcd.TokenSpaceG= uidCName, Pcd.TokenCName, FieldName.strip('.'))), FieldList[FieldName.strip= (".")][1], FieldList[FieldName.strip(".")][2])) - Value, ValueSize =3D ParseFieldValue(Value) - CApp =3D CApp + ' __FLEXIBLE_SIZE(Size, %s, %= s, %d / __ARRAY_ELEMENT_SIZE(%s, %s) + ((%d %% __ARRAY_ELEMENT_SIZE(%s, %s)= ) ? 1 : 0)); // From %s Line %d Value %s\n' % (Pcd.DatumType, FieldName.str= ip("."), ValueSize, Pcd.DatumType, FieldName.strip("."), ValueSize, Pcd.Dat= umType, FieldName.strip("."), FieldList[FieldName.strip(".")][1], FieldList= [FieldName.strip(".")][2], FieldList[FieldName.strip(".")][0]); - else: - NewFieldName =3D '' - FieldName_ori =3D FieldName.strip('.') - while '[' in FieldName: - NewFieldName =3D NewFieldName + FieldName.= split('[', 1)[0] + '[0]' - ArrayIndex =3D int(FieldName.split('[', 1)= [1].split(']', 1)[0]) - FieldName =3D FieldName.split(']', 1)[1] - FieldName =3D NewFieldName + FieldName - while '[' in FieldName: - FieldName =3D FieldName.rsplit('[', 1)[0] - CApp =3D CApp + ' __FLEXIBLE_SIZE(Size, %= s, %s, %d); // From %s Line %d Value %s \n' % (Pcd.DatumType, FieldName.str= ip("."), ArrayIndex + 1, FieldList[FieldName_ori][1], FieldList[FieldName_o= ri][2], FieldList[FieldName_ori][0]) + storeset =3D [DefaultStoreName] if DefaultStoreName =3D=3D= 'STANDARD' else ['STANDARD', DefaultStoreName] + for defaultstorenameitem in storeset: + CApp =3D CApp + "// SkuName: %s, DefaultStoreName: %s= \n" % (skuname, defaultstorenameitem) + for FieldList in [inherit_OverrideValues.get(defaultst= orenameitem)]: + if not FieldList: + continue + for FieldName in FieldList: + FieldName =3D "." + FieldName + IsArray =3D self.IsFieldValueAnArray(FieldList= [FieldName.strip(".")][0]) + if IsArray: + try: + Value =3D ValueExpressionEx(FieldList[= FieldName.strip(".")][0], "VOID*", self._GuidDict)(True) + except BadExpression: + EdkLogger.error('Build', FORMAT_INVALI= D, "Invalid value format for %s. From %s Line %d " % + (".".join((Pcd.TokenSp= aceGuidCName, Pcd.TokenCName, FieldName.strip('.'))), FieldList[FieldName.s= trip(".")][1], FieldList[FieldName.strip(".")][2])) + Value, ValueSize =3D ParseFieldValue(Value) + CApp =3D CApp + ' __FLEXIBLE_SIZE(Size, %= s, %s, %d / __ARRAY_ELEMENT_SIZE(%s, %s) + ((%d %% __ARRAY_ELEMENT_SIZE(%s,= %s)) ? 1 : 0)); // From %s Line %d Value %s\n' % (Pcd.DatumType, FieldName= .strip("."), ValueSize, Pcd.DatumType, FieldName.strip("."), ValueSize, Pcd= .DatumType, FieldName.strip("."), FieldList[FieldName.strip(".")][1], Field= List[FieldName.strip(".")][2], FieldList[FieldName.strip(".")][0]); + else: + NewFieldName =3D '' + FieldName_ori =3D FieldName.strip('.') + while '[' in FieldName: + NewFieldName =3D NewFieldName + FieldN= ame.split('[', 1)[0] + '[0]' + ArrayIndex =3D int(FieldName.split('['= , 1)[1].split(']', 1)[0]) + FieldName =3D FieldName.split(']', 1)[= 1] + FieldName =3D NewFieldName + FieldName + while '[' in FieldName: + FieldName =3D FieldName.rsplit('[', 1)= [0] + CApp =3D CApp + ' __FLEXIBLE_SIZE(Siz= e, %s, %s, %d); // From %s Line %d Value %s \n' % (Pcd.DatumType, FieldName= .strip("."), ArrayIndex + 1, FieldList[FieldName_ori][1], FieldList[FieldNa= me_ori][2], FieldList[FieldName_ori][0]) if skuname =3D=3D SkuName: break =20 # # Allocate and zero buffer for the PCD @@ -1592,10 +1596,11 @@ class DscBuildData(PlatformBuildClassObject): CApp =3D CApp + ' memcpy (Pcd, OriginalPcd, OriginalSize);\n' =20 # # Assign field values in PCD # + CApp =3D CApp + "// Default value in Dec \n" for FieldList in [Pcd.DefaultValues]: if not FieldList: continue for FieldName in FieldList: IsArray =3D self.IsFieldValueAnArray(FieldList[FieldNa= me][0]) @@ -1624,60 +1629,60 @@ class DscBuildData(PlatformBuildClassObject): CApp =3D CApp + ' Pcd->%s =3D %dULL; // From = %s Line %d Value %s\n' % (FieldName, Value, FieldList[FieldName][1], FieldL= ist[FieldName][2], FieldList[FieldName][0]) else: CApp =3D CApp + ' Pcd->%s =3D %d; // From %s = Line %d Value %s\n' % (FieldName, Value, FieldList[FieldName][1], FieldList= [FieldName][2], FieldList[FieldName][0]) for skuname in self.SkuIdMgr.GetSkuChain(SkuName): inherit_OverrideValues =3D Pcd.SkuOverrideValues[skuname] - for FieldList in [Pcd.DefaultFromDSC,inherit_OverrideValue= s.get(DefaultStoreName)]: - if not FieldList: - continue - if Pcd.DefaultFromDSC and FieldList =3D=3D Pcd.Default= FromDSC: - IsArray =3D self.IsFieldValueAnArray(FieldList) - if IsArray: - try: - FieldList =3D ValueExpressionEx(FieldList,= "VOID*")(True) - except BadExpression: - EdkLogger.error("Build", FORMAT_INVALID, "= Invalid value format for %s.%s, from DSC: %s" % - (Pcd.TokenSpaceGuidCName, = Pcd.TokenCName, FieldList)) - - Value, ValueSize =3D ParseFieldValue (FieldList) - if isinstance(Value, str): - CApp =3D CApp + ' Pcd =3D %s; // From DSC Def= ault Value %s\n' % (Value, Pcd.DefaultFromDSC) - elif IsArray: - # - # Use memcpy() to copy value into field - # - CApp =3D CApp + ' Value =3D %s; // From D= SC Default Value %s\n' % (self.IntToCString(Value, ValueSize), Pcd.DefaultF= romDSC) - CApp =3D CApp + ' memcpy (Pcd, Value, %d);\n'= % (ValueSize) - continue - - for FieldName in FieldList: - IsArray =3D self.IsFieldValueAnArray(FieldList[Fie= ldName][0]) - if IsArray: + storeset =3D [DefaultStoreName] if DefaultStoreName =3D=3D= 'STANDARD' else ['STANDARD', DefaultStoreName] + for defaultstorenameitem in storeset: + CApp =3D CApp + "// SkuName: %s, DefaultStoreName: %s= \n" % (skuname, defaultstorenameitem) + for FieldList in [Pcd.DefaultFromDSC,inherit_OverrideV= alues.get(defaultstorenameitem)]: + if not FieldList: + continue + if Pcd.DefaultFromDSC and FieldList =3D=3D Pcd.Def= aultFromDSC: + IsArray =3D self.IsFieldValueAnArray(FieldList) + if IsArray: + try: + FieldList =3D ValueExpressionEx(FieldL= ist, "VOID*")(True) + except BadExpression: + EdkLogger.error("Build", FORMAT_INVALI= D, "Invalid value format for %s.%s, from DSC: %s" % + (Pcd.TokenSpaceGuidCNa= me, Pcd.TokenCName, FieldList)) + Value, ValueSize =3D ParseFieldValue (FieldLis= t) + if isinstance(Value, str): + CApp =3D CApp + ' Pcd =3D %s; // From DSC= Default Value %s\n' % (Value, Pcd.DefaultFromDSC) + elif IsArray: + # + # Use memcpy() to copy value into field + # + CApp =3D CApp + ' Value =3D %s; // Fr= om DSC Default Value %s\n' % (self.IntToCString(Value, ValueSize), Pcd.Defa= ultFromDSC) + CApp =3D CApp + ' memcpy (Pcd, Value, %d)= ;\n' % (ValueSize) + continue + for FieldName in FieldList: + IsArray =3D self.IsFieldValueAnArray(FieldList= [FieldName][0]) + if IsArray: + try: + FieldList[FieldName][0] =3D ValueExpre= ssionEx(FieldList[FieldName][0], "VOID*", self._GuidDict)(True) + except BadExpression: + EdkLogger.error('Build', FORMAT_INVALI= D, "Invalid value format for %s. From %s Line %d " % + (".".join((Pcd.TokenSp= aceGuidCName, Pcd.TokenCName, FieldName)), FieldList[FieldName][1], FieldLi= st[FieldName][2])) try: - FieldList[FieldName][0] =3D ValueExpressio= nEx(FieldList[FieldName][0], "VOID*", self._GuidDict)(True) - except BadExpression: - EdkLogger.error('Build', FORMAT_INVALID, "= Invalid value format for %s. From %s Line %d " % - (".".join((Pcd.TokenSpaceG= uidCName, Pcd.TokenCName, FieldName)), FieldList[FieldName][1], FieldList[F= ieldName][2])) - - try: - Value, ValueSize =3D ParseFieldValue (FieldLis= t[FieldName][0]) - except Exception: - EdkLogger.error('Build', FORMAT_INVALID, "Inva= lid value format for %s. From %s Line %d " % (".".join((Pcd.TokenSpaceGuidC= Name,Pcd.TokenCName,FieldName)),FieldList[FieldName][1], FieldList[FieldNam= e][2])) - if isinstance(Value, str): - CApp =3D CApp + ' Pcd->%s =3D %s; // From %s = Line %d Value %s\n' % (FieldName, Value, FieldList[FieldName][1], FieldList= [FieldName][2], FieldList[FieldName][0]) - elif IsArray: - # - # Use memcpy() to copy value into field - # - CApp =3D CApp + ' FieldSize =3D __FIELD_SIZE(= %s, %s);\n' % (Pcd.DatumType, FieldName) - CApp =3D CApp + ' Value =3D %s; // From %= s Line %d Value %s\n' % (self.IntToCString(Value, ValueSize), FieldList[Fie= ldName][1], FieldList[FieldName][2], FieldList[FieldName][0]) - CApp =3D CApp + ' memcpy (&Pcd->%s[0], Value,= (FieldSize > 0 && FieldSize < %d) ? FieldSize : %d);\n' % (FieldName, Valu= eSize, ValueSize) - else: - if ValueSize > 4: - CApp =3D CApp + ' Pcd->%s =3D %dULL; // F= rom %s Line %d Value %s\n' % (FieldName, Value, FieldList[FieldName][1], Fi= eldList[FieldName][2], FieldList[FieldName][0]) + Value, ValueSize =3D ParseFieldValue (Fiel= dList[FieldName][0]) + except Exception: + EdkLogger.error('Build', FORMAT_INVALID, "= Invalid value format for %s. From %s Line %d " % (".".join((Pcd.TokenSpaceG= uidCName,Pcd.TokenCName,FieldName)),FieldList[FieldName][1], FieldList[Fiel= dName][2])) + if isinstance(Value, str): + CApp =3D CApp + ' Pcd->%s =3D %s; // From= %s Line %d Value %s\n' % (FieldName, Value, FieldList[FieldName][1], Field= List[FieldName][2], FieldList[FieldName][0]) + elif IsArray: + # + # Use memcpy() to copy value into field + # + CApp =3D CApp + ' FieldSize =3D __FIELD_S= IZE(%s, %s);\n' % (Pcd.DatumType, FieldName) + CApp =3D CApp + ' Value =3D %s; // Fr= om %s Line %d Value %s\n' % (self.IntToCString(Value, ValueSize), FieldList= [FieldName][1], FieldList[FieldName][2], FieldList[FieldName][0]) + CApp =3D CApp + ' memcpy (&Pcd->%s[0], Va= lue, (FieldSize > 0 && FieldSize < %d) ? FieldSize : %d);\n' % (FieldName, = ValueSize, ValueSize) else: - CApp =3D CApp + ' Pcd->%s =3D %d; // From= %s Line %d Value %s\n' % (FieldName, Value, FieldList[FieldName][1], Field= List[FieldName][2], FieldList[FieldName][0]) + if ValueSize > 4: + CApp =3D CApp + ' Pcd->%s =3D %dULL; = // From %s Line %d Value %s\n' % (FieldName, Value, FieldList[FieldName][1]= , FieldList[FieldName][2], FieldList[FieldName][0]) + else: + CApp =3D CApp + ' Pcd->%s =3D %d; // = From %s Line %d Value %s\n' % (FieldName, Value, FieldList[FieldName][1], F= ieldList[FieldName][2], FieldList[FieldName][0]) if skuname =3D=3D SkuName: break # # Set new PCD value and size # @@ -2290,10 +2295,11 @@ class DscBuildData(PlatformBuildClassObject): None, IsDsc=3DTrue) for pcd in Pcds.values(): SkuInfoObj =3D pcd.SkuInfoList.values()[0] pcdDecObject =3D self._DecPcds[pcd.TokenCName, pcd.TokenSpaceG= uidCName] + pcd.DatumType =3D pcdDecObject.DatumType # Only fix the value while no value provided in DSC file. for sku in pcd.SkuInfoList.values(): if (sku.DefaultValue =3D=3D "" or sku.DefaultValue=3D=3DNo= ne): sku.DefaultValue =3D pcdDecObject.DefaultValue if 'DEFAULT' not in pcd.SkuInfoList.keys() and 'COMMON' not in= pcd.SkuInfoList.keys(): --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel