read PCI memory and config spyce through /dev/mem
Warlich, Christof
christof.warlich at siemens.com
Mon May 6 10:44:03 EDT 2013
Hi,
I'd like to look at some of my PCI devices through /dev/mem.
My kernel config has "Filter access to /dev/mem" (STRICT_DEVMEM)
switched off, so as root, I should have unrestricted access.
I get my PCI device's BAR address through /proc/iomem, e.g.:
$ cat /proc/iomem
...
f7600000-f7603fff : r8169
...
Ok, so there should be 16K of PCI memory from my ethernet card
starting at f7600000, which is 4150263808 in decimal to be used
With dd. But:
$ dd if=/dev/mem bs=1 count=1024 skip=4150263808
dd: reading `/dev/mem': Bad address
0+0 records in
0+0 records out
0 bytes (0 B) copied, 6.6658e-05 s, 0.0 kB/s
The kernel config help says that _PCI_ memory access is even
possible with STRICT_DEVMEM enabled. Can anyone give me a hint
what I may do wrong?
Thanks a lot,
Chris
More information about the Kernelnewbies
mailing list