kv2: initialize memory manager, early pci devices

Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
This commit is contained in:
Michael Shaw 2026-05-12 02:59:37 -04:00
commit a252a3f8e9
58 changed files with 1270 additions and 505 deletions

36
amd64/amd64_init.c Normal file
View file

@ -0,0 +1,36 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <drivers/acpi.h>
#include <drivers/tty.h>
#include <drivers/serial.h>
#include <lib/stdio.h>
#include "descriptor.h"
static struct tty tty_early = {0};
static struct tty_serial_ops tty_early_ops = {.serial_getchar = arch_serial_read, .serial_putchar = arch_serial_write};
void yield()
{
for (;;) {
asm("hlt");
}
}
void _panic()
{
yield();
}
void arch_early_init()
{
tty_early.serial_ops = &tty_early_ops;
tty_early.priv = (void *)COM1;
tty_printf = &tty_early;
}
void arch_init()
{
gdt_init();
idt_init();
acpi_init();
}