OurOS 0.1
Operating System built by McGill Students
 
Loading...
Searching...
No Matches
What is HAL?

HAL stands for Hardware Abstraction Layer. It's the layer that separates the kernel from the hardwrare.

Why do we need it?

If you were to embed hardware code directly into the kernel, it'd instantly become a mess of hardware-specific function, naming conventions and such. By splitting it up, we keep the kernel clean and "unaware" of the complexities of the hardware it's talking to.

Example of good HAL:

Keyboard.c abstracts away specifics of the keyboard implementation. In the HAL, the keyboard is implemented using the ps/2 port, and converting from ps/2 scancodes to keycodes is a huge mess, best not seen by anyone after it's written :)