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::244; helo=mail-io0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (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 94DB12035A7A2 for ; Thu, 16 Nov 2017 07:59:27 -0800 (PST) Received: by mail-io0-x244.google.com with SMTP id n79so5726659ion.3 for ; Thu, 16 Nov 2017 08:03:37 -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=fA/WHtRq2kX+ztA7uJmOwzXTgPGXU+kDstXhSw/Wyr4=; b=cvoTwaxT2omREHId/KCghH2pZXTEc/5vQWhzYZpT8gUQpJyM5TUt77VucjPw7bfWHG Df6jk+RhwrWYxQVatOZNdhszNBrQnSlArWA3xa4lu3aZ5KqSAbss1T15xp/RCe4g+qpj qk7274umlW0d9n73KQdBK77eBdEBvqKnt0pTk= 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=fA/WHtRq2kX+ztA7uJmOwzXTgPGXU+kDstXhSw/Wyr4=; b=IaYrrKLAwIer147f/t6HtBVnXmAJHxasBZaZU8lEMqPz+0c1TYVB3fLIYnkOkargF4 /cCWwSqXv4JIxMSYY8qRWG884h5aQeuzGcXj9Vkbo/fvKLd30MdrJYWOoW4fsrvWKRvO mHTHXBfnvF24cXSa7p38muHWVK4yqfXO23xHfK4lFtJzb7TAJglRe30q6JJe63OUsUUM lM15AuIM7Z0i0rIWA7t/uTyOHEFdWbGeDttMP0JLnmjdFelLhasS1ZwUe+9RP380RpoZ eHKfZz3NygfBHuTh07BOAr5uwFQkLU0jJqxYbRNaHBJW+uzzsJy/0BG175v5jyWVxm86 mZ1A== X-Gm-Message-State: AJaThX5P6D5li0KLAYBpcdffbfKM6sYBbUt59/XQ0/Btn9zoZlcVkoxh ovcXuL5nTv9xPsX/IA9ecLj4IexO+LmA0AUN2HIEwPC21Tc= X-Google-Smtp-Source: AGs4zMaA8YMzVqTLvmy2anLrbkZbgowNoZ8hw6NMgPfZ3Q3cDK79TaeEh9hBVB3LViYnJIrQxdwqSh3IRTPuDXTAgSE= X-Received: by 10.107.174.206 with SMTP id n75mr2103546ioo.43.1510848216376; Thu, 16 Nov 2017 08:03:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.104.3 with HTTP; Thu, 16 Nov 2017 08:03:35 -0800 (PST) In-Reply-To: <20171116154456.xcwtsvugsdpiwmop@bivouac.eciton.net> References: <20171116143546.2409-1-ard.biesheuvel@linaro.org> <20171116154456.xcwtsvugsdpiwmop@bivouac.eciton.net> From: Ard Biesheuvel Date: Thu, 16 Nov 2017 16:03:35 +0000 Message-ID: To: Leif Lindholm Cc: "edk2-devel@lists.01.org" , Laszlo Ersek Subject: Re: [PATCH] ArmPkg: move RVCT PLATFORM_FLAGS override into ArmHvcLib/ArmSmcLib 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, 16 Nov 2017 15:59:27 -0000 Content-Type: text/plain; charset="UTF-8" On 16 November 2017 at 15:44, Leif Lindholm wrote: > On Thu, Nov 16, 2017 at 02:35:46PM +0000, Ard Biesheuvel wrote: >> Currently, each ARM platform built with RVCT that uses ArmHvcLib >> or ArmSmcLib needs to specify a CPU target that implements both the >> security and virtualization extensions, so that the assembler does >> not choke on the 'hvc' and 'smc' instructions in ArmHvcLib/ArmSvcLib. >> Let's move these overrides into the module .INFs so we can lift this >> requirement at the platform side. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel >> --- >> ArmPkg/ArmPkg.dsc | 2 -- >> ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf | 3 +++ >> ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf | 3 +++ >> 3 files changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc >> index 382e99868453..622720ab2aef 100644 >> --- a/ArmPkg/ArmPkg.dsc >> +++ b/ArmPkg/ArmPkg.dsc >> @@ -33,8 +33,6 @@ [Defines] >> [BuildOptions] >> XCODE:*_*_ARM_PLATFORM_FLAGS == -arch armv7 >> GCC:*_*_ARM_PLATFORM_FLAGS == -march=armv7-a -mfpu=neon >> - # We use A15 to get the Secure and Virtualization extensions >> - RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 >> >> RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG >> *_*_*_CC_FLAGS = -DDISABLE_NEW_DEPRECATED_INTERFACES >> diff --git a/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf b/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf >> index 92efac5741c8..d046ef3ba253 100644 >> --- a/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf >> +++ b/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf >> @@ -30,3 +30,6 @@ [Sources.AARCH64] >> [Packages] >> MdePkg/MdePkg.dec >> ArmPkg/ArmPkg.dec >> + >> +[BuildOptions] >> + RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 >> diff --git a/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf b/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf >> index 9f9ba729967c..0aa64d467129 100644 >> --- a/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf >> +++ b/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf >> @@ -29,3 +29,6 @@ [Sources.AARCH64] >> [Packages] >> MdePkg/MdePkg.dec >> ArmPkg/ArmPkg.dec >> + >> +[BuildOptions] >> + RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 > > For this one, you should be able to get away with --cpu 7-A.security > rather than listing a random CPU that happens to implement the > required extension. > > This on the surface minor cleanup makes me unreasonably happy - thanks. > So if you can fold that in: > Reviewed-by: Leif Lindholm > > For whatever reason, a --cpu 7-A.virtualization never seems to have > been implemented... > Thanks Pushed as 302e8eda3b2f848e54bd21d0a8b2e5d8b891bffd