Changeset a6c5a7e0 in rtems


Ignore:
Timestamp:
Mar 17, 2015, 2:02:59 PM (4 years ago)
Author:
Daniel Krueger <daniel.krueger@…>
Branches:
4.11, master
Children:
a1d6f7a
Parents:
044c7d82
git-author:
Daniel Krueger <daniel.krueger@…> (03/17/15 14:02:59)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/10/15 06:12:14)
Message:

arm: Align ARM exception frame to 8 bytes

The stack pointer must be aligned on 8 byte boundary on ARM, so the size of
the exception frame must be a multiple of 8 bytes. Otherwise we might/will
get an alignment fault, when executing code in the data abort handler for
example.

Close #2318.

Signed-off-by: Daniel Krueger <daniel.krueger@…>

Location:
cpukit/score/cpu/arm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/arm/cpu.c

    r044c7d82 ra6c5a7e0  
    6262  sizeof( CPU_Exception_frame ) == ARM_EXCEPTION_FRAME_SIZE,
    6363  ARM_EXCEPTION_FRAME_SIZE
     64);
     65
     66RTEMS_STATIC_ASSERT(
     67  sizeof( CPU_Exception_frame ) % CPU_STACK_ALIGNMENT == 0,
     68  CPU_Exception_frame_alignment
    6469);
    6570
  • cpukit/score/cpu/arm/rtems/score/cpu.h

    r044c7d82 ra6c5a7e0  
    223223#endif
    224224
    225 #define ARM_EXCEPTION_FRAME_SIZE 76
     225#define ARM_EXCEPTION_FRAME_SIZE 80
    226226
    227227#define ARM_EXCEPTION_FRAME_REGISTER_SP_OFFSET 52
     
    688688#endif
    689689  const ARM_VFP_context *vfp_context;
     690  uint32_t reserved_for_stack_alignment;
    690691} CPU_Exception_frame;
    691692
Note: See TracChangeset for help on using the changeset viewer.