Reputation: 261
Say that I have a device that uses memory mapped IO.
And we know that in Linux, each process have 3 GB of user space, and 1 GB of kernel space.
Now I assume that the address(es) for this device will be mapped to the kernel space of a process, so that a process (which is running in user mode) cannot access the device. Am I correct?
Upvotes: 0
Views: 494
Reputation:
Now I assume that the address(es) for this device will be mapped to the kernel space of a process, so that a process (which is running in user mode) cannot access the device. Am I correct?
Mostly. Since devices exist in physical memory, they can be mapped to multiple virtual addresses. An appropriately privileged userspace application can use mmap()
on /dev/mem
to remap portions of I/O memory into its address spce.
Upvotes: 5