#2401 closed defect (fixed)

ARMv7M: Default exception handler doesn't support FPU

Reported by: Martin Galvan Owned by: Sudarshan Rajagopalan <sudarshan.rajagopalan@…>
Priority: normal Milestone: 4.11.2
Component: score Version: 4.11
Severity: major Keywords:
Cc: sudarshan.rajagopalan@…, daniel.gutson@…, joel.sherrill@… Blocked By:


On exception entry, _ARMV7M_Exception_default stores the previous Stack Pointer
in a CPU_Exception_frame. The SP can be MSP or PSP, depending on the mode
in which the exception was taken. To know this, we must check the value of LR.

Right now the code checks whether it should store MSP or PSP by comparing LR to
-3 (0xFFFFFFFD). However, this doesn't work if we're using an FPU
since the error code would be either 0xFFFFFFE9 or 0xFFFFFFED. The result is
that we always end up selecting MSP.

This bug was found by Sudarshan Rajagopalan in the RTEMS git master.

Change History (2)

comment:1 Changed on Jan 26, 2017 at 7:16:00 AM by Sebastian Huber


comment:2 Changed on Feb 15, 2017 at 1:19:20 PM by Sudarshan Rajagopalan <sudarshan.rajagopalan@…>

Owner: set to Sudarshan Rajagopalan <sudarshan.rajagopalan@…>
Resolution: fixed
Status: newclosed

In 5b5ef4e479dbb437b96601e3ef4e5fc508e22dd3/rtems:

Fix exception handler for supporting FPU

Close #2401.

Note: See TracTickets for help on using tickets.