Any way to force AHCI mode on ICH8?

Morgan Wesström freebsd-questions at
Fri Sep 10 13:21:47 UTC 2010

On 2010-09-09 15:51, Morgan Wesström wrote:
> On 2010-09-09 13:04, Ivan Voras wrote:
>> On 09/09/10 02:10, Morgan Wesström wrote:
>>> I run FreeBSD 8.1 on an old Asus P5B-VM motherboard with ICH8. Its AMI
>>> BIOS lacks an option to enable AHCI mode. Intel's datasheet for the ICH8
>>> family specifies that this feature exists on the ICH8, and the option is
>>> available in the BIOS for the identical (apart from form factor) P5B
>>> motherboard.
>>> I've contacted Asus support for an updated BIOS but I don't have much
>>> hope I will ever see one. Would it be possible to patch the FreeBSD
>>> kernel to enable AHCI mode somehow during boot?
>> You mean except adding:
>> ahci_load="YES"
>> to /boot/loader.conf ?
> Yes, I meant if there was a way to programmatically switch the ICH8 into
> AHCI mode before loading ahci(4). The BIOS on this motherboard only
> provides a "legacy" and an "enhanced" option for the SATA controller.
> Neither option turns on AHCI mode so ata(4) attaches to the controller.
> There's also a JMicron controller, providing an eSATA connector, on this
> motherboard. It is AHCI compatible and ahci(4) attaches correctly to it.
> It would've been nice to be able to use NCQ and hotplug on the other
> SATA connectors too since the ICH8 has those features.

Cross-posting this to freebsd-hackers in case that is a more appropriate

On page 486, in the Intel I/O Controller Hub 8 (ICH8) Datasheet, there's
a description of the address map register that controls the SATA mode
selection (SMS).

I quote note 7:

"Software shall not manipulate SMS during runtime operation (i.e., the
OS will not do this). The BIOS may choose to switch from one mode to
another during POST."

That note is probably there for a reason but what would life be without
experimentation? :-) This is of course far beyond my level of expertise,
but would it be possible to flip the necessary register bit very early
on in the boot process to turn the SATA controller into AHCI mode? Has
anyone done anything like this and what part of the kernel or boot
loader would be most appropriate to patch? I have no problem applying a
patch and recompiling what's needed if anyone could provide the
necessary code.


More information about the freebsd-questions mailing list