Skip to content

Commit 86aff09

Browse files
Vincenzo Frascinogalak
Vincenzo Frascino
authored andcommitted
arm: core: Integrate thread stack guard feature
This patch integrates the thread stack guard feature in the arm Zephyr core. Change-Id: I2022899cbc7a340be71cfaa52f79418292f93bae Signed-off-by: Vincenzo Frascino <[email protected]>
1 parent 726c7b5 commit 86aff09

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

arch/arm/core/swap.S

+8
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,14 @@ _thread_irq_disabled:
179179
vldmia r0, {s16-s31}
180180
#endif
181181

182+
#ifdef CONFIG_MPU_STACK_GUARD
183+
/* r2 contains k_thread */
184+
add r0, r2, #0
185+
push {r2, lr}
186+
blx configure_mpu_stack_guard
187+
pop {r2, lr}
188+
#endif /* CONFIG_MPU_STACK_GUARD */
189+
182190
/* load callee-saved + psp from thread */
183191
add r0, r2, #_thread_offset_to_callee_saved
184192
ldmia r0, {v1-v8, ip}

0 commit comments

Comments
 (0)