public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Michael Zimmermann <sigmaepsilon92@gmail.com>
Cc: edk2-devel-01 <edk2-devel@lists.01.org>,
	Leif Lindholm <leif.lindholm@linaro.org>
Subject: Re: reasoning beehind prohibiting VFP/NEON on AArch32
Date: Sun, 13 May 2018 09:32:26 +0200	[thread overview]
Message-ID: <CAKv+Gu_RKgTy68r=-23w-b-wKZb1c-Mc=F8GaxwPH+=v0eS3HA@mail.gmail.com> (raw)
In-Reply-To: <CAN9vWDKOco6V3qD7+6K4SrCNpS2Gi6yn-sh5hc4V7XXNFnRm9w@mail.gmail.com>

On 12 May 2018 at 23:11, Michael Zimmermann <sigmaepsilon92@gmail.com> wrote:
> For AArch32 the spec says in 2.3.5.3:
>> Floating point, SIMD, vector operations and other instruction set
> extensions must not
> be used.
>
> For AArch64 the spec says in 2.3.6.4:
>> Floating point and SIMD instructions may be used.
>
> So is there a reason why AArch32 is not allowed to use Floating point
> operations?
> I'd understand if this restriction was limited to runtime services only but
> I don't see how it makes sense for boot services.
>
> I've written a patch which adds NEON support to FrameBufferBltLib to
> increase the rendering performance(by a lot actually) for 24bit displays
> and thought about sending it to the mailing list - that's why the question
> came up.
>

The reason for the difference between AArch64 and the other EFI
architectures is that AArch64 does not have a softfloat ABI, so it is
impossible to compile floating point code [portably] without enabling
VFP/NEON. This is why AArch64 is the exception here.

Currently, the AArch32 CPU context structure [EFI_SYSTEM_CONTEXT_ARM]
does not cover VFP/NEON registers, and so they are not
preserved/restored when an interrupt is taken. This means you cannot
use VFP/NEON registers in an event handler or you will corrupt the
VFP/NEON state of the interrupted context.


  reply	other threads:[~2018-05-13  7:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-12 21:11 reasoning beehind prohibiting VFP/NEON on AArch32 Michael Zimmermann
2018-05-13  7:32 ` Ard Biesheuvel [this message]
2018-05-13  9:48   ` Michael Zimmermann
2018-05-13 10:16     ` Ard Biesheuvel
2018-05-13 10:58       ` Michael Zimmermann
2018-05-13 11:39         ` Ard Biesheuvel
2018-05-13 12:49           ` Michael Zimmermann

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_RKgTy68r=-23w-b-wKZb1c-Mc=F8GaxwPH+=v0eS3HA@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