kb handling is very slow

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
Prabu

kb handling is very slow

Post by Prabu »

keyboard handling is very slow!.

"actually things will be faster in the real machine and slow
in bochs, but for me its working opposite to this principle"

in my micro kernel os,
when a keyboard int occurs a message will be sent
to the kb_driver to wake it,
then the kb_driver will read the port 0x60.

my question is, should i do any initialisation on the keyboard chip or should i change the typematic and repeat rates of
the keyboard? If i do will it work faster.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:kb handling is very slow

Post by distantvoices »

That's no good, man!

You should have the keyboard ISR fetch the scancode from
Keyboard immediately and stuff it into a FIFO. Just alter a
variable for the timer ISR to check. It should do the message sending - via something like "interrupt(1)", which might attach a message to the postbox of the Keyboard driver and wake it up eventually.

The keyboard isr does nothing but changing a variable from 0 to 1.

The timer isr checks this variable (which tells: scancode FIFO has input)

the keyboard driver fetches the scancodes, prcesses them and eventually sets the variable to 0 ere it goes to sleep again.

HtH & CCW
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Post Reply