public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Leif Lindholm <leif.lindholm@linaro.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: edk2-devel@lists.01.org, liming.gao@intel.com,
	yonghong.zhu@intel.com, Alexei.Fedorov@arm.com,
	evan.lloyd@arm.com
Subject: Re: [PATCH 1/2] BaseTools/tools_def AARCH64: mark register x18 as reserved
Date: Thu, 13 Jul 2017 15:11:18 +0100	[thread overview]
Message-ID: <20170713141118.GC26676@bivouac.eciton.net> (raw)
In-Reply-To: <20170713124844.23556-1-ard.biesheuvel@linaro.org>

On Thu, Jul 13, 2017 at 01:48:43PM +0100, Ard Biesheuvel wrote:
> The AArch64 ABI classifies register x18 as a platform register, which
> means it should not be used unless the code is guaranteed to run on a
> platform that doesn't use it in such a capacity.
> 
> GCC does not honour this requirement by default, and so we need to tell
> it not to touch it explicitly, by passing the -ffixed-x18 command line
> option.
> 
> Link: https://bugzilla.tianocore.org/show_bug.cgi?id=625
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

> ---
>  BaseTools/Conf/tools_def.template | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
> index 7d3f54218461..128da5131d01 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -4341,7 +4341,7 @@ DEFINE GCC_X64_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-ad
>  DEFINE GCC_IPF_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS) -minline-int-divide-min-latency
>  DEFINE GCC_ARM_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft -fno-pic -fno-pie
>  DEFINE GCC_ARM_CC_XIPFLAGS         = -mno-unaligned-access
> -DEFINE GCC_AARCH64_CC_FLAGS        = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char  -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables -fno-pic -fno-pie
> +DEFINE GCC_AARCH64_CC_FLAGS        = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char  -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables -fno-pic -fno-pie -ffixed-x18
>  DEFINE GCC_AARCH64_CC_XIPFLAGS     = -mstrict-align
>  DEFINE GCC_DLINK_FLAGS_COMMON      = -nostdlib --pie
>  DEFINE GCC_DLINK2_FLAGS_COMMON     = -Wl,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds
> -- 
> 2.9.3
> 


      parent reply	other threads:[~2017-07-13 14:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13 12:48 [PATCH 1/2] BaseTools/tools_def AARCH64: mark register x18 as reserved Ard Biesheuvel
2017-07-13 12:48 ` [PATCH 2/2] BaseTools/tools_def AARCH64: avoid SIMD register in XIP code Ard Biesheuvel
2017-07-13 14:11   ` Leif Lindholm
2017-07-13 16:15     ` Alexei Fedorov
2017-07-13 16:17       ` Ard Biesheuvel
     [not found]         ` <HE1PR0802MB2299B668C33778EC20CE6DDA9AAC0@HE1PR0802MB2299.eurprd08.prod.outlook.com>
2017-07-13 17:00           ` Ard Biesheuvel
2017-07-13 17:06             ` Alexei Fedorov
2017-07-13 17:31               ` Leif Lindholm
2017-07-13 20:09                 ` Laszlo Ersek
2017-07-13 14:11 ` Leif Lindholm [this message]

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=20170713141118.GC26676@bivouac.eciton.net \
    --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