diff --git a/kernel/arch/idt/idt.c b/kernel/arch/idt/idt.c index 5937505..e85edb3 100644 --- a/kernel/arch/idt/idt.c +++ b/kernel/arch/idt/idt.c @@ -6,6 +6,7 @@ #endif #include #include +#include __attribute__((aligned(0x10))) static idt_entry_t idt[256]; @@ -58,8 +59,8 @@ void idt_init(void) __asm__ volatile("lidt %0" : : "m"(idtr)); // load the new IDT PIC_remap(0x20, 0x28); - //IRQ_set_mask(0xfd); // unmask IRQ1 - pic_disable(); //TODO: this is ending a timer interrupt even though its masked off.. + pic_disable(); // mask everything + IRQ_clear_mask(1); __asm__ volatile("sti"); // set the interrupt flag #ifdef __TESTING__ diff --git a/kernel/arch/pic/pic.c b/kernel/arch/pic/pic.c index ef093ed..330187d 100644 --- a/kernel/arch/pic/pic.c +++ b/kernel/arch/pic/pic.c @@ -1,5 +1,6 @@ #ifdef __TESTING__ #include +#include #endif #include #include @@ -70,6 +71,8 @@ void IRQ_set_mask(uint8_t IRQline) // Masked IRQlines are ignored by the PIC, ma port = PIC2_DATA; IRQline -= 8; } + + printf("%x %x\n", port, IRQline); value = inb(port) | (1 << IRQline); outb(port, value); diff --git a/kernel/kmain.c b/kernel/kmain.c index 4dbf89a..84586d6 100644 --- a/kernel/kmain.c +++ b/kernel/kmain.c @@ -25,7 +25,7 @@ void kmain(void) /** * The computer is now hanging on INTERRUPT 32, - * this is good because that means the PIC is working, its the timer interrupt + * this is good because that means the PIC is working, its the timer interrupt, except... the PIT is masked off... * we need to now implement the ISR routines in exception_handler, * first i want to implement all of the code for the basic exceptions.. * then i want to setup the PIC triggers @@ -33,4 +33,12 @@ void kmain(void) * now for keyboard stuff, i believe i need to start looking into setting up a ps/2 driver before the interrupts will even start arriving.. * */ + + printf("Entering loop...\n"); + while (1) { + + continue; + } + printf("Exiting loop...\n"); + }