OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 23, 2024 3:40 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Trouble with Timer Interrupt(PIT)
PostPosted: Sun May 17, 2020 1:24 am 
Offline

Joined: Thu May 14, 2020 9:23 pm
Posts: 7
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


Top
 Profile  
 
 Post subject: Re: Trouble with Timer Interrupt(PIT)
PostPosted: Mon May 25, 2020 7:41 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5143
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.


Top
 Profile  
 
 Post subject: Re: Trouble with Timer Interrupt(PIT)
PostPosted: Tue May 26, 2020 1:53 am 
Offline

Joined: Thu May 14, 2020 9:23 pm
Posts: 7
Yep. That was the problem.


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: AlmaX3, Bing [Bot] and 117 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