From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:400c:c09::243; helo=mail-wm0-x243.google.com; envelope-from=pete@akeo.ie; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 01CD22035A7A9 for ; Tue, 14 Nov 2017 04:28:36 -0800 (PST) Received: by mail-wm0-x243.google.com with SMTP id z3so21669250wme.5 for ; Tue, 14 Nov 2017 04:32:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=xtC8JIp2E19Dlw0O7jxpvSwG4MW/QCJplZeykX2W4Tg=; b=riJDx+cLJ7tcu6eFJKHTCRZvw0mLixRwukgsmKuTTcJ/I/5amwpTeyqs7QV6jo6jlr FVvEoJfoKZm+r/UVnGJfz6n7YZQj30pCBKp5tJv6MJ0bQtMxAzUcihIzp3y0nYwPgnhP o7pMHu1I0TRH7VKYzrsLGz4bFe1O1d0zYcOfa9JG0KtePffBI32jTNiSGJxejOCcRePX r3rkkgdVShl1FBdAno2JZrGGEBTcokMT/msDevaK1OyVfhy/v9vNVopXxKE4yc/peuPF lTncA2BTbWuHf2e+EjigQqgOGxN12IJml1I1s3VvUVcjAPlgN1KIxlu2D+QlnFc65hOo fggg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=xtC8JIp2E19Dlw0O7jxpvSwG4MW/QCJplZeykX2W4Tg=; b=s7AV1jJO9JevBwN0rMoUq6fQZL+ZIgogrDWAQThu3OoElJie3b5/cU9X917IeFrpLq MePxNmWjId2RbIRX7EzgIk/NVgRblHZI5Svc4gfCBb5AHpWpTp0sdIC3u34wunOosIj+ 2c2RIY1dSfN+eO+MJlQ1TVjbZXPF/3fgcf6ZbcBPV7pDaRid0oh3wqljIJHiNmrqa0BH ETGtCy4V9e1bh+rdKHMs1PvfncG16VOTZiSdFfgHU/NjfyUlN89lgfHVyyuYYyoXG0P7 6EhzCmpyxjABaKc/fkkjjuOmqnZsktBQLqS6FQQC+zFpzVPjkI7QMGA5z6thiC0YwTGo YPYQ== X-Gm-Message-State: AJaThX7aG6TkoKCmbHkQNTNXTlN7dTOnsW55fSg6nLks9pI1z51BI9vG 6u12ijtUOPiqGpAxbIKHo1bw5SLY9p0= X-Google-Smtp-Source: AGs4zMYPCuoHfGqD4qwL/c2XCx+pOXDILVQ99LyCOdi9VeRhQubglH64LSyDj1Q9fblxsxXhOlK59g== X-Received: by 10.80.208.139 with SMTP id v11mr16556045edd.62.1510662762463; Tue, 14 Nov 2017 04:32:42 -0800 (PST) Received: from localhost.localdomain ([84.203.87.147]) by smtp.gmail.com with ESMTPSA id i17sm14574556ede.64.2017.11.14.04.32.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Nov 2017 04:32:40 -0800 (PST) From: Pete Batard To: edk2-devel@lists.01.org Date: Tue, 14 Nov 2017 12:32:25 +0000 Message-Id: <20171114123229.3516-1-pete@akeo.ie> X-Mailer: git-send-email 2.9.3.windows.2 Subject: [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 12:28:37 -0000 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