Date: Wed, 21 Mar 2001 17:32:55 -0800 From: Chris Sears <cbsears@ix.netcom.com> To: freebsd-hackers@freebsd.org Subject: Re: Linux -> FreeBSD VM functions Message-ID: <3AB95647.B8F646DE@ix.netcom.com> References: <200103212251.f2LMpah02805@mass.dis.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AB95647.B8F646DE>