diff --git a/arch/arm/core/mmu/arm_mmu.c b/arch/arm/core/mmu/arm_mmu.c index 62ef1492557c7..cdf099d253b0c 100644 --- a/arch/arm/core/mmu/arm_mmu.c +++ b/arch/arm/core/mmu/arm_mmu.c @@ -890,6 +890,9 @@ static int __arch_mem_map(void *virt, uintptr_t phys, size_t size, uint32_t flag switch (flags & K_MEM_CACHE_MASK) { + case K_MEM_ARM_NORMAL_NC: + conv_flags |= MT_NORMAL; + break; case K_MEM_CACHE_NONE: default: conv_flags |= MT_DEVICE; diff --git a/include/zephyr/arch/arm/mmu/arm_mem.h b/include/zephyr/arch/arm/mmu/arm_mem.h new file mode 100644 index 0000000000000..55a880cae8b7d --- /dev/null +++ b/include/zephyr/arch/arm/mmu/arm_mem.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2025 STMicroelectronics + * + * SPDX-License-Identifier: Apache-2.0 + */ +#ifndef ZEPHYR_INCLUDE_ARCH_ARM_ARM_MEM_H_ +#define ZEPHYR_INCLUDE_ARCH_ARM_ARM_MEM_H_ + +/* + * Define ARM specific memory flags used by k_mem_map_phys_bare() + * followed public definitions in include/kernel/mm.h. + */ + +/** ARM Specific flags: normal memory with Non-cacheable */ +#define K_MEM_ARM_NORMAL_NC 5 + +#endif /* ZEPHYR_INCLUDE_ARCH_ARM_ARM_MEM_H_ */ diff --git a/include/zephyr/kernel/mm.h b/include/zephyr/kernel/mm.h index 79c3dc4815f97..51eef148040e6 100644 --- a/include/zephyr/kernel/mm.h +++ b/include/zephyr/kernel/mm.h @@ -11,6 +11,8 @@ #include #if defined(CONFIG_ARM_MMU) && defined(CONFIG_ARM64) #include +#elif defined(CONFIG_ARM_AARCH32_MMU) +#include #endif /* CONFIG_ARM_MMU && CONFIG_ARM64 */ #include