Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jun 1997 17:39:45 +0200 (MEST)
From:      Søren Schmidt <sos@sos.freebsd.dk>
To:        luigi@labinfo.iet.unipi.it (Luigi Rizzo)
Cc:        toor@dyson.iquest.net, hackers@FreeBSD.ORG
Subject:   Re: DMA for IDE drives ?
Message-ID:  <199706031539.RAA25432@sos.freebsd.dk>
In-Reply-To: <199706031041.MAA25969@labinfo.iet.unipi.it> from Luigi Rizzo at "Jun 3, 97 12:41:14 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
In reply to Luigi Rizzo who wrote:
> 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

Pretty to the point, but you also need code to check if the drive
really supports DMAr. the struct wdparam has to be enlarged.
I'm currently testing exactly this here, it seems to work so far.
More later...

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Søren Schmidt               (sos@FreeBSD.org)               FreeBSD Core Team
                Even more code to hack -- will it ever end
..



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