Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Hardware abstraction
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==In operating systems== A '''hardware abstraction layer''' ('''HAL''') is an [[abstraction layer]], implemented in software, between the physical [[Computer hardware|hardware]] of a [[computer]] and the [[Computer software|software]] that runs on that computer. Its function is to hide differences in hardware from most of the [[operating system]] [[Kernel (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 (operating system)|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 [[Adaptive Domain Environment for Operating Systems|Adeos]]. The [[NetBSD]] operating system is widely known as having a clean hardware abstraction layer which allows it to be highly portable.<ref name="NetBSD"/> As part of this system are {{man|9|uvm|NetBSD||inline}}/{{man|9|pmap|NetBSD||inline}}, {{man|9|bus_space|NetBSD||inline}}, {{man|9|bus_dma|NetBSD||inline}} and other subsystems. Popular buses which are used on more than one architecture are also abstracted, such as [[Industry Standard Architecture|ISA]], [[Extended Industry Standard Architecture|EISA]], [[Peripheral Component Interconnect|PCI]], [[PCIe]], etc., allowing drivers to also be highly portable with a minimum of code modification. Operating systems having a defined HAL are more easily portable across different hardware. This is especially important for [[embedded system]]s that run on dozens of different platforms. ===Microsoft Windows=== [[File:Windows_2000_architecture.svg|thumb|The hardware abstraction layer in the [[architecture of Windows NT]]]] The [[Windows NT]] kernel has a HAL in the kernel space between hardware and the executive services that are contained in the file [[ntoskrnl.exe|NTOSKRNL.EXE]]<ref name="nthal"/><ref name="Custer_1993"/> under ''%WINDOWS%\system32\hal.dll''. This allows portability of the Windows NT kernel-mode code to a variety of processors, with different [[memory management unit]] architectures, and a variety of systems with different I/O bus architectures; most of that code runs without change on those systems, when compiled for the [[instruction set]] applicable to those systems. For example, the [[Silicon Graphics|SGI]] Intel x86-based workstations were not [[IBM PC compatible]] workstations, but due to the HAL, [[Windows 2000]] was able to run on them.<ref>{{Cite web|title=Changing hardware abstraction layer in Windows 2000 / XP β Smallvoid.com|date=15 January 2001 |url=http://smallvoid.com/article/winnt-hardware-abstraction-layer.html|access-date=2020-09-18|language=en-US}}</ref>{{failed verification|date=October 2022}} Since [[Windows Vista]] and [[Windows Server 2008]], the HAL used is automatically determined during [[Windows Vista startup process|startup]].<ref name="Russinovich_2008"/> ===AS/400=== An "extreme" example of a HAL can be found in the [[System/38]] and [[AS/400]] architectures, currently implemented in the [[IBM i]] operating system. Most compilers for those systems generate an abstract machine code; the Licensed Internal Code, or LIC, translates this virtual machine code into native code for the processor on which it is running and executes the resulting native code.<ref name="soltis"/> (The exceptions are compilers that generate the LIC itself; those compilers are not available outside IBM.) This was so successful that application software and operating system software above the LIC layer that were compiled on the original S/38 run without modification and without recompilation on the latest AS/400 systems, despite the fact that the underlying hardware has been changed dramatically; at least three different types of processors have been in use.<ref name="soltis"/> === Android === [[Android (operating system)|Android]] introduced a HAL known as the "vendor interface" (codenamed "Project Treble") on [[Android Oreo|version 8.0 "Oreo"]]. It abstracts low-level code from the Android OS framework, and they must be made [[forward compatible]] to support future versions of Android to ease the development of firmware updates.<ref name="ars-treble">{{cite web|title=Google's "Project Treble" solves one of Android's many update roadblocks|url=https://arstechnica.com/gadgets/2017/05/google-hopes-to-fix-android-updates-no-really-with-project-treble/|website=Ars Technica|date=12 May 2017|access-date=12 May 2017}}</ref> Before Project Treble Android relied on various non-standardized legacy HALs.<ref>{{Cite web|url=https://source.android.com/devices/architecture/hal-types#legacy|website=Android Open Source Project|title=Conventional & legacy HALs}}</ref> [[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.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)