mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
mm/kmm_map: Add support to dynamically map pages into kernel virtual memory
This adds functionality to map pages dynamically into kernel virtual memory. This allows implementing I/O remap for example, which is a useful (future) feature. Now, the first target is to support mapping user pages for the kernel. Why? There are some userspace structures that might be needed when the userspace process is not running. Semaphores are one such example. Signals and the WDT timeout both need access to the user semaphore to work properly. Even though for this only obtaining the kernel addressable page pool virtual address is needed, for completeness a procedure is provided to map several pages.
This commit is contained in:
+10
@@ -189,6 +189,16 @@ config MM_SHM
|
||||
Build in support for the shared memory interfaces shmget(), shmat(),
|
||||
shmctl(), and shmdt().
|
||||
|
||||
config MM_KMAP
|
||||
bool "Support for dynamic kernel virtual mappings"
|
||||
default n
|
||||
depends on MM_PGALLOC && BUILD_KERNEL
|
||||
select ARCH_VMA_MAPPING
|
||||
---help---
|
||||
Build support for dynamically mapping pages from the page pool into
|
||||
kernel virtual memory. This includes pages that are already mapped
|
||||
for user.
|
||||
|
||||
config MM_HEAP_MEMPOOL_THRESHOLD
|
||||
int "The size of threshold to avoid using multiple mempool in heap"
|
||||
default 0
|
||||
|
||||
Reference in New Issue
Block a user