Affiliate Disclosure
If you buy through our links, we may get a commission. Read our ethics policy.

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

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.

Watch the Latest from AppleInsider TV

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.

15 Comments

jfreedle2 2 Years · 23 comments

Not sure why anybody would want to run an emulated Unix instead of the certified Unix that is natively run as sold. Running Linux in virtual machines is more than good enough to use a Linux environment if required.

0 Likes · 6 Dislikes
22july2013 12 Years · 3802 comments

"The firmware ain't done until Linux won't run."

1 Like · 1 Dislike
michelb76 9 Years · 737 comments

jfreedle2 said:
Not sure why anybody would want to run an emulated Unix instead of the certified Unix that is natively run as sold. Running Linux in virtual machines is more than good enough to use a Linux environment if required.

It's not emulated, Asahi runs native. Apart from 'because they can', it also provides a very decent performance improvement compared to OSX for certain applications.

7 Likes · 0 Dislikes
yyzguy 1 Year · 57 comments

Is there any way to follow this discussion without posting?  I have nothing useful to contribute, but want to be notified when others post.   So this is what I’m doing unless there’s a better way.

unbeliever2 13 Years · 99 comments

jfreedle2 said:
Not sure why anybody would want to run an emulated Unix instead of the certified Unix that is natively run as sold. Running Linux in virtual machines is more than good enough to use a Linux environment if required.

It's literally the opposite of emulated, and is in fact more "native" than running it in a virtual machine, since the whole point is to run Linux on "bare metal" (Apple silicon).

2 Likes · 0 Dislikes