Geoff Chappell - Software Analyst
The hal option specifies an executable to load as the Hardware Abstraction Layer (HAL).
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
which is also the syntax for the option as a BOOT.INI switch in earlier Windows versions.
The BCD option hal is number 0x22000012 in osloader objects. It is effective in version 6.0 and higher.
The hal option is documented. The bcdedit /? types osloader command summarises it as “Defines the file name for a private HAL.”
The hal option overrides the loader’s default selection of the HAL, but is itself overridden by detecthal in Windows Vista:
|if detecthal evaluates as true||6.0 only||halacpi.dll or halmacpi.dll (x86);
|if hal evaluates as filename||6.0 and higher||filename|
|6.0 only (x86);
6.0 and higher (x64)
|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.