Boot Options: hal

The hal option specifies an executable to load as the Hardware Abstraction Layer (HAL).

Syntax

To have the BCDEDIT tool set the hal option for the currently running operating system, run the command

bcdedit /set hal filename 

where filename names the proposed HAL.

To set this option at the Edit Boot Options Menu, add

/hal=filename 

which is also the syntax for the option as a BOOT.INI switch in earlier Windows versions.

Availability

The BCD option hal is number 0x22000012 in osloader objects. It is effective in version 6.0 and higher.

Documentation Status

The hal option is documented. The bcdedit /? types osloader command summarises it as “Defines the file name for a private HAL.”

Behaviour

The hal option overrides the loader’s default selection of the HAL, but is itself overridden by detecthal in Windows Vista:

Condition Loader Versions HAL
if detecthal evaluates as true 6.0 only halacpi.dll or halmacpi.dll (x86);
hal.dll (x64)
if hal evaluates as filename 6.0 and higher filename
  6.0 only (x86);
6.0 and higher (x64)
hal.dll
6.1 only (x86) halacpi.dll or halmacpi.dll
6.2 and higher (x86) halmacpi.dll

Versions 6.0 and 6.1 are supplied with two 32-bit HALs. Version 6.0 chooses from them if detecthal is on, and this choice has precedence over any hal option. Version 6.1 chooses from them by the same means but only in default of a hal option. In brief, the loader chooses halmacpi.dll if it can find a Multiple APIC description table. Versions 6.2 and higher have only halmacpi.dll.

Whether a filename is specified for the hal or is chosen by the loader, it gets appended to the path for the “system32” subdirectory of the systemroot directory for the selected operating system. However, it seems that the file is required to be in the directory, as opposed to being on some deeper path. The mechanisms are indirect and are presently beyond the scope of this note.