OSDev.org
https://forum.osdev.org/

how to set up IRQs and the PIC
https://forum.osdev.org/viewtopic.php?f=1&t=56798
Page 1 of 1

Author:  uruseiyatsura [ Mon Mar 27, 2023 12:58 am ]
Post subject:  how to set up IRQs and the PIC

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.

Author:  sounds [ Mon Mar 27, 2023 10:37 am ]
Post subject:  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.

Author:  Octocontrabass [ Mon Mar 27, 2023 3:23 pm ]
Post subject:  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?

Author:  Klakap [ Tue Mar 28, 2023 2:24 am ]
Post subject:  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.

Author:  Clover5411 [ Tue Mar 28, 2023 3:25 am ]
Post subject:  Re: how to set up IRQs and the PIC

I don't mean to be rude; but to get proper help, you need to give a more detailed description than just saying you couldn't get PIC and IRQ working.

Author:  sounds [ Tue Mar 28, 2023 9:48 am ]
Post subject:  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.

Author:  iansjack [ Tue Mar 28, 2023 10:48 am ]
Post subject:  Re: how to set up IRQs and the PIC

sounds wrote:
KineticManiac, we're attempting to be welcoming here, check uruseiyatsura's post history for the context.

What’s your point?

It was an eminently sensible comment.

Author:  lochyj [ Thu Mar 30, 2023 7:28 pm ]
Post subject:  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

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/