Sunday, April 5, 2009

Advanced Host Controller Interface (AHCI) in Laptops

The Advanced Host Controller Interface (AHCI) is a programming-specification which defines the operation of Serial ATA host-controllers (also known as host bus adapters) in a non implementation-specific manner. The specification describes a system memory structure for computer hardware vendors in order to exchange data between host system memory and the attached storage-devices. As of June 2008, the current version of the specification is v. 1.3. AHCI offers software developers and hardware designers a standard method for detecting, configuring, and programming SATA/AHCI adapters. AHCI is separate from the Serial ATA-II standard, although it exposes SATA's advanced capabilities (such as hot-plugging and native command queuing) such that host-systems can utilize them.

Many SATA controllers offer selectable modes of operation: legacy Parallel ATA, standard AHCI-mode, or vendor-specific RAID.Intel recommends choosing RAID mode on their motherboards (which also enables AHCI) rather than the plain AHCI/SATA mode for maximum flexibility, due to the issues caused when the mode is switched once an operating system has already been installed.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.

AHCI is fully supported out of the box for Microsoft Windows Vista and the Linux operating system from kernel 2.6.19.NetBSD also supports drivers in AHCI mode out of the box in certain versions. OpenBSD has had an ahci driver since OpenBSD 4.1. FreeBSD supports AHCI as well. AHCI support for Solaris 10 has been introduced in the 8/07 release. Older operating systems require drivers written by the host bus adapter vendor in order to support AHCI.

Common problems switching to AHCI under Windows

# Enabling AHCI in a system's BIOS will cause a 0x7B Blue Screen of Death STOP error (INACCESSIBLE_BOOT_DEVICE) on installations of Windows XP and Windows Vista where AHCI/RAID drivers for that system's chipset are not installed; i.e., boot failure.Switching the chipset to AHCI mode involves changing the BIOS settings and will not work. Usually, manual installation of new drivers is required before enabling AHCI in BIOS.Alternatively, a "Repair" installation with the appropriate driver loaded during the setup process usually corrects the problem. For motherboards with more than one Sata controller (for example, some boards have Intel and Jmicron Sata controllers) another alternative is possible. The sata cable for the boot drive can be inserted into a port on one controller (which can be configured in IDE mode), allowing the machine to boot successfully with the other controller configured for AHCI mode. The AHCI drivers can then be installed in windows without difficulty before swapping the cable back.
# For Intel chipsets (for example, Intel ICH9) drivers are available from either an OEM motherboard or computer manufacturer. For the Intel versions, the driver must be loaded before loading the OS (by pressing F6 as setup starts, then using the floppy disk when prompted). The Intel drivers will work for both XP and Vista. Also, in the case of ICH9, an unsupported method to enable AHCI on ICH9 is available.
# When attempting to install Windows XP or a previous version on an AHCI-enabled system, setup will fail with the error message "setup could not detect hard disk drive..." since no drivers will be found for accessing the SATA controller/s. This problem can be corrected by either using a floppy disk or by slipstreaming the appropriate drivers into the Windows XP installation CD, or by turning on IDE emulation in the BIOS settings if it's available (usually labelled COMPATIBILITY or ACPI).
# Enabling AHCI in a system with Windows Vista already installed will result in a BSoD if SATA was configured in IDE mode during Vista's installation. Before enabling AHCI in the BIOS, users must first follow the instructions found at Microsoft Knowledge Base article 922976. This fix also works with the Windows 7 Beta.
# Enabling AHCI in a system BIOS on installations of Windows XP or Windows Vista will cause SATA Optical drives to disappear. A Hotfix for Windows Vista is available under the title: "SATA optical drives are not available after you start a Windows Vista-based computer." This problem was fixed in Vista SP1.
# Windows Vista installation process may take several hours on a system that uses an AMD/ATI SB600 Series chipset operating in AHCI mode.

No comments: