From ddff91fef6ac339d3630690ec98eab1acec36218 Mon Sep 17 00:00:00 2001 From: Maciej Kusio Date: Wed, 8 Jan 2025 13:46:41 -0800 Subject: [PATCH] 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 --- arch/arm/core/mpu/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/core/mpu/Kconfig b/arch/arm/core/mpu/Kconfig index 58556f4e7bc..67baee979c9 100644 --- a/arch/arm/core/mpu/Kconfig +++ b/arch/arm/core/mpu/Kconfig @@ -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