Hi Dan,

I am a bit rusty on the build system and someone from the core TF-A team will be able to advise on makefile changes. One more thing that you would need to do is set cptr_el3.tfp=0 & cpacr_el1.fpen=0b11  (TF-A disables FP by default at runtime).

 

Best Regards

Soby Mathew

 

From: Bartus, Dan <Dan.Bartus@analog.com>
Sent: 24 May 2022 18:03
To: Soby Mathew <Soby.Mathew@arm.com>; tf-a@lists.trustedfirmware.org
Cc: Neely, Brian <Brian.Neely@analog.com>
Subject: RE: Floating point math

 

Can u suggest a method to disable that flag in BL2 and no where else in platform.mk>?? Possibly using the an ifdef BL2_SOURCES?

 

 

From: Soby Mathew <Soby.Mathew@arm.com>
Sent: Tuesday, May 24, 2022 4:51 AM
To: Bartus, Dan <Dan.Bartus@analog.com>; tf-a@lists.trustedfirmware.org
Cc: Neely, Brian <Brian.Neely@analog.com>
Subject: RE: Floating point math

 

[External]

 

Hi Dan

Just my 2 cents,
Theoretically it should be possible to use FPU at BL2. BL2 does not context switch between worlds and hence all that is probably required is to enable compiler to use FP.  The current build system in TF-A may be a bit unwieldy because it may not allow remove C flags for a particular BL image , as I remember. The runtime firmware , BL31 should not use FP and hence any changes done to BL2 to enable it to use FP should not affect the BL31 compiler flags.

 

Best Regards

Soby Mathew

 

From: Bartus, Dan via TF-A <tf-a@lists.trustedfirmware.org>
Sent: 23 May 2022 21:50
To: tf-a@lists.trustedfirmware.org
Cc: Neely, Brian <Brian.Neely@analog.com>
Subject: [TF-A] Floating point math

 

We are using an arm ARCH-64  (A55) and we need to do some floating point math in BL2.  It seems this is not enabled. Is there a reason why I cannot do FP math (security issue?) and if I can, how do I enable it?

 

I am seeing this error when I use floats “-mgeneral-regs-only”

 

 

thanks