From owner-freebsd-hackers Wed Mar 21 14:55:23 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.dis.org (mass.dis.org [216.240.45.41]) by hub.freebsd.org (Postfix) with ESMTP id 10D3337B71A for ; Wed, 21 Mar 2001 14:55:18 -0800 (PST) (envelope-from msmith@mass.dis.org) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.2/8.11.2) with ESMTP id f2LMpah02805; Wed, 21 Mar 2001 14:51:36 -0800 (PST) (envelope-from msmith@mass.dis.org) Message-Id: <200103212251.f2LMpah02805@mass.dis.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: Chris Sears Cc: Alexey Dokuchaev , freebsd-hackers@freebsd.org Subject: Re: Linux -> FreeBSD VM functions In-reply-to: Your message of "Wed, 21 Mar 2001 14:44:31 PST." <3AB92ECF.EAACE3D8@ix.netcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 21 Mar 2001 14:51:36 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I appear to have missed the original version of this message. Oops. > Alexey > > > static inline unsigned long > > get_kvirt_address(unsigned long address) > > { > > } > > This function returns 0 if a virtual address is not mapped. If you're looking at using this function, you're almost certainly at the wrong level. 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(). Again, I'm sorry that I missed your previous message; I may be misunderstanding what you're trying to do here. If you could resend it privately, I'd appreciate it. Regards, Mike -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message