source: rtems/cpukit/score/cpu/sparc/Makefile.am @ e1c0d67

5
Last change on this file since e1c0d67 was 146adb1, checked in by Sebastian Huber <sebastian.huber@…>, on 07/17/17 at 05:30:46

sparc: Add lazy floating point switch

The SPARC ABI is a bit special with respect to the floating point context.
The complete floating point context is volatile. Thus, from an ABI point
of view nothing needs to be saved and restored during a context switch.
Instead the floating point context must be saved and restored during
interrupt processing. Historically, the deferred floating point switch was
used for SPARC and the complete floating point context is saved and
restored during a context switch to the new floating point unit owner.
This is a bit dangerous since post-switch actions (e.g. signal handlers)
and context switch extensions may silently corrupt the floating point
context.

The floating point unit is disabled for interrupt handlers. Thus, in case
an interrupt handler uses the floating point unit then this will result in a
trap (INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT).

In uniprocessor configurations, a lazy floating point context switch is
used. In case an active floating point thread is interrupted (PSR[EF] == 1)
and a thread dispatch is carried out, then this thread is registered as the
floating point owner. When a floating point owner is present during a
context switch, the floating point unit is disabled for the heir thread
(PSR[EF] == 0). The floating point disabled trap checks that the use of the
floating point unit is allowed and saves/restores the floating point context
on demand.

Update #3077.

  • Property mode set to 100644
File size: 854 bytes
Line 
1include $(top_srcdir)/automake/compile.am
2
3include_rtemsdir = $(includedir)/rtems
4include_rtems_HEADERS = rtems/asm.h
5
6include_rtems_scoredir = $(includedir)/rtems/score
7include_rtems_score_HEADERS = rtems/score/sparc.h
8include_rtems_score_HEADERS += rtems/score/cpu.h
9include_rtems_score_HEADERS += rtems/score/cpuimpl.h
10include_rtems_score_HEADERS += rtems/score/sparcimpl.h
11include_rtems_score_HEADERS += rtems/score/types.h
12include_rtems_score_HEADERS += rtems/score/cpuatomic.h
13
14noinst_LIBRARIES = libscorecpu.a
15libscorecpu_a_SOURCES = cpu.c
16libscorecpu_a_SOURCES += sparc-context-volatile-clobber.S
17libscorecpu_a_SOURCES += sparc-context-validate.S
18libscorecpu_a_SOURCES += sparc-counter.c
19libscorecpu_a_SOURCES += sparc-counter-asm.S
20libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
21
22include $(srcdir)/preinstall.am
23include $(top_srcdir)/automake/local.am
Note: See TracBrowser for help on using the repository browser.