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).
If I want to find the physical frame number that it is mapped to, I think I should write a system call. Also, will the macros we mentioned earlier be of help to me? (Because the library is mapped in the user address space of an user process)
Should I not be walking thro' the page tables to get the frame number?
In that case, can you please tell me where I should start looking?
Thank you,
Arun
On 9/4/07,
Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
Arun Babu wrote:
> Further, if I want to get the physical frame number for a given logical
> address, can someone please suggest me the way? [Is writing a code to walk
> through the page tables the only way? or can we make use of an already
> existing function/module?]
>
>
Replying too soon, sorry. Check if this helps:
__pa(kaddr) >> PAGE_SHIFT
(ideas taken from the same header file)
regards,
Mulyadi
--
I choose to do things not because they are easy. But because they are hard.
(Inspired by John F Kennedy's Rice moon speech..http://www1.jsc.nasa.gov/er/seh/ricetalk.htm)
Basic research is what I am doing when I don't know what I am doing. -- Wernher von Braun