public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/4] BaseTools: Add VS2017 support, including ARM and AARCH64
@ 2017-11-14 12:32 Pete Batard
  2017-11-14 12:32 ` [PATCH 1/4] MdeModulePkg, NetworkPkg: Fix VS2017 IA32 warnings Pete Batard
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Pete Batard @ 2017-11-14 12:32 UTC (permalink / raw)
  To: edk2-devel

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-11-14 17:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox