Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions arch/arm/core/mmu/arm_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
17 changes: 17 additions & 0 deletions include/zephyr/arch/arm/mmu/arm_mem.h
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the commit message for arch: arm: mmu: introduce NORMAL and STRONGLY_ORDERED flags - it no longer reflects what the commit does

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! updated

Original file line number Diff line number Diff line change
@@ -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_ */
2 changes: 2 additions & 0 deletions include/zephyr/kernel/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include <zephyr/toolchain.h>
#if defined(CONFIG_ARM_MMU) && defined(CONFIG_ARM64)
#include <zephyr/arch/arm64/arm_mem.h>
#elif defined(CONFIG_ARM_AARCH32_MMU)
#include <zephyr/arch/arm/mmu/arm_mem.h>
#endif /* CONFIG_ARM_MMU && CONFIG_ARM64 */

#include <zephyr/kernel/internal/mm.h>
Expand Down