LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   What does "/dev/mem" file indicates in linux (http://www.linuxquestions.org/questions/linux-kernel-70/what-does-dev-mem-file-indicates-in-linux-925226/)

haribabu1836 01-23-2012 06:40 AM

What does "/dev/mem" file indicates in linux
 
Hi All,

I have a PCI device in FC13 and i know the BAR0 value of it. How can i map some size of device memory into my application(main.c) address space? Should i do this by opening "/dev/mem" file and by "mmap()" function?

Is this "/dev/mem" device file indicates processor address space OR system RAM?
And what does "/dev/ramx" device files indicates? Please clear me these doubts,Thanks in advance.

nini09 01-23-2012 03:09 PM

/dev/mem is a character device file that is an image of the main memory of the computer. Byte addresses in /dev/mem are interpreted as physical memory addresses.

haribabu1836 01-24-2012 01:46 AM

Quote:

Originally Posted by nini09 (Post 4582439)
/dev/mem is a character device file that is an image of the main memory of the computer. Byte addresses in /dev/mem are interpreted as physical memory addresses.

Thanks for your reply.
What does "/dev/ram" files indicates in Linux and how these files differs from "/dev/mem" file?

nini09 01-24-2012 03:28 PM

/dev/ram* is RAM disk device, which simulates a fixed size hard disk in physical RAM.


All times are GMT -5. The time now is 12:59 AM.