yf13 commented on code in PR #12041: URL: https://github.com/apache/nuttx/pull/12041#discussion_r1569774653
########## include/nuttx/mm/map.h: ########## @@ -193,6 +193,42 @@ void vm_release_region(FAR struct mm_map_s *mm, FAR void *vaddr, #endif +#ifdef CONFIG_MM_UMAP + +/**************************************************************************** + * Name: vm_map_region + * + * Description: + * Allocate virtual memory and maps physical memory range into user space + * of the current process. + * + * Input Parameters: + * paddr - Starting physical address + * size - Size of the address range + * + * Returned Value: + * Virtual address of the range, or NULL if error + * + ****************************************************************************/ + +uintptr_t vm_map_region(uintptr_t paddr, size_t size); Review Comment: This patch is for interfaces definitions only as we are highly to change based on review discussions. The implementations will be based on `vm_alloc_region()` and `up_shmat()`. This is simply a wrapper function for device drivers to use, I am unsure if there is better place in the source tree to put them. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
