Skip to content

Commit d65fc29

Browse files
arnopojhedberg
authored andcommitted
arch: arm: mmu: introduce K_MEM_ARM_NORMAL_NC flag
Add new flag to allow to select normal non-cacheable memory. This is needed for armV7 to be able to configure non cacheable memories with "normal" attribute instead of "device" attribute. Signed-off-by: Arnaud Pouliquen <[email protected]>
1 parent ce09e3d commit d65fc29

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
#ifndef ZEPHYR_INCLUDE_ARCH_ARM_ARM_MEM_H_
7+
#define ZEPHYR_INCLUDE_ARCH_ARM_ARM_MEM_H_
8+
9+
/*
10+
* Define ARM specific memory flags used by k_mem_map_phys_bare()
11+
* followed public definitions in include/kernel/mm.h.
12+
*/
13+
14+
/** ARM Specific flags: normal memory with Non-cacheable */
15+
#define K_MEM_ARM_NORMAL_NC 5
16+
17+
#endif /* ZEPHYR_INCLUDE_ARCH_ARM_ARM_MEM_H_ */

include/zephyr/kernel/mm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#include <zephyr/toolchain.h>
1212
#if defined(CONFIG_ARM_MMU) && defined(CONFIG_ARM64)
1313
#include <zephyr/arch/arm64/arm_mem.h>
14+
#elif defined(CONFIG_ARM_AARCH32_MMU)
15+
#include <zephyr/arch/arm/mmu/arm_mem.h>
1416
#endif /* CONFIG_ARM_MMU && CONFIG_ARM64 */
1517

1618
#include <zephyr/kernel/internal/mm.h>

0 commit comments

Comments
 (0)