SATA

Dan Strick strick at covad.net
Wed May 5 17:05:45 PDT 2004


On Tue, 04 May 2004 01:25:37 +0200, Florian wrote:
>>
> On advice, I downloaded FreeBSD 4.10 RC2 (because 5.2.1 would not work) 
> but can't install it because the installer does not find my HDD which is a 
> 120gb Seagate drive on an on-board Silicon Image SiI 3112 SATARaid 
> Controller.
> Is SATA support not yet implemented in RC2 but in the 4.9? Or is SATA only 
> supported in 5.x?
> What can I do?
>>

FreeBSD supports some but not all ATA/SATA controllers.  I believe release
5.2.1 has some support for the SiI 3112 chip but release 4.x does not.

Your motherboard probably has a traditional parallel ATA interface.
If so, you could do the installation on a regular ATA drive.
(Which motherboard do you have?)

Once you have installed FreeBSD 4.10 on the regular ATA drive, if you
are feeling particularly adventuresome you could hack the FreeBSD 4.10
ATA driver to support the SiI 3112.  It happens that PCI ATA controllers
generally provide a similar programming interface.  (See for exmaple the
INCITS T13 unpublished draft "ATA/ATAPI Host Adapters Standard" or the
Intel data sheets for ICHx cpu support chip sets.)  All ATA adapters
probably have their own individual quirks, but ATA adapters produced
by the same manufacturer may tend to have the same quirks.  SATA adapters
are generally intended to work well enough with generic PCI ATA drivers
as long as they mostly accept the controller configuration defaults.

If you hack the FreeBSD 4.10 ATA driver to support the SiI 3112 as if
it were an SiI 0680, you might get lucky.  To do this, you must modify
/sys/dev/ata/ata-pci.c to recognize the PCI device.  In function
ata_pci_match(), add the following case to the big switch statement:

    case 0x31121095:
        return "SiI 3112 SATA controller"; 

You might reasonably add it after the 0x31121095 case for the SiI 0680
controller.

If you want the driver to attempt dma with this controller, you must add
a case to function ata_dmainit() in /sys/dev/ata/ata-dma.c.  Add this line:

	case 0x31121095:    /* SiI 3112 SATA controller */

immediately before the line:

	case 0x06801095:    /* SiI 0680 ATA133 controller */

You might also examine the release 5.2.1 ATA driver to see what it
does specifically for the SiI 3112 SATA controller.

I don't claim that these modifications to the ATA driver will work
very well.  I made them on my system (release 4.9) and it now sees
the SiI 3112 SATA controller, but I have not yet dug up any spare
SATA drives to test with the controller.  Note that these modifications
will not support the RAID features of your controller.

Dan Strick
strick at covad.net


More information about the freebsd-questions mailing list