Hello guys,
I just started OSdev and I'm building a very simple OS, but I cannot set up the PIC and the IRQ in protected mode.
I read the osdev wiki and I found something about the PIC initialisation, but nothing about the IRQ.
I admit I am pretty a noob, but I don't found any code about the IRQ init.
Could someone gimme a hand please?
Thank you.
how to set up IRQs and the PIC
Re: how to set up IRQs and the PIC
For starters, can you disable all interrupts in the PIC? That will prevent any IRQs from firing until you have set up interrupt handler code. https://wiki.osdev.org/8259_PIC#Disabling
Please share any code you have, and we can give you more detailed info.
Please share any code you have, and we can give you more detailed info.
-
- Member
- Posts: 5562
- Joined: Mon Mar 25, 2013 7:01 pm
Re: how to set up IRQs and the PIC
IRQs are Interrupt ReQuests. Initialization is different for every device that can generate IRQs. So, which device do you want to initialize to generate IRQs?
Re: how to set up IRQs and the PIC
IRQ are set up through IDT table. you simply build IDT table in memory, and point to it by assembly command lidt. some info about this is on https://wiki.osdev.org/Interrupts_tutorial or https://wiki.osdev.org/Interrupt_Descriptor_Table.
-
- Member
- Posts: 25
- Joined: Sat Jul 27, 2019 9:41 am
Re: how to set up IRQs and the PIC
KineticManiac, we're attempting to be welcoming here, check uruseiyatsura's post history for the context.
Re: how to set up IRQs and the PIC
What’s your point?sounds wrote:KineticManiac, we're attempting to be welcoming here, check uruseiyatsura's post history for the context.
It was an eminently sensible comment.
Re: how to set up IRQs and the PIC
Here is a reasonably good tutorial that you may find useful:
http://www.osdever.net/bkerndev/Docs/isrs.htm
Edit:
Forgot to add this:
https://wiki.osdev.org/Bran%27s_Kernel_ ... Known_Bugs
http://www.osdever.net/bkerndev/Docs/isrs.htm
Edit:
Forgot to add this:
https://wiki.osdev.org/Bran%27s_Kernel_ ... Known_Bugs