Fuchsia is a new open source, micro-kernel-like operating system from Google. Drivers do not execute inside the Zircon kernel, instead they are privileged user-space processes. Drivers are built using a stable DDK.
Magma is the gpu driver architecture for Fuchsia. There are two driver components: a gpu-specific library loaded into each application’s address space; and the magma system driver that manages the hardware.
Magma is designed to support Vulkan, though it could be used to implement OpenGL or other graphics api. For legacy codebases Fuchsia intends to support OpenGL via translation to Vulkan using ANGLE.
A memory management unit that allows arbitrary mapping of system memory pages into the GPU address space is needed for DMA to/from non-contiguous buffers.
For system security it’s important to maintain address space isolation in the gpu domain as well as in the cpu domain.
This may be relaxed in the future.
Similar to the direct rendering model on Linux, there are two driver components: a gpu-specific library loaded into each application’s address space; and the magma system driver that manages the hardware.
Whereas a traditional client driver makes ioctl syscalls to communicate with a kernel driver; magma provides an interface for client drivers to communicate over IPC with the Magma system driver.
Details on the Magma interface are given in Magma: Design.