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.
Calling the IDT and ISR at the same time crashes the OS
Re: Calling the IDT and ISR at the same time crashes the OS
Did you remember to mask IRQs?
Re: Calling the IDT and ISR at the same time crashes the OS
It seems like you are not remapping PIC https://wiki.osdev.org/8259_PIC#Initialisation
Re: Calling the IDT and ISR at the same time crashes the OS
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?Klakap wrote:It seems like you are not remapping PIC https://wiki.osdev.org/8259_PIC#Initialisation
how
Again, sorry for the newbie questions.
Last edited by Caffeine on Wed Nov 17, 2021 5:52 pm, edited 1 time in total.
Re: Calling the IDT and ISR at the same time crashes the OS
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!