serial Kernel panic

This commit is contained in:
2026-01-10 09:45:20 +01:00
parent 0f72987bc1
commit 12ab12f1b2
7 changed files with 119 additions and 2 deletions

View File

@@ -65,6 +65,17 @@ void pit_init()
outb(0x40, (divisor >> 8) & 0xFF);
}
// Wait n ticks
// Given that there's a tick every 1ms, wait n milliseconds
void timer_wait(uint64_t wait_ticks)
{
uint64_t then = ticks + wait_ticks;
while (ticks < then)
{
asm("hlt");
};
}
void timer_init()
{
// Remapping the PIC, because at startup it conflicts with