Re: [edk2] reasoning beehind prohibiting VFP/NEON on AArch32

2018-05-13 Thread Michael Zimmermann
I looked at ARMs TimerDxe and saw that mTimerNotifyFunction is called with TPL_HIGH_LEVEL but didn't realize that RestoreTPL would call all pending events. Thank you for your help. On Sun, May 13, 2018 at 1:39 PM Ard Biesheuvel wrote: > On 13 May 2018 at 12:58, Michael Zimmermann wrote: > >> No

Re: [edk2] reasoning beehind prohibiting VFP/NEON on AArch32

2018-05-13 Thread Ard Biesheuvel
On 13 May 2018 at 12:58, Michael Zimmermann wrote: >> No, the other way around. You should raise the TPL to TPL_HIGH_LEVEL >> to prevent being interrupted by something that may corrupt the NEON >> registers. > But isn't that only necessary if you assume that interrupt-handlers use VFP > registers?

Re: [edk2] reasoning beehind prohibiting VFP/NEON on AArch32

2018-05-13 Thread Michael Zimmermann
> No, the other way around. You should raise the TPL to TPL_HIGH_LEVEL > to prevent being interrupted by something that may corrupt the NEON > registers. But isn't that only necessary if you assume that interrupt-handlers use VFP registers? afaik on ARM wrote: > On 13 May 2018 at 11:48, Michael Z

Re: [edk2] reasoning beehind prohibiting VFP/NEON on AArch32

2018-05-13 Thread Ard Biesheuvel
On 13 May 2018 at 11:48, Michael Zimmermann wrote: > So basically using them should be safe as long as you're in > EfiGetCurrentTpl() < TPL_HIGH_LEVEL, right? No, the other way around. You should raise the TPL to TPL_HIGH_LEVEL to prevent being interrupted by something that may corrupt the NEON r

Re: [edk2] reasoning beehind prohibiting VFP/NEON on AArch32

2018-05-13 Thread Michael Zimmermann
So basically using them should be safe as long as you're in EfiGetCurrentTpl() < TPL_HIGH_LEVEL, right? Also, it'd probably be trivial to add VFP/NEON regs to EFI_SYSTEM_CONTEXT_ARM though that wouldn't help when writing apps for existing uefi platforms. On Sun, May 13, 2018 at 9:32 AM Ard Biesheu

Re: [edk2] reasoning beehind prohibiting VFP/NEON on AArch32

2018-05-13 Thread Ard Biesheuvel
On 12 May 2018 at 23:11, Michael Zimmermann 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

[edk2] reasoning beehind prohibiting VFP/NEON on AArch32

2018-05-12 Thread Michael Zimmermann
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 op