OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 5:38 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: IRQs or PIT don't work, don't know why
PostPosted: Sat Jun 11, 2022 4:27 pm 
Offline

Joined: Sat Jun 11, 2022 4:49 am
Posts: 1
Location: Istanbul, Turkey
I'm trying to make a simple OS by following JamesM's kernel development tutorials:
http://www.jamesmolloy.co.uk/tutorial_html/5.-IRQs%20and%20the%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.


Top
 Profile  
 
 Post subject: Re: IRQs or PIT don't work, don't know why
PostPosted: Tue Jun 14, 2022 10:50 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5100
The tutorial you're following is full of bugs. Try fixing those bugs.


Top
 Profile  
 
 Post subject: Re: IRQs or PIT don't work, don't know why
PostPosted: Thu Jun 16, 2022 12:27 am 
Offline
Member
Member
User avatar

Joined: Sun Feb 18, 2007 7:28 pm
Posts: 1564
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?

_________________
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 73 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group