From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web11.3580.1658456936805078546 for ; Thu, 21 Jul 2022 19:28:57 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=aBwCa6Wr; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: yuwei.chen@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658456936; x=1689992936; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=YtMa9Rgovj7TRA+QVf4SgiJFcFItmv9Wk1vsHT2igHQ=; b=aBwCa6Wrn6uqyeA9W0b82NKIkZevd5B/ZAauUTgXUIPizQEBfarkmKBi TV2pTNl6cQ7ydL+l0r0Pa7nYOoCGMD254QoSRcNhXkTZE95z2XH+3BuIB EIKQIPBM9YheUB7RU1KyAfHPZz05qUfA7DfmFppx3aPgwwEk/mCqzmdL6 VnnLzzIh5vhd81DGcpWNVd6KhlJDBTDHuco6l3eNZAqJlkYuTUOxhtiBQ uVkEYNft8gNf7OhL57mHu/2Xg3k+pU3ar7DrwQiFZimZrEIll9WGZSgZL J9bUiIOqAn518+J/h0mnYaUaoc8G6oK8ePHwrFHuav/ZKWA7yJt43w483 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10415"; a="288390077" X-IronPort-AV: E=Sophos;i="5.93,184,1654585200"; d="scan'208";a="288390077" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2022 19:28:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,184,1654585200"; d="scan'208";a="595824777" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga007.jf.intel.com with ESMTP; 21 Jul 2022 19:28:53 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 21 Jul 2022 19:28:52 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Thu, 21 Jul 2022 19:28:52 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Thu, 21 Jul 2022 19:28:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VlwMbJdJtLZlrTbVQxlVJTqE4Tw+S8mimJNVja/Qym9SN7r8PU/qmCR+NmyckePyp+XF5Sg7Wp9qSDZyDPC4GjcO/GJay7dZfCG5FeNvy19XOmTuFgVovgfM6TwMOLQwOMPFFA+Lqc85hWKVd6UXwUGLJJQz/ynHVtPgD5T9nTemdjM130TkJVFzuwJtNGZh0qXgxIQj7BCZVS3Owybx152ipC1jPecBs7YMkgP8Y8Hwx8nAmENiTDvXY+2nBIOFM/2pCkD0fhVK13U5KccIQj///Wypc1Lkr5LqG4SE9CVEfAccvHqy7Sgq5ir8I2vOosumbpDf7/E7IwxsQBsDHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QqSBYFMsl9d8czziz6rszAxOZf208df0tqtBlRTLJ5Q=; b=Gxxk1iSV9p3PL9nLYDqIfi7zFVEKAoidbP2XWv+FoU0HvcChlK3SmuuxVJZt0s21bqpGbB2DiJjNk5TL5Bp1Y3QSF8vLu7aj6XpFU07Jv8P5/J6OZhaA8aoqy8P+bLgLIL0z1A4ca/ONZ2ij+GllPlHF/lS/uNHKflix381qH1DgfUd6W7crq7MP+0DgZodP/Hisfex/uFBg93S5kSp9p+pcgJy2ymhHOaOcfMOMuD8Fja6lGu9WgBxeFAkfw4B5+NJnFJCWB50kqWBbcSHRwZO2hqa73OHZ7QxO00ahY4zqHhuKOWNLov42gj5YPgFqnlPeO6w3WMQsG8ySA2FHRw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW5PR11MB5906.namprd11.prod.outlook.com (2603:10b6:303:1a0::21) by BN8PR11MB3796.namprd11.prod.outlook.com (2603:10b6:408:90::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18; Fri, 22 Jul 2022 02:28:40 +0000 Received: from MW5PR11MB5906.namprd11.prod.outlook.com ([fe80::7441:64b2:df24:2649]) by MW5PR11MB5906.namprd11.prod.outlook.com ([fe80::7441:64b2:df24:2649%9]) with mapi id 15.20.5417.026; Fri, 22 Jul 2022 02:28:40 +0000 From: "Yuwei Chen" To: "devel@edk2.groups.io" , "Li, Yi1" CC: "Feng, Bob C" , "Gao, Liming" Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: INF should use latest Pcd value instead of default value Thread-Topic: [edk2-devel] [PATCH 1/1] BaseTools: INF should use latest Pcd value instead of default value Thread-Index: AQHYlOnfmZ2e3iA2PUSTMp9XrDFcGK2Jth9w Date: Fri, 22 Jul 2022 02:28:40 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 484f46e7-67b2-4639-7682-08da6b89e3cd x-ms-traffictypediagnostic: BN8PR11MB3796:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aLyyI6vuGEF3ybfpM3JGBcbZM4Gbfy1SNk0aUbjRdnRRPzIVzqpGSgBwP5ynQQKri8a2nc8nbv/Bqb9kDK57Z5ZN9PWzxYIpe1rRc8a22wlSGIp58OtQuVf2ZyWVmapKnF36KRe0KADA+6iP6h68H+M0FVVabNswvbeNOBj4jHDrrXI7gCGyiXycwH8nJyd4WM/s1PMXNxGW0W18/GbyMixeIrOA8O2oJ47kqp69N17X52nhkXD9VjgDLAJJIejRHkF15zReSJ6Q/0568K9ddrX71kyR0b8weON5wB8UYIpwp5+zEjtxyk6NU+yjtYX3csm0JBq0MmnhouK1Z1Ast/NPJepfQjZvtYzcIhRtdmedNgLyd/j9k2RK3HS3rCVQOK3YYI7Wjj0uNCPxJ7hwiSnJow+XX/tqwnJJjPtfq7ABfdNcq78iEHxjF3NoLCUz574slZv9XjCYh0dXIZ5XYEtZcMUt/WXtJAPjPTqWUv+dCVXRh8RjfdyTZONZxZO9x/TVleBuq4hFI9j6acK8VFBhvAMm4T53N50pYqe9CxDvt82k1L6YH6ENrRoJNsZtVNZWfoS9T7egYffbT/IKOqS3stTBhLk14vIqXasPOZ3hskHHK7HzBaDKPXWQ2p8HJK6lk9GzwUh2RPRqJj5BzeT6t8R/lMXhgy56M3KALuZWzXBW+iXrxsBThdoR8Z9Kgtpx971lHm1am3VYwpyEBtP24EtE5yTn+u8Fg25BoS5Y7zQtmC1m+HYwp67UkoM3EVFGlWzN9aiDRedJNNNwNRqR6hvIC6dmbPpyuzkCyx9VFeJZEibUKUprrrIFsFXDZF4IJi+DN2C33IHRY9ogLCjSGy+Ce7qKPRN9t+DJAsUurJvtCsMWbzWFMb8SnBwF x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW5PR11MB5906.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(346002)(39860400002)(396003)(136003)(366004)(376002)(26005)(53546011)(2906002)(966005)(71200400001)(4326008)(122000001)(55016003)(66476007)(41300700001)(52536014)(83380400001)(33656002)(8936002)(5660300002)(6506007)(7696005)(82960400001)(54906003)(86362001)(478600001)(110136005)(6636002)(8676002)(316002)(66556008)(38070700005)(186003)(66446008)(66946007)(9686003)(38100700002)(76116006)(64756008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?dFlOxa9vTVwSBD3I+GdIg3vwueHn4FHOB6tm5xRwm3DPOYAlZMhU1vhS9Z7d?= =?us-ascii?Q?6PK6E95JLoRMoG3JkHosyLrr1cgPZpf1YFos0rqKPca+FvBCTNBhAFvArUSB?= =?us-ascii?Q?dMXMMOl8xnO0ExxkMaVx0XtJaYNs/HRHN7oROyuEYYD0YLxzZjGijN5vIwDy?= =?us-ascii?Q?AvmbnF2VFEHLtbNl5DF5HxDC00nGm0IqaX/sc9wzIf8MB0gNY9sOvEIaiZZG?= =?us-ascii?Q?Ytpgkncwbv4ERZ2XSKZAbPeqmcnqemaoOmxLSlhRAJQMNdhDh9127iYMOA2k?= =?us-ascii?Q?eSWAzz6FCSnJ+ENNMhIMmcb2n6bbffjGQJ6n5sSPJtmyTAX18PpSs4wxPWDM?= =?us-ascii?Q?0VUOxBQXRSsbgQmIudZtmCHeYIETiBriJD+VEFvwUcWzdmZ+mI0L59vAE0yG?= =?us-ascii?Q?DUZfj8KvMO65KdEBfs9YXTuV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-ascii?Q?fl6rLWg33wcxoVnrl+psiJKtdcE31eAw//qfm+sazCsI6DfyP4D27AIJI59A?= =?us-ascii?Q?SHOiNyAFCXbiT0u0K1ScOa3v4mmgSh0rVtJcs04adqmKo0o2AUR+Nd65VnAB?= =?us-ascii?Q?Gc3BLPRX2MlhOsNlSzxJDSfr472Hpu/W3C/WBSsgl7ZUeoHDAKTnyJBLs8BO?= =?us-ascii?Q?MYUQwz9xOmlWIi8RPSXsiciKH64ZIPYM0lgFlWm7KfSzxFAytgoRNxw8T8zD?= =?us-ascii?Q?Xa43StpZee1s5Czd43BvPilA27p619NPLZ0C4wCv?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW5PR11MB5906.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 484f46e7-67b2-4639-7682-08da6b89e3cd X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jul 2022 02:28:40.2775 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: l1Ry9lkegW1t3daqY2TMGRmC20mWcGG1HILvyQ0f5+Dx33/uLJpVPFeB5Sj0vhdVtAsgXzM22aRUlbLAhDS+sw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3796 Return-Path: yuwei.chen@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Yi, Could you describe the bug with an example? In which scenario the dsc defin= ed pcd will not override the dec definition?=20 Thanks, Christine > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of yi1 li > Sent: Monday, July 11, 2022 1:48 PM > To: devel@edk2.groups.io > Cc: Li, Yi1 ; Feng, Bob C ; Gao, > Liming > Subject: [edk2-devel] [PATCH 1/1] BaseTools: INF should use latest Pcd va= lue > instead of default value >=20 > This patch is a bug fix about FeatureFlagExpression in INF file: > INF [Source] section now unconditionally use Pcd default value in DEC w= hen > handling FeatureFlagExpression, it is wrong. > If a Pcd value has been set in the DSC file, we should use latest value= in DSC > instead of default value. >=20 > Cc: Bob Feng > Cc: Liming Gao >=20 > Signed-off-by: Yi Li > --- > BaseTools/Source/Python/Workspace/InfBuildData.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py > b/BaseTools/Source/Python/Workspace/InfBuildData.py > index 5b9b3d7b4f..e4ff1c6686 100644 > --- a/BaseTools/Source/Python/Workspace/InfBuildData.py > +++ b/BaseTools/Source/Python/Workspace/InfBuildData.py > @@ -1084,7 +1084,9 @@ class InfBuildData(ModuleBuildClassObject): > else: > for Name, Guid in self.Pcds: > if self.Pcds[(Name, Guid)].Type =3D=3D 'FeatureFlag' or = self.Pcds[(Name, > Guid)].Type =3D=3D 'FixedAtBuild': > - Pcds['%s.%s' % (Guid, Name)] =3D self.Pcds[(Name, > Guid)].DefaultValue > + PcdFullName =3D '%s.%s' % (Guid, Name); > + if not PcdFullName in Pcds: > + Pcds[PcdFullName] =3D self.Pcds[(Name, > + Guid)].DefaultValue > try: > Value =3D ValueExpression(Instance, Pcds)() > if Value =3D=3D True: > -- > 2.31.1.windows.1 >=20 >=20 >=20 >=20 >=20