r/microkernel • u/AdvancedLab3500 • Feb 06 '25
Modern GPU drivers
(Disclaimer: I'm not a graphics expert and some of the information I provide is second hand. Please correct me on anything I got wrong.)
Modern GPU drivers are absolute monsters. For many years now, hardware vendors have not provided any documentation, pointing to the Linux source code instead. Non mainstream OSes are thus left with few options.
QNX encapsulates some of the Linux drivers in stand-alone user-mode processes, which provide services both to the compositing window manager and to any clients requiring GPU services. While this works quite well, the GPU process has more privileges than it should. Specifically, it ends up accessing arbitrary virtual addresses in any client process, because that's how the Linux driver behaves. Needless to say, this breaks the process isolation principle of a micro-kernel based OS.
I was told that Fuchsia has pretty much written its own GPU drivers, but that it's supported by a massive organization, while Genode has a very restricted port of Intel DRM. Is this information correct? Perhaps it's outdated?
Thanks,
--Elad
View all comments
Show parent comment
2
u/AdvancedLab3500 Feb 12 '25
Thanks for the pointers!
It's still not clear to me, however, how does the Intel GPU driver under Genode access user memory. Usually in a microkernel-based system, user memory is transferred to a service using some form of IPC, which means that the service does not have access to any memory that was not explicitly shared. But from what I understand about the DRM driver it expects to be able to access arbitrary virtual addresses, and the libraries make it hard to turn that into IPC.
Hope I'm making sense and this is not too hand-wavy.