Skip to content

Commit

Permalink
ARM: 8610/1: V7M: Add dsb before jumping in handler mode
Browse files Browse the repository at this point in the history
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: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Torgue Alexandre authored and Russell King committed Sep 6, 2016
1 parent 6a8146f commit 8e02676
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/mm/proc-v7m.S
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ __v7m_setup_cont:
badr r1, 1f
ldr r5, [r12, #11 * 4] @ read the SVC vector entry
str r1, [r12, #11 * 4] @ write the temporary SVC vector entry
dsb
mov r6, lr @ save LR
ldr sp, =init_thread_union + THREAD_START_SP
cpsie i
Expand Down

0 comments on commit 8e02676

Please sign in to comment.