public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/4] Add ARM64 support for VS2017
@ 2018-02-14 13:08 Pete Batard
  2018-02-14 13:08 ` [PATCH 1/4] MdePkg: Disable some Level 4 warnings for VS2017/ARM64 Pete Batard
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Pete Batard @ 2018-02-14 13:08 UTC (permalink / raw)
  To: edk2-devel; +Cc: liming.gao, ard.biesheuvel

This series completes VS2017 support by enabling AARCH64 compilation.
* PATCH 1 targets the disabling of VS Level 4 warnings. The disabled
  warnings for ARM64 are the same as the ones for IA32, X64 and ARM.
* PATCH 2 adds assembly source in MdePkg/Library/BaseLib for various low
  level required functions. These new assembly files were converted from
  their GCC version, with minor changes applied to make them palatable
  to the MSFT assembler.
* PATCH 3 adds variable argument handlers for print output. This is
  achieved without relying on any external toolchain headers. However
  a call to the __va_start() compiler intrinsic function is now being
  used for the VA_START macros, which we apply for ARM as well.
* PATCH 4 enables the selection of ARM64 in the conf templates.
  One item of note is that the build options for ARM64 are the same as
  for ARM, except for /BASE:0 which was removed to avoid error:
  'invalid base address 0x0; ARM64 image cannot have base address below 4GB'

With these patches, VS2017 toolchain users should be able to compile
regular UEFI ARM64 applications using EDK2.

Note however that ARM64 support requires the use of Visual Studio 2017
Update 4 or later (a.k.a. v15.4), as native ARM64 compilation was not
included in any version of Visual Studio prior to that.

Additional notes:

We tested compiling and running the full UEFI Shell with this series, as
well as a small set of applications and drivers, and saw no issues.
Since we also modified the VA_START() macro for ARM, we also re-ran
similar tests for ARM, to confirm that there was no regression there.

Finally, we did not test the generation of a complete QEMU ARM64 firmware
as it requires porting a handful of assembly sources, that don't exist
yet, and our focus is with the generation of working AARCH64 drivers or
applications. Hopefully, this can be tackled as VS2017/ARM64 sees more
usage...

Regards,

/Pete


Pete Batard (4):
  MdePkg: Disable some Level 4 warnings for VS2017/ARM64
  MdePkg/Library/BaseLib: Enable VS2017/ARM64 builds
  MdePkg/Include: Add VA list support for VS2017/ARM64
  BaseTools/Conf: Add VS2017/ARM64 support

 BaseTools/Conf/build_rule.template                    |   2 +-
 BaseTools/Conf/tools_def.template                     |  32 ++++++-
 MdePkg/Include/AArch64/ProcessorBind.h                |  53 +++++++++-
 MdePkg/Include/Base.h                                 |   7 +-
 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/BaseLib.inf                    |   8 ++
 12 files changed, 463 insertions(+), 9 deletions(-)
 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

-- 
2.9.3.windows.2



^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH 0/4] Add ARM64 support for VS2017
@ 2018-02-23  9:49 Pete Batard
  2018-02-23  9:50 ` [PATCH 4/4] BaseTools/Conf: Add VS2017/ARM64 support Pete Batard
  0 siblings, 1 reply; 8+ messages in thread
From: Pete Batard @ 2018-02-23  9:49 UTC (permalink / raw)
  To: edk2-devel; +Cc: liming.gao, ard.biesheuvel

This is v2, which just removes a redundant #if defined(_MSC_EXTENSIONS) in 1/4.

This series completes VS2017 support by enabling AARCH64 compilation.
* PATCH 1 targets the disabling of VS Level 4 warnings. The disabled
  warnings for ARM64 are the same as the ones for IA32, X64 and ARM.
* PATCH 2 adds assembly source in MdePkg/Library/BaseLib for various low
  level required functions. These new assembly files were converted from
  their GCC version, with minor changes applied to make them palatable
  to the MSFT assembler.
* PATCH 3 adds variable argument handlers for print output. This is
  achieved without relying on any external toolchain headers. However
  a call to the __va_start() compiler intrinsic function is now being
  used for the VA_START macros, which we apply for ARM as well.
* PATCH 4 enables the selection of ARM64 in the conf templates.
  One item of note is that the build options for ARM64 are the same as
  for ARM, except for /BASE:0 which was removed to avoid error:
  'invalid base address 0x0; ARM64 image cannot have base address below 4GB'

With these patches, VS2017 toolchain users should be able to compile
regular UEFI ARM64 applications using EDK2.

Note however that ARM64 support requires the use of Visual Studio 2017
Update 4 or later (a.k.a. v15.4), as native ARM64 compilation was not
included in any version of Visual Studio prior to that.

Additional notes:

We tested compiling and running the full UEFI Shell with this series, as
well as a small set of applications and drivers, and saw no issues.
Since we also modified the VA_START() macro for ARM, we also re-ran
similar tests for ARM, to confirm that there was no regression there.

Finally, we did not test the generation of a complete QEMU ARM64 firmware
as it requires porting a handful of assembly sources, that don't exist
yet, and our focus is with the generation of working AARCH64 drivers or
applications. Hopefully, this can be tackled as VS2017/ARM64 sees more
usage...

Regards,

/Pete

Pete Batard (4):
  MdePkg: Disable some Level 4 warnings for VS2017/ARM64
  MdePkg/Library/BaseLib: Enable VS2017/ARM64 builds
  MdePkg/Include: Add VA list support for VS2017/ARM64
  BaseTools/Conf: Add VS2017/ARM64 support

 BaseTools/Conf/build_rule.template                    |   2 +-
 BaseTools/Conf/tools_def.template                     |  32 ++++++-
 MdePkg/Include/AArch64/ProcessorBind.h                |  53 +++++++++-
 MdePkg/Include/Base.h                                 |   7 +-
 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/BaseLib.inf                    |   8 ++
 12 files changed, 463 insertions(+), 9 deletions(-)
 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

-- 
2.9.3.windows.2



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

end of thread, other threads:[~2018-02-23  9:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-14 13:08 [PATCH 0/4] Add ARM64 support for VS2017 Pete Batard
2018-02-14 13:08 ` [PATCH 1/4] MdePkg: Disable some Level 4 warnings for VS2017/ARM64 Pete Batard
2018-02-14 13:13   ` Ard Biesheuvel
2018-02-14 15:46     ` Pete Batard
2018-02-14 13:08 ` [PATCH 2/4] MdePkg/Library/BaseLib: Enable VS2017/ARM64 builds Pete Batard
2018-02-14 13:08 ` [PATCH 3/4] MdePkg/Include: Add VA list support for VS2017/ARM64 Pete Batard
2018-02-14 13:08 ` [PATCH 4/4] BaseTools/Conf: Add VS2017/ARM64 support Pete Batard
  -- strict thread matches above, loose matches on Subject: below --
2018-02-23  9:49 [PATCH 0/4] Add ARM64 support for VS2017 Pete Batard
2018-02-23  9:50 ` [PATCH 4/4] BaseTools/Conf: Add VS2017/ARM64 support Pete Batard

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