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.
The problem is that it works well on Qemu, but not on real hardware. Anyone know how to fix it?
BTW, here's the hardware implementations for the Raspberry Pi on my OS: https://gitlab.com/weedboi6969/fusion/- ... rpi-common
Just a procrastinating uni student doing stupid things (or not doing them at all)...
I believe you should align the struct. Otherwise I would not recommend to use the framebuffer channel, rather use the property channel. It's more flexible and works on all Pis. Here's the corresponding part of my tutorial series, tested by many many users both on qemu and real hardware: 09_framebuffer.
Note that my mbox[] array is 16 bytes aligned. This code is intended for AArch64, but there's nothing in the mbox/lfb part that wouldn't compile under AArch32. Also note that I only convert the returned GPU address to CPU address unconditionally, and never do the other way around: mbox[28] &= 0x3FFFFFFF;
And here's dwelch's tutorial video01.c. Written for AArch32 and Raspi2, uses the framebuffer channel, although a little bit less readable source (uses hardcoded GPU addresses).
Thanks for your reply! Apparently it's the lack of BSS clearing code that's causing the problem. However, I figured out that it's best to switch to the Mailbox property interface for framebuffer initialization, so I've adapted your code into my OS and now everything is working nicely on real hardware now.
Just a procrastinating uni student doing stupid things (or not doing them at all)...