Sunday, April 13, 2025
HomeTechnologyAsahi Linux M4 support hits a roadblock because of Apple Silicon changes...

Asahi Linux M4 support hits a roadblock because of Apple Silicon changes TechTricks365


Asahi Linux logo and a Mac Studio

The Asahi Linux project is having trouble bringing the operating system to M4 Macs, with some chip changes making working with the latest Apple Silicon models a lot tougher.

Asahi Linux is a project to make the Linux kernel work with Apple Silicon, so that Linux users can natively use modern Macs with Linux. After having success with M1 and M2 chips, the project is running into issues when trying to work with M4.

In a post to Mastodon on April 4, developer Sven Peter describes the work to add M4 support to Asahi Linux as “rather painful.” This is in comparison to the challenges the project faced when it came to supporting M1 and M2.

The project, for the moment, is focusing on upstreaming M1 and M2 support, but it has started to look towards the M4 workload. Unfortunately, trying to run the m1n1 bootloader isn’t working properly for some M4 users who have tried it, as Apple has changed something for the M4 generation.

Chip challenges

In describing the issue, Peter mentions how, when configuring a boot object, the environment is set where Apple’s SPTM (Secure Page Table Monitor) is set to the GL2 register. The boot loader is supposed to communicate from EL2 (Exception Level 2) with the MMU (Memory Management Unit) enabled to set up pagetables.

The problem is that it doesn’t work for Linux, Peter explains. It also doesn’t help for running XNU, Apple’s OS kernel, for reverse engineering purposes.

Configuring a raw boot object drops the process into EL2 with GL2, but with most of the Apple-specific extensions disabled. While this is OK for linux, it means XNU cannot be run under the project’s hypervisor.

This is a bit of a roadblock for the project, and will make it considerably harder to enable M4 support to Asahi Linux in future. However, in a reply, Peter offers hope that a hijacking of XNU exception handlers and pagetable code could be a path forward.

There is no clear timetable for M4 support.


RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments