HOME

TheInfoList



OR:

The Advanced Host Controller Interface (AHCI) is a technical standard defined by
Intel Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the devel ...
that specifies the register-level interface of
Serial ATA SATA (Serial AT Attachment) is a computer bus interface that connects host bus adapters to mass storage devices such as hard disk drives, optical drives, and solid-state drives. Serial ATA succeeded the earlier Parallel ATA (PATA) standar ...
(SATA) host controllers in a non-implementation-specific manner in its motherboard chipsets. The specification describes a system memory structure for computer hardware vendors to exchange data between host system
memory Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembered ...
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 Hot swapping is the replacement or addition of components to a computer system without stopping, shutting down, or rebooting the system; hot plugging describes the addition of components only. Components which have such functionality are sai ...
and native command queuing) such that host systems can utilize them. For modern solid state drives, the interface has been superseded by NVMe. The current version of the specification is 1.3.1.


Operating modes

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
motherboard A motherboard (also called mainboard, main circuit board, mb, mboard, backplane board, base board, system board, logic board (only in Apple computers) or mobo) is the main printed circuit board (PCB) in general-purpose computers and other expand ...
s (which also enables AHCI) rather than AHCI/SATA mode for maximum flexibility. 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 IDE Mode, the number of storage devices per controller is usually limited to four (two IDE channels, master device and slave device with up to two devices per channel), compared to the maximum of 32 devices/ports when configured in AHCI mode. But the chipset SATA interfaces may emulate more than one "IDE controller" when configured in IDE Mode.


Operating system support

AHCI is supported out of the box on
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
and later,
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which i ...
-based operating systems (since version 2.6.19 of the
kernel Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine lea ...
),
OpenBSD OpenBSD is a security-focused operating system, security-focused, free and open-source, Unix-like operating system based on the Berkeley Software Distribution (BSD). Theo de Raadt created OpenBSD in 1995 by fork (software development), forking N ...
(since version 4.1),
NetBSD NetBSD is a free and open-source Unix operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was forked. It continues to be actively developed and is a ...
(since version 4.0), FreeBSD (since version 8.0),
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac (computer), Mac computers. Within the market of ...
, GNU Mach, ArcaOS, eComStation (since version 2.1), and Solaris 10 (since version 8/07). 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 Windows XP is a major release of Microsoft's Windows NT operating system. It was release to manufacturing, released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct upgrade to its predecessors, Wind ...
and older do not provide AHCI support out of the box.


System drive boot issues

Some operating systems, notably
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
,
Windows 7 Windows 7 is a major release of the Windows NT operating system developed by Microsoft. It was released to manufacturing on July 22, 2009, and became generally available on October 22, 2009. It is the successor to Windows Vista, released nearl ...
,
Windows 8 Windows 8 is a major release of the Windows NT operating system developed by Microsoft. It was released to manufacturing on August 1, 2012; it was subsequently made available for download via MSDN and TechNet on August 15, 2012, and later to ...
, Windows 8.1 and
Windows 10 Windows 10 is a major release of Microsoft's Windows NT operating system. It is the direct successor to Windows 8.1, which was released nearly two years earlier. It was released to manufacturing on July 15, 2015, and later to retail on ...
, 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. Technically speaking, this is an implementation bug with AHCI that can be avoided, but it has not been fixed yet. As an interim resolution, Intel recommends changing the drive controller to AHCI or RAID before installing an operating system. (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 In computing, BIOS (, ; Basic Input/Output System, also known as the System BIOS, ROM BIOS, BIOS ROM or PC BIOS) is firmware used to provide runtime services for operating systems and programs and to perform hardware initialization during the ...
will allow the user to boot into Windows, and thereby the required registry change can be performed. Consequently, the user then has the option of continuing to use the system in Combined mode or switching to AHCI mode. Inter alia with Windows 10 and 8, this can be fixed by forcing the correct drivers to reload during Safe Mode. In Windows 8, Windows 8.1 and Windows Server 2012, the controller driver has changed from msahci to storahci, and the procedures to upgrade to the AHCI controller is similar to that of Windows 7. On Windows 8, 8.1 and Windows Server 2012, changing from IDE mode to AHCI mode without first updating the registry will make the boot drive inaccessible (i.e. resulting in a recurring boot loop, which begins with a Blue Screen error). In Windows 10, after changing the controller to AHCI mode, if the OS is allowed to reboot a couple of times after the start of the boot loop, which starts with an INACCESSIBLE_BOOT_DEVICE BSOD, Windows presents recovery options. Out of the Advanced options, if Startup Repair option is selected, Windows attempts to fix the issue and the PC begins to function normally. 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.


Power management

Power management is handled by the
Aggressive Link Power Management Aggressive Link Power Management (ALPM) is a power management protocol for Advanced Host Controller Interface-compliant (AHCI) Serial ATA (SATA) devices, such as hard disk drives and solid-state drives. Description When enabled via the AHCI co ...
(ALPM) protocol.


See also

* Open Host Controller Interface (OHCI) * Universal Host Controller Interface (UHCI) * Enhanced Host Controller Interface (EHCI) * Extensible Host Controller Interface (XHCI) * Wireless Host Controller Interface (WHCI) * Host controller interface (USB, Firewire)


References

{{Reflist


External links


"AHCI Specification"
Intel.
"AHCI"
OSDev Wiki Serial ATA