Commit 8e02676f authored by Torgue Alexandre's avatar Torgue Alexandre Committed by Russell King

ARM: 8610/1: V7M: Add dsb before jumping in handler mode

According to ARM AN321 (section 4.12):

"If the vector table is in writable memory such as SRAM, either relocated
by VTOR or a device dependent memory remapping mechanism, then
architecturally a memory barrier instruction is required after the vector
table entry is updated, and if the exception is to be activated
immediately"
Reviewed-by: default avatarVladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: default avatarMaxime Coquelin <mcoquelin.stm32@gmail.com>
Signed-off-by: default avatarAlexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 6a8146f4
...@@ -132,6 +132,7 @@ __v7m_setup_cont: ...@@ -132,6 +132,7 @@ __v7m_setup_cont:
badr r1, 1f badr r1, 1f
ldr r5, [r12, #11 * 4] @ read the SVC vector entry ldr r5, [r12, #11 * 4] @ read the SVC vector entry
str r1, [r12, #11 * 4] @ write the temporary SVC vector entry str r1, [r12, #11 * 4] @ write the temporary SVC vector entry
dsb
mov r6, lr @ save LR mov r6, lr @ save LR
ldr sp, =init_thread_union + THREAD_START_SP ldr sp, =init_thread_union + THREAD_START_SP
cpsie i cpsie i
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment