public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Pete Batard <pete@akeo.ie>
To: edk2-devel@lists.01.org
Subject: [PATCH 0/4] BaseTools: Add VS2017 support, including ARM and AARCH64
Date: Tue, 14 Nov 2017 12:32:25 +0000	[thread overview]
Message-ID: <20171114123229.3516-1-pete@akeo.ie> (raw)

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



             reply	other threads:[~2017-11-14 12:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-14 12:32 Pete Batard [this message]
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 ` [PATCH 0/4] BaseTools: Add VS2017 support, including ARM and AARCH64 Gao, Liming
2017-11-14 17:07   ` 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=20171114123229.3516-1-pete@akeo.ie \
    --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