RISC-V: Enhancement for stack size to 16-bytes aligned at least

If enable CONFIG_PMP_STACK_GUARD, the stack size may not 16-bytes
aligned. Enhance this issue.

Signed-off-by: Shih-Wei Teng <swteng@andestech.com>
This commit is contained in:
Shih-Wei Teng 2021-01-06 17:55:25 +08:00 committed by Anas Nashif
commit a418b2535b

View file

@ -54,7 +54,8 @@
*/ */
#ifdef CONFIG_PMP_STACK_GUARD #ifdef CONFIG_PMP_STACK_GUARD
#define ARCH_KERNEL_STACK_RESERVED Z_RISCV_STACK_GUARD_SIZE #define ARCH_KERNEL_STACK_RESERVED Z_RISCV_STACK_GUARD_SIZE
#define ARCH_KERNEL_STACK_OBJ_ALIGN Z_RISCV_PMP_ALIGN #define ARCH_KERNEL_STACK_OBJ_ALIGN \
MAX(Z_RISCV_PMP_ALIGN, ARCH_STACK_PTR_ALIGN)
#endif #endif
#ifdef CONFIG_USERSPACE #ifdef CONFIG_USERSPACE