From patchwork Thu Jul 13 12:48:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 107675 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2174087qge; Thu, 13 Jul 2017 05:48:59 -0700 (PDT) X-Received: by 10.84.217.204 with SMTP id d12mr10351169plj.208.1499950139413; Thu, 13 Jul 2017 05:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499950139; cv=none; d=google.com; s=arc-20160816; b=SV79lG2zNs/gBwtCEkP5eR0kS1vkQvoIquVSP1JQF4Cxki3GxXAW7jhJpdRCxBio3y zvJt/11s/PyGIOOQkgdZ+9UN7PaEAm8SViSytzSAxYxAHk1BbIy3jq/gYUahpAlSQZS3 d9/e6oswM9l9XcUGHnL8uPGQVd0VAjEcEqtpaUb/vkP6qegRKVrKXBaeUU+bSKPN4QFI uoH82CyrTJG3jSfHNJSOby9ZvP6PbKZZeMc/5+O5ZNNNlyOjEANnsoDhC2exXt+8XJSK jYY7jChIKisX0zdii3f5FYggdXchvUbHIaQ8iCWh9hAdEGwkco1Wt3F4HByoeU6zC6NZ EOUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=4CioYZ476A4VfwvqNaILugEG7EmhGHIrZ72wBRq6FIU=; b=LVcnMwPZ997PKKN/NDZSDSk7lbF/0FFsC/rHVjuPDW1ujHXAEJ3YDQk5Q3/LIXzqKo T9mM++sPgp0rr5DjSbeHP824pCanhEJhbiatvYDOb3nSGIlI7w0rfcFLxlCHSkqri/o7 o/X0K6dn8zQA8XDRDpU1nuv72cX6Fs7rLAZWWiLNPJmVcFyZDSQqf1qv36ZpwMxwDTDT 8JKXyoCS8Q3+bONax8xv09VXkiJd87lQV1IKFIkmBLOt8pZSq8em18njIMOMkzIkTGIo NrAKQMvmYqFQKN47I/JwRYMmIglTS0HkpFdUpAhGaMiJbEHklwpCvIH/NA9gBtPzlJVw sqbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=ecwjRl3z; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id 14si1174135pla.312.2017.07.13.05.48.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2017 05:48:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=ecwjRl3z; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 21C5421A00AE5; Thu, 13 Jul 2017 05:47:10 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wr0-x22b.google.com (mail-wr0-x22b.google.com [IPv6:2a00:1450:400c:c0c::22b]) (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 B79232095D8CE for ; Thu, 13 Jul 2017 05:47:08 -0700 (PDT) Received: by mail-wr0-x22b.google.com with SMTP id y28so800646wrd.3 for ; Thu, 13 Jul 2017 05:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=94YaIZ/DSLBVXhiM+iV5ok9+A3bRNJxMB157p5sqGUk=; b=ecwjRl3zsVU5+ncIbwthMXqUGdCr/qk3Q4bq8V3L9p9OU2IWztMRHvl7PqiBO96/HC EedOc6AUx8zmgwk6sUoQ0PRs/NlJ0eWWzVrG6clL7aRwAL+vH7TNORI73odetCVb3pst 9AKyVtxqtwtkLTt0nXjiQ/0CWagL68zf9zjx8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=94YaIZ/DSLBVXhiM+iV5ok9+A3bRNJxMB157p5sqGUk=; b=YsSTkxWcBgiVse4V12sCtTHAgqBEpdPZU9SIgRO30FPCmtUsJcSstS7hZMLTMUViv/ ti6yOxEvTqdVKcRdAf7vo6vgt6+hAlUZyFxISudNgfkBwGX4oVaAokJTaOmPeRuQJWCW 02J6j+WFc7OfzAKy1WtCnk3N4xOqeAyNAZtG/2I0sfIxqJeK6mtvDzlNeayvcge4BB77 XYWKnzxZ4u0zB/6gwSVJxmWo4eMTio6daRLxif3V5FTL05olCod7wQC6uGzKwpCzsVjh d88szo0DlzWMj9RGbX32W8kEJo9n7H8DNHGbKgoC2irUnrKCtFTDCD5XIrPG2F35lGPR tD5g== X-Gm-Message-State: AIVw111UayALGbqIdSKH0qDVDJNLdd6zwVFTBjTtmWMdbiPJzRRHfPPu N8yhTEZdFs1XJFWcuGYqkg== X-Received: by 10.223.142.202 with SMTP id q68mr1461238wrb.13.1499950134828; Thu, 13 Jul 2017 05:48:54 -0700 (PDT) Received: from localhost.localdomain ([154.145.198.181]) by smtp.gmail.com with ESMTPSA id 52sm5420720wra.56.2017.07.13.05.48.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2017 05:48:53 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, liming.gao@intel.com, yonghong.zhu@intel.com Date: Thu, 13 Jul 2017 13:48:43 +0100 Message-Id: <20170713124844.23556-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 Subject: [edk2] [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: , Cc: Alexei.Fedorov@arm.com, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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 --- BaseTools/Conf/tools_def.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm 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