Advanced Host Controller Interface

Last updated
AHCI
Advanced Host Controller Interface
Latest version1.3.1
November 11, 2011 (2011-11-11)
Organization Intel
Website www.intel.com/content/www/us/en/io/serial-ata/ahci.html

The Advanced Host Controller Interface (AHCI) is a technical standard defined by Intel that specifies the register-level interface of Serial ATA (SATA) host controllers in a non-implementation-specific manner in its motherboard chipsets. [1]

Contents

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. For modern solid state drives, the interface has been superseded by NVMe. [2]

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 motherboards (which also enables AHCI) rather than AHCI/SATA mode for maximum flexibility. [3] 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. [4] [1] 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 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), [5] macOS, GNU Mach, ArcaOS, [6] eComStation (since version 2.1), and Solaris 10 (since version 8/07). [7] 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

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.

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. [3] (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 then has the option of continuing to use the system in Combined mode or switching to AHCI mode. [8] Inter alia with Windows 10 and 8, this can be fixed by forcing the correct drivers to reload during Safe Mode. [9]

In Windows 8, Windows 8.1 and Windows Server 2012, the controller driver has changed from msahci to storahci, [10] and the procedures to upgrade to the AHCI controller is similar to that of Windows 7. [11] 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. [12]

Power management

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

See also

Related Research Articles

<span class="mw-page-title-main">Parallel ATA</span> Interface standard for the connection of storage devices

Parallel ATA (PATA), originally AT Attachment, also known as IDE, is a standard interface designed for IBM PC-compatible computers. It was first developed by Western Digital and Compaq in 1986 for compatible hard drives and CD or DVD drives. The connection is used for storage devices such as hard disk drives, floppy disk drives, and optical disc drives in computers.

<span class="mw-page-title-main">SATA</span> Computer bus interface for storage devices

SATA 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) standard to become the predominant interface for storage devices.

A disk array controller is a device that manages the physical disk drives and presents them to the computer as logical units. It almost always implements hardware RAID, thus it is sometimes referred to as RAID controller. It also often provides additional disk cache.

<span class="mw-page-title-main">Multi-booting</span> Act of installing multiple operating systems on a single computer

Multi-booting is the act of installing multiple operating systems on a single computer, and being able to choose which one to boot. The term dual-booting refers to the common configuration of specifically two operating systems. Multi-booting may require a custom boot loader.

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 system of a personal computer, but may also be implemented by application-specific devices such as a microcontroller.

<span class="mw-page-title-main">UEFI</span> Operating system software specification

UEFI is a set of specifications written by the UEFI Forum. They define the architecture of the platform firmware used for booting and its interface for interaction with the operating system. Examples of firmware that implement these specifications are AMI Aptio, Phoenix SecureCore Tiano, TianoCore EDK II and InsydeH2O.

<span class="mw-page-title-main">Native Command Queuing</span>

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 drive head movement, resulting in increased performance for workloads where multiple simultaneous read/write requests are outstanding, most often occurring in server-type applications.

<span class="mw-page-title-main">USB mass storage device class</span>

The USB mass storage device class is a set of computing communications protocols, specifically a USB Device Class, defined by the USB Implementers Forum that makes a USB device accessible to a host computing device and enables file transfers between the host and the USB device. To a host, the USB device acts as an external hard drive; the protocol set interfaces with a number of storage devices.

<span class="mw-page-title-main">QEMU</span> Free virtualization and emulation software

QEMU is a free and open-source emulator. It emulates the machine's processor through dynamic binary translation and provides a set of different hardware and device models for the machine, enabling it to run a variety of guest operating systems. It can interoperate with Kernel-based Virtual Machine (KVM) to run virtual machines at near-native speed. QEMU can also do emulation for user-level processes, allowing applications compiled for one architecture to run on another.

<span class="mw-page-title-main">ACPI</span> Computer firmware interface standard

Advanced Configuration and Power Interface (ACPI) is an open standard that operating systems can use to discover and configure computer hardware components, to perform power management, auto configuration, and status monitoring. First released in December 1996, ACPI aims to replace Advanced Power Management (APM), the MultiProcessor Specification, and the Plug and Play BIOS (PnP) Specification. ACPI brings power management under the control of the operating system, as opposed to the previous BIOS-centric system that relied on platform-specific firmware to determine power management and configuration policies. The specification is central to the Operating System-directed configuration and Power Management (OSPM) system. ACPI defines hardware abstraction interfaces between the device's firmware, the computer hardware components, and the operating systems.

<span class="mw-page-title-main">EFI system partition</span> Partition used by Unified Extensible Firmware Interface

The EFIsystem partition or ESP is a partition on a data storage device that is used by computers having the Unified Extensible Firmware Interface (UEFI). When a computer is booted, UEFI firmware loads files stored on the ESP to start installing operating systems and various utilities.

<span class="mw-page-title-main">VirtualBox</span> Open-source x86 virtualization application

Oracle VM VirtualBox is a type-2 hypervisor for x86 virtualization developed by Oracle Corporation. VirtualBox was originally created by InnoTek Systemberatung GmbH, which was acquired by Sun Microsystems in 2008, which was in turn acquired by Oracle in 2010.

I/O Controller Hub (ICH) is a family of Intel southbridge microchips used to manage data communications between a CPU and a motherboard, specifically Intel chipsets based on the Intel Hub Architecture. It is designed to be paired with a second support chip known as a northbridge. As with any other southbridge, the ICH is used to connect and control peripheral devices.

<span class="mw-page-title-main">Intel Rapid Storage Technology</span> Computer storage device

Intel Rapid Storage Technology (RST) is a driver SATA AHCI and a firmware-based RAID solution built into a wide range of Intel chipsets. Currently also is installed as a driver for Intel Optane temporary storage units.

A trim command allows an operating system to inform a solid-state drive (SSD) which blocks of data are no longer considered to be 'in use' and therefore can be erased internally.

<span class="mw-page-title-main">USB Attached SCSI</span> Computer protocol for running the SCSI command set over USB for storage drives

USB Attached SCSI (UAS) or USB Attached SCSI Protocol (UASP) is a computer protocol used to move data to and from USB storage devices such as hard drives (HDDs), solid-state drives (SSDs), and thumb drives. UAS depends on the USB protocol, and uses the standard SCSI command set. Use of UAS generally provides faster transfers compared to the older USB Mass Storage Bulk-Only Transport (BOT) drivers.

The Intel X79 is a Platform Controller Hub (PCH) designed and manufactured by Intel for their LGA 2011 and LGA 2011-1.

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 initialism NVM stands for non-volatile memory, which is often NAND flash memory that comes in several physical form factors, including solid-state drives (SSDs), PCIe add-in cards, and M.2 cards, the successor to mSATA cards. NVM Express, as a logical-device interface, has been designed to capitalize on the low latency and internal parallelism of solid-state storage devices.

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.

<span class="mw-page-title-main">SATA Express</span> Computer device interface

SATA Express is a computer bus interface that supports both Serial ATA (SATA) and PCI Express (PCIe) storage devices, initially standardized in the SATA 3.2 specification. The SATA Express connector used on the host side is backward compatible with the standard SATA data connector, while it also provides two PCI Express lanes as a pure PCI Express connection to the storage device.

References

  1. 1 2 "Serial ATA AHCI: Specification, Rev. 1.3.1". Intel Corp. Retrieved 2015-05-03.
  2. "NVMe vs. SATA: Which SSD Technology Is Faster?". www.howtogeek.com. Retrieved 2020-10-10.
  3. 1 2 "Intel Matrix Storage Technology - Changing and/or choosing Serial ATA Modes". Intel. Retrieved 2007-09-30.
  4. "PCI IDE Controller Specification 1.0" (PDF). Berg Software Design. Retrieved 2015-05-03.
  5. "Ahci(4)".
  6. "ArcaOS Changelog" . Retrieved 2020-08-24.
  7. "What's New in the Solaris 10 8/07 Release - Driver Enhancements". Oracle. Archived from the original on 2007-10-25. Retrieved 2010-10-20.
  8. "Error Message when you start a Windows 7 or Windows Vista-based computer after you change the SATA mode of the boot drive: "STOP 0x0000007B INACCESSABLE_BOOT_DEVICE"". Microsoft. Archived from the original on 24 May 2011. Retrieved 2011-04-20.
  9. "Enabling AHCI mode AFTER Windows 10 installation". tenforums.com user Toobad. Retrieved 2015-12-19.
  10. "StorAHCI replaces MSAHCI (Windows)". Microsoft.
  11. "Improving performance of SATA drives on Windows 2012".
  12. "Support | How to enable AHCI support after install". Novell.com. Retrieved 2014-05-11.