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 <vincenzo.frascino@linaro.org>
This commit is contained in:
Vincenzo Frascino 2017-03-29 11:31:45 +01:00 committed by Kumar Gala
commit 86aff09c77

View file

@ -179,6 +179,14 @@ _thread_irq_disabled:
vldmia r0, {s16-s31}
#endif
#ifdef CONFIG_MPU_STACK_GUARD
/* r2 contains k_thread */
add r0, r2, #0
push {r2, lr}
blx configure_mpu_stack_guard
pop {r2, lr}
#endif /* CONFIG_MPU_STACK_GUARD */
/* load callee-saved + psp from thread */
add r0, r2, #_thread_offset_to_callee_saved
ldmia r0, {v1-v8, ip}