Hi Arun...
What I am trying to find is, suppose for a user process, a library is mapped
at logical address 0x0123456 (as viewed from /proc/<pid>/maps).
OK, so it's a user space address. Initially I think you probably need to
walk on the assigned page tables by yourself, but please check
follow_page() defined in mm/memory.c. The function gives you idea on how
to browse through the page tables by using functions such pgd_offset()
and so on. Once you got the pte, you need the extract the relevant bits
to get the physical address of the page frame. I don't know the exact
bits you need, so please check the relevant Intel documents
One more thing. What you got above is the address of the page frame,
whereas to get the true physical address, you need to add some of least
significant bits from the original user space address. Again, it depends
on addressing (I hope I use the correct term) mode currently used i.e
using PAE or not, 2 level paging or 3 level paging etc.
Probably I missed something, but hopefully I give you clearer ideas.
regards,
Mulyadi
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ