add task stack testing with ldrt to supported arm configs
This commit is contained in:
parent
0f29c9ae9a
commit
9ba2ebb196
|
@ -82,6 +82,13 @@
|
|||
push {r4-r11}
|
||||
#endif // RT_ARM_FP
|
||||
|
||||
#if RT_MPU_TASK_REGIONS_ENABLE
|
||||
/* Force an exception if the context was just saved past the end of the task's
|
||||
* stack. This may unrecoverable, as the stores have already occurred into a
|
||||
* disallowed area, unless this is specifically set up as a stack guard. */
|
||||
ldrt r4, [sp]
|
||||
#endif // RT_MPU_TASK_REGIONS_ENABLE
|
||||
|
||||
// Store the stack pointer with the saved context.
|
||||
mov32 r2, rt_context_prev
|
||||
ldr r2, [r2]
|
||||
|
|
|
@ -36,6 +36,10 @@
|
|||
#define controltemp r2,
|
||||
#define getcontrol mrs r2, control
|
||||
#define setcontrol msr control, r2
|
||||
/* Force an exception if the context was just saved past the end of the task's
|
||||
* stack. This may unrecoverable, as the stores have already occurred into a
|
||||
* disallowed area, unless this is specifically set up as a stack guard. */
|
||||
#define teststack ldrt r4, [r1]
|
||||
|
||||
.macro mpuconfigure
|
||||
mov32 r1, rt_active_task
|
||||
|
@ -96,6 +100,7 @@
|
|||
#define getcontrol
|
||||
#define setcontrol
|
||||
#define mpuconfigure
|
||||
#define teststack
|
||||
#endif // RT_MPU_TASK_REGIONS_ENABLE
|
||||
|
||||
#if __ARM_ARCH == 8
|
||||
|
@ -118,6 +123,7 @@
|
|||
getcontrol
|
||||
getpsplim
|
||||
saveregs
|
||||
teststack
|
||||
|
||||
// Store the new stack pointer with the saved context.
|
||||
mov32 r2, rt_context_prev
|
||||
|
|
Loading…
Reference in New Issue