aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-02-13 08:51:45 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-02-13 08:51:45 +0000
commit98cd062e820135b4759a21d9506a5df884527e7b (patch)
treeac6dd8924039073eddf3a836faa05f21ea056e3b /os
parent2a48761772a3b774ac6ff8a2a907ef57a61eb277 (diff)
downloadChibiOS-98cd062e820135b4759a21d9506a5df884527e7b.tar.gz
ChibiOS-98cd062e820135b4759a21d9506a5df884527e7b.tar.bz2
ChibiOS-98cd062e820135b4759a21d9506a5df884527e7b.zip
Fixed bug #706.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8874 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s10
-rw-r--r--os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s10
-rw-r--r--os/rt/ports/ARMCMx/compilers/IAR/chcoreasm_v7m.s10
-rw-r--r--os/rt/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s12
4 files changed, 41 insertions, 1 deletions
diff --git a/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s b/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s
index 298110f09..a98802798 100644
--- a/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s
+++ b/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s
@@ -64,8 +64,18 @@ _port_switch:
#if CORTEX_USE_FPU
vpush {s16-s31}
#endif
+
str sp, [r1, #CONTEXT_OFFSET]
+#if (CORTEX_SIMPLIFIED_PRIORITY == FALSE) && \
+ ((CORTEX_MODEL == 3) || (CORTEX_MODEL == 4))
+ /* Workaround for ARM errata 752419, only applied if
+ condition exists for it to be triggered.*/
+ ldr r3, [r0, #CONTEXT_OFFSET]
+ mov sp, r3
+#else
ldr sp, [r0, #CONTEXT_OFFSET]
+#endif
+
#if CORTEX_USE_FPU
vpop {s16-s31}
#endif
diff --git a/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s b/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s
index b232e0397..a303c0256 100644
--- a/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s
+++ b/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s
@@ -64,8 +64,18 @@ _port_switch:
#if CORTEX_USE_FPU
vpush {s16-s31}
#endif
+
str sp, [r1, #CONTEXT_OFFSET]
+#if (CORTEX_SIMPLIFIED_PRIORITY == FALSE) && \
+ ((CORTEX_MODEL == 3) || (CORTEX_MODEL == 4))
+ /* Workaround for ARM errata 752419, only applied if
+ condition exists for it to be triggered.*/
+ ldr r3, [r0, #CONTEXT_OFFSET]
+ mov sp, r3
+#else
ldr sp, [r0, #CONTEXT_OFFSET]
+#endif
+
#if CORTEX_USE_FPU
vpop {s16-s31}
#endif
diff --git a/os/rt/ports/ARMCMx/compilers/IAR/chcoreasm_v7m.s b/os/rt/ports/ARMCMx/compilers/IAR/chcoreasm_v7m.s
index 12516a2fc..2f58a73aa 100644
--- a/os/rt/ports/ARMCMx/compilers/IAR/chcoreasm_v7m.s
+++ b/os/rt/ports/ARMCMx/compilers/IAR/chcoreasm_v7m.s
@@ -72,8 +72,18 @@ _port_switch:
#if CORTEX_USE_FPU
vpush {s16-s31}
#endif
+
str sp, [r1, #CONTEXT_OFFSET]
+#if (CORTEX_SIMPLIFIED_PRIORITY == FALSE) && \
+ ((CORTEX_MODEL == 3) || (CORTEX_MODEL == 4))
+ /* Workaround for ARM errata 752419, only applied if
+ condition exists for it to be triggered.*/
+ ldr r3, [r0, #CONTEXT_OFFSET]
+ mov sp, r3
+#else
ldr sp, [r0, #CONTEXT_OFFSET]
+#endif
+
#if CORTEX_USE_FPU
vpop {s16-s31}
#endif
diff --git a/os/rt/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s b/os/rt/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s
index 1d23a99f3..69bfaa59c 100644
--- a/os/rt/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s
+++ b/os/rt/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s
@@ -67,8 +67,18 @@ _port_switch PROC
#if CORTEX_USE_FPU
vpush {s16-s31}
#endif
- str sp, [r1, #CONTEXT_OFFSET]
+
+ str sp, [r1, #CONTEXT_OFFSET]
+#if (CORTEX_SIMPLIFIED_PRIORITY == FALSE) && \
+ ((CORTEX_MODEL == 3) || (CORTEX_MODEL == 4))
+ /* Workaround for ARM errata 752419, only applied if
+ condition exists for it to be triggered.*/
+ ldr r3, [r0, #CONTEXT_OFFSET]
+ mov sp, r3
+#else
ldr sp, [r0, #CONTEXT_OFFSET]
+#endif
+
#if CORTEX_USE_FPU
vpop {s16-s31}
#endif