7#ifndef ZEPHYR_INCLUDE_KERNEL_MM_H
8#define ZEPHYR_INCLUDE_KERNEL_MM_H
12#if defined(CONFIG_ARM_MMU) && defined(CONFIG_ARM64)
34#define K_MEM_CACHE_NONE 2
37#define K_MEM_CACHE_WT 1
40#define K_MEM_CACHE_WB 0
48#define K_MEM_CACHE_MASK (BIT(3) - 1)
61#define K_MEM_PERM_RW BIT(3)
64#define K_MEM_PERM_EXEC BIT(4)
67#define K_MEM_PERM_USER BIT(5)
78#define K_MEM_DIRECT_MAP BIT(6)
106#define K_MEM_MAP_UNINIT BIT(16)
115#define K_MEM_MAP_LOCK BIT(17)
134#define K_MEM_MAP_UNPAGED BIT(18)
195#ifdef CONFIG_DEMAND_MAPPING
292 uintptr_t addr,
size_t size,
size_t align);
#define K_MEM_MAP_UNPAGED
Region will be unpaged i.e.
Definition mm.h:134
static void k_mem_unmap(void *addr, size_t size)
Un-map mapped memory.
Definition mm.h:256
size_t k_mem_free_get(void)
Return the amount of free memory available.
static void * k_mem_map(size_t size, uint32_t flags)
Map anonymous memory into Zephyr's address space.
Definition mm.h:190
size_t k_mem_region_align(uintptr_t *aligned_addr, size_t *aligned_size, uintptr_t addr, size_t size, size_t align)
Given an arbitrary region, provide a aligned region that covers it.
int k_mem_update_flags(void *addr, size_t size, uint32_t flags)
Modify memory mapping attribute flags.
void * k_mem_map_phys_guard(uintptr_t phys, size_t size, uint32_t flags, bool is_anon)
Map memory into virtual address space with guard pages.
void k_mem_unmap_phys_guard(void *addr, size_t size, bool is_anon)
Un-map memory mapped via k_mem_map_phys_guard().
flags
Definition parser.h:96
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINTPTR_TYPE__ uintptr_t
Definition stdint.h:105