Skip to content

Commit

Permalink
Changes MPU alignment to 128 when FPU_SHARING and MPU_STACK_GUARD
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rysiof committed Jan 8, 2025
1 parent 8cf199f commit ef376e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/core/mpu/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef376e7

Please sign in to comment.