Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34599 )
Change subject: drivers/emulation/qemu: Show splashscreen on bochs VGA ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34599/2/src/drivers/emulation/qemu/... File src/drivers/emulation/qemu/bochs.c:
https://review.coreboot.org/c/coreboot/+/34599/2/src/drivers/emulation/qemu/... PS2, Line 126: if (CONFIG(BOOTSPLASH))
This would require to implement an interface to get the framebuffer parameter in $n places, right?
We already have the infrastructure to query the framebuffer parameters. With CONFIG_LINEAR_FRAMEBUFFER, there is a fill_lb_framebuffer(). However, I hate boot-state hooks (because of many bugs introduced by their excessive usage) so I propose another scheme (that would be better in the long run anyway):
Currently every linear-framebuffer driver in coreboot has its own means to cache the framebuffer info for future calls of fill_lb_framebuffer(). This has one very bad implication: The driver implements fill_lb_ framebuffer(), so there can only be a single driver in the whole core- boot build (making runtime decisions which driver to choose impossible).
It would be better to reverse the control flow: Instead of querying the framebuffer infos later, let the drivers push them when they set up a framebuffer. Then, the bootsplash code can be in a central place (where the framebuffer info is pushed to), and also rules for multiple reported framebuffers could be implemented there.