OSDev.org

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

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Calling the IDT and ISR at the same time crashes the OS
PostPosted: Mon Nov 15, 2021 10:07 pm 
Offline
Member
Member

Joined: Mon Nov 15, 2021 9:48 pm
Posts: 79
Hey,
I've got a newbie problem - Calling the IDT and ISR at the same time crashes my OS, and calling the IDT and a init_video() crashes the OS.

What I've done so far:
I followed the tutorial linked here: https://www.youtube.com/watch?v=EpFUzjYehxs ad a base and am now continuing with Brans Kernel Development Tutorial. I wrote functions to control the screen based on his code as well.

How I have tried to fix it:
I've looked everywhere online and have even restarted the project twice. So I really have no idea what is wrong.

The Code:
The code can be found here: https://github.com/zachary-d-r/Os-Problem-Code


Again, I'm sorry for the newbie question, I am just really lost on how to get this to work.


Top
 Profile  
 
 Post subject: Re: Calling the IDT and ISR at the same time crashes the OS
PostPosted: Tue Nov 16, 2021 8:04 am 
Offline
Member
Member
User avatar

Joined: Wed Sep 28, 2005 11:00 pm
Posts: 85
Did you remember to mask IRQs?


Top
 Profile  
 
 Post subject: Re: Calling the IDT and ISR at the same time crashes the OS
PostPosted: Tue Nov 16, 2021 10:50 am 
Offline
Member
Member

Joined: Sat Mar 10, 2018 10:16 am
Posts: 296
It seems like you are not remapping PIC https://wiki.osdev.org/8259_PIC#Initialisation

_________________
https://github.com/VendelinSlezak/BleskOS


Top
 Profile  
 
 Post subject: Re: Calling the IDT and ISR at the same time crashes the OS
PostPosted: Tue Nov 16, 2021 2:46 pm 
Offline
Member
Member

Joined: Mon Nov 15, 2021 9:48 pm
Posts: 79
Klakap wrote:
It seems like you are not remapping PIC https://wiki.osdev.org/8259_PIC#Initialisation


How should I implement this? - should I create a new file with the code and initialize it before the idt and irs? Or am I completely wrong? Also, how would I initialize the PIC controller?
how
Again, sorry for the newbie questions.


Last edited by Caffeine on Wed Nov 17, 2021 5:52 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Calling the IDT and ISR at the same time crashes the OS
PostPosted: Tue Nov 16, 2021 9:28 pm 
Offline
Member
Member

Joined: Wed Aug 30, 2017 8:24 am
Posts: 1593
You should keep your interrupts masked until you have discovered and initialized all interrupt controllers in the system. So initialize your IDT, keep interrupts masked. Then initialize PIC (and possibly APIC) and mask out all interrupts in them, then unmask interrupts in the CPU. Now, only unmask those IRQs you have drivers for. That way you will only get interrupts you actually know. It will not help you to know that, say, IRQ13 fired if you don't know what IRQ13 is.

_________________
Carpe diem!


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 63 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group