From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) by mx.groups.io with SMTP id smtpd.web11.1502.1587368531470082717 for ; Mon, 20 Apr 2020 00:42:12 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=n1 header.b=JwuR/CfV; spf=pass (domain: nvidia.com, ip: 203.18.50.4, mailfrom: ashishsingha@nvidia.com) Received: from hkpgpgate101.nvidia.com (Not Verified[10.18.92.77]) by nat-hk.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 20 Apr 2020 15:42:08 +0800 Received: from HKMAIL102.nvidia.com ([10.18.16.11]) by hkpgpgate101.nvidia.com (PGP Universal service); Mon, 20 Apr 2020 00:42:08 -0700 X-PGP-Universal: processed; by hkpgpgate101.nvidia.com on Mon, 20 Apr 2020 00:42:08 -0700 Received: from HKMAIL104.nvidia.com (10.18.16.13) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 20 Apr 2020 07:42:07 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) by HKMAIL104.nvidia.com (10.18.16.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Mon, 20 Apr 2020 07:42:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lP+IIy2MH3GOgTQWdhd3HvEYENWzDfZ8HeRK8vFzXnPaS5a37rIfShJwYuYh4o4u6sowQuGViZgQjotesMW/gh7ut2eFWnh9oILjVeqFy5atvd/KDwY0euQrmRDabIWgkFhls927sabIJj0uiFE9MOqpuepYFBYoQQ8JvylHW3XbxlIondPZF0wsSa//+/0RWlhX20xLkz1/Y3SRc1CpPkot+WIFtbZumRoR9EbA5Dvbq9XSmNOP73PVrFyvAcePVgD2LXslCRoJV1Yh+jaPpS219ZNmPdOhZ5pihJh99dpe+os845os1f87u7GCa1d7TFJ1lakF5o42wfIe7I/vlQ== 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-SenderADCheck; bh=WsJ0x+Z4Ula0VeWy6JDxFWi9H5VbrMoy2z3GurnQ1gA=; b=W+RKFGN6Z+qnCQZ2x41RjxtpZ8wxJJ2l2F4WKOBoXnS4Bz1nOOEYWQdx+KQ3Ivitm6cCOrgHVBv0pBfi3fzDkEZIaNs35/oFLzXJsXJTQUTT/p4+KbyGL/gJyONUlgFnnH529ipd6uKCh+Qb/DaaIu8QEGvsVhqdo6K1bLQ2aZLxc8wf2NVrNt85DWOvrKi0/WSrFwiHbCSkF5EpUt9TjsZvXrAj4Co8FkNKI5iiWo7vwMO8tIEecJuH0Mg90gwNTywM1nRT7eCjhYjzqmNxzJBLNuI16HglKAHRw+T43+zcuyKBjGe+uTCJBdwhcUuJ5lRWX7bQYpcrdu5s48SldA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from BYAPR12MB2726.namprd12.prod.outlook.com (2603:10b6:a03:66::17) by BYAPR12MB2631.namprd12.prod.outlook.com (2603:10b6:a03:6b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.26; Mon, 20 Apr 2020 07:42:03 +0000 Received: from BYAPR12MB2726.namprd12.prod.outlook.com ([fe80::61e1:6a43:d8b:f7a4]) by BYAPR12MB2726.namprd12.prod.outlook.com ([fe80::61e1:6a43:d8b:f7a4%6]) with mapi id 15.20.2921.027; Mon, 20 Apr 2020 07:42:03 +0000 From: "Ashish Singhal" To: "Lin, Derek (HPS SW)" , "devel@edk2.groups.io" , Bob Feng , "Gao, Liming" Subject: Re: [edk2-devel] Conditionally Include FDF File Thread-Topic: [edk2-devel] Conditionally Include FDF File Thread-Index: AQHWFtKZxMAU2rFjGkuX7RWe3+BlnKiBiO6AgAAKlLSAAAypfw== Date: Mon, 20 Apr 2020 07:42:03 +0000 Message-ID: References: ,<25824.1587363415325446652@groups.io>, In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=ashishsingha@nvidia.com; x-originating-ip: [216.228.112.22] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d40f1d20-1e9a-4fc8-75d5-08d7e4fe5195 x-ms-traffictypediagnostic: BYAPR12MB2631: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 03793408BA x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR12MB2726.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10009020)(366004)(39860400002)(376002)(346002)(396003)(136003)(19627405001)(26005)(7696005)(66946007)(9686003)(52536014)(55016002)(66476007)(76116006)(66446008)(64756008)(66556008)(2940100002)(71200400001)(81156014)(8676002)(296002)(316002)(33656002)(2906002)(186003)(5660300002)(6506007)(53546011)(86362001)(8936002)(110136005)(478600001);DIR:OUT;SFP:1101; received-spf: None (protection.outlook.com: nvidia.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: x8RzycfY5Pm7Sg5fo1orDVhVVNE8Nh07Zwme79PDn1ttxgoi8EBRtKEglhNegCX4ki4qFDrGAl0MYHWk5c5qViUBGWC+qjiQxt3C7fUwpcnyNpDePlqJhTlWwFGwm3o9Q11+Bxurxkce02QSaNjE2yrC44BdSpNAIEVhzu4I3Xh2rtwEr18Roz7LjwTGHnXZt1XqhA1jk2U84TdJmdeON+h3EfNNTqV9CnkPuuUXOZylRXXYsvKKwBkuUKpK7We6II+WmSEfrLrAaugeK0xPaiUlVA2qiVm8N+MlgWzJr/98AgOOLeOZ63Vtjg0Gf5R04zwnfLd6eLcXJFzYd480eNVN539B5Z/mEXZza9tyJF0d3Gd117+vN13Ug+3buVoVvAd+0KP3rkSk7pZttz1tilbIha96LGgtZsIDW2vfcxcAmr+RXZdQoJVOETrloZ6k x-ms-exchange-antispam-messagedata: Kltw+GKNkpJEsbzNRQySpu7Sllgd7zmFhvfnpj4RtMz4O79S0nO0zR6PdXgUaSaNmxKYK+h5GMbrr6v/Ux7j0dREi1MHtlbTlKZDrQW3jTRFLvlkbwGHwCaIVMPVeNjDOePPjEFx6CKP3ksA9pHD8g== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: d40f1d20-1e9a-4fc8-75d5-08d7e4fe5195 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2020 07:42:03.6890 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Vm0k/EBRtLERJsIuxDmkU0QCr5t7UoUQPnBbju/08OsQfARhQScKZSf09Edu64zkrLniLyONixvWbjg1COqhmg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2631 Return-Path: ashishsingha@nvidia.com X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1587368528; bh=ie/ufFWOiI9k/+WsQg9R51UCfG9718eyz02n+EQB4ug=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:X-MS-Has-Attach:X-MS-TNEF-Correlator: authentication-results:x-originating-ip:x-ms-publictraffictype: x-ms-office365-filtering-correlation-id:x-ms-traffictypediagnostic: x-microsoft-antispam-prvs:x-ms-oob-tlc-oobclassifiers: x-forefront-prvs:x-forefront-antispam-report:received-spf: x-ms-exchange-senderadcheck:x-microsoft-antispam: x-microsoft-antispam-message-info: x-ms-exchange-antispam-messagedata:x-ms-exchange-transport-forked: MIME-Version:X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg: Content-Language:Content-Type; b=JwuR/CfV0SA+EoxwBvHp9pzIhacJtPg8uRUKz62xi0Ac33YDQm8sXd7IwpgObGd5B KaiFVo3q2svt0vlX8aH/D2//dknkkimRlz/E/d6cvciy0/Mho0j6Yj7fERLbm4vnfx MdifrkskHgYfiBEgbMD1qQT9hNxhr+X2nB4qVO3X7FSRCulJFbEkShlF4HDzr252WZ oq8KMhLLFR/rbAF/glSMEdVcIQ8cjInQyzfUaM7M8XfWWlfdCJ546B6E7JOaD5rXFp 2IyeUiyObbfhQBiO0UuQXt/xpTCHumJgz6Usw62ejnGTED41NMTNrFmtGnTZyVZa0E /2UlPCJJSVuPA== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BYAPR12MB27265EA79761EBA258476A25BAD40BYAPR12MB2726namp_" --_000_BYAPR12MB27265EA79761EBA258476A25BAD40BYAPR12MB2726namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Spoke to soon. My change works for the case where BUILD_PLATFORM_XYZ is n= ot defined but the case where it is defined I guess INCLUDE_XYZ_FDF needs= =20to be defined in a different way with proper escape characters. Thanks Ashish ________________________________ From: Ashish Singhal Sent: Monday, April 20, 2020 1:07 AM To: Lin, Derek (HPS SW) ; devel@edk2.groups.io ; Bob Feng ; Gao, Liming Subject: Re: [edk2-devel] Conditionally Include FDF File It seems like this is happening because in FdfParser.py, include files ar= e processed before processing the conditional statements. I think this is= =20being done so that all defines (even from the included files) can be a= ccounted for before processing any conditionals. This seems to be a valid= =20flow from pre-processing perspective, although this leaves out the use= =20case where a file may be conditionally included. Bob/Liming, For now, I have fixed the issue by changing my conditional include to be = the following: In top-level FDF: !ifdef $(BUILD_PLATFORM_XYZ) =20 $(INCLUDE_XYZ_FDF) !endif In top-level DSC: !ifdef $(BUILD_PLATFORM_XYZ) =20 INCLUDE_XYZ_FDF =3D !include Platform/NVIDIA/XYZ.fdf.inc !endif Please suggest me if there is a batter way of working around this issue. Thanks Ashish ________________________________ From: Lin, Derek (HPS SW) Sent: Monday, April 20, 2020 12:16 AM To: Ashish Singhal ; devel@edk2.groups.io Subject: Re: [edk2-devel] Conditionally Include FDF File External email: Use caution opening links or attachments I saw this issue too. The included file is always included no matter the condition is TRUE or F= ALSE. ``` !if FALSE =20 !include abc.fdf !endif ``` -------------------------------------------------------------------------= ---------- This email message is for the sole use of the intended recipient(s) and m= ay contain confidential information. Any unauthorized review, use, disclosure or di= stribution is prohibited. If you are not the intended recipient, please contact the= =20sender by reply email and destroy all copies of the original message. -------------------------------------------------------------------------= ---------- --_000_BYAPR12MB27265EA79761EBA258476A25BAD40BYAPR12MB2726namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Spoke to soon. My change works for the case where BUILD_PLATFORM_XYZ is not defin= ed but the case where it is defined I guess INCLUDE_XYZ_FDF =20needs to be defined in a different way with proper escape characters.<= /span>

Thanks
Ashish

From: Ashish Singhal &l= t;ashishsingha@nvidia.com>
Sent: Monday, April 20, 2020 1:07 AM
To: Lin, Derek (HPS SW) <derek.lin2@hpe.com>; devel@edk2.gro= ups.io <devel@edk2.groups.io>; Bob Feng <bob.c.feng@intel.com>= ;; Gao, Liming <liming.gao@intel.com>
Subject: Re: [edk2-devel] Conditionally Include FDF File
 
It seems like this is happening because in FdfParser.py, include files ar= e processed before processing the conditional statements. I think this is= =20being done so that all defines (even from the included files) can be a= ccounted for before processing any conditionals. =20This seems to be a valid flow from pre-processing perspective, althoug= h this leaves out the use case where a file may be conditionally included= .

Bob/Liming,

For now, I have fixed the issue by changing my conditional include to be = the following:

In top-level FDF:
!ifdef $(BUILD_P= LATFORM_XYZ)
  $(INCLUDE_XYZ_FDF)
!endif

In top-level DSC:
!ifdef $(BUILD_PLATFORM_XYZ)
  INCLUDE_XYZ_FDF =3D !include Platform/NVIDIA/XYZ.fdf.inc
!endif

Please suggest me if there is a batter way of working around this issue.<= /div>

Thanks
Ashish

From: Lin, Derek (HPS= =20SW) <derek.lin2@hpe.com>
Sent: Monday, April 20, 2020 12:16 AM
To: Ashish Singhal <ashishsingha@nvidia.com>; devel@edk2.gro= ups.io <devel@edk2.groups.io>
Subject: Re: [edk2-devel] Conditionally Include FDF File
 
External email: = Use caution opening links or attachments

I saw this issue too.

The included file is always included no matter the condition is TRUE or F= ALSE.
```
!if FALSE
  !include abc.fdf
!endif
```


This email message is for the sole use of the intended recipient(s) = and may=20 contain confidential information.  Any unauthorized review, use, dis= closure=20 or distribution is prohibited.  If you are not the intended recipien= t,=20 please contact the sender by reply email and destroy all copies of the or= iginal=20 message.

--_000_BYAPR12MB27265EA79761EBA258476A25BAD40BYAPR12MB2726namp_--