<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p>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 ...</p>
<p>Jiri.<br>
</p>
<div class="moz-cite-prefix">On 12/3/19 3:48 PM, Schweikhardt, Jens
(TSPCE3-TL4) wrote:<br>
</div>
<blockquote type="cite"
cite="mid:53adf766e49344e991b70cc8d78f78c1@BK99MAIL02.bk.local">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span lang="DE">Hello, world\n<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE"><o:p> </o:p></span></p>
<p class="MsoNormal">I have a question about the use of trap 4
by RTEMS on Sparc32 (leon3).<o:p></o:p></p>
<p class="MsoNormal">Since our app needs FP, we set the PSR[EF]
bit during the boot process before RTEMS is invoked.<o:p></o:p></p>
<p class="MsoNormal">Since we don’t expect the fp_disabled trap
(4) to occur, we install a fatal handler for it with<o:p></o:p></p>
<p class="MsoNormal">rtems_interrupt_catch(&fatalTrapHandler,
4, &old);<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">However, the fatalTrapHandler is invoked a
short time after application start (we use the Init() task<o:p></o:p></p>
<p class="MsoNormal">and start a handful of additional tasks,
all of which have attribute RTEMS_FLOATING_POINT)<o:p></o:p></p>
<p class="MsoNormal">and the PSR[EF] bit is indeed cleared. None
of our tasks<o:p></o:p></p>
<p class="MsoNormal">clears that bit, so we suspect RTEMS does
it for some reason.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Question: is an RTEMS/sparc application
allowed to install a handler for trap 4? I could not find an<o:p></o:p></p>
<p class="MsoNormal">answer in the docs for SPARC Specific
Information.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for any insight!<br>
Regards, Jens<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<hr>
<font size="1" face="Arial" color="Gray"><br>
Tesat-Spacecom GmbH & Co. KG<br>
Sitz: Backnang; Registergericht: Amtsgericht Stuttgart HRA
270977<br>
Persoenlich haftender Gesellschafter: Tesat-Spacecom
Geschaeftsfuehrungs GmbH;<br>
Sitz: Backnang; Registergericht: Amtsgericht Stuttgart HRB
271658;<br>
Geschaeftsfuehrung: Dr. Marc Steckling, Kerstin Basche, Ralf
Zimmermann<br>
</font><br>
<img src="https://www.tesat.de/images/footer.jpg" alt="banner"
moz-do-not-send="true" width="680" height="194">
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@rtems.org">users@rtems.org</a>
<a class="moz-txt-link-freetext" href="http://lists.rtems.org/mailman/listinfo/users">http://lists.rtems.org/mailman/listinfo/users</a></pre>
</blockquote>
</body>
</html>