arch: Changes MPU alignment to 128 when FPU_SHARING and MPU_STACK_GUARD

With our builds for Arm M7 we are selecting FPU_SHARING and
MPU_STACK_GUARD. For that setup, we have
ARM_MPU_REGION_MIN_ALIGN_AND_SIZE=64 and
MPU_STACK_GUARD_MIN_SIZE_FLOAT=128. So worst case scenario,
we are going to have stack that is 64-byte aligned and
128-byte guard at the bottom of the buffer.

Fixes: #83714

Signed-off-by: Maciej Kusio <rysiof@gmail.com>
This commit is contained in:
Maciej Kusio 2025-01-08 13:46:41 -08:00 committed by Benjamin Cabé
parent 748881066f
commit ddff91fef6

View file

@ -8,6 +8,7 @@ if CPU_HAS_MPU
config ARM_MPU_REGION_MIN_ALIGN_AND_SIZE
int
default 256 if ARM_MPU && ARMV6_M_ARMV8_M_BASELINE && !ARMV8_M_BASELINE
default 128 if ARM_MPU && FPU_SHARING && MPU_STACK_GUARD
default 64 if ARM_MPU && AARCH32_ARMV8_R
default 32 if ARM_MPU
default 4