hazel/kernel/kernel.c

20 lines
458 B
C

#include <kernel/kernel.h>
#include <kernel/multiboot.h>
#include <kernel/serial.h>
kernel_ctx_t ctx = {0};
void kernel(multiboot_info_t *info) {
if (!(info->flags & (1<<6))) goto halt;
ctx.mem_map = (multiboot_memory_map_t *)info->memmapaddress;
ctx.mem_map_len = info->memmaplength;
if (serial_port_init(COM1))
ctx.log_method = LOG_COM1;
LOG("Kernel log being sent to COM1\n");
halt:
asm volatile ("cli" ::);
for (;;) {}
}