Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Mar 1997 17:50:12 +0100
From:      j@uriah.heep.sax.de (J Wunsch)
To:        Emmanuel.Duros@sophia.inria.fr
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Pb using DMA - Physical addressing
Message-ID:  <19970311175012.YO20885@uriah.heep.sax.de>
In-Reply-To: <199703111427.PAA05582@chouette.inria.fr>; from Emmanuel Duros on Mar 11, 1997 15:27:30 %2B0100
References:  <199703111427.PAA05582@chouette.inria.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
As Emmanuel Duros wrote:

> I am currently writing a device driver (isa bus) for a communication
> card (satellite reception/emission cards) that uses DMA transfers.
> 
> I have got a peace of code that works fine under DOS but as I insert it
> into the freebsd device driver code nothing happens.
> 
> I think the problem comes from the mapping of virtual addresses into
> physical addresses (?). Unfortunately I have not found much
> documentation on this...

Do not program the DMA controller yourself in Unix.  It's a shared
resource, other drivers might also wanna get hold of it.

Have a look into /sys/i386/isa/fd.c, the floppy disk driver.  It's
also using motherboard DMA.  Watch out for the isa_dma* functions.
(Once you figured out how to use them, please do us a favor and write
a man page!  I think we can even accept a stub page, so someone else
could fill in the blanks for the hairy troff macro details.)

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970311175012.YO20885>