public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Laszlo Ersek <lersek@redhat.com>
Subject: Re: [PATCH] ArmPkg: move RVCT PLATFORM_FLAGS override into ArmHvcLib/ArmSmcLib
Date: Thu, 16 Nov 2017 16:03:35 +0000	[thread overview]
Message-ID: <CAKv+Gu_zAS-eAF-Bk_=hHVB4TVmUg4SPP9=RZrQ65A4mYtRsVQ@mail.gmail.com> (raw)
In-Reply-To: <20171116154456.xcwtsvugsdpiwmop@bivouac.eciton.net>

On 16 November 2017 at 15:44, Leif Lindholm <leif.lindholm@linaro.org> 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 <ard.biesheuvel@linaro.org>
>> ---
>>  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 <leif.lindholm@linaro.org>
>
> For whatever reason, a --cpu 7-A.virtualization never seems to have
> been implemented...
>

Thanks

Pushed as 302e8eda3b2f848e54bd21d0a8b2e5d8b891bffd


      reply	other threads:[~2017-11-16 15:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16 14:35 [PATCH] ArmPkg: move RVCT PLATFORM_FLAGS override into ArmHvcLib/ArmSmcLib Ard Biesheuvel
2017-11-16 15:44 ` Leif Lindholm
2017-11-16 16:03   ` Ard Biesheuvel [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='CAKv+Gu_zAS-eAF-Bk_=hHVB4TVmUg4SPP9=RZrQ65A4mYtRsVQ@mail.gmail.com' \
    --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