Re: How to convert virtual address to physical address and revers e?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi Raj,

I am now getting a little bit more sense about it.

here is my basic thoughts:
for RAM  < 896 MB
physical address 0 <==> virtual address 0xc0000000 and thats what
virt_to_phys & phys_to_virt do ( so do __pa and  __va). Every physical page
frame is mapped by a struct page that records the page frame's information
and you can find the page via mem_map+pfn, ie pfn_to_page.

for  896 MB < RAM < 4096MB
the *virtual field will record the corresponding virtual address if the
given mapped physical address is larger than 896MB.
does that the way kernel work ? correct me plz if I am wrong.
(will discuss more details after thes basics)

btw, I cant find any function or macro called rmap, is that kunmap you mean
? I need to dig more about this topic, its getting instresting.




--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux