HELP!! simple device driver for mapping piece of /dev/mem to user space

HELP!! simple device driver for mapping piece of /dev/mem to user space

Post by ferdinand.cornelisse » Sun, 31 Dec 1899 09:00:00



Hi all,

I am working with a PCI board which has onboard memory. The card does
not have a device driver, so the only way I can access the card's
memory is by openening /dev/mem en mmaping the right memory block into
user space memory. However, this is only possible when running as
root. I want to be able to access the boards memory as an ordinary
user by writing a simple kernel-space device driver which maps the
correct memory from /dev/mem to memory in user space.

Can anyone help me out by giving me pointers to usefull example code,
documents or whatever useful information?

Thanks in advance.

Ferdinand.

 
 
 

HELP!! simple device driver for mapping piece of /dev/mem to user space

Post by Tony Lawrenc » Sun, 31 Dec 1899 09:00:00



> Hi all,

> I am working with a PCI board which has onboard memory. The card does
> not have a device driver, so the only way I can access the card's
> memory is by openening /dev/mem en mmaping the right memory block into
> user space memory. However, this is only possible when running as
> root. I want to be able to access the boards memory as an ordinary
> user by writing a simple kernel-space device driver which maps the
> correct memory from /dev/mem to memory in user space.

> Can anyone help me out by giving me pointers to usefull example code,
> documents or whatever useful information?

The book "Linux Device Drivers" (
http://pcunix.com/Books/lindd.html ) has an appendix devoted to
PCI..

--

SCO/Linux articles, help, book reviews, tests,
job listings and more : http://www.pcunix.com

 
 
 

1. HELP!! simple driver to map /dev/mem to user space mem

Hi all,

I am working with a PCI board which has onboard memory. The card does
not have a device driver, so the only way I can access the card's
memory is by openening /dev/mem en mmaping the right memory block into
user space memory. However, this is only possible when running as
root. I want to be able to access the boards memory as an ordinary
user by writing a simple kernel-space device driver which maps the
correct memory from /dev/mem to memory in user space.

Can anyone help me out by giving me pointers to usefull example code,
documents or whatever useful information?

Thanks in advance.

Ferdinand.

2. a little computer board

3. I/O mapping from Device Driver to User space

4. configuring dosemu

5. Need help in understanding the mapping of user-space send, sendto, sendmsg to kernel-space sendmsg

6. Firewall Appliance

7. user space device driver can't write to isa device

8. Interesting network question

9. map pci memory to user space for network devices

10. Driver to map Z8530 in user space on Solaris 2.5.1

11. Problem mapping PCI memory space to user space

12. Mapping driver buffer to user space

13. mapping user space and kernel space