public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: Pete Batard <pete@akeo.ie>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH 0/4] BaseTools: Add VS2017 support, including ARM and AARCH64
Date: Tue, 14 Nov 2017 16:03:45 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E17DE72@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20171114123229.3516-1-pete@akeo.ie>

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-devel/2017-October/016175.html 
 In my patch, I disable warning 4701&4703, because they are also disabled in 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 define VS2017_BINARM for arm, VS2017_BINAARCH64 for AARCH64? On VS2017, I notice it doesn't set VS150COMNTOOLS env by default. So, I use vswhere.exe to detect 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 without VS env. In your patch on ARM support, <stdarg.h> 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? 
 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 separate them per package. For example, to add ARM arch, you can create one patch in BaseTools, one patch in MdePkg, another one is ArmPkg. 

Thanks
Liming
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Pete 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
> 
> 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
> 
> This series is broken down into:
> - A preliminary patch, to eliminate new warnings that would be produced for
>   VS2017/IA32
> - IA32 + X64 support
> - ARM support
> - AARCH64 support
> 
> Notes:
> - Considering that the multiplication of toolchain flavours is probably not in
>   our best interest when it comes to maintenance, I deliberately chose not to
>   create extra VS2017 variants (for x64, ASL and EBC). For one thing, I had
>   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 need
>   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 drivers
>   (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 work is
>   required to produce QEMU ARM/AARCH64 firmware images, mostly due to missing
>   .asm files. Since most of the RVCT .asm files can be reused mostly unchanged
>   for MSFT, I was able to cajole the ARM process to go up to the QEMU image
>   generation (which failed due to some alignment issue), which gives me some
>   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 work.
> - While the VS2017 version of IA32 and X64 do not silence any level 4 warnings
>   by default, to bring them to par with VS2015, the ARM and ARM64 versions
>   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 the
>   MSFT ARM/ARM64 assemblers. Maybe there is a better way to achieve the
>   removal of that option, but I haven't found it.
> 
> Regards,
> 
> /Pete
> 
> 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
> 
>  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/BootMaintenanceManagerCustomizedUiSupport.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
> 
> --
> 2.14.2
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


  parent reply	other threads:[~2017-11-14 15:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-14 12:32 [PATCH 0/4] BaseTools: Add VS2017 support, including ARM and AARCH64 Pete Batard
2017-11-14 12:32 ` [PATCH 1/4] MdeModulePkg, NetworkPkg: Fix VS2017 IA32 warnings Pete Batard
2017-11-14 12:32 ` [PATCH 2/4] BaseTools: Add VS2017 IA32 and X64 support Pete Batard
2017-11-14 12:32 ` [PATCH 3/4] BaseTools: Add VS2017 ARM support Pete Batard
2017-11-14 12:32 ` [PATCH 4/4] BaseTools: Add VS2017 AARCH64 support Pete Batard
2017-11-14 16:03 ` Gao, Liming [this message]
2017-11-14 17:07   ` [PATCH 0/4] BaseTools: Add VS2017 support, including ARM and AARCH64 Pete Batard
2017-11-14 16:16 ` Kurt Kennett
2017-11-14 17:30   ` Pete Batard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A14E17DE72@SHSMSX104.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox