The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
hal_x86.c File Reference

x86 implementation of the hardware abstraction layer. More...

Functions

void hal_initialize (void)
 initialize the hardware abstraction layer.

Detailed Description

x86 implementation of the hardware abstraction layer.

the portable kernel calls hal_initialize() without knowing anything about the GDT, IDT, PIC, or which drivers exist. all of that lives here, behind the neutral hal.h interface, so another architecture can supply its own hal_x86.c-equivalent (GIC on ARM, PLIC on RISC-V) without touching the kernel.

Function Documentation

◆ hal_initialize()

void hal_initialize ( void )

initialize the hardware abstraction layer.

brings up the arch's interrupt and device machinery in the correct order (on x86: GDT, IDT, ISR, exceptions, PIC/IRQ, then the timer and keyboard). interrupts are left disabled; the caller enables them once every handler is in place. each architecture provides its own implementation.