Basic raspberry pi OS very slow kprintf
Posted: Thu Aug 11, 2016 7:35 am
Hi!
I set out to port an exiting x86 hobby OS called yaosp to ARM for the raspberry pi hardware. It is a nice UNIX like OS, and its original authors managed to implemented so much functionality and ported many libraries that is asonishing for a team of 2 people. The code clarity is also fascinating and the kernel code is very minimal in the same time. (https://github.com/csko/yaosp)
So, here's my take on getting the console working with a kprintf() like method: https://github.com/attilaszia/armyaosp.
The script source/kernel/stat.sh should compile the kernel.img (via a custom written python utility).
I'm using some of Alex Chadwick's code to to negotiate a framebuffer with the GPU via malboxes, and then I use somewhat modified draw_pixel and draw_character methods to redraw the screen upon putchars. The result is horribly slow, it looks like if there was a sleep between consecutive characters when I call the kprintf function with any string.
Why could this happen? Does the per-character redrawing of the 80x25 console buffer have such a performance impact?
(The original x86 code navigated in the VGA video buffer and did not redraw the screen upon putchars, that is what I try to simulate using the console char buffer)
I set out to port an exiting x86 hobby OS called yaosp to ARM for the raspberry pi hardware. It is a nice UNIX like OS, and its original authors managed to implemented so much functionality and ported many libraries that is asonishing for a team of 2 people. The code clarity is also fascinating and the kernel code is very minimal in the same time. (https://github.com/csko/yaosp)
So, here's my take on getting the console working with a kprintf() like method: https://github.com/attilaszia/armyaosp.
The script source/kernel/stat.sh should compile the kernel.img (via a custom written python utility).
I'm using some of Alex Chadwick's code to to negotiate a framebuffer with the GPU via malboxes, and then I use somewhat modified draw_pixel and draw_character methods to redraw the screen upon putchars. The result is horribly slow, it looks like if there was a sleep between consecutive characters when I call the kprintf function with any string.
Why could this happen? Does the per-character redrawing of the 80x25 console buffer have such a performance impact?
(The original x86 code navigated in the VGA video buffer and did not redraw the screen upon putchars, that is what I try to simulate using the console char buffer)