serial Kernel panic
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user