I am working on a small embedded system. When my linux boots up into user space, I know where are my devices in the physical memory. I want to map them into user space virtu
In Kernel module, remap_pfn_range() can be used to convert the physical address to virtual address. When you don't have a actual devices you can: 1) create a virtual device and, 2) use mmap to those virtual devices to access the very same kernel memory through remap_pfn_range virtual mapping of that process. 3) Usually in dedicated environments you may addition want to pin those physical pages lest they are taken away from your process. 4) You also share these physical addresses with different processes but will need to handle synchronization, independently through other IPC mechanisms as to each process they will look as different addresses.