[okl4-developer] virtual to physical in kernel

Geoffrey Lee glee at ok-labs.com
Tue Jun 10 11:04:35 EST 2008


On Sun, Jun 08, 2008 at 07:38:15PM -0700, Gabi Voiculescu wrote:
> Hello.
> 

Hi Gabi

> I have a question related to the ARMv6 version of OKL4.
> 
> I am currently doing a test at kernel level (actually in the interrupt handling subroutine) requiring me obtain the physical address of a memory section described by a fpage_t object.
> 
> I don't know what is the best function to convert from base virtual address to base physical address.
> 


Check out lookup_mapping().

	-gl

> My code looks like this:
> 
> uintptr_t test_get_phys (fpage_t test_fpage)
> {
> uintptr_t vaddr;
> uintptr_t paddr;
> 
> vaddr = test_fpage.get_base();
> 
> 
> I saw a way of doing this by using (for armv6):
> 
> paddr = l4e_get_phys (get_current_tcb()->get_space(), vaddr);
> 
> but it seems to be a higher level implementation than I am looking for.
> 
> Can you help me?
> 
> Thank you,
> Gabi Voiculescu
> 
> 
>        
> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer


-- 




More information about the Developer mailing list