Advanced Host Controller Interface

From Wikipedia, the free encyclopedia
  (Redirected from AHCI)
Jump to: navigation, search

The Advanced Host Controller Interface (AHCI) is a technical standard defined by Intel that specifies the operation of Serial ATA (SATA) host bus adapters in a non-implementation-specific manner.

The specification describes a system memory structure for computer hardware vendors to exchange data between host system memory and attached storage devices. AHCI gives software developers and hardware designers a standard method for detecting, configuring, and programming SATA/AHCI adapters. AHCI is separate from the SATA 3 Gbit/s standard, although it exposes SATA's advanced capabilities (such as hot swapping and native command queuing) such that host systems can utilize them.

As of March 2014, the current version of the specification is 1.3.1.

Operating modes[edit]

Many SATA controllers offer selectable modes of operation: legacy Parallel ATA emulation (more commonly called IDE mode), standard AHCI mode (also known as native mode), or vendor-specific RAID (which generally enables AHCI in order to take advantage of its capabilities). Intel recommends choosing RAID mode on their motherboards (which also enables AHCI) rather than AHCI/SATA mode for maximum flexibility.[1] Legacy mode is a software backward-compatibility mechanism intended to allow the SATA controller to run in legacy operating systems which are not SATA-aware or where a driver does not exist to make the operating system SATA-aware.

When a SATA controller is configured to operate in legacy mode, the number of storage devices per controller is usually limited to four (two IDE channels, primary and secondary, with up to two devices per channel), compared to the maximum of 32 devices/ports when configured in AHCI mode.[2][3]

Operating System Support[edit]

AHCI is supported out of the box on Windows Vista and later, Linux-based operating systems (since version 2.6.19 of the kernel), OpenBSD (since version 4.1), NetBSD (since version 4.0), FreeBSD (since version 8.0), macOS, eComStation (since version 2.1), and Solaris 10 (since version 8/07).[4] DragonFlyBSD based its AHCI implementation on OpenBSD's and added extended features such as port multiplier support. Older versions of operating systems require hardware-specific drivers in order to support AHCI. Windows XP and older do not provide AHCI support out of the box.

System Drive Boot Issues[edit]

Some operating systems, notably Windows Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10, do not configure themselves to load the AHCI driver upon boot if the SATA controller was not in AHCI mode at the time the operating system was installed. Although this is an easily rectifiable condition, it remains an ongoing issue with the AHCI standard.

The most prevalent symptom for an operating system (or systems) that are installed in IDE mode (in some BIOS firmware implementations otherwise called 'Combined IDE mode'), is that the system drive typically fails to boot, with an ensuing error message, if the SATA controller (in BIOS) is inadvertently switched to AHCI mode after OS installation. In Microsoft Windows the symptom is a boot loop which begins with a Blue Screen error, if not rectified - and through no fault of the Windows OS.

Technically speaking, this is an implementation bug with AHCI that can be avoided. As an interim resolution, Intel recommends changing the drive controller to AHCI or RAID before installing an operating system.[1] (It may also be necessary to load chipset-specific AHCI or RAID drivers at installation time, for example from a USB flash drive).

On Windows Vista and Windows 7, this can be fixed by configuring the msahci device driver to start at boot time (rather than on-demand). Setting non-AHCI mode (i.e. IDE or Combined mode) in the BIOS will allow the user to boot into Windows, and thereby the required registry change can be performed. Consequently, the user than has the option of continuing to use the system in Combined mode or switching to AHCI mode.[5]

On Windows 10, this can be fixed by forcing the correct drivers to reload during Safe Mode.[6]

In Windows 8, Windows 8.1 and Windows Server 2012, the name of the controller has changed from msahci to storahci,[7] and the procedures to upgrade to the new controller is similar to that of Windows 7.[8] On Windows 8, 8.1 and Windows Server 2012, changing the SATA mode to AHCI without updating the registry will make the boot drive inaccessible (i.e. resulting in a recurring boot loop, which begins with a Blue Screen error).

A similar problem can occur on Linux systems if the AHCI driver is compiled as a kernel module rather than built into the kernel image, as it may not be included in the initrd (initial RAM disk) created when the controller is configured to run in Legacy Mode. The solution is either to build a new initrd containing the AHCI module, or to build the AHCI driver into the kernel image.[9]

Power management[edit]

Power management is handled by the Aggressive Link Power Management (ALPM) protocol.

See also[edit]

References[edit]

External links[edit]