Page 1 of 1

IRQs or PIT don't work, don't know why

Posted: Sat Jun 11, 2022 4:27 pm
by Arnolxu
I'm trying to make a simple OS by following JamesM's kernel development tutorials:
http://www.jamesmolloy.co.uk/tutorial_h ... 20PIT.html

But when I tried to implement PIT, nothing happened. I think it didn't work because the tutorial was using C and I was using C++, and I did something wrong while implementing it.

Here's the git repository: https://github.com/ardatdev/arus
What did I do wrong? I'm new to OS development and I have no idea what's wrong.

Re: IRQs or PIT don't work, don't know why

Posted: Tue Jun 14, 2022 10:50 am
by Octocontrabass

Re: IRQs or PIT don't work, don't know why

Posted: Thu Jun 16, 2022 12:27 am
by neon
Hi,

You should really be enabling hardware interrupts after having already set up the PIT not before. Move timer::init right after init_descriptor_tables. What happens if the timer goes off after that STI but before you install its ISR?