What Is a Hardware Abstraction Layer?
The hardware abstraction layer is an interface layer between the operating system kernel and the hardware circuit, and its purpose is to abstract the hardware. It hides the details of the hardware interface of a specific platform, provides a virtual hardware platform for the operating system, makes it hardware-independent, and can be ported on multiple platforms. From the perspective of software and hardware testing, software and hardware testing can be completed based on the hardware abstraction layer, which makes it possible to perform software and hardware testing in parallel.
- The hardware abstraction layer technology was originally proposed by Microsoft to ensure the stability and compatibility of Windows NT. In view of the system crashes or crashes that often occur in the Windows operating systems in the past, Microsoft concluded that program design directly communicates with the hardware, which is the main cause of system instability. Based on this conclusion, Microsoft Corporation cancelled direct access to the hardware on Windows NT, and first proposed the concept of Hardware Abstraction Layer (HAL). The hardware abstraction layer is: A thin layer of software that is isolated from the other layers of the system. It is implemented by making a variety of different hardware appear to the same virtual machine in other parts of the operating system. "Later, this HAL design idea was embedded by some System operating system reference, the system kernel is divided into two layers, the upper layer is called "Kernel" and the bottom layer is called "hardware abstraction layer". In EOS, HAL is independent of the EOS kernel; for operating systems and application software, HAL is an abstraction of the underlying architecture. Comprehensive analysis of the HAL layer code, we can find that these codes are closely related to the underlying hardware equipment. Therefore, the hardware abstraction layer can be defined as all software that depends on the underlying hardware. Even though some EOS HALs are physically closely linked to the system kernel, or even cross each other, they can be functionally analyzed from the perspective of layered technology [1]
- The design of the embedded operating system is a very complicated problem that involves all aspects of embedded software and hardware. Solving this problem can be based on such a basic principle: problem decomposition, each break. Designing an easy-to-portable embedded platform should follow a hierarchical, modular, and object-oriented design approach [1]
- Embedded systems are a special type of computer system. It includes three main parts from the bottom up: hardware environment, embedded operating system and embedded applications. The hardware environment is the hardware platform on which the entire embedded operating system and application programs run. Different applications usually have different hardware environments; therefore, how to effectively apply embedded operations to a variety of application environments is the development of embedded operating systems. The key issues that must be addressed. The hardware abstraction layer provides the operating system and applications with services that abstract the hardware through the hardware abstraction layer interface. When the operating system or application is designed using the hardware abstraction layer API, as long as the hardware abstraction layer API can be implemented on the underlying hardware platform, the operating system and application code can be ported. In this way, the 3-layer structure of the original embedded system gradually evolved into a 4-layer structure. Figure
- * Hardware abstraction layer is closely related to hardware
- * The hardware abstraction layer is independent of the operating system
- * Interface-defined functions should include all functions supported by the hardware or hardware required by the system
- * Interface definition is simple and clear, too much
- The functional simulation of the user equipment interface by the hardware abstraction layer is mainly completed by the virtual driver module, including the sending and receiving of data packets and the preprocessing of protocol messages.It provides standard API functions for the upper-layer protocol software, while the interface management of the user equipment is It is managed and configured by the upper-layer network management software through the ground equipment management module.The internal communication module runs on the internal force Ethernet network and coordinates the functional interfaces between the modules to ensure real-time and reliable communication between the slave processing unit and the main processing unit. data transmission.