OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 10:26 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Interrupt is called only once
PostPosted: Mon Dec 09, 2019 11:54 am 
Offline
Member
Member
User avatar

Joined: Sun Jul 21, 2019 7:34 am
Posts: 300
Hello.

I recently added interrupts to my kernel and wanted to check if they work correctly, but I came across the fact that the interrupt only works once, that is, in the example with the keyboard: I press a button - a pixel is drawn, but if I press it further, the interrupt does not work.

For debugging, I used the output to the COM port, after which qemu wrote the data to the document. Output to the document occurred only once.

I do not understand why this happens, because the processor is constantly waiting for an interrupt and must perform not only the first interrupt (look bootloader.asm).

Here is irq1_header().
Here is a link to the repository with the system.


Top
 Profile  
 
 Post subject: Re: Interrupt is called only once
PostPosted: Mon Dec 09, 2019 12:09 pm 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
You won't get any further keyboard interrupts until you read the keystroke from the keyboard port.


Top
 Profile  
 
 Post subject: Re: Interrupt is called only once
PostPosted: Mon Dec 09, 2019 4:13 pm 
Offline
Member
Member

Joined: Wed Mar 09, 2011 3:55 am
Posts: 509
More generally, you don't just need to ensure that the CPU is ready to *receive* the next interrupt, but that the interrupt controller is ready to pass the next interrupt on, and that the device in question is ready to *send* the next interrupt. It doesn't do any good for the CPU to be ready for an interrupt if it never receives it in the first place.


Top
 Profile  
 
 Post subject: Re: Interrupt is called only once
PostPosted: Tue Dec 10, 2019 10:06 am 
Offline
Member
Member
User avatar

Joined: Sun Jul 21, 2019 7:34 am
Posts: 300
iansjack wrote:
You won't get any further keyboard interrupts until you read the keystroke from the keyboard port.


Thanks.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 148 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