arc: implement stack checking
ARC CPU has stack checking feature that allows to trigger an exception whenever the stack is incorrectly accessed. This patch implements the stack_top and stack_base register updates on context switches, and activates the Stack Checking bit of STATUS32 register when the CPU is in the context of a fiber or task. As GCC accesses the non-yet allocated stack with frame pointer enabled, this patch also add the omit-frame-pointer gcc flag in order to work properly. Change-Id: Ia9e224085a03bd29d682fb8f51f8e712f2ccb556 Signed-off-by: Alexandre d'Alton <alexandre.dalton@intel.com>
This commit is contained in:
parent
c65821718f
commit
f91e55b798
9 changed files with 77 additions and 5 deletions
|
@ -194,6 +194,9 @@ struct tcs {
|
|||
#ifdef CONFIG_ERRNO
|
||||
int errno_var;
|
||||
#endif
|
||||
#ifdef CONFIG_ARC_STACK_CHECKING
|
||||
uint32_t stack_top;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct s_NANO {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue