LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 01-23-2012, 05:40 AM   #1
haribabu1836
LQ Newbie
 
Registered: Apr 2010
Posts: 16

Rep: Reputation: 0
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.
 
Old 01-23-2012, 02:09 PM   #2
nini09
Member
 
Registered: Apr 2009
Posts: 974

Rep: Reputation: 67
/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.
 
Old 01-24-2012, 12:46 AM   #3
haribabu1836
LQ Newbie
 
Registered: Apr 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by nini09 View Post
/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?
 
Old 01-24-2012, 02:28 PM   #4
nini09
Member
 
Registered: Apr 2009
Posts: 974

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


Reply

Tags
drivers, linux


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Stupidly ran "cat /dev/urandom > /dev/mem", worried I broke firmware crosstalk Linux - Hardware 2 10-25-2010 05:27 PM
LXer: Interview: Nina Paley (author of "Sita Sings the Blues" and the two "Minute Mem LXer Syndicated Linux News 0 03-17-2010 02:11 PM
Android permission to open("/dev/mem",...) eseitelbach Linux - Software 0 11-04-2009 09:05 AM
"Bad address" reading /dev/mem chvince Linux - General 1 12-03-2008 06:06 PM
Linux "mem=" commands (XBox xDSL) Thraxen Linux - General 0 09-12-2006 10:34 PM


All times are GMT -5. The time now is 02:51 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration