AHCI
   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. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the developers of the x86 seri ...
that specifies the register-level interface of Serial ATA (SATA)
host controller In computer hardware, a host controller, host adapter, or host bus adapter (HBA), connects a computer system bus, which acts as the host system, to other network and storage devices. The terms are primarily used to refer to devices for conne ...
s 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 said ...
and
native command queuing In computing, Native Command Queuing (NCQ) is an extension of the Serial ATA protocol allowing hard disk drives to internally optimize the order in which received read and write commands are executed. This can reduce the amount of unnecessary dri ...
) such that host systems can utilize them. For modern
solid state drives A solid-state drive (SSD) is a solid-state storage device that uses integrated circuit assemblies to store data persistently, typically using flash memory, and functioning as secondary storage in the hierarchy of computer storage. It is ...
, the interface has been superseded by
NVMe NVM Express (NVMe) or Non-Volatile Memory Host Controller Interface Specification (NVMHCIS) is an open, logical-device interface specification for accessing a computer's non-volatile storage media usually attached via PCI Express (PCIe) bus. The ...
. 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 Raid, RAID or Raids may refer to: Attack * Raid (military), a sudden attack behind the enemy's lines without the intention of holding ground * Corporate raid, a type of hostile takeover in business * Panty raid, a prankish raid by male college ...
(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. 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 In a computer system, a chipset is a set of electronic components in one or more integrated circuits known as a "Data Flow Management System" that manages the data flow between the processor, memory and peripherals. It is usually found on the mo ...
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, w ...
-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 learn ...
), OpenBSD (since version 4.1), NetBSD (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 computers. Within the market of desktop and lapt ...
, GNU Mach, ArcaOS,
eComStation eComStation or eCS is an operating system based on OS/2 Warp for the 32-bit x86 architecture. It was originally developed by Serenity Systems and Mensys BV under license from IBM. It includes additional applications, and support for new hard ...
(since version 2.1), and
Solaris 10 Solaris is a proprietary Unix operating system originally developed by Sun Microsystems. After the Sun acquisition by Oracle in 2010, it was renamed Oracle Solaris. Solaris superseded the company's earlier SunOS in 1993, and became known for ...
(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 released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct upgrade to its predecessors, Windows 2000 for high-end and ...
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 nearly ...
,
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 J ...
, 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 will allow the user to boot into Windows, and thereby the required
registry Registry may refer to: Computing * Container registry, an operating-system-level virtualization registry * Domain name registry, a database of top-level internet domain names * Local Internet registry * Metadata registry, information system for re ...
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 Windows Server 2012, codenamed "Windows Server 8", is the sixth version of the Windows Server operating system by Microsoft, as part of the Windows NT family of operating systems. It is the server version of Windows based on Windows 8 and succe ...
, 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 In computing, a loadable kernel module (LKM) is an object file that contains code to extend the running kernel, or so-called ''base kernel'', of an operating system. LKMs are typically used to add support for new hardware (as device drivers) and/o ...
rather than built into the
kernel image The kernel is a computer program at the core of a computer's operating system and generally has complete control over everything in the system. It is the portion of the operating system code that is always resident in memory and facilitates in ...
, as it may not be included in the
initrd In Linux systems, initrd (''initial ramdisk'') is a scheme for loading a temporary root file system into memory, to be used as part of the Linux startup process. initrd and initramfs refer to two different methods of achieving this. Both are comm ...
(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 (ALPM) protocol.


See also

*
Open Host Controller Interface A host controller interface (HCI) is a register-level interface that enables a host controller for USB or IEEE 1394 hardware to communicate with a host controller driver in software. The driver software is typically provided with an operating sys ...
(OHCI) *
Universal Host Controller Interface A host controller interface (HCI) is a register-level interface that enables a host controller for USB or IEEE 1394 hardware to communicate with a host controller driver in software. The driver software is typically provided with an operating sys ...
(UHCI) *
Enhanced Host Controller Interface A host controller interface (HCI) is a register-level interface that enables a host controller for USB or IEEE 1394 hardware to communicate with a host controller driver in software. The driver software is typically provided with an operating sys ...
(EHCI) *
Extensible Host Controller Interface eXtensible Host Controller Interface (xHCI) is a computer interface specification that defines a register-level description of a host controller for Universal Serial Bus (USB), which is capable of interfacing with USB 1.x, 2.0, and 3.x compatible ...
(XHCI) *
Wireless Host Controller Interface Wireless USB (Universal serial bus, Universal Serial Bus) was a short-range, high-bandwidth wireless radio communication protocol created by the Wireless USB Promoter Group which intended to increase the availability of general USB-based techno ...
(WHCI) *
Host controller interface (USB, Firewire) A host controller interface (HCI) is a register-level interface (computer science), interface that enables a host controller for USB or IEEE 1394 hardware to communicate with a host controller driver in software. The driver software is typically pr ...


References

{{Reflist


External links


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