Click to See Complete Forum and Search --> : Device Driver I/O


driver_wannabe
08-26-2005, 01:41 PM
Some things I read recently, made reference to being able to go to User space from a device driver.
I.E., a device driver would need to map an address range into a User's process space.

Thus, this would give a process direct access to a device's
I/O memory buffer area.
So I guess the function mmap( ) would be used for this...

Can you give me an example of how or when a driver would need to do this?
Typically, what sort of driver would need to do this? Are we talking about a Block Driver?

TIA

bwkaz
08-26-2005, 06:48 PM
I would think that any kind of driver could do it. Anything running in kernel mode should have the ability to call whatever kernel functions do it.

But I'm not entirely sure how to do it. Maybe try looking at the mmap handler for the /dev/mem (character) device? That might give you some pointers.