Subject: Mapping Virtual memory to physical memory
To: None <,,>
From: Mark Milligan <>
List: tech-misc
Date: 08/20/2001 08:41:41
A quick question:

Is there a function or api call to get the physical address from a virtua=
address?  I am helping port netbsd to an 8260 powerpc and the internal
communications controler cannot handle virtual addresses, it bypassess th=
address translation for DMA etc.  So I would like to be able to take the
virtual address of a destination buffer and convert it to a physical addr=
for the DMA controler.

Ive read the man pages on bus_dma, uvm, kvm and looked thru the pmap.c co=
de and
the closest thing ive found is the pmap_extract() function but it seems l=
ike a
internal (to pmap) functon only and dosent seem very usefull.  I could wr=
ite a
wraper to go around this function but I am hopeing there is a better way.

I know there are a couple of other people ho have worked on 8260 ports ou=
there, how have you handled this problem?

Thanks in advance.

Mark Milligan