[okl4-developer] How to know the phys addr mapping of a virt addr?

Geoffrey Lee glee at ok-labs.com
Thu Jan 3 00:07:10 EST 2008


On Wed, Jan 02, 2008 at 08:16:54PM +0800, kashin Lin wrote:
> Hi,
> 
> are there any function in pistachio that i can call to transfer a virt addr
> to
> phys addr ( which header i should include)?
> 
> i modify the timer's driver codes in src/platform/ to adapt okl4 to my
> target, but got
> the wrong timer behavior. i wonder if i write to the wrong address. so i
> need a way to
> know if the virt addr i used is mapped to the timer's base phy addr.

Hi

There is a virt_to_phys().

If you can get far enough to get the kernel debugger initialized you can
just dump the kernel pagetable to find out where your timer is mapped.

	-gl

> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer





More information about the Developer mailing list