Page 1 of 2

Adoption of the AHCI interface

Posted: Sun Oct 02, 2011 3:40 am
by Casm
Looking through the new PCI codes I noticed that SATA drives have two interface codes, designated AHCI and vendor specific. That led me to wonder just how widely adopted the AHCI interface is going to be, and whether or not it would be safer to carry on programming SATA drives as if they were ATA drives. (And is there any real advantage in doing otherwise.)

Re: Adoption of the AHCI interface

Posted: Sun Oct 02, 2011 1:17 pm
by Cognition
AHCI is already fairly well adopted on newer motherboards, however some onboard sata controllers might need to be configured to actually run in 'AHCI mode'. Sometimes using certain controller features like software based raid solutions might also force a controller to operate through it's native interface. I'm not too sure how well supported it is for discrete controllers, you might want to nose around the linux sources some to get a headcount of what controllers use AHCI.

That said you'll probably want an AHCI driver going forward as it is pretty well standardized at this point.

Re: Adoption of the AHCI interface

Posted: Mon Oct 03, 2011 1:33 am
by xyzzy
It's often configurable in the BIOS whether a controller operates in legacy or AHCI mode. Pretty much all recent boards I've seen support AHCI, the default is usually legacy mode though.

Re: Adoption of the AHCI interface

Posted: Mon Oct 03, 2011 3:39 am
by Brendan
Hi,
Cognition wrote:That said you'll probably want an AHCI driver going forward as it is pretty well standardized at this point.
Agreed.

I'd assume that almost all SATA controllers have 2 modes - "legacy mode" (for backward compatibility) and "AHCI mode". Old OSs that don't support SATA properly use "legacy mode" (which is why it's often the default for BIOS); while a new OSs should support "AHCI mode" (and switch the controller from "legacy mode" to "AHCI mode" where possible).


Cheers,

Brendan

Re: Adoption of the AHCI interface

Posted: Mon Oct 03, 2011 8:08 am
by rdos
The problem with the AHCI spec (as with the USB disc spec), is that it relies on non-open standards (the SCSI standard in both cases if I remember it correctly). I would like an AHCI document that stood on its own without external specifications that are not available.

Also, it is not as simple as turn on legacy support in BIOS, since most useful configurations should work with some standard OS that might be installed before your own OS. For instance, I have a portable computer with Windows 7 that is installed with AHCI enabled, which means that I cannot change to legacy-mode in BIOS without problems.

Re: Adoption of the AHCI interface

Posted: Tue Oct 04, 2011 12:07 am
by JackScott
rdos wrote:For instance, I have a portable computer with Windows 7 that is installed with AHCI enabled, which means that I cannot change to legacy-mode in BIOS without problems.
Not true. In every case I've seen (and that's a lot, I work in a computer shop) you can change the controller mode from IDE-compatible to AHCI or vice-versa and Windows 7 will just reconfigure its startup sequence for the new controller. It'll restart itself a few times, and you're good to go in the new controller mode. I would still be hesitant to say it works 100% of the time, but every time I've done it, it works. It also copes fine with changes in video card driver, primary hard drive, and many other things.

Re: Adoption of the AHCI interface

Posted: Tue Oct 04, 2011 12:32 am
by rdos
OK. I'll try it in the evening. I've only tested this with Windows XP, and it refused to start when changing to AHCI-mode.

Re: Adoption of the AHCI interface

Posted: Tue Oct 04, 2011 1:28 am
by Combuster
Next time, don't blindly assume that design deficiencies persist across three generations of Windows...

Re: Adoption of the AHCI interface

Posted: Tue Oct 04, 2011 5:49 am
by Casm
Thanks for the replies. I think I might proceed on the assumption that by the time this operating system sees the light of day, IDE drives will be as common as their ST412/506 predecessors.

Re: Adoption of the AHCI interface

Posted: Tue Oct 04, 2011 12:16 pm
by Brynet-Inc
rdos wrote:OK. I'll try it in the evening. I've only tested this with Windows XP, and it refused to start when changing to AHCI-mode.
Windows XP didn't include an AHCI driver, a lot of systems were sold with ATA mode enabled by default so that it could be installed.. many OEM's systems included generic or vendor AHCI drivers written by a 3rd party.

This continues to be a problem for people using these older systems and running BSD or some other OS with AHCI drivers, as typically they don't force the controller into AHCI mode.. the user has to toggle the BIOS setting, which, sometimes isn't there.

Re: Adoption of the AHCI interface

Posted: Tue Oct 04, 2011 3:05 pm
by rdos
Combuster wrote:Next time, don't blindly assume that design deficiencies persist across three generations of Windows...
Why not? Other deficiencies persist over more than 3 Windows generations?

Re: Adoption of the AHCI interface

Posted: Wed Oct 05, 2011 8:17 am
by quok
rdos wrote:
Combuster wrote:Next time, don't blindly assume that design deficiencies persist across three generations of Windows...
Why not? Other deficiencies persist over more than 3 Windows generations?
I see a troll!

Re: Adoption of the AHCI interface

Posted: Sat Oct 08, 2011 12:13 pm
by rdos
JackScott wrote:
rdos wrote:For instance, I have a portable computer with Windows 7 that is installed with AHCI enabled, which means that I cannot change to legacy-mode in BIOS without problems.
Not true. In every case I've seen (and that's a lot, I work in a computer shop) you can change the controller mode from IDE-compatible to AHCI or vice-versa and Windows 7 will just reconfigure its startup sequence for the new controller. It'll restart itself a few times, and you're good to go in the new controller mode. I would still be hesitant to say it works 100% of the time, but every time I've done it, it works. It also copes fine with changes in video card driver, primary hard drive, and many other things.
People on a laptop forum (the same that I have) say differently: http://forum.notebookreview.com/sony/42 ... -bios.html

Several people there claim there is a need to reinstall Win 7 when changing from AHCI to IDE mode. Also, the option is not visible in the BIOS without some type of hacking.

Re: Adoption of the AHCI interface

Posted: Sat Oct 08, 2011 1:45 pm
by Brynet-Inc
rdos wrote:
People on a laptop forum (the same that I have) say differently: http://forum.notebookreview.com/sony/42 ... -bios.html

Several people there claim there is a need to reinstall Win 7 when changing from AHCI to IDE mode. Also, the option is not visible in the BIOS without some type of hacking.
I don't use Windows, but are you really going to use some random forum reference about some particular model as a way to enforce your argument?

Re: Adoption of the AHCI interface

Posted: Sun Oct 09, 2011 3:45 pm
by JackScott
It looks like the laptop featured on that page is broken by design; Sony doesn't want people to have a fully-working BIOS. Nevertheless, that matters not. My argument is thus:

Hypothesis: Windows 7 supports AHCI to IDE mode switches without a reinstall.

Method: Become an accredited computer technician, and then over several years perform hundreds of Windows installations and fixes of Windows installations. Occasionally, it will be needed to switch mode from AHCI to IDE. When doing this, store away the data in the back of your mind for a rainy day when an argument on the Internet presents itself to you.

Results: Roughly a hundred mode switches in the BIOS (in both directions) over two years that have caused Windows 7 to reconfigure its startup sequence. None have needed a reinstall. As far as I can recall, I have never had it not work on any desktop PC with a fully-functioning BIOS, and I've only had it not work once due to a buggy driver on a laptop. Your data says that it also doesn't work on a particular model of Sony laptop, so we'll take that into consideration too.

Conclusion: Since ~99% of the mode switches work, and only a couple of results don't work (and those that don't have other issues, like a dodgy Sony laptop BIOS or a driver issue) we can conclude that Windows 7 does in fact support this feature, and it is the fault of other computer features that it doesn't occasionally.

I know that this doesn't help you, with your model of laptop, but it does rule out Windows as the culprit of this problem.