From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::243; helo=mail-io0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::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 D334F2243693C for ; Fri, 23 Feb 2018 03:49:41 -0800 (PST) Received: by mail-io0-x243.google.com with SMTP id v6so8439663iog.7 for ; Fri, 23 Feb 2018 03:55:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9ulB/KcqcKG2HYp9GrWS03YeAvGXxGESb9QRauBTFZM=; b=E1btroVM1jPo5x/4MQBanpRh4jW+xsVRM1MLXR4Wt8INBVHEAufLXct35HtuZHdT7w JtyFUUWLBbGMNgvk2ReeoyrbrG7zkWVa7zdBNONP0mB9QXpXxHzH4+6A4n2l97+hF1sj 94RneRMMtFho82NM5L+SelB+R52honIf0E19M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9ulB/KcqcKG2HYp9GrWS03YeAvGXxGESb9QRauBTFZM=; b=Uz4+4jRuMHA/VaS3GOswRNOf4W+WtQyY3ipR8ZGSdoRVRcl71vj/82quDr/bEu49Q6 6EASrudb4xh1qItRCX+wqs8VoeDURtTGNWcfz68YWgJvM0z09cOuvkP/mA2jcG5PcKme 7AfTp49U7qL6+C7vrIZ/PENw/bu9PNb6dg6blnilBuNYThic44e5B4q9czIgnRHDH3Q8 TwEdI+JVsKDstAUvKmNxe5pkLgTMK68nIJOkJPxfvOWyL83IDmO7opUm+aiuBzGfrs6p cFOaTnQey1qqWkg4IpWZZfKeAlX6DLP8iCqZQJyfp7kcRCYXUl+VutO7g7enYF0NWUDe 1VTQ== X-Gm-Message-State: APf1xPA//9zU9HWWcIaEsjkNn3XcMhNvAs7+RZkA7B/dTwtzJt/CmHq8 oe53joSnfUw7t6XOfHUIWh8EqbdVn/gknI+DE91wxw== X-Google-Smtp-Source: AG47ELuTytQIl3jYtQENxzjMhsGO0G3l+jfeb0EV08/QPevXYfhkiiwK1AkX6lVdyYpP/K+BzaaIyngdl7s84mvNV/k= X-Received: by 10.107.5.199 with SMTP id 190mr1509357iof.107.1519386942402; Fri, 23 Feb 2018 03:55:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.138.209 with HTTP; Fri, 23 Feb 2018 03:55:41 -0800 (PST) In-Reply-To: <20180223095003.6012-1-pete@akeo.ie> References: <20180223095003.6012-1-pete@akeo.ie> From: Ard Biesheuvel Date: Fri, 23 Feb 2018 11:55:41 +0000 Message-ID: To: Pete Batard Cc: "edk2-devel@lists.01.org" , "Gao, Liming" Subject: Re: [PATCH 0/4] Add ARM64 support for VS2017 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Feb 2018 11:49:42 -0000 Content-Type: text/plain; charset="UTF-8" On 23 February 2018 at 09:49, Pete Batard wrote: > 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' > This series looks fine to me, with the exception of the error mentioned here, which seems strange to me. It does appear to be a toolchain issue rather than anything else, so if you can build working binaries with these patches, it's all fine by me. Acked-by: Ard Biesheuvel > 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 >