I am trying to find the physical addresses of heap variables, stack variables and memory mapped peripheral addresses using the /proc/{pid}/pagemap file using the steps detailed in the file: http://lxr.free-electrons.com/source/Documentation/vm/pagemap.txt. The procedure detailed works well for stack and heap variables. However, for memory mapped peripherals no page is found in the /proc/{pid}/pagemap file. The output of 'cat /proc/{pid}/maps' is:00008000-0000a000 r-xp 00000000 b3:02 289852     /home/linaro/ocm_test/write-memory00011000-00012000 r--p 00001000 b3:02 289852     /home/linaro/ocm_test/write-memory00012000-00013000 rw-p 00002000 b3:02 289852     /home/linaro/ocm_test/write-memory00013000-00034000 rw-p 00000000 00:00 0          [heap]b2efe000-b6dfe000 rw-s 00001000 b3:02 284849     /dev/uio0b6dfe000-b6ed2000 r-xp 00000000 b3:02 282416     /lib/arm-linux-gnueabihf/libc-2.15.sob6ed2000-b6eda000 ---p 000d4000 b3:02 282416     /lib/arm-linux-gnueabihf/libc-2.15.sob6eda000-b6edc000 r--p 000d4000 b3:02 282416     /lib/arm-linux-gnueabihf/libc-2.15.sob6edc000-b6edd000 rw-p 000d6000 b3:02 282416     /lib/arm-linux-gnueabihf/libc-2.15.sob6edd000-b6ee0000 rw-p 00000000 00:00 0 b6ee0000-b6ee2000 r-xp 00000000 b3:02 27519      /usr/lib/libinterface.sob6ee2000-b6ee9000 ---p 00002000 b3:02 27519      /usr/lib/libinterface.sob6ee9000-b6eea000 r--p 00001000 b3:02 27519      /usr/lib/libinterface.sob6eea000-b6eeb000 rw-p 00002000 b3:02 27519      /usr/lib/libinterface.sob6efb000-b6f12000 r-xp 00000000 b3:02 282407     /lib/arm-linux-gnueabihf/ld-2.15.sob6f13000-b6f14000 rw-p 00000000 00:00 0 b6f14000-b6f15000 rw-s 00000000 b3:02 284849     /dev/uio0b6f15000-b6f19000 rw-p 00000000 00:00 0 b6f19000-b6f1a000 r--p 00016000 b3:02 282407     /lib/arm-linux-gnueabihf/ld-2.15.sob6f1a000-b6f1b000 rw-p 00017000 b3:02 282407     /lib/arm-linux-gnueabihf/ld-2.15.sobee36000-bee57000 rw-p 00000000 00:00 0          [stack]bef1f000-bef20000 r-xp 00000000 00:00 0          [sigpage]ffff0000-ffff1000 r-xp 00000000 00:00 0          [vectors]When I try to find the physical addresses of 0x00013000 or 0xbee36000 it works fine. However the page map file returns no page found when I try to find the physical address corresponding to 0xb2efe000 which belongs to /dev/uio0. I am trying to do this for verification purposes. I know a physical address exists because I have used mmap on 0x1b90000 ignored to find 0xb2efe000. Could someone please explain why the /proc/{pid}/pagemap file doesn't contain the physical address?
Pagemap on memory mapped devices not working
ubuntu;linux kernel;virtual memory;mmap