Mike

> 
> FreeBSD provides a more complete mechanism for getting virtual mappings
> of device physical apertures, and you should use it.
> 
> > No actually it would the other way around: VM_PAGE_TO_PHYS.
> > But you have to get the vm_page of the virtual address first.
> > Perhaps pmap_extract(pmap, va) might be more helpful
> > but you will need the pmap of the process.
> 
> Typically, in non-PCI, non-PNP cases you would use pmap_mapdev().

He was looking for virtual to physical mapping rather than allocation.
pmap_mapdev allocates:

/*
 * Map a set of physical memory pages into the kernel virtual
 * address space. Return a pointer to where it is mapped. This
 * routine is intended to be used for mapping device memory,
 * NOT real memory. The non-cacheable bits are set on each
 * mapped page.
 */

But in any case, he should hit the books.

Chris

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to