Lines Matching +full:mapped +full:- +full:addr
4 * SPDX-License-Identifier: Apache-2.0
23 * This is the offset to subtract from a virtual address mapped in the
41 #define K_MEM_VIRT_OFFSET ((CONFIG_KERNEL_VM_BASE + CONFIG_KERNEL_VM_OFFSET) - \
56 #define K_MEM_PHYS_ADDR(virt) ((virt) - K_MEM_VIRT_OFFSET)
71 * @brief Kernel is mapped in virtual memory if defined.
99 uintptr_t addr = (uintptr_t)virt; in k_mem_phys_addr() local
107 (addr >= CONFIG_KERNEL_VM_BASE) && in k_mem_phys_addr()
110 (addr < (CONFIG_KERNEL_VM_BASE + in k_mem_phys_addr()
117 /* Should be identity-mapped */ in k_mem_phys_addr()
120 (addr >= CONFIG_SRAM_BASE_ADDRESS) && in k_mem_phys_addr()
123 (addr < (CONFIG_SRAM_BASE_ADDRESS + in k_mem_phys_addr()
129 (unsigned long)addr); in k_mem_phys_addr()
136 return K_MEM_PHYS_ADDR(addr); in k_mem_phys_addr()
183 * This function is intended for mapping memory-mapped I/O regions into
185 * linear address representing the base of where the physical region is mapped
188 * The memory mapped via this function must be unmapped using
200 * A caching mode must be selected. By default, the region is read-only
214 * and pin it at build time, it will be mapped when the system boots.
260 * a succeeding guard pages. The memory mapped via this function must be
266 * the base of where the physical region is mapped in 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-
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,
317 * @note Calling this function on a region which was not mapped via
320 * @param addr Page-aligned memory region base virtual address
321 * @param size Page-aligned memory region size
322 * @param is_anon True if the mapped memory is from anonymous memory.
324 void k_mem_unmap_phys_guard(void *addr, size_t size, bool is_anon);