Keyboard and Framebuffer issues
Posted: Mon May 27, 2024 6:07 am
https://github.com/Senc3951/MyOS
Hi, I have 2 questions about my OS I hope someone can answer.
1. When testing the keyboard driver, I noticed that if I spam keys, at first everything works and the letters are printed to the screen, however, after a couple of seconds it stops generating interrupts. upon further investigating I saw that if I print the letters only to the serial output and not to the screen (Framebuffer), it will still stop generating interrupts but after a longer time, so I guess it happens because the fb is slow and the kernel doesn't have time to send an EOI while another key is pressed. (located at kernel/src/dev/ps2/kbd, taken from xv6)
2. When initializing the framebuffer and clearing the screen, I saw that it takes around 1.5sec to clear the screen. To speed things up, I mapped it as WC but I can't see a difference. I saw that someone said that it happens because of qemu and on actual hardware it would be faster, but when experimenting with Limine bootloader, the fb reacted way faster although they used the same caching for all the memory (WC for fb, WB for rest). (cache init at kernel/src/mem/vmm, fb at kernel/src/dev/fb/screen)
Hi, I have 2 questions about my OS I hope someone can answer.
1. When testing the keyboard driver, I noticed that if I spam keys, at first everything works and the letters are printed to the screen, however, after a couple of seconds it stops generating interrupts. upon further investigating I saw that if I print the letters only to the serial output and not to the screen (Framebuffer), it will still stop generating interrupts but after a longer time, so I guess it happens because the fb is slow and the kernel doesn't have time to send an EOI while another key is pressed. (located at kernel/src/dev/ps2/kbd, taken from xv6)
2. When initializing the framebuffer and clearing the screen, I saw that it takes around 1.5sec to clear the screen. To speed things up, I mapped it as WC but I can't see a difference. I saw that someone said that it happens because of qemu and on actual hardware it would be faster, but when experimenting with Limine bootloader, the fb reacted way faster although they used the same caching for all the memory (WC for fb, WB for rest). (cache init at kernel/src/mem/vmm, fb at kernel/src/dev/fb/screen)