Re: /dev/mem contains physical memory addresses?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2006-07-07 at 10:15 +0530, Om. wrote:
> On 7/6/06, Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:
> > On Thu, 2006-07-06 at 19:51 +0200, George Zhim wrote:
> > > Hi!
> > >
> > > On 7/6/06, Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:
> > > > PHYSICAL. if you want virutal you need to use /dev/kmem.
> How about peripheral memory mapped to some addresses? Assuming I have
> a PCI device and a on board flash PROM, would I be able to see them in
> /proc/(k)mem ? I feel not. Am I correct?

/dev/mem yes

HOWEVER, there is a much nicer way to mmap a PCI device's resources, and
that is sysfs.
/sys/bus/pci/devices/0000:00:02.0/resource0 
for example is the first resource of a PCI device on my system.
No need to muck about with the dangerous /dev/mem; this one is at least
well defined and portable across systems, including virtualization etc
etc


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

[Index of Archives]     [Audio]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux