Lines Matching +full:address +full:- +full:aligned

4  * SPDX-License-Identifier: Apache-2.0
21 * @brief Address offset of permanent virtual mapping from physical address.
23 * This is the offset to subtract from a virtual address mapped in the
24 * kernel's permanent mapping of RAM, to obtain its physical address.
41 #define K_MEM_VIRT_OFFSET ((CONFIG_KERNEL_VM_BASE + CONFIG_KERNEL_VM_OFFSET) - \
48 * @brief Get physical address from virtual address.
52 * @param virt Virtual address
54 * @return Physical address.
56 #define K_MEM_PHYS_ADDR(virt) ((virt) - K_MEM_VIRT_OFFSET)
59 * @brief Get virtual address from physical address.
63 * @param phys Physical address
65 * @return Virtual address.
87 * @brief Get physical address from virtual address.
93 * @param virt Virtual address
95 * @return Physical address.
103 "address %p not in permanent mappings", virt); in k_mem_phys_addr()
115 "address %p not in permanent mappings", virt); in k_mem_phys_addr()
117 /* Should be identity-mapped */ in k_mem_phys_addr()
128 "physical address 0x%lx not in RAM", in k_mem_phys_addr()
140 * @brief Get virtual address from physical address.
146 * @param phys Physical address
148 * @return Virtual address.
154 "physical address 0x%lx not in RAM", (unsigned long)phys); in k_mem_virt_addr()
166 "physical address 0x%lx not in RAM", (unsigned long)phys); in k_mem_virt_addr()
181 * Map a physical memory region into the kernel's virtual address space
183 * This function is intended for mapping memory-mapped I/O regions into
184 * the virtual address space. Given a physical address and a size, return a
185 * linear address representing the base of where the physical region is mapped
186 * in the virtual address space for the Zephyr kernel.
192 * for the kernel. This function will choose the virtual address
200 * A caching mode must be selected. By default, the region is read-only
204 * If there is insufficient virtual address space for the mapping this will
219 * @param[out] virt_ptr Output virtual address storage location
220 * @param[in] phys Physical address base of the memory region
228 * Unmap a virtual memory region from kernel's virtual address space.
238 * this can be used with the virtual address as returned by
251 * @param virt Starting address of the virtual address region to be unmapped.
252 * @param size Size of the virtual address region
257 * Map memory into virtual address space with guard pages.
259 * This maps memory into virtual address space with a preceding and
264 * virtual address space with a preceding and a succeeding guard pages.
265 * Given a physical address and a size, return a linear address representing
266 * the base of where the physical region is mapped in the virtual address
270 * for the kernel. This function will choose the virtual address
281 * The returned virtual memory pointer will be page-aligned. The size
282 * parameter, and any base address for re-mapping purposes must be page-
283 * aligned.
294 * @param phys Physical address base of the memory region if not requesting
295 * anonymous memory. Must be page-aligned.
296 * @param size Size of the memory mapping. This must be page-aligned.
300 * @return The mapped memory location, or NULL if insufficient virtual address
307 * Un-map memory mapped via k_mem_map_phys_guard().
309 * This removes the memory mappings for the provided page-aligned region,
320 * @param addr Page-aligned memory region base virtual address
321 * @param size Page-aligned memory region size