Hello Everyone,
I recently got started with my hobby OS . I am following James M's tutorial for the basics. However, I am having trouble getting timer interrupt to work. I do enable interrupts after setting up gdt, idt, remapping and installing irqs. The Timer driver seems straightforward to implement. I doubt that the driver itself is the problem as the IRQ doesn't fire for some reason(not even once).
I'd appreciate it if anyone could point out where I am going wrong.
Github: https://github.com/Crescent92/testOS
Trouble with Timer Interrupt(PIT)
-
- Member
- Posts: 5575
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Trouble with Timer Interrupt(PIT)
Your irq_handler() function takes one pointer to registers_t as an argument, but you don't pass that pointer to it. You probably want to add a "push esp" instruction right before the call, and appropriate stack cleanup right after.
Re: Trouble with Timer Interrupt(PIT)
Yep. That was the problem.