Lines Matching +full:address +full:- +full:aligned
4 * SPDX-License-Identifier: Apache-2.0
18 * @brief Get the flags of mapped virtual address.
21 * a mapped virtual address. This is used internally for remapping.
23 * Behavior when providing unaligned address is undefined, this
24 * is assumed to be page aligned.
26 * @param virt Page-aligned virtual address
27 * @param[out] flags flags of mapped virtual address
30 * @retval -EINVAL if invalid arguments are provided
31 * @retval -EFAULT if virtual address is not mapped
36 * @brief Test if address is page-aligned
38 * @param addr address to be tested
40 * @retval true if page-aligned
41 * @retval false if not page-aligned
45 return ((addr & (CONFIG_MM_DRV_PAGE_SIZE - 1)) == 0U); in sys_mm_drv_is_addr_aligned()
49 * @brief Test if address is page-aligned
51 * @param addr address to be tested
53 * @retval true if page-aligned
54 * @retval false if not page-aligned
62 * @brief Test if size is page-aligned
66 * @retval true if page-aligned
67 * @retval false if not page-aligned
71 if ((size & (CONFIG_MM_DRV_PAGE_SIZE - 1)) == 0U) { in sys_mm_drv_is_size_aligned()
79 * @brief Test if all physical addresses in array are page-aligned
84 * @retval true if all are page-aligned
85 * @retval false if at least one is not page-aligned
92 * @param virt Page-aligned base virtual address
103 * @param virt Page-aligned base virtual address
119 * and call sys_mm_drv_simple_map_region() with some pre-processing done.
125 * @param virt Page-aligned destination virtual address to map
126 * @param phys Page-aligned source physical address to map
127 * @param size Page-aligned size of the mapped memory region in bytes
131 * @retval -EINVAL if invalid arguments are provided
132 * @retval -EFAULT if any virtual addresses have already been mapped
145 * and call sys_mm_drv_simple_map_array() with some pre-processing done.
151 * @param virt Page-aligned destination virtual address to map
152 * @param phys Array of pge-aligned source physical address to map
157 * @retval -EINVAL if invalid arguments are provided
158 * @retval -EFAULT if any virtual addresses have already been mapped
171 * and call sys_mm_drv_simple_unmap_region() with some pre-processing done.
177 * @param virt Page-aligned base virtual address to un-map
178 * @param size Page-aligned region size
181 * @retval -EINVAL if invalid arguments are provided
182 * @retval -EFAULT if virtual addresses have already been mapped
194 * and call sys_mm_drv_simple_remap_region() with some pre-processing done.
200 * @param virt_old Page-aligned base virtual address of existing memory
201 * @param size Page-aligned size of the mapped memory region in bytes
202 * @param virt_new Page-aligned base virtual address to which to remap
206 * @retval -EINVAL if invalid arguments are provided
207 * @retval -EFAULT if old virtual addresses are not all mapped or
221 * and call sys_mm_drv_simple_move_region() with some pre-processing done.
227 * @param virt_old Page-aligned base virtual address of existing memory
228 * @param size Page-aligned size of the mapped memory region in bytes
229 * @param virt_new Page-aligned base virtual address to which to map
231 * @param phys_new Page-aligned base physical address to contain
235 * @retval -EINVAL if invalid arguments are provided
236 * @retval -EFAULT if old virtual addresses are not all mapped or
250 * and call sys_mm_drv_simple_move_array() with some pre-processing done.
256 * @param virt_old Page-aligned base virtual address of existing memory
257 * @param size Page-aligned size of the mapped memory region in bytes
258 * @param virt_new Page-aligned base virtual address to which to map
260 * @param phys_new Array of page-aligned physical address to contain
265 * @retval -EINVAL if invalid arguments are provided
266 * @retval -EFAULT if old virtual addresses are not all mapped or
277 * mapped to a virtual address. This is useful when use case of
280 * it needs to be read-write and after it has already
282 * attributes need to be changed to read-only/executable.
285 * @param virt Page-aligned virtual address to be updated
286 * @param size Page-aligned size of the mapped memory region in bytes
290 * @retval -EINVAL if invalid arguments are provided
291 * @retval -EFAULT if virtual addresses is not mapped