diff --git a/src/kernel.c b/src/kernel.c index 8937b23..abd5506 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -9,6 +9,13 @@ #include +void apply_pic_masks() +{ + //0x21 is master pic, 0xa1 is slave pic + outb(0x21,0xfc);//0b11111100 (bit 0 is PIT, bit 1 is keyboard and so on) + outb(0xa1,0xff); +} + void kmain() { terminal_initialize(); @@ -16,9 +23,8 @@ void kmain() isr_install(); pic_remap(0x20, 0x28); pit_init(); - //only enable keyboard IRQs - outb(0x21,0xfc); - outb(0xa1,0xff); + + apply_pic_masks(); printf("Kernel init sequence completed\n");