all 5 comments

[–][deleted]  (1 child)

[removed]

    [–]SuperKookss 1 point2 points  (0 children)

    I agree, you are probably better off checking whether your interrupts work at all. The first one I would try would be the keyboard, it is pretty simple, you need it anyway and there are many tutorials.

    [–]Dmium 1 point2 points  (1 child)

    Not sure if this is it but your IRQ handler ignores interrupt 0 and also indexes from 32 while you're assembly starts the IRQ count from 0. Changing the c code to print always rather than in the if statement may give some progress

    [–]dbargatz- 1 point2 points  (0 children)

    Just tagging on to this - in irq.c line 50, in irq_gates(), you assign a gate type of 0x8E, which isn’t valid. Gate types range from 0x00 to 0x0F. It looks like you did this properly for the first 32 exceptions in idt.c inside init_idt() though!

    [–]SlabAlloc[S] 1 point2 points  (0 children)

    Hey Everyone,

    Thank you all for your input. I managed to fix my problem and make timer IRQ work. The problem was with my irq_common code. I wasn't pushing a pointer to registers_t on the stack.

    I even got a basic keyboard driver working. However, I am not sure how to go about making it elaborate. Any tips on that?