|
ginnOS
The reference: libc, the libraries and the kernel
|
x86 implementation of the hardware abstraction layer. More...
#include "kernel/hal/hal.h"#include "arch/x86/cpu/gdt.h"#include "arch/x86/cpu/pat.h"#include "arch/x86/cpu/idt.h"#include "arch/x86/cpu/isr.h"#include "arch/x86/cpu/exception.h"#include "arch/x86/cpu/double_fault.h"#include "arch/x86/cpu/irq.h"#include "kernel/cpu/cpu.h"#include "kernel/irq/irq.h"#include "drivers/pit/pit.h"#include "drivers/keyboard/keyboard.h"Functions | |
| void | hal_initialize (void) |
| initialize the hardware abstraction layer. | |
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.
| 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.