Changeset dfd735a1 in mainline


Ignore:
Timestamp:
2010-07-16T11:40:06Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
24697c3
Parents:
5c16ce7
Message:

Separate ldm(2) from instructions accessing banked registers with NOPs. This is forbidden and was corrupting the link register.

Location:
kernel/arch/arm32/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/exc_handler.S

    r5c16ce7 rdfd735a1  
    9696        ldmfd r3!, {r4-r7}
    9797        stmfd r13!, {r4-r7}
    98         stmfd r13, {r13, lr}^
     98        mov r4, r13
     99        stmfd r4, {r13, lr}^
     100        nop                     /* Cannot access r13 immediately after stm(2) */
    99101        sub r13, r13, #8
    100102        stmfd r13!, {r2}
     
    138140
    139141        # return to user mode
    140         ldmfd r13, {r13, lr}^
     142        mov r0, r13
     143        ldmfd r0, {r13, lr}^
     144        nop                     /* Cannot access r13 immediately after ldm(2) */
    141145        add r13, r13, #8
    142146        b 2f
  • kernel/arch/arm32/src/userspace.c

    r5c16ce7 rdfd735a1  
    9898                "msr spsr_c, %[user_mode]\n"
    9999                "ldmfd sp, {r0-r12, sp, lr}^\n"
     100                "nop\n"         /* Cannot access sp immediately after ldm(2) */
    100101                "add sp, sp, #(15*4)\n"
    101102                "ldmfd sp!, {pc}^\n"
Note: See TracChangeset for help on using the changeset viewer.