Page 1 of 1

Keyboard Buffer Full?

Posted: Tue Mar 06, 2007 12:54 am
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?

Re: Keyboard Buffer Full?

Posted: Tue Mar 06, 2007 1:21 am
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

Posted: Tue Mar 06, 2007 1:25 am
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?

Posted: Tue Mar 06, 2007 3:37 am
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)