From owner-freebsd-hackers Tue Mar 11 08:52:48 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id IAA18612 for hackers-outgoing; Tue, 11 Mar 1997 08:52:48 -0800 (PST) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id IAA18603 for ; Tue, 11 Mar 1997 08:52:40 -0800 (PST) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id RAA00679; Tue, 11 Mar 1997 17:51:29 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.5/8.8.5) id RAA00943; Tue, 11 Mar 1997 17:50:13 +0100 (MET) Message-ID: <19970311175012.YO20885@uriah.heep.sax.de> 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 References: <199703111427.PAA05582@chouette.inria.fr> X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199703111427.PAA05582@chouette.inria.fr>; from Emmanuel Duros on Mar 11, 1997 15:27:30 +0100 Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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. ;-)