apic: init apic timer using pit, not precise on qemu
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user