Lines Matching +full:memory +full:- +full:to +full:- +full:memory

4  * SPDX-License-Identifier: Apache-2.0
19 * @brief Kernel Memory Management
20 * @defgroup kernel_memory_management Kernel Memory Management
36 /** Write-through caching. Used by certain drivers. */
39 /** Full write-back caching. Any RAM mapped wants this. */
44 * pay attention to be not conflicted when updating these flags.
48 #define K_MEM_CACHE_MASK (BIT(3) - 1)
55 * Default is read-only, no user, no exec
60 /** Region will have read/write access (and not read-only) */
66 /** Region will be accessible to user mode (normally supervisor-only) */
77 /** Region will be mapped to 1:1 virtual and physical address */
98 * @brief The mapped region is not guaranteed to be zeroed.
109 * Region will be pinned in memory and never paged
111 * Such memory is guaranteed to never produce a page fault due to page-outs
112 * or copy-on-write once the mapping call has returned. Physical page frames
113 * will be pre-fetched as necessary and pinned.
118 * Region will be unpaged i.e. not mapped into memory
120 * This is meant to be used by kernel code and not by application code.
122 * Corresponding memory address range will be set so no actual memory will
127 * When this flag is specified, the phys argument to arch_mem_map()
129 * This is very similar to arch_mem_page_out() in that regard.
131 * ARCH_UNPAGED_ANON_UNINIT. Those are to be used with anonymous memory
139 * Return the amount of free memory available
142 * If demand paging is enabled, it may still be possible to allocate more.
145 * concurrent memory mappings or page-ins take place.
152 * Map anonymous memory into Zephyr's address space
154 * This function effectively increases the data space available to Zephyr.
155 * The kernel will choose a base virtual address and return it to the caller.
156 * The memory will have access permissions for all contexts set per the
159 * If user thread access control needs to be managed in any way, do not enable
161 * with memory domain APIs after the mapping has been established. Setting
162 * K_MEM_PERM_USER here will allow all user threads to access this memory
165 * Unless K_MEM_MAP_UNINIT is used, the returned memory will be zeroed.
167 * The mapped region is not guaranteed to be physically contiguous in memory.
171 * Pages mapped in this way have write-back cache settings.
173 * The returned virtual memory pointer will be page-aligned. The size
174 * parameter, and any base address for re-mapping purposes must be page-
181 * Many K_MEM_MAP_* flags have been implemented to alter the behavior of this
184 * @param size Size of the memory mapping. This must be page-aligned.
186 * @return The mapped memory location, or NULL if insufficient virtual address
187 * space, insufficient physical memory to establish the mapping,
188 * or insufficient memory for paging structures.
199 * This maps backing-store "location" tokens into Zephyr's address space.
200 * Corresponding memory address range will be set so no actual memory will
204 * The kernel will choose a base virtual address and return it to the caller.
205 * The memory access permissions for all contexts will be set per the
208 * If user thread access control needs to be managed in any way, do not enable
210 * with memory domain APIs after the mapping has been established. Setting
211 * K_MEM_PERM_USER here will allow all user threads to access this memory
216 * The provided backing-store "location" token must be linearly incrementable
219 * Allocated pages will have write-back cache settings.
221 * The returned virtual memory pointer will be page-aligned. The size
222 * parameter, and any base address for re-mapping purposes must be page-
230 * @param size Size of the memory mapping. This must be page-aligned.
233 * space to establish the mapping, or insufficient memory for paging
244 * Un-map mapped memory
246 * This removes a memory mapping for the provided page-aligned region.
247 * Associated page frames will be free and the kernel may re-use the associated
250 * Calling this function on a region which was not mapped to begin with is
253 * @param addr Page-aligned memory region base virtual address
254 * @param size Page-aligned memory region size
262 * Modify memory mapping attribute flags
265 * page-aligned memory region.
267 * Calling this function on a region which was not mapped to begin with is
268 * undefined behavior. However system memory implicitly mapped at boot time
271 * @param addr Page-aligned memory region base virtual address
272 * @param size Page-aligned memory region size
282 * to the provided alignment value.
288 * @param[in] align What to align the address and size to