OSDev.org

The Place to Start for Operating System Developers
It is currently Mon May 29, 2023 12:41 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: how to set up IRQs and the PIC
PostPosted: Mon Mar 27, 2023 12:58 am 
Offline

Joined: Mon Apr 04, 2022 9:20 am
Posts: 16
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.


Top
 Profile  
 
 Post subject: Re: how to set up IRQs and the PIC
PostPosted: Mon Mar 27, 2023 10:37 am 
Offline
Member
Member

Joined: Sat Feb 04, 2012 5:03 pm
Posts: 95
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.


Top
 Profile  
 
 Post subject: Re: how to set up IRQs and the PIC
PostPosted: Mon Mar 27, 2023 3:23 pm 
Offline
Member
Member

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


Top
 Profile  
 
 Post subject: Re: how to set up IRQs and the PIC
PostPosted: Tue Mar 28, 2023 2:24 am 
Offline
Member
Member

Joined: Sat Mar 10, 2018 10:16 am
Posts: 273
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.

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


Top
 Profile  
 
 Post subject: Re: how to set up IRQs and the PIC
PostPosted: Tue Mar 28, 2023 3:25 am 
Offline

Joined: Sat Jul 27, 2019 9:41 am
Posts: 19
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.


Top
 Profile  
 
 Post subject: Re: how to set up IRQs and the PIC
PostPosted: Tue Mar 28, 2023 9:48 am 
Offline
Member
Member

Joined: Sat Feb 04, 2012 5:03 pm
Posts: 95
KineticManiac, we're attempting to be welcoming here, check uruseiyatsura's post history for the context.


Top
 Profile  
 
 Post subject: Re: how to set up IRQs and the PIC
PostPosted: Tue Mar 28, 2023 10:48 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4548
Location: Chichester, UK
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.


Top
 Profile  
 
 Post subject: Re: how to set up IRQs and the PIC
PostPosted: Thu Mar 30, 2023 7:28 pm 
Offline

Joined: Fri Nov 11, 2022 10:28 pm
Posts: 8
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


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: SemrushBot [Bot] and 10 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