While reading through Embedded Linux System Design and Development, I came across the following text
So when we talk about the MIPS HAL it means the support for the MIPS processors and the boards built with MIPS processors. When we talk about a BSP we refer to the software that does not have the processor support software but just the additional software for supporting the board. The HAL can be understood as a superset of all supported BSPs and it additionally includes the processor-specific software.
What exactly is the Hardware abstraction layer (Talking in terms of Linux) ? Is this in some way related to BSP ? From my understanding, BSP is the Board specific code such as Bootloader, kernel core, specific drivers for the peripherals etc. How does the HAL come up as a superset to BSP ?
I don't think HAL is a Linux specific concept, i.e. it's not a subsystem or a proper logical grouping of code. It's possible that the authors have introduced it in order to help explain other concepts. In a way, operating system kernels can be described as HAL since they abstract away the hardware, providing uniform interface to user space. So the exact answer will only be in the context of the book.
In bare metal/RTOS-based embedded systems, HAL layer, if present, would sit on top of drivers in order to provide same API to higher layers even when underlying drivers or the physical components (like peripheral or bus connecting micro controller to the peripheral) change. It is different from board bringup code or bootloader which runs before HAL becomes useful.
Hope that addresses your query.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With