> 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message