I want to map device memory (NIC) to the kernel space memory region by using ioremap_wc()
. And then I want to remap memory region from kernel space to user space, and I can use 2 functions for this: vm_insert_page()
and remap_pfn_range()
POSIX mmap(3)
usually use the second: remap_pfn_range()
What is the difference between vm_insert_page()
and remap_pfn_range()
, and when do I need to use vm_insert_page()
instead of remap_pfn_range()
?
vm_inser_page
to remap device memory (NIC) region from kernel space to user space, because "With vm_inser_page you can map only RAM buffers"? – Bedford