OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 2:34 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [SOLVED] IRQ1 not firing after enabling paging
PostPosted: Mon Jul 10, 2017 5:34 pm 
Offline
Member
Member

Joined: Sun Sep 06, 2015 5:40 am
Posts: 47
I've just implemented paging (which does actually appear to work, much to my surprise). However, my OS already has working interrupt handlers, which none of the tutorials seem to deal with much. However, now when I press a key, the interrupt does not fire. However, IRQ0 still fires and works correctly, so my last guess is it's how I'm initializing the PS/2 controller, but it worked perfectly before paging was enabled. I do actually get one key event (for which no key has been pressed/released), but I send EOIs correctly so this isn't stopping further interrupts being sent.

I don't want to dump a whole bunch of code, and I have no idea where to even look tbh, I've looked for everything I think was obvious, but clearly I'm missing something. Please ask for whatever might be helpful.

Thanks in advance, despite the shoddy description of the problem.

_________________
OS on Github | My Rust ACPI library


Last edited by isaacwoods on Tue Jul 11, 2017 7:35 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: IRQ1 not firing after enabling paging
PostPosted: Mon Jul 10, 2017 10:14 pm 
Offline
Member
Member

Joined: Thu Aug 13, 2015 4:57 pm
Posts: 384
BaconWraith wrote:
However, now when I press a key, the interrupt does not fire. However, IRQ0 still fires and works correctly, so my last guess is it's how I'm initializing the PS/2 controller, but it worked perfectly before paging was enabled.

You used versioning, right? So go back in versions to find the last one that works correctly and then you can easily compare the last that worked to the _first_ that didn't, that should (hopefully) just be a couple of lines of code.


BaconWraith wrote:
I do actually get one key event (for which no key has been pressed/released), but I send EOIs correctly so this isn't stopping further interrupts being sent.

What exactly is a key event? Is that one IRQ1? What do you mean "no key has been pressed"?

You have checked that IRQ1 is unmasked? You have checked that there's nothing in the buffer on the PS/2 controller? Did you check the suggested PS/2 controller init sequence:
http://wiki.osdev.org/%228042%22_PS/2_Controller#Initialising_the_PS.2F2_Controller


Top
 Profile  
 
 Post subject: Re: IRQ1 not firing after enabling paging
PostPosted: Tue Jul 11, 2017 7:35 am 
Offline
Member
Member

Joined: Sun Sep 06, 2015 5:40 am
Posts: 47
Ugh, sorry. I had already looked at the diff but thanks for the tip, and I just completely misread the bug. The keyboard wasn't firing again because a page fault (which of course didn't happen before) picked up on a bug in my key handler's ring buffer implementation, which meant I wasn't reading the scancode from the PS/2 controller, so it didn't send more interrupts.

_________________
OS on Github | My Rust ACPI library


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

All times are UTC - 6 hours


Who is online

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