From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-x233.google.com (mail-wr0-x233.google.com [IPv6:2a00:1450:400c:c0c::233]) (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 90B2B2095D8CB for ; Thu, 13 Jul 2017 07:09:33 -0700 (PDT) Received: by mail-wr0-x233.google.com with SMTP id k67so53655863wrc.2 for ; Thu, 13 Jul 2017 07:11:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OZaeXhyk4pTZ2AmJc7qWHGWWlF/QpsO8MAI7CEfr2Vo=; b=Z4YtERcr6L89/1ChowfPt7kgg4nBY+nUEiK3GBfhhLFwxt/yCIAGBWMQz5dQUtAc8N BQyKqx4h7P2Yn/Nd1HYF96y9/+Uku4FIPkjd74mmHnSIdN1wdfSixRzYMPvbEnd/bVl3 ryFEyU9cewRkqsKJCk+/2zkzmVxFWhSVI5fXw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=OZaeXhyk4pTZ2AmJc7qWHGWWlF/QpsO8MAI7CEfr2Vo=; b=oNNrt5tIGD8+bQmgBo/VRywA7Hfdbws3/imOLJdYYJMBqDgZHledIVoxOD3eO7mtyT Kak8FMTo7dKJriYoEnZgN13u+3ADa/dktjZCLYjLAhX3s9yi2lj8w56YykqOkAFAztCp cUAYyUDYr63r+1PyOU3fLbMn7JdGCvs48IF5uCmmvuJnNrkfd3mcuNAHudPegOZH4aqJ rGifh+LZ7VznpV8SjfZbrHX0YdKtBx3xgHEI+jUYIZ8XDiRMsdqwZfoIhMhrPWhKbqRR dUBKJtVL8UMNChHwI8vxg3fIS8cqNM+PEgbmfGOW0wcsAZRhF8sTu4COBAY84oMNzpsB FU4g== X-Gm-Message-State: AIVw112GaCoWj9uV/jTiLKPRYdUKUhu38o5WMOcSbx+C8bpEaMWz2R9M CY9BCGH1Fzh6EULv3SqELg== X-Received: by 10.223.163.202 with SMTP id m10mr1754485wrb.197.1499955080532; Thu, 13 Jul 2017 07:11:20 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id 31sm4131741wrd.20.2017.07.13.07.11.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2017 07:11:20 -0700 (PDT) Date: Thu, 13 Jul 2017 15:11:18 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, liming.gao@intel.com, yonghong.zhu@intel.com, Alexei.Fedorov@arm.com, evan.lloyd@arm.com Message-ID: <20170713141118.GC26676@bivouac.eciton.net> References: <20170713124844.23556-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20170713124844.23556-1-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [PATCH 1/2] BaseTools/tools_def AARCH64: mark register x18 as reserved 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: Thu, 13 Jul 2017 14:09:34 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Reviewed-by: Leif Lindholm > --- > 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 >