sparc and trap 4 (floating point disabled)

Jiri Gaisler jiri at gaisler.se
Tue Dec 3 19:55:03 UTC 2019


Does your application work if you don't use your custom trap handler? In the old days, RTEMS used lazy FPU context switching so FPU disabled traps could happen and were handled by the kernel. Also note that if you use FPU instructions in the Init task, you need a special FPU attribute for it ...

Jiri.

On 12/3/19 3:48 PM, Schweikhardt, Jens (TSPCE3-TL4) wrote:
>
> Hello, world\n
>
>  
>
> I have a question about the use of trap 4 by RTEMS on Sparc32 (leon3).
>
> Since our app needs FP, we set the PSR[EF] bit during the boot process before RTEMS is invoked.
>
> Since we don’t expect the fp_disabled trap (4) to occur, we install a fatal handler for it with
>
> rtems_interrupt_catch(&fatalTrapHandler, 4, &old);
>
>  
>
> However, the fatalTrapHandler is invoked a short time after application start (we use the Init() task
>
> and start a handful of additional tasks, all of which have attribute RTEMS_FLOATING_POINT)
>
> and the PSR[EF] bit is indeed cleared. None of our tasks
>
> clears that bit, so we suspect RTEMS does it for some reason.
>
>  
>
> Question: is an RTEMS/sparc application allowed to install a handler for trap 4? I could not find an
>
> answer in the docs for SPARC Specific Information.
>
>  
>
> Thanks for any insight!
> Regards, Jens
>
>  
>
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Tesat-Spacecom GmbH & Co. KG
> Sitz: Backnang; Registergericht: Amtsgericht Stuttgart HRA 270977
> Persoenlich haftender Gesellschafter: Tesat-Spacecom Geschaeftsfuehrungs GmbH;
> Sitz: Backnang; Registergericht: Amtsgericht Stuttgart HRB 271658;
> Geschaeftsfuehrung: Dr. Marc Steckling, Kerstin Basche, Ralf Zimmermann
>
> banner
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20191203/063e7fe5/attachment-0001.html>


More information about the users mailing list