Keyboard Buffer Full?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Keyboard Buffer Full?

Post by pcmattman »

I can't enter any input into my OS after a certain point (generally after a disk read). The Bochs log has heaps of these entries:

Code: Select all

00044420000i[KBD  ] internal keyboard buffer full, ignoring scancode.(9e)
00044550000i[KBD  ] internal keyboard buffer full, ignoring scancode.(9f)
00044666000i[KBD  ] internal keyboard buffer full, ignoring scancode.(a0)
00044718000i[KBD  ] internal keyboard buffer full, ignoring scancode.(22)
00045370000i[KBD  ] internal keyboard buffer full, ignoring scancode.(a2)
00045598000i[KBD  ] internal keyboard buffer full, ignoring scancode.(a1)
00045598000i[KBD  ] internal keyboard buffer full, ignoring scancode.(1f)
00045626000i[KBD  ] internal keyboard buffer full, ignoring scancode.(1e)
00046416000i[KBD  ] internal keyboard buffer full, ignoring scancode.(20)
Any ideas?
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Keyboard Buffer Full?

Post by Brendan »

pcmattman wrote:I can't enter any input into my OS after a certain point (generally after a disk read). The Bochs log has heaps of these entries:
In general this means the OS isn't reading data out of the keyboard controller chip fast enough, and/or a keyboard IRQ was missed.

Does your OS disable interrupts for too long?

Has the IPS value being used by Bochs been calibrated properly?

In your "bochsrc.txt" there should be a line like this:

Code: Select all

keyboard_serial_delay: 200
Does increasing this delay help?


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

It actually turns out I was trying to read a sector into a 128-byte buffer... oops! The problem has since been resolved by increasing the buffer size to the appropriate 512 bytes. My OS doesn't disable interrupts at all (yet), and how do I calibrate the IPS value in Bochs?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

setting ips is a matter of taste / host speed (the latter only specifying a maximum) There should be some standard IPS values in your default bochsrc / bochs documentation, which should give you some indication. Sometimes it helps setting it to horribly low values too... (You might want to update vga update interval if you change ips)

But since the default IPS is generally fine, you're best off reading about cpu sync (sync=slowdown being my favorite)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply