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.43; helo=mga05.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 1DB202235228A for ; Tue, 27 Feb 2018 18:35:04 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2018 18:41:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,403,1515484800"; d="scan'208";a="204278418" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 27 Feb 2018 18:41:10 -0800 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 27 Feb 2018 18:41:10 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 27 Feb 2018 18:41:09 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.125]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.116]) with mapi id 14.03.0319.002; Wed, 28 Feb 2018 10:41:08 +0800 From: "Gao, Liming" To: Leif Lindholm , Ard Biesheuvel CC: "edk2-devel@lists.01.org" , "Zhu, Yonghong" Thread-Topic: [PATCH] BaseTools/tools_def: use separate PP definition for DTC Thread-Index: AQHTr/naJ2gYUo64vEux4CsOH6CSuqO4E7eAgAABJACAABB9gIAA9dpw Date: Wed, 28 Feb 2018 02:41:07 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1D47B8@SHSMSX104.ccr.corp.intel.com> References: <20180227175132.1607-1-ard.biesheuvel@linaro.org> <20180227183327.lg6juoabvbc3jute@bivouac.eciton.net> <20180227185801.6d7mgbkaqtxppcid@bivouac.eciton.net> <20180227200107.6degkvddcd46dlba@bivouac.eciton.net> In-Reply-To: <20180227200107.6degkvddcd46dlba@bivouac.eciton.net> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] BaseTools/tools_def: use separate PP definition for DTC 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: , X-List-Received-Date: Wed, 28 Feb 2018 02:35:05 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Leif Lindholm [mailto:leif.lindholm@linaro.org] > Sent: Wednesday, February 28, 2018 4:01 AM > To: Ard Biesheuvel > Cc: edk2-devel@lists.01.org; Gao, Liming ; Zhu, Yon= ghong > Subject: Re: [PATCH] BaseTools/tools_def: use separate PP definition for = DTC >=20 > On Tue, Feb 27, 2018 at 07:02:06PM +0000, Ard Biesheuvel wrote: > > On 27 February 2018 at 18:58, Leif Lindholm = wrote: > > > On Tue, Feb 27, 2018 at 06:36:08PM +0000, Ard Biesheuvel wrote: > > >> On 27 February 2018 at 18:33, Leif Lindholm wrote: > > >> > On Tue, Feb 27, 2018 at 05:51:32PM +0000, Ard Biesheuvel wrote: > > >> >> Clang's preprocessor behaves differently from GCC's, and produces > > >> >> intermediate device tree source that still contains #pragma pack(= ) > > >> >> and other directives that the device tree compiler chokes on. > > >> >> > > >> >> For assembling device tree sources, it matters very little which > > >> >> preprocessor is being used, so let's just use GNU CPP explicitly. > > >> > > > >> > Ah, right, same fundamental issue as > > >> > 5b8766bb92debfa7b2f45a4a6d683b4227360d66. > > >> > > >> Yes, and I fail to see why changing just those two files makes a > > >> meaningful difference. > > > > > > Probably because Secure96Dxe.inf has a lot more [Packages] and > > > [LibraryClasses] dependencies than DeveloperBox.inf. > > > > > > This patch would undoubtedly also have resolved that issue. > > > (As would clang preprocessor not throwing out C syntax when explicitl= y > > > asked to provide asm.) > > > > > >> > However, this time triggered by autogen seemingly forcing inclusio= n of > > >> > lots of central header files that are not even used, like > > >> > MdePkg/Include/IndustryStandard/Bluetooth.h > > >> > MdePkg/Include/IndustryStandard/Acpi10.h > > >> > and so on. > > >> > > > >> > Is there any way to suppress these implicit includes from .dts > > >> > processing? > > >> > > >> There is 'Trim', which can filter #include'd content, but using that > > >> also robs us of the ability to #include .dtsi files, which was kind = of > > >> the point of using the preprocessor in the first place. > > > > > > Yeah, that'd definitely be missing the point slightly. > > > > > > I was thinking more along the lines of either excluding the autogen > > > bits from the preprocessing or using a separate .inf for the .dts. > > > > > > > We need the AutoGen.h bits for the fixed PCD values, which was the > > other reason for using the preprocessor in the first place. >=20 > Yeah, I was afraid of that. >=20 > > Separate .inf would mean registering file GUIDs in the package .DEC, > > so that the driver can find the binary image at runtime, which is what > > I was trying to get away from by pulling it into the driver, > > especially because we are dealing with overlay DT snippets, of which > > there may be many, rather than a single DT (with a well known file > > GUID) for the entire platform. > > > > > If neither of those feels practical, the proposed patch is fine. > > > It just feels a little bit clunky. > > > > Yeah, I don't see any unclunky solutions, unfortunately. >=20 > Fair enough. > Reviewed-by: Leif Lindholm