tests: kernel: fatal: check stack overflow of FP capable threads
Test the HW stack protection feature for threads that are pre-tagged as FPU users, when building with support for FP shared registers mode (CONFIG_FP_SHARING=y). Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
0bae5a48d4
commit
bceca79804
1 changed files with 18 additions and 0 deletions
|
@ -308,6 +308,15 @@ void test_fatal(void)
|
|||
|
||||
TC_PRINT("test stack HW-based overflow - supervisor 2\n");
|
||||
check_stack_overflow(stack_hw_overflow, 0);
|
||||
|
||||
#if defined(CONFIG_FLOAT) && defined(CONFIG_FP_SHARING)
|
||||
TC_PRINT("test stack HW-based overflow (FPU thread) - supervisor 1\n");
|
||||
check_stack_overflow(stack_hw_overflow, K_FP_REGS);
|
||||
|
||||
TC_PRINT("test stack HW-based overflow (FPU thread) - supervisor 2\n");
|
||||
check_stack_overflow(stack_hw_overflow, K_FP_REGS);
|
||||
#endif /* CONFIG_FLOAT && CONFIG_FP_SHARING */
|
||||
|
||||
#endif /* CONFIG_HW_STACK_PROTECTION */
|
||||
|
||||
#ifdef CONFIG_USERSPACE
|
||||
|
@ -323,6 +332,15 @@ void test_fatal(void)
|
|||
|
||||
TC_PRINT("test stack HW-based overflow - user priv stack 2\n");
|
||||
check_stack_overflow(user_priv_stack_hw_overflow, K_USER);
|
||||
|
||||
#if defined(CONFIG_FLOAT) && defined(CONFIG_FP_SHARING)
|
||||
TC_PRINT("test stack HW-based overflow (FPU thread) - user 1\n");
|
||||
check_stack_overflow(stack_hw_overflow, K_USER | K_FP_REGS);
|
||||
|
||||
TC_PRINT("test stack HW-based overflow (FPU thread) - user 2\n");
|
||||
check_stack_overflow(stack_hw_overflow, K_USER | K_FP_REGS);
|
||||
#endif /* CONFIG_FLOAT && CONFIG_FP_SHARING */
|
||||
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
|
||||
#endif /* !CONFIG_ARCH_POSIX */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue