Date: Wed, 21 Mar 2001 14:51:36 -0800 From: Mike Smith <msmith@freebsd.org> To: Chris Sears <cbsears@ix.netcom.com> Cc: Alexey Dokuchaev <danfe@inet.ssc.nsu.ru>, freebsd-hackers@freebsd.org Subject: Re: Linux -> FreeBSD VM functions Message-ID: <200103212251.f2LMpah02805@mass.dis.org> In-Reply-To: Your message of "Wed, 21 Mar 2001 14:44:31 PST." <3AB92ECF.EAACE3D8@ix.netcom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103212251.f2LMpah02805>