LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   how to find physical address of kernel virtual address (https://www.linuxquestions.org/questions/programming-9/how-to-find-physical-address-of-kernel-virtual-address-494252/)

kushneeraj 10-20-2006 07:29 PM

how to find physical address of kernel virtual address
 
Hi All,

My kernel module recieve some virtual address from other module. This virtual can be kernel logical address or kernel virtual address.

if the memory is allocated by kmalloc() it will returns the kernel logical address. In this case i can use __pa() to get its physical address as there is a direct mapping.
But for memory allocated by vmalloc(), it will return ths kernel virtual address for which there may not be direct mapping for physical address. So in this case __pa() will not work.

I want to know how to make out the address i recieve from other module is kernel virtual address or kernel logical address.
Also how to find the physical address if its kernel virtual address..

Waiting for responces..

thanks
Neeraj


All times are GMT -5. The time now is 04:47 AM.