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.93; helo=mga11.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 AC7A8220D4C17 for ; Tue, 14 Nov 2017 07:59:41 -0800 (PST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2017 08:03:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,395,1505804400"; d="scan'208";a="173428952" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 14 Nov 2017 08:03:48 -0800 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 14 Nov 2017 08:03:47 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 14 Nov 2017 08:03:47 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by shsmsx102.ccr.corp.intel.com ([169.254.2.175]) with mapi id 14.03.0319.002; Wed, 15 Nov 2017 00:03:45 +0800 From: "Gao, Liming" To: Pete Batard , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH 0/4] BaseTools: Add VS2017 support, including ARM and AARCH64 Thread-Index: AQHTXUS9nCx2m7fBok6Q/zNwXWJszKMT/vug Date: Tue, 14 Nov 2017 16:03:45 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E17DE72@SHSMSX104.ccr.corp.intel.com> References: <20171114123229.3516-1-pete@akeo.ie> In-Reply-To: <20171114123229.3516-1-pete@akeo.ie> 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 0/4] BaseTools: Add VS2017 support, including ARM and AARCH64 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 15:59:41 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pete: Thanks for your contribution. In fact, I have sent one patch serial to add= VS2017 tool chain for IA32 and X64. https://lists.01.org/pipermail/edk2-de= vel/2017-October/016175.html=20 In my patch, I disable warning 4701&4703, because they are also disabled i= n VS2015. In tools_def.template, to align other VS tool chain, I use VS2017= _BIN for 32bit, VS2017_BINX64 for 64bit. Could you follow this rule to defi= ne VS2017_BINARM for arm, VS2017_BINAARCH64 for AARCH64? On VS2017, I notic= e it doesn't set VS150COMNTOOLS env by default. So, I use vswhere.exe to de= tect VS2017 installation path. When we build source code with VS tool chain= , we open normal cmd instead of VS cmd. So, we need to consider the case wi= thout VS env. In your patch on ARM support, is included in Base.= h. This is a windows header file. So, VS env must be setup to build source = code with ARM arch. Right?=20 Last, I suggest you base on my patch to add VS2017 ARM and AARCH64 arch. I= will still work on VS2017 IA32 and X64. For your patches, I suggest you se= parate them per package. For example, to add ARM arch, you can create one p= atch in BaseTools, one patch in MdePkg, another one is ArmPkg.=20 Thanks Liming > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Pe= te Batard > Sent: Tuesday, November 14, 2017 8:32 PM > To: edk2-devel@lists.01.org > Subject: [edk2] [PATCH 0/4] BaseTools: Add VS2017 support, including ARM = and AARCH64 >=20 > Seeing that Visual Studio Update 4 finally added native ARM64 compilation > support and this is an open task: > https://github.com/tianocore/tianocore.github.io/wiki/Tasks >=20 > This series is broken down into: > - A preliminary patch, to eliminate new warnings that would be produced f= or > VS2017/IA32 > - IA32 + X64 support > - ARM support > - AARCH64 support >=20 > Notes: > - Considering that the multiplication of toolchain flavours is probably n= ot in > our best interest when it comes to maintenance, I deliberately chose no= t to > create extra VS2017 variants (for x64, ASL and EBC). For one thing, I h= ad > some issues with the x64 tools for ARM compilation (which may very well= have > been my own), and I'd rather see the variants being added after their n= eed > has been justified by their potential users, rather than preemptively. > - ARM and ARM64 should be considered EXPERIMENTAL at this stage. > I've had some good success compiling and running moderately complex dri= vers > (e.g. ZFS file system driver) using the proposed patches on ARM/ARM64, = and I > am also confident that simple applications should be fine, but more wor= k is > required to produce QEMU ARM/AARCH64 firmware images, mostly due to mis= sing > .asm files. Since most of the RVCT .asm files can be reused mostly unch= anged > for MSFT, I was able to cajole the ARM process to go up to the QEMU ima= ge > generation (which failed due to some alignment issue), which gives me s= ome > confidence that we should eventually be able to use the MSFT toolchain = to > produce working images for ARM and ARM64, but this will require some wo= rk. > - While the VS2017 version of IA32 and X64 do not silence any level 4 war= nings > by default, to bring them to par with VS2015, the ARM and ARM64 version= s > have to silence 3 of them, as VS is a bit less leniant than gcc/Clang. > Again, it should be possible to remove the silencing of these warnings > eventually, but this will require some work. > - Finally, you'll see that a whole section of build_rule.template had to = be > duplicated just so that we could remove the --convert-hex option for th= e > MSFT ARM/ARM64 assemblers. Maybe there is a better way to achieve the > removal of that option, but I haven't found it. >=20 > Regards, >=20 > /Pete >=20 > Pete Batard (4): > MdeModulePkg, NetworkPkg: Fix VS2017 IA32 warnings > BaseTools: Add VS2017 IA32 and X64 support > BaseTools: Add VS2017 ARM support > BaseTools: Add VS2017 AARCH64 support >=20 > ArmPkg/Library/CompilerIntrinsicsLib/Arm/rtdiv.asm = | 255 > ++++++++++++++++++++ > ArmPkg/Library/CompilerIntrinsicsLib/Arm/rtsrsh.asm = | 45 ++++ > ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf = | 13 +- > ArmPkg/Library/CompilerIntrinsicsLib/memcpy_ms.c = | 30 +++ > ArmPkg/Library/CompilerIntrinsicsLib/memset_ms.c = | 29 +++ > BaseTools/Conf/build_rule.template = | 30 +++ > BaseTools/Conf/tools_def.template = | 168 +++++++++++++ > BaseTools/set_vsprefix_envs.bat = | 9 + > MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c = | 2 +- > MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerC= ustomizedUiSupport.c | 2 +- > MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c = | 2 +- > MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c = | 2 +- > MdePkg/Include/Base.h = | 15 ++ > MdePkg/Library/BaseLib/AArch64/CpuBreakpoint.asm = | 39 +++ > MdePkg/Library/BaseLib/AArch64/DisableInterrupts.asm = | 37 +++ > MdePkg/Library/BaseLib/AArch64/EnableInterrupts.asm = | 37 +++ > MdePkg/Library/BaseLib/AArch64/GetInterruptsState.asm = | 49 ++++ > MdePkg/Library/BaseLib/AArch64/MemoryFence.asm = | 38 +++ > MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm = | 101 ++++++++ > MdePkg/Library/BaseLib/AArch64/SwitchStack.asm = | 69 ++++++ > MdePkg/Library/BaseLib/Arm/CpuBreakpoint.asm = | 5 +- > MdePkg/Library/BaseLib/BaseLib.inf = | 27 ++- > MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf = | 5 +- > MdePkg/Library/BaseStackCheckLib/BaseStackCheckNull.c = | 18 ++ > NetworkPkg/HttpBootDxe/HttpBootImpl.c = | 2 +- > NetworkPkg/HttpBootDxe/HttpBootSupport.c = | 2 +- > Nt32Pkg/Sec/SecMain.inf = | 2 + > 27 files changed, 1019 insertions(+), 14 deletions(-) > create mode 100644 ArmPkg/Library/CompilerIntrinsicsLib/Arm/rtdiv.asm > create mode 100644 ArmPkg/Library/CompilerIntrinsicsLib/Arm/rtsrsh.asm > create mode 100644 ArmPkg/Library/CompilerIntrinsicsLib/memcpy_ms.c > create mode 100644 ArmPkg/Library/CompilerIntrinsicsLib/memset_ms.c > create mode 100644 MdePkg/Library/BaseLib/AArch64/CpuBreakpoint.asm > create mode 100644 MdePkg/Library/BaseLib/AArch64/DisableInterrupts.asm > create mode 100644 MdePkg/Library/BaseLib/AArch64/EnableInterrupts.asm > create mode 100644 MdePkg/Library/BaseLib/AArch64/GetInterruptsState.asm > create mode 100644 MdePkg/Library/BaseLib/AArch64/MemoryFence.asm > create mode 100644 MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm > create mode 100644 MdePkg/Library/BaseLib/AArch64/SwitchStack.asm > create mode 100644 MdePkg/Library/BaseStackCheckLib/BaseStackCheckNull.c >=20 > -- > 2.14.2 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel