What should be in the Hardware Abstraction Layer (HAL)?
I think it's different depending on the type of kernel structure used (Micro Monolithic, Exo, Hybrid, Pico, Nano). Kernels with less in kernel mode like a Microkernel might have less architecture dependencies than a Monolithic Kernel?
What would be the architecture dependencies?
so far I have seen the following:
CPU, Context switch, Memory Management Unit (MMU), Clock/Timers, Trap, Interrupts, Device Registers, Device Addresses, Direct Memory Access (DMA), Spinlocks, and Basic input output system (BIOS).
[EDIT] Colours removed by Brendan[/EDIT]
What should be in the Hardware Abstraction Layer?
- zeitue
- Member
- Posts: 88
- Joined: Fri Dec 14, 2012 6:05 pm
- Libera.chat IRC: zeitue
- Location: United States, Texas
- Contact:
What should be in the Hardware Abstraction Layer?
### Z++; && S++; ###
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: What should be in the Hardware Abstraction Layer?
(See my reply to your other thread for a comment on colours. Also, that signatue is an insult to my eyes)
To be honest, the "HAL" is kinda an iffy concept. For my code (runs on x86, amd64 and armv7) there are two "HAL"s. First is the processor / system layer which provides memory management, interrupts and timing. The next layer is the actual device drivers (USB, Display, PS2 keyboard, sound, ...) but they all have their own interface definition (although, devices of the same type will use the same interface - e.g. display adapters have a common API)
In essense, a monolithic kernel is a thick HAL with scheduling bundled with it. There is no one layer, there's many layers of differing thickness abstracting away from the hardware.
To be honest, the "HAL" is kinda an iffy concept. For my code (runs on x86, amd64 and armv7) there are two "HAL"s. First is the processor / system layer which provides memory management, interrupts and timing. The next layer is the actual device drivers (USB, Display, PS2 keyboard, sound, ...) but they all have their own interface definition (although, devices of the same type will use the same interface - e.g. display adapters have a common API)
In essense, a monolithic kernel is a thick HAL with scheduling bundled with it. There is no one layer, there's many layers of differing thickness abstracting away from the hardware.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
- zeitue
- Member
- Posts: 88
- Joined: Fri Dec 14, 2012 6:05 pm
- Libera.chat IRC: zeitue
- Location: United States, Texas
- Contact:
Re: What should be in the Hardware Abstraction Layer?
@thepowersgang thank you for the reply.
your HAL layer seams to contain the same thing that the rest of them do so I must be on the right track.
if the HAL is built in layers in a monolithic system would it be like this in a microkernel system?
having the base HAL in the microkernel, then having a layer of trusted driver severs above this as the second HAL?
your HAL layer seams to contain the same thing that the rest of them do so I must be on the right track.
if the HAL is built in layers in a monolithic system would it be like this in a microkernel system?
having the base HAL in the microkernel, then having a layer of trusted driver severs above this as the second HAL?
### Z++; && S++; ###
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen