Keyboard driver resets system when key is pressed.
-
- Member
- Posts: 5512
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Keyboard driver resets system when key is pressed.
Oh, so its the excatly the same as sending normal commands to the controller, except for sending to the data port, neat!
Re: Keyboard driver resets system when key is pressed.
So I'm back once again... when will this stupid keyboard driver end...
Anyway so I implmented stole the heap code from https://wiki.osdev.org/User:Pancakes/Si ... ementation, but that doesn't matter for todays post.
So I.. rewrote the keyboard driver. I got it to send a interrupt, BUT it.. stops sending them.
And I also didn't implment the reset code (because i'm pretty sure you need to send it to the keyboards, and I don't really know how to set up the sending commands to keyboards), so that might be the issue; the PS/2 keyboard in a bad state.
I would really appreciate if I can get help with sending commands to the keyboard and the single interrupt issue.
Anyway so I implmented stole the heap code from https://wiki.osdev.org/User:Pancakes/Si ... ementation, but that doesn't matter for todays post.
So I.. rewrote the keyboard driver. I got it to send a interrupt, BUT it.. stops sending them.
And I also didn't implment the reset code (because i'm pretty sure you need to send it to the keyboards, and I don't really know how to set up the sending commands to keyboards), so that might be the issue; the PS/2 keyboard in a bad state.
I would really appreciate if I can get help with sending commands to the keyboard and the single interrupt issue.
-
- Member
- Posts: 5512
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Keyboard driver resets system when key is pressed.
Did you acknowledge the PS/2 controller? Did you acknowledge the interrupt controller? Are you disabling interrupts at some point after returning from the first interrupt? Is a higher-priority interrupt blocking the keyboard interrupt?
What (if anything) did you do to initialize the PS/2 controller? If you didn't initialize it at all, it's probably in a reasonable state, although you should still check the output buffer so it doesn't get stuck waiting for you to respond to an interrupt that got lost when you initialized the interrupt controllers.
Sending bytes (command or otherwise) to the keyboard works very much like sending commands to the PS/2 controller, except you don't write anything to port 0x64. The keyboard will send a reply after every byte you send. You must wait for each reply before sending the next byte. You receive the reply exactly the same way you receive a scan code byte.
-
- Member
- Posts: 778
- Joined: Fri Aug 26, 2016 1:41 pm
- Libera.chat IRC: mpetch