From 69920375975fba5ec48f76956fefceec174bc0f9 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 dc540038e2b2c2..a84823639db588 100644 --- a/arch/arm/core/mpu/Kconfig +++ b/arch/arm/core/mpu/Kconfig @@ -47,6 +47,7 @@ config ARM_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