#211 closed enhancement (fixed)

fixes for deferred FPU context switching

Reported by: strauman Owned by: Joel Sherrill
Priority: normal Milestone: 2
Component: score Version: unknown
Severity: minor Keywords:
Cc: bugs@… Blocked By:
Blocking:

Description

This patch (against rtems-ss-20020301) fixes saving / restoring
floating point context.
The fpsave / fprestore routines are only used in a executing
context which _is_ fp and hence has the FPU enabled. The current
behavior required the FPU always to be on which is very dangerous
if lazy context switching is used.

The patch also makes sure (on powerpc only) that the FPU is disabled
for integer tasks. Note that this is crucial if deferred fp context
switching is used. Otherwise, fp context corruption may go undetected!
Also note that even tasks which merely push/pop FP registers to/from the stack
without modifying them still MUST be FP tasks - otherwise (if lazy FP
context switching is used), FP register corruption (of other, FP, tasks
may occur)!

Furthermore, (on PPC) by default, lazy FP context save/restore is _disabled_

Release:
RTEMS-ss-20020301

Environment:
target: powerpc-rtems
host: i386-linux

How-To-Repeat:
n.a.

Attachments (1)

fpctxt.diff (7.1 KB) - added by strauman on Dec 3, 2006 at 1:31:13 PM.
fpctxt.diff

Download all attachments as: .zip

Change History (2)

comment:1 Changed on May 14, 2002 at 4:54:41 PM by Joel Sherrill

Status: assignedclosed

State-Changed-From-To: open->closed
State-Changed-Why: Patch applied. Thanks.

Changed on Dec 3, 2006 at 1:31:13 PM by strauman

Attachment: fpctxt.diff added

fpctxt.diff

Note: See TracTickets for help on using tickets.