Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Sep 2010 15:21:42 +0200
From:      =?UTF-8?B?TW9yZ2FuIFdlc3N0csO2bQ==?= <freebsd-questions@pp.dyndns.biz>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Any way to force AHCI mode on ICH8?
Message-ID:  <4C8A30E6.5090009@pp.dyndns.biz>
In-Reply-To: <4C88E666.2030208@pp.dyndns.biz>
References:  <4C8825E7.5080000@pp.dyndns.biz> <i6aevt$3b9$1@dough.gmane.org> <4C88E666.2030208@pp.dyndns.biz>

next in thread | previous in thread | raw e-mail | index | archive | help
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.
>>>
>>> http://www.intel.com/Assets/PDF/datasheet/313056.pdf
>>>
>>> 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
list.

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).

http://www.intel.com/assets/pdf/datasheet/313056.pdf

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.

Regards
Morgan





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