From 12142f72ec71acbabdf019907f3a9e5d24a3e99b Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Wed, 29 May 2024 14:26:29 +0200 Subject: [PATCH] arch: arm: core: mpu: allow non-ARM memory attributes Memory region defined in devicetree can have attributes that are not intended to be parsed by MPU library, but might be valid for other components. Signed-off-by: Nikodem Kastelik --- arch/arm/core/mpu/arm_mpu.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/arm/core/mpu/arm_mpu.c b/arch/arm/core/mpu/arm_mpu.c index 52ad585b79c..fe5d86c822d 100644 --- a/arch/arm/core/mpu/arm_mpu.c +++ b/arch/arm/core/mpu/arm_mpu.c @@ -130,12 +130,10 @@ static int mpu_configure_regions_from_dt(uint8_t *reg_index) break; #endif default: - /* Either the specified `ATTR_MPU_*` attribute does not - * exists or the `REGION_*_ATTR` macro is not defined - * for that attribute. + /* Attribute other than ARM-specific is set. + * This region should not be configured in MPU. */ - LOG_ERR("Invalid attribute for the region\n"); - return -EINVAL; + continue; } #if defined(CONFIG_ARMV7_R) region_conf.size = size_to_mpu_rasr_size(region[idx].dt_size);