Call for testers: Apple ATA DMA

Nathan Whitehorn nwhitehorn at freebsd.org
Wed Sep 10 16:18:04 UTC 2008


Marco Trillo wrote:
> Hello,
>
> On Tue, Sep 9, 2008 at 5:38 PM, Nathan Whitehorn <nwhitehorn at freebsd.org> wrote:
>   
>> I just finished a patch to the Apple built-in ATA drivers (ata_macio and
>> ata_kauai) that adds DMA support. Due to lack of Kauai hardware (G4
>> machines), it has had only minimal testing, so I'd appreciate some more.
>>
>> The patch can be found here:
>> http://people.freebsd.org/~nwhitehorn/apple-ata-dma.patch
>>     
>
> Regarding the Kauai mode setting:
>
> [snip]
>   
>
> The "DMA_CONFIG_REG" register is actually only for UDMA timings, not
> for DMA+UDMA. DMA mode timings are ORed with PIO mode timings in the
> "PIO_CONFIG_REG" register; as indicated with the masks: 0x00fff000 for
> DMA and 0xff000fff for PIO.
>
> This can be verified by looking at Mac OS X's AppleKauaiATA.cpp
> driver, in lines 985 and 986 and others [1] .
>
> Note that the NetBSD driver also contains this error, and there is a
> patch for it on NetBSD PR 39176. OpenBSD driver doesn't have this
> problem.
>
> In addition, to enable UDMA, you need to OR 1 to the UDMA timing mode.
> So for example for UDMA2, you need to write 0x00004a61 and not simply
> 0x00004a60 .
>   
Thanks! I had just assumed that the NetBSD driver did the right thing, 
and only have a CD drive attached to a Shasta controller on which to 
test the Kauai driver. I'll change it to do things the right way.
-Nathan


More information about the freebsd-ppc mailing list