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.136; helo=mga12.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 A0589211F8871 for ; Mon, 25 Jun 2018 21:40:42 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jun 2018 21:40:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,273,1526367600"; d="scan'208";a="240288804" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga005.fm.intel.com with ESMTP; 25 Jun 2018 21:40:41 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 25 Jun 2018 21:40:41 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 25 Jun 2018 21:40:41 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.87]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.82]) with mapi id 14.03.0319.002; Tue, 26 Jun 2018 12:40:39 +0800 From: "Gao, Liming" To: Chris Co , Ard Biesheuvel CC: "edk2-devel@lists.01.org" , Leif Lindholm , Charles Garcia-Tobin Thread-Topic: [edk2] [PATCH v2 1/1] BaseTools/tools_def: Add GCC49xASL Toolchain support Thread-Index: AQHUCo025Yvcza0FRU+cJ4rJFggoQqRwNGbQ///eGoCAAIhEMIAALK6AgAEyxiA= Date: Tue, 26 Jun 2018 04:40:38 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E29DED3@SHSMSX104.ccr.corp.intel.com> References: <20180623005740.43200-1-christopher.co@microsoft.com> <20180623005740.43200-2-christopher.co@microsoft.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E29D4B5@SHSMSX104.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E29D7EF@SHSMSX104.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2 1/1] BaseTools/tools_def: Add GCC49xASL Toolchain support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 04:40:42 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Chris: Here is the example usage. You can add below [BuildOptions] in your platf= orm DSC. Then, it will use override ASL path and flag.=20 [BuildOptions] *_*_*_ASL_PATH =3D=3D C:\Asl\asl.exe *_*_*_ASL_FLAGS =3D=3D /MsftInternal *_*_*_ASL_OUTFLAGS =3D=3D /Fo=3D Thanks Liming >-----Original Message----- >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of >Chris Co >Sent: Tuesday, June 26, 2018 2:21 AM >To: Gao, Liming ; Ard Biesheuvel > >Cc: edk2-devel@lists.01.org; Leif Lindholm ; Cha= rles >Garcia-Tobin >Subject: Re: [edk2] [PATCH v2 1/1] BaseTools/tools_def: Add GCC49xASL >Toolchain support > > > >> -----Original Message----- >> From: Gao, Liming >> Sent: Monday, June 25, 2018 1:15 AM >> To: Ard Biesheuvel >> Cc: Chris Co ; edk2-devel@lists.01.org; Le= if >> Lindholm ; Charles Garcia-Tobin > Tobin@arm.com> >> Subject: RE: [edk2] [PATCH v2 1/1] BaseTools/tools_def: Add GCC49xASL >> Toolchain support >> >> Ard: >> The commit log message says that the Microsoft ASL compiler is necessa= ry >> to expose Windows-specific Pin Function Config Descriptors on Windows Io= T >> devices. >> > >I'll add a bit more detail here. Prior to the inclusion of Pin Function D= escriptors >in the 6.2 spec, we added a vendor-specific descriptor through the MSFT AS= L >compiler with /MsftInternal flag which essentially implemented the >functionality of the proposed Pin Function Config Descriptors so that pins >could be exposed to user-mode applications. Now that the spec is updated >and the standard ASL compiler supports the new descriptors, I wanted to >move us to the standardized ASL compiler but was disappointed to find out >that Windows has not been enlightened to process the Pin Function Config >Descriptor yet. So we still need this fall back to the MSFT ASL compiler = with >/MsftInternal flag while I work with the ACPI team here to implement these >descriptors. My hope is that in the next year I can move us back to the >standard ASL compiler. > >> Besides, there is no ways to configure tool chain with the parameter i= n >build >> command. But, tool chain ASL path and flag can be overridden in >> [BuildOptions] of platform DSC file. Another way is to provide the gener= ic >> DSC file to include MS ASL option setting in [BuildOptions] section. Pla= tform >> DSC can decide to include it or not. >> > >Since the MS ASL really only impacts Windows IoT boards, platform dsc >overrides on the Windows IoT ARM boards might be a better option here. > >> Thanks >> Liming >> >-----Original Message----- >> >From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] >> >Sent: Monday, June 25, 2018 3:34 PM >> >To: Gao, Liming >> >Cc: Chris Co ; edk2-devel@lists.01.org; >> >Leif Lindholm ; Charles Garcia-Tobin >> > >> >Subject: Re: [edk2] [PATCH v2 1/1] BaseTools/tools_def: Add GCC49xASL >> >Toolchain support >> > >> >(+ Charles) >> > >> >On 25 June 2018 at 03:38, Gao, Liming wrote: >> >> Chris: >> >> GCC 4.9 targeting arm-none-eabi. This GCC4.9 should run in Windows >> OS. >> >So, could you give some info where windows GCC49 is from. >> >> > >We get Windows GCC49 from linaro: >https://releases.linaro.org/archive/14.09/components/toolchain/binaries/gc= c >-linaro-arm-none-eabi-4.9-2014.09_win32.zip >Make comes from MinGW > >> > >> >OK, so first of all, could you elaborate on why we need a different ASL >> >compiler? We have spent the past 5 years in conference calls and >> >meeting rooms to standardize ACPI on ARM, so I am rather disappointed >> >that we have this discrepancy. >> > >> >Then, could you explain why you chose GCC49? We have GCC5 now as well, >> >which enables LTO and generally results in smaller code. Also, is there >> >any way we could parameterize the existing GCCx toolchains to allow a >> >different ASL compiler to be selected? >> > > >We are using GCC49 because this was the last GCC build for Windows as exe >we could find. We use these tools to build using GCC on Windows: >https://releases.linaro.org/archive/14.09/components/toolchain/binaries/gc= c >-linaro-arm-none-eabi-4.9-2014.09_win32.zip >I would love to use GCC5 if toolchain exes are readily available for Windo= ws. > >There are two main deltas between existing GCCx toolchains and the one I a= m >adding here: ASL compiler delta and echo/noop delta. >The ASL delta was discussed above. We have one more delta: >(*_GCC49xASL_ARM_OBJCOPY_PATH =3D noop, >*_GCC49xASL_ARM_SYMRENAME_PATH =3D noop). On Linux, these are set >to `echo` which effectively no-ops them. On Windows, echo behaves >differently and unfortunately there's no clean Windows command to noop, so >we made a noop.exe program and added it to our build tools. If we can fin= d a >way to parameterize the existing GCCx toolchain to select command based on >build environment, then I think this patch can be dropped in favor of reus= ing >the existing GCCx chain. > >> >Thanks, >> >Ard. >> > >> > >> >>>-----Original Message----- >> >>>From: Chris Co [mailto:Christopher.Co@microsoft.com] >> >>>Sent: Saturday, June 23, 2018 8:58 AM >> >>>To: edk2-devel@lists.01.org >> >>>Cc: Zhu, Yonghong ; Gao, Liming >> >>>; Leif Lindholm >> >>>Subject: [PATCH v2 1/1] BaseTools/tools_def: Add GCC49xASL Toolchain >> >>>support >> >>> >> >>>From: Chris Co >> >>> >> >>>This patch adds a build option for invoking GCC49 ARM cross compiler >> >>>in the Windows environment to build firmware for Windows 10 IoT >> >>>devices using NXP i.MX6 and i.MX7 SoCs. >> >>> >> >>>In addition, this build option targets the Microsoft ASL compiler >> >>>instead of iasl. The Microsoft ASL compiler is necessary to expose >> >>>Windows-specific Pin Function Config Descriptors on Windows IoT >> >>>devices. >> >>> >> >>>Contributed-under: TianoCore Contribution Agreement 1.1 >> >>>Signed-off-by: Christopher Co >> >>>Cc: Yonghong Zhu >> >>>Cc: Liming Gao >> >>>Cc: Leif Lindholm >> >>>--- >> >>> BaseTools/Conf/tools_def.template | 61 ++++++++++++++++++++ >> >>> 1 file changed, 61 insertions(+) >> >>> >> >>>diff --git a/BaseTools/Conf/tools_def.template >> >>>b/BaseTools/Conf/tools_def.template >> >>>index 11a79029b890..f7a375ebaf1e 100755 >> >>>--- a/BaseTools/Conf/tools_def.template >> >>>+++ b/BaseTools/Conf/tools_def.template >> >>>@@ -393,6 +393,12 @@ DEFINE DTC_BIN =3D ENV(DTC_PREFI= X)dtc >> >>> # Required to build platforms or ACPI ta= bles: >> >>> # Intel(r) ACPI Compiler from >> >>> # >> >https://na01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Facpica. >> org%2Fdownloads&data=3D02%7C01%7CChristopher.Co%40microsoft.co >> >m%7C04783c7442e045028b6b08d5da73c590%7C72f988bf86f141af91ab2d7cd0 >> 11db47%7C1%7C0%7C636655113127087911&sdata=3DrekWKjfTCvj%2FCv >> mXi%2FtAcEOw7ooGMYGo6uyKoNCL0os%3D&reserved=3D0 >> >>>+# GCC49xASL -Windows- Requires: >> >>>+# GCC 4.9 targeting arm-none-eabi >> >>>+# Optional: >> >>>+# Required to build platforms or ACPI ta= bles: >> >>>+# Microsoft ASL ACPI Compiler (asl.exe= ) from Windows >> >WDK >> >>>+# >> https://na01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fdocs. >> microsoft.com%2Fen-us%2Fwindows- >> &data=3D02%7C01%7CChristopher.Co%40microsoft.com%7C04783c7442e >> 045028b6b08d5da73c590%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0 >> %7C636655113127087911&sdata=3DOEHhpxkYbIqRmALJeMDjp4RekTgVK >G >> 6dlmdmYa3HNOg%3D&reserved=3D0 >> >>>hardware/drivers/download-the-wdk >> >>> # GCC5 -Linux,Windows- Requires: >> >>> # GCC 5 with LTO support, targeting x86_= 64-linux-gnu, >> >aarch64- >> >>>linux-gnu, or arm-linux-gnueabi >> >>> # Optional: >> >>>@@ -5466,6 +5472,61 @@ RELEASE_GCC49_AARCH64_DLINK_FLAGS =3D >> >>>DEF(GCC49_AARCH64_DLINK_FLAGS) >> >>> NOOPT_GCC49_AARCH64_DLINK_FLAGS =3D >> >>>DEF(GCC49_AARCH64_DLINK_FLAGS) -z common-page-size=3D0x1000 -O0 >> >>> NOOPT_GCC49_AARCH64_DLINK_XIPFLAGS =3D -z common-page- >> size=3D0x20 >> >- >> >>>O0 >> >>> >> >>>+###################################################### >> ## >> >## >> >>>########################## >> >>>+# >> >>>+# GCC49xASL - This configuration is used to compile under Windows to >> >>>produce >> >>>+# PE/COFF binaries using GCC 4.9. >> >>>+# >> >>>+###################################################### >> ## >> >## >> >>>########################## >> >>>+*_GCC49xASL_*_*_FAMILY =3D GCC >> >>>+ >> >>>+*_GCC49xASL_*_MAKE_PATH =3D >> DEF(GCC_HOST_PREFIX)make >> >>>+*_GCC49xASL_*_*_DLL =3D ENV(GCC49_DLL) >> >>>+*_GCC49xASL_*_ASL_PATH =3D DEF(WIN_ASL_BIN) >> >>>+ >> >>>+*_GCC49xASL_*_PP_FLAGS =3D DEF(GCC_PP_FLAGS) >> >>>+*_GCC49xASL_*_ASLPP_FLAGS =3D DEF(GCC_ASLPP_FLAGS) >> >>>+*_GCC49xASL_*_ASLCC_FLAGS =3D DEF(GCC_ASLCC_FLAGS) >> >>>+*_GCC49xASL_*_VFRPP_FLAGS =3D DEF(GCC_VFRPP_FLAGS) >> >>>+*_GCC49xASL_*_APP_FLAGS =3D >> >>>+*_GCC49xASL_*_ASL_FLAGS =3D /MsftInternal >> >>>+*_GCC49xASL_*_ASL_OUTFLAGS =3D DEF(MS_ASL_OUTFLAGS) >> >>>+ >> >>>+################## >> >>>+# GCC49xASL ARM definitions >> >>>+################## >> >>>+*_GCC49xASL_ARM_OBJCOPY_PATH =3D noop >> >>>+*_GCC49xASL_ARM_CC_PATH =3D ENV(GCC49_ARM_PREFIX)gcc >> >>>+*_GCC49xASL_ARM_SLINK_PATH =3D ENV(GCC49_ARM_PREFIX)ar >> >>>+*_GCC49xASL_ARM_DLINK_PATH =3D >ENV(GCC49_ARM_PREFIX)gcc >> >>>+*_GCC49xASL_ARM_ASLDLINK_PATH =3D >> ENV(GCC49_ARM_PREFIX)gcc >> >>>+*_GCC49xASL_ARM_ASM_PATH =3D >ENV(GCC49_ARM_PREFIX)gcc >> >>>+*_GCC49xASL_ARM_PP_PATH =3D ENV(GCC49_ARM_PREFIX)gcc >> >>>+*_GCC49xASL_ARM_VFRPP_PATH =3D >> ENV(GCC49_ARM_PREFIX)gcc >> >>>+*_GCC49xASL_ARM_ASLCC_PATH =3D >ENV(GCC49_ARM_PREFIX)gcc >> >>>+*_GCC49xASL_ARM_ASLPP_PATH =3D >ENV(GCC49_ARM_PREFIX)gcc >> >>>+*_GCC49xASL_ARM_RC_PATH =3D >> >ENV(GCC49_ARM_PREFIX)objcopy >> >>>+*_GCC49xASL_ARM_SYMRENAME_PATH =3D noop >> >>>+ >> >>>+*_GCC49xASL_ARM_ARCHCC_FLAGS =3D -mthumb >> >>>+*_GCC49xASL_ARM_PLATFORM_FLAGS =3D -march=3Darmv7-a >> >>>+ >> >>>+*_GCC49xASL_ARM_ASLCC_FLAGS =3D DEF(GCC_ASLCC_FLAGS) >> >>>+*_GCC49xASL_ARM_ASLDLINK_FLAGS =3D >> >>>DEF(GCC49_ARM_ASLDLINK_FLAGS) >> >>>+*_GCC49xASL_ARM_ASM_FLAGS =3D >> DEF(GCC49_ARM_ASM_FLAGS) >> >>>+*_GCC49xASL_ARM_DLINK_FLAGS =3D >> >DEF(GCC49_ARM_DLINK_FLAGS) >> >>>+*_GCC49xASL_ARM_DLINK2_FLAGS =3D >> >DEF(GCC49_ARM_DLINK2_FLAGS) >> >>>+*_GCC49xASL_ARM_DTCPP_FLAGS =3D DEF(GCC_DTCPP_FLAGS) >> >>>+*_GCC49xASL_ARM_PLATFORM_FLAGS =3D -march=3Darmv7-a >> >>>+*_GCC49xASL_ARM_PP_FLAGS =3D $(ARCHCC_FLAGS) >> >>>$(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS) >> >>>+*_GCC49xASL_ARM_RC_FLAGS =3D DEF(GCC_ARM_RC_FLAGS) >> >>>+*_GCC49xASL_ARM_VFRPP_FLAGS =3D $(ARCHCC_FLAGS) >> >>>$(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS) >> >>>+*_GCC49xASL_ARM_CC_XIPFLAGS =3D >> DEF(GCC49_ARM_CC_XIPFLAGS) >> >>>+ >> >>>+ DEBUG_GCC49xASL_ARM_CC_FLAGS =3D >> DEF(GCC49_ARM_CC_FLAGS) >> >- >> >>>O0 >> >>>+RELEASE_GCC49xASL_ARM_CC_FLAGS =3D >> DEF(GCC49_ARM_CC_FLAGS) >> >- >> >>>Wno-unused-but-set-variable -Wno-unused-const-variable >> >>>+ NOOPT_GCC49xASL_ARM_CC_FLAGS =3D >> DEF(GCC49_ARM_CC_FLAGS) >> >- >> >>>O0 >> >>>+ >> >>> >> >>>####################################################### >> ## >> >## >> >>>######################### >> >>> # >> >>> # GCC 5 - This configuration is used to compile under Linux to >> >>>produce >> >>>-- >> >>>2.16.2.gvfs.1.33.gf5370f1 >> >> >> >> _______________________________________________ >> >> edk2-devel mailing list >> >> edk2-devel@lists.01.org >> >> https://na01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fli= st >> >> s.01.org%2Fmailman%2Flistinfo%2Fedk2- >> devel&data=3D02%7C01%7CChristo >> >> >> >pher.Co%40microsoft.com%7C04783c7442e045028b6b08d5da73c590%7C72f9 >> 88bf >> >> >> >86f141af91ab2d7cd011db47%7C1%7C0%7C636655113127087911&sdata=3D >> WLQCR >> >> O6Olja0J14OBnX1PSsdXnTYEXDMki9fN7CuAHs%3D&reserved=3D0 >_______________________________________________ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel