Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Aug 2000 02:23:44 -0700
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Pran Joseph <pran@procsys.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Memory Mapping -2
Message-ID:  <20000825022344.K1209@fw.wintelcom.net>
In-Reply-To: <39A61CCA.2DB82AFF@procsys.com>; from pran@procsys.com on Fri, Aug 25, 2000 at 12:44:18PM %2B0530
References:  <39A61CCA.2DB82AFF@procsys.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* Pran Joseph <pran@procsys.com> [000825 00:11] wrote:
> Hi,
> 
>  I am trying to write a PCI ethernet driver for FreeBSD 3.4 release.
> 
> 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.

Um, I'm not sure what you mean here, a physical memory location can
be mapped vitually anywhere :), you have to keep track of the virtual
address somehow in your driver.

> 2. What are things should I do if I want the driver to work on alpha
> platform also.

Don't use i386 assumptions?  example: use PAGE_SIZE rather than
hardcoding 4096, make sure you're using busdma rather than
hardcoding all your stuff.

Lastly buy and alpha. :)

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."


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?20000825022344.K1209>