Lines Matching +full:permission +full:- +full:flags

4  * SPDX-License-Identifier: Apache-2.0
11 * This contains APIs for a system-wide memory management
30 * This contains APIs for a system-wide memory management
48 /** Write-through caching */
51 /** Full write-back caching */
55 #define SYS_MM_MEM_CACHE_MASK (BIT(3) - 1)
62 * @name Region permission attributes.
64 * Default should be read-only, no user, no exec.
69 /** Region will have read/write access (and not read-only) */
75 /** Region will be accessible to user mode (normally supervisor-only) */
102 * @param virt Page-aligned destination virtual address to map
103 * @param phys Page-aligned source physical address to map
104 * @param flags Caching, access and control flags, see SYS_MM_MEM_* macros
107 * @retval -EINVAL if invalid arguments are provided
108 * @retval -EFAULT if virtual address has already been mapped
110 int sys_mm_drv_map_page(void *virt, uintptr_t phys, uint32_t flags);
124 * @param virt Page-aligned destination virtual address to map
125 * @param phys Page-aligned source physical address to map
126 * @param size Page-aligned size of the mapped memory region in bytes
127 * @param flags Caching, access and control flags, see SYS_MM_MEM_* macros
130 * @retval -EINVAL if invalid arguments are provided
131 * @retval -EFAULT if any virtual addresses have already been mapped
134 size_t size, uint32_t flags);
148 * @param virt Page-aligned destination virtual address to map
149 * @param phys Array of pge-aligned source physical address to map
151 * @param flags Caching, access and control flags, see SYS_MM_MEM_* macros
154 * @retval -EINVAL if invalid arguments are provided
155 * @retval -EFAULT if any virtual addresses have already been mapped
158 size_t cnt, uint32_t flags);
175 * @param virt Page-aligned virtual address to un-map
178 * @retval -EINVAL if invalid arguments are provided
179 * @retval -EFAULT if virtual address is not mapped
198 * @param virt Page-aligned base virtual address to un-map
199 * @param size Page-aligned region size
202 * @retval -EINVAL if invalid arguments are provided
203 * @retval -EFAULT if virtual address is not mapped
224 * @param virt_old Page-aligned base virtual address of existing memory
225 * @param size Page-aligned size of the mapped memory region in bytes
226 * @param virt_new Page-aligned base virtual address to which to remap
230 * @retval -EINVAL if invalid arguments are provided
231 * @retval -EFAULT if old virtual addresses are not all mapped or
267 * @param virt_old Page-aligned base virtual address of existing memory
268 * @param size Page-aligned size of the mapped memory region in bytes
269 * @param virt_new Page-aligned base virtual address to which to map
271 * @param phys_new Page-aligned base physical address to contain
275 * @retval -EINVAL if invalid arguments are provided
276 * @retval -EFAULT if old virtual addresses are not all mapped or
301 * @param virt_old Page-aligned base virtual address of existing memory
302 * @param size Page-aligned size of the mapped memory region in bytes
303 * @param virt_new Page-aligned base virtual address to which to map
305 * @param phys_new Array of page-aligned physical address to contain
310 * @retval -EINVAL if invalid arguments are provided
311 * @retval -EFAULT if old virtual addresses are not all mapped or
330 * @brief Update memory page flags
336 * it needs to be read-write and after it has already
338 * attributes need to be changed to read-only/executable.
341 * @param virt Page-aligned virtual address to be updated
342 * @param flags Caching, access and control flags, see SYS_MM_MEM_* macros
345 * @retval -EINVAL if invalid arguments are provided
346 * @retval -EFAULT if virtual addresses is not mapped
349 int sys_mm_drv_update_page_flags(void *virt, uint32_t flags);
352 * @brief Update memory region flags
358 * it needs to be read-write and after it has already
360 * attributes need to be changed to read-only/executable.
363 * @param virt Page-aligned virtual address to be updated
364 * @param size Page-aligned size of the mapped memory region in bytes
365 * @param flags Caching, access and control flags, see SYS_MM_MEM_* macros
368 * @retval -EINVAL if invalid arguments are provided
369 * @retval -EFAULT if virtual addresses is not mapped
372 int sys_mm_drv_update_region_flags(void *virt, size_t size, uint32_t flags);
395 * @param virt Page-aligned virtual address
400 * @retval -EINVAL if invalid arguments are provided
401 * @retval -EFAULT if virtual address is not mapped
425 for (iter = regions; iter->size; iter++)
435 * @retval regions A possibly empty array - i.e. containing only the sentinel
436 * marking at the end - of memory regions.