I have looked into similar questions on this site (listed at the end) but still feel like missing a couple points, hopefully someone can help here:
Is there a hook into the
proc
file system that connects the/proc/iomem
inode
to a function that dumps the information? I wasn't able to find where in proc fs this function lives. I did agrep
under the linux source treefs/proc
foriomem
, got nothing. So maybe it is a more of aprocfs
question... The answer to this question might help me to dig up the answer to the next question..The
/proc/iomem
has more entries than the BIOS E820 information I extracted from eitherdmesg
or/sys/firmware/memmap
(these two are actually consistent with each other). For example,/sys/firmware/memmap
does not seem to have pci memory mapped regions. Drivers' init code calls therequest_mem_region()
and add more info to the map, so somewhere there should be a global variable (root of all resources ?) that remembers this graph?
The questions on stackoverflow I have looked into: