From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=zhijux.fan@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 77863211C3F40 for ; Thu, 31 Jan 2019 18:12:47 -0800 (PST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2019 18:12:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,546,1539673200"; d="dat'59?scan'59,208,59";a="315389425" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga006.fm.intel.com with ESMTP; 31 Jan 2019 18:12:46 -0800 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 31 Jan 2019 18:12:47 -0800 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 31 Jan 2019 18:12:46 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.190]) with mapi id 14.03.0415.000; Fri, 1 Feb 2019 10:12:44 +0800 From: "Fan, ZhijuX" To: "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Feng, Bob C" Thread-Topic: [edk2][PATCH] BaseTools: PCD value incorrect in structure pcd sku case. Thread-Index: AdS504q4p55VfhtvRIO7PocBBX57aw== Date: Fri, 1 Feb 2019 02:12:44 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [PATCH] BaseTools: PCD value incorrect in structure pcd sku case. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2019 02:12:47 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Defined 2 PCDs(Test4 & Test401) and 2 SKUs(DEFAULT & _), then set "SKUID_Defines" to ALL, for FixedAtBuild=20 gEfiStructuredPcdPkgTokenSpaceGuid. Test401 in this case,=20 its value should get from "Default" SKU, not from "_" SKU,=20 but we does not set value in SKU "_" in dsc, so Test401=20 should only display the value get from dec. Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/Common/GlobalData.py | 2 +- BaseTools/Source/Python/Workspace/DscBuildData.py | 1 + BaseTools/Source/Python/build/BuildReport.py | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/Common/GlobalData.py b/BaseTools/Sourc= e/Python/Common/GlobalData.py index 5eaee06694..f117998b0b 100644 --- a/BaseTools/Source/Python/Common/GlobalData.py +++ b/BaseTools/Source/Python/Common/GlobalData.py @@ -103,7 +103,7 @@ MixedPcd =3D {} =20 # Structure Pcd dict gStructurePcd =3D {} - +gPcdSkuOverrides=3D{} # Pcd name for the Pcd which used in the Conditional directives gConditionalPcds =3D [] =20 diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index 233e530d5c..0ea1b1bb39 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1525,6 +1525,7 @@ class DscBuildData(PlatformBuildClassObject): for stru_pcd in S_pcd_set.values(): for skuid in SkuIds: if skuid in stru_pcd.SkuOverrideValues: + GlobalData.gPcdSkuOverrides.update({(stru_pcd.TokenCNa= me, stru_pcd.TokenSpaceGuidCName): stru_pcd.SkuOverrideValues}) continue nextskuid =3D self.SkuIdMgr.GetNextSkuId(skuid) NoDefault =3D False diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Sourc= e/Python/build/BuildReport.py index e979611c26..9752a9c0d2 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -1295,7 +1295,10 @@ class PcdReport(object): FileWrite(File, ' %-*s : %6s %10s =3D %s' % (self.MaxLen= , Flag + ' ' + PcdTokenCName, TypeName, '(' + Pcd.DatumType + ')', Value)) if IsStructure: FiledOverrideFlag =3D False - OverrideValues =3D Pcd.SkuOverrideValues + if (Pcd.TokenCName,Pcd.TokenSpaceGuidCName) in GlobalData.= gPcdSkuOverrides: + OverrideValues =3D GlobalData.gPcdSkuOverrides[(Pcd.To= kenCName,Pcd.TokenSpaceGuidCName)] + else: + OverrideValues =3D Pcd.SkuOverrideValues if OverrideValues: for Data in OverrideValues.values(): Struct =3D list(Data.values()) --=20 2.14.1.windows.1