Date: Tue, 3 Jun 1997 12:41:14 +0200 (MET DST) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: toor@dyson.iquest.net (John S. Dyson) Cc: hackers@freebsd.org Subject: Re: DMA for IDE drives ? Message-ID: <199706031041.MAA25969@labinfo.iet.unipi.it> In-Reply-To: <199705211437.JAA01152@dyson.iquest.net> from "John S. Dyson" at May 21, 97 09:37:22 am
next in thread | previous in thread | raw e-mail | index | archive | help
Following the suggestion from John Dyson, I have downloaded the documents for the PIIX controller (i82371FB/i82371SB) which is used on several of our motherboards. Maybe I am oversimplifying things but it seems that DMA for IDE could be implemented as follows: assuming that the conditions to use DMA on IDE apply (i.e a PIIX controller is detected, a drive supporting DMA is present on the channel), a read or write operation is required: in wdstart(): for write operations: instead of calling the outsw()/outsl, program the controller as specified in the PIIX manual, bottom of page 97, steps 1, 2, 4 (step 3 should have been already taken care of; or the command to request a DMA write transfer is different from a regular write command ?) for read operations: before returning, program the PIIX controller executing steps 1,2,4 as above; in wdintr() clear the stop bit in the dma-ide command register of the PIIX (step 7 page 98 of the docs) additionally, for read ops, do not issue the insw/insl instructions [One difficulty which might arise is that there is one DMA for each ide channel. So, presumably, we cannot overlap read/write ops on separate drives; I don't even know if we can do it now, btw.] Is it that simple, or there are other details I am not considering ? Thanks Luigi -----------------------------+-------------------------------------- Luigi Rizzo | Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it | Universita' di Pisa tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ _____________________________|______________________________________ for write operations: > John >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706031041.MAA25969>