From patchwork Tue Jun 23 15:30:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 50244 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8C23021575 for ; Tue, 23 Jun 2015 15:31:53 +0000 (UTC) Received: by lagh6 with SMTP id h6sf3908078lag.0 for ; Tue, 23 Jun 2015 08:31:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=uNtx4IfI9IhqRZQX9etPiU5XzGPX2lRjfIPDdYZWbYg=; b=J+bpNUUvG9w82KPXJI2cDJoRcfEfn0Ctp+eVnYihnc8Tm8VEC3OJJ0efSrECVirlHy xHsGc3C54ify0kU0jjouotlsmaB0DHzTU46Wpe1n6M6bJKItjFtklipEHbEaa9eMAh2r 6Zf1qvJAQPu0Q652yfVg+TgDSXcBROOhfiGUnxeE//IRY7kFmTTaDVLBZ4iBmnTjCmaC kv4xTi2VXbfjmrl7PVt5PJeCHxvyCy8ep849dtDNJP/66+MK7pm+yuBlQ9tuOuW/12mm s55Pow7XuZg8bYiA+vDidCuWaPrYpnvZB3xiwGVHOxxwIAHcUlPcSwLM4g6ALtbOj326 S1MA== X-Gm-Message-State: ALoCoQlTkZJm10SgS/JX0vB6IkIICKCpOQ26hDR7Qgp5UaQ+2Y+3PMZyzbdmupM91RxEi1E9NzWe X-Received: by 10.194.179.42 with SMTP id dd10mr24985114wjc.7.1435073512503; Tue, 23 Jun 2015 08:31:52 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.227 with SMTP id t3ls68792laj.72.gmail; Tue, 23 Jun 2015 08:31:52 -0700 (PDT) X-Received: by 10.152.26.67 with SMTP id j3mr36590004lag.7.1435073512337; Tue, 23 Jun 2015 08:31:52 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id xg1si19589883lac.41.2015.06.23.08.31.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jun 2015 08:31:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by lacny3 with SMTP id ny3so8988144lac.3 for ; Tue, 23 Jun 2015 08:31:52 -0700 (PDT) X-Received: by 10.112.219.70 with SMTP id pm6mr34960448lbc.41.1435073512216; Tue, 23 Jun 2015 08:31:52 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp3155925lbb; Tue, 23 Jun 2015 08:31:51 -0700 (PDT) X-Received: by 10.42.190.129 with SMTP id di1mr28755250icb.11.1435073496089; Tue, 23 Jun 2015 08:31:36 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id v13si12451355igr.50.2015.06.23.08.31.32 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 23 Jun 2015 08:31:36 -0700 (PDT) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Z7QAS-0000D3-Lv; Tue, 23 Jun 2015 15:31:20 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Z7QAR-0000Ck-4p for edk2-devel@lists.sourceforge.net; Tue, 23 Jun 2015 15:31:19 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 74.125.82.44 as permitted sender) client-ip=74.125.82.44; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wg0-f44.google.com; Received: from mail-wg0-f44.google.com ([74.125.82.44]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Z7QAP-00082S-7n for edk2-devel@lists.sourceforge.net; Tue, 23 Jun 2015 15:31:19 +0000 Received: by wgbhy7 with SMTP id hy7so12943257wgb.2 for ; Tue, 23 Jun 2015 08:31:11 -0700 (PDT) X-Received: by 10.194.184.79 with SMTP id es15mr59829778wjc.112.1435073471202; Tue, 23 Jun 2015 08:31:11 -0700 (PDT) Received: from localhost.localdomain ([185.13.106.68]) by mx.google.com with ESMTPSA id ei8sm36242290wjd.32.2015.06.23.08.31.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Jun 2015 08:31:10 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, olivier.martin@arm.com, leif.lindholm@linaro.org Date: Tue, 23 Jun 2015 17:30:55 +0200 Message-Id: <1435073455-3268-5-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435073455-3268-1-git-send-email-ard.biesheuvel@linaro.org> References: <1435073455-3268-1-git-send-email-ard.biesheuvel@linaro.org> X-Spam-Score: -1.4 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record 0.1 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1Z7QAP-00082S-7n Subject: [edk2] [RFC PATCH 4/4] ArmVirtPkg: ArmVirtQemu: use GCC 'small' C model on AArch64 X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Use GCC's 'small' C model when building ArmVirtQemu for AArch64. This model uses PC relative references for globals instead of absolute references, which is assumed to be beneficial since it means fewer runtime relocations to fix up, and less indirect addressing via literals that are accessed via the D-cache. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirtQemu.dsc | 2 +- ArmVirtPkg/ArmVirtQemu.fdf | 24 +++++++++++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 374cf7a9ee02..b6a6a44c7216 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -76,7 +76,7 @@ [LibraryClasses.ARM.SEC] [BuildOptions] RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 -I$(WORKSPACE)/ArmVirtPkg/Include GCC:*_*_ARM_PLATFORM_FLAGS == -mcpu=cortex-a15 -I$(WORKSPACE)/ArmVirtPkg/Include - *_*_AARCH64_PLATFORM_FLAGS == -I$(WORKSPACE)/ArmVirtPkg/Include + *_*_AARCH64_PLATFORM_FLAGS == -I$(WORKSPACE)/ArmVirtPkg/Include -mcmodel=small ################################################################################ diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf index 73d088a3bbdb..617b786798ca 100644 --- a/ArmVirtPkg/ArmVirtQemu.fdf +++ b/ArmVirtPkg/ArmVirtQemu.fdf @@ -306,24 +306,42 @@ [FV.FVMAIN_COMPACT] # ############################################################################ -[Rule.Common.SEC] +[Rule.ARM.SEC] FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED { TE TE Align = 128 $(INF_OUTPUT)/$(MODULE_NAME).efi } -[Rule.Common.PEI_CORE] +[Rule.AARCH64.SEC] + FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED { + TE TE Align = 4K $(INF_OUTPUT)/$(MODULE_NAME).efi + } + +[Rule.ARM.PEI_CORE] FILE PEI_CORE = $(NAMED_GUID) { TE TE Align = 8 $(INF_OUTPUT)/$(MODULE_NAME).efi UI STRING ="$(MODULE_NAME)" Optional } -[Rule.Common.PEIM] +[Rule.AARCH64.PEI_CORE] + FILE PEI_CORE = $(NAMED_GUID) { + TE TE Align = 4K $(INF_OUTPUT)/$(MODULE_NAME).efi + UI STRING ="$(MODULE_NAME)" Optional + } + +[Rule.ARM.PEIM] FILE PEIM = $(NAMED_GUID) { PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex TE TE Align = 8 $(INF_OUTPUT)/$(MODULE_NAME).efi UI STRING="$(MODULE_NAME)" Optional } +[Rule.AARCH64.PEIM] + FILE PEIM = $(NAMED_GUID) { + PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex + TE TE Align = 4K $(INF_OUTPUT)/$(MODULE_NAME).efi + UI STRING="$(MODULE_NAME)" Optional + } + [Rule.Common.PEIM.TIANOCOMPRESSED] FILE PEIM = $(NAMED_GUID) DEBUG_MYTOOLS_IA32 { PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex