Boot Options: detecthal

The detecthal option directs the loader to detect which kernel and Hardware Abstraction Layer (HAL) to load.

Syntax

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

bcdedit /set detecthal boolean 

where boolean is one of 1, on, yes or true.

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

Availability

The BCD option detecthal is number 0x26000010 in osloader objects. It is effective only in Windows Vista. Later versions of the loader ignore it.

Documentation Status

The detecthal option is documented for Windows Vista. The bcdedit /? types osloader command summarises it as “Enables hardware abstraction layer (HAL) and kernel detection.” Later versions of the BCDEDIT tool continue to recognise the detecthal option at least to the original release of Windows 10, presumably for operating on it in BCD stores that are used for booting Windows Vista.

Behaviour

The detecthal option forces the Windows Vista loader to choose from a hard-coded selection of possible HALs and kernels. This overrides any specifications in hal or kernel options. It also causes the 32-bit loader to discount any HAL that’s named hal.dll.

The detected HAL for Windows Vista is:

Condition HAL
if the ACPI description tables include a Multiple APIC Description Table halmacpi.dll (x86);
hal.dll (x64)
else halacpi.dll (x86)

The test for choosing HALMACPI.DLL requires the Advanced Configuration and Power Interface (ACPI). A Root System Description Pointer (RSDP) must be present either in the Extended BIOS Data Area or in the 128KB at 0x000E0000. From this must be found either a Root System Description Table (RSDT) or preferably an Extended System Description Table (XSDT). Each has physical addresses of other description tables. If one of these has the APIC signature expected for a Multiple APIC Description Table, then the loader chooses HALMACPI.DLL.

The 64-bit loader is similarly forced to check for a Multiple APIC Description Table but there is no HAL in reserve. The detected HAL can only be hal.dll. Without a Multiple APIC Description Table, the detecthal option leaves 64-bit Windows Vista unable to start.

The detected kernel is:

Condition Kernel
32-bit loader translating physical memory addresses using PAE ntkrnlpa.exe (x86)
else ntoskrnl.exe

Whether the 32-bit loader, and thence the 32-bit kernel, uses Physical Address Extension (PAE) depends on the pae and nx options.

Without the detecthal option, the loader uses whatever HAL and kernel are specified by hal or kernel options. Without a hal option, the loader defaults to hal.dll. Without a kernel option, the loader falls back to the same kernel it would have detected.

After Windows Vista

See that the only effect of detecthal when starting 32-bit Windows Vista is that the loader tests for which of halacpi.dll and halmacpi.dll to use instead of trusting that whatever file is named hal.dll is correct for the running system. For the 64-bit loader, which knows only of hal.dll, all detecthal can do is stop Windows from starting if hal.dll is not correct.

Windows 7 did away with detecthal in favour of doing the detection anyway. Instead of overriding the hal and kernel options, the detection provides their defaults. Starting with Windows 8, which is supplied with only one HAL and one kernel, these defaults are trivial. The 32-bit loader doesn’t even bother with looking for a Multiple APIC description table. The detected HAL can only be halmacpi.dll and the detected kernel can only be ntoskrnl.exe.