apic: init apic timer using pit, not precise on qemu

This commit is contained in:
2025-09-01 23:22:33 +03:00
parent 982f1a5fae
commit a459751453
5 changed files with 75 additions and 1 deletions
+8
View File
@@ -73,6 +73,9 @@ void kmain(unsigned int magic, unsigned int info)
printf("IOAPIC init done\n");
ioapic_redirect(2, 32);//timer
ioapic_redirect(1, 33);//keyboard
init_apic_timer();
mask_pit_interrupt();
}
printf("done fucking with pages and memory map!\n");
@@ -132,6 +135,11 @@ void kmain(unsigned int magic, unsigned int info)
while(1)
{
if(timer_ticks % 1000 == 0)
{
//printf("a second should have passed!\n");
}
/* if(inportb(0x64) & 0x1)
{
unsigned char key = inportb(0x60);