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.
IRQs or PIT don't work, don't know why
-
- Member
- Posts: 5563
- Joined: Mon Mar 25, 2013 7:01 pm
Re: IRQs or PIT don't work, don't know why
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?
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?
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}