A
hardware abstraction layer (HAL) is an
abstraction layer, implemented in software, between the physical
hardware of a
computer and the
software that runs on that computer. Its function is to hide differences in hardware from most of the
operating system kernel, so that most of the kernel-mode code does not need to be changed to run on systems with different hardware. On Microsoft Windows, HAL can basically be considered to be the driver for the motherboard and allows instructions from higher level computer languages to communicate with lower level components, but prevents direct access to the hardware.
CP/M (
CP/M BIOS),
DOS (
DOS BIOS),
Solaris,
Linux,
BSD,
macOS, and some other portable operating systems also have a HAL, even if it is not explicitly designated as such. Some operating systems, such as Linux, have the ability to insert one while running, like Adeos. The
NetBSD operating system is widely known as having a clean hardware abstraction layer which allows it to be highly portable. Since
Windows Vista and
Windows Server 2008, the HAL used is automatically determined during
startup. Before Project Treble, Android relied on various non-standardized legacy HALs.
Halium is an Android-based HAL used by several mobile operating systems such as
Ubuntu Touch and
LuneOS to run on smartphones with Android pre-installed. ==See also==