Demonstrated the launch of a Linux environment with GNOME on devices with an Apple M1 chip

The Linux support initiative for the Apple M1 chip, promoted by the Asahi Linux and Corellium projects, has reached the point where it is possible to run the GNOME desktop in a Linux environment running on a system with an Apple M1 chip. Screen output is organized using a framebuffer, and OpenGL support is provided using the LLVMPipe software rasterizer. The next step is to enable the display co-processor to output up to 4K resolution, the drivers for which have already been reverse-engineered.

The Asahi project has achieved initial support for non-GPU SoC M1 components in the core Linux kernel. In the demonstrated Linux environment, in addition to the capabilities of the standard kernel, several additional patches related to PCIe, the pinctrl driver for the internal bus, and the display driver were used. These additions made it possible to provide screen output and achieve USB and Ethernet operation. Graphics acceleration is not yet used.

Interestingly, for the reverse engineering of SoC M1, the Asahi project, instead of trying to disassemble macOS drivers, implemented a hypervisor that runs at a level between macOS and the M1 chip and transparently intercepts and logs all operations with the chip. Of the features of the SoC M1 that make it difficult to implement chip support in third-party operating systems, the addition of a coprocessor to the display controller (DCP) is mentioned. Half of the functionality of the macOS display driver, which calls ready-made coprocessor functions through a special RPC interface, has been moved to the side of the specified coprocessor.

Enthusiasts have already parsed enough calls to this RPC interface to use the coprocessor for displaying, as well as controlling the hardware cursor and performing compositing and scaling operations. The problem is that the RPC interface is firmware specific and changes with each version of macOS, so Asahi Linux plans to support only certain firmware versions. First of all, support for the firmware shipped with macOS 12 "Monterey" will be provided. It is not possible to download the desired version of the firmware, since iBoot installs the firmware at the stage before transferring control to the operating system and with verification by digital signature.

Demonstrated the launch of a Linux environment with GNOME on devices with an Apple M1 chip
Demonstrated the launch of a Linux environment with GNOME on devices with an Apple M1 chip


Source: opennet.ru

Add a comment