From owner-freebsd-hackers Wed Mar 21 17:28:47 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from granger.mail.mindspring.net (granger.mail.mindspring.net [207.69.200.148]) by hub.freebsd.org (Postfix) with ESMTP id 6888337B71C for ; Wed, 21 Mar 2001 17:28:44 -0800 (PST) (envelope-from cbsears@ix.netcom.com) Received: from ix.netcom.com (user-2ivfm4q.dialup.mindspring.com [165.247.216.154]) by granger.mail.mindspring.net (8.9.3/8.8.5) with ESMTP id UAA15133 for ; Wed, 21 Mar 2001 20:28:42 -0500 (EST) Message-ID: <3AB95647.B8F646DE@ix.netcom.com> Date: Wed, 21 Mar 2001 17:32:55 -0800 From: Chris Sears X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.17-21mdk i686) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Re: Linux -> FreeBSD VM functions References: <200103212251.f2LMpah02805@mass.dis.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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