Date: Fri, 25 Aug 2000 00:29:59 -0700 From: Mike Smith <msmith@freebsd.org> To: pran@procsys.com Cc: freebsd-hackers@freebsd.org Subject: Re: Memory Mapping -2 Message-ID: <200008250729.AAA04702@mass.osd.bsdi.com> In-Reply-To: Your message of "Fri, 25 Aug 2000 12:44:18 %2B0530." <39A61CCA.2DB82AFF@procsys.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> Hi, > > I am trying to write a PCI ethernet driver for FreeBSD 3.4 release. Will you folks please give up and move to 4.x? 3.x is *dead*. 8) > I have some questions > > 1. How can I convert physical address to virtual address . What I want > is to read the physical address from the device register and to copy it > to host memory. From my earlier post I found that I can use vtopys > macro to convert virtual to physical address. Now I want to do the > reverse. You don't do it like this. Firstly, you shouldn't use vtophys, you should be using busdma. Secondly, a physical page can appear in more than one virtual location. Typically your ethernet hardware will have a descriptor associated with each buffer, and you need to use the descriptor to backtrack to your control structure which references the actual virtual address you care about. > 2. What are things should I do if I want the driver to work on alpha > platform also. a) Move to 4.x b) Use the busspace and busdma interfaces -- ... 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] 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?200008250729.AAA04702>