28 lines
436 B
C
28 lines
436 B
C
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include "hal/hal.h"
|
|
#include "kprintf.h"
|
|
#include "serial.h"
|
|
#include "gdt.h"
|
|
#include "idt.h"
|
|
#include "acpi.h"
|
|
|
|
void hal_init(void) {
|
|
if (!serial_init()) {
|
|
hal_hang(); // going further makes no sense
|
|
}
|
|
LOG("hal", "serial init\n");
|
|
gdt_init();
|
|
}
|
|
|
|
__attribute__((noreturn)) void hal_hang(void) {
|
|
for(;;) {
|
|
asm("hlt");
|
|
}
|
|
}
|
|
|
|
void hal_init_withmalloc(void) {
|
|
acpi_init();
|
|
}
|
|
|