Linux on Apple M1 Project Reveals New Details About M1 System Architecture
Apple's M1 systems use multiple proprietary technologies.
Corellium, a software company specializing in virtualization solutions, has managed to port Linux to an Apple M1-based PC and even succeeded in making almost all the system peripherals work. In the process, Corellium discovered several interesting details about Apple’s M1 processor and the system architecture.
A couple of weeks ago, we reported that a startup called Corellium had managed to run Linux on an Apple M1-based computer. Back then, the operating system ran, but it did not support many things, essentially making the PC unusable to a large degree. Recently the company finally managed to make most of the things (including Wi-Fi) work, which means that Linux can now be used on the latest Macs. But the whole project of running a non-Apple OS on such computers has an interesting side effect as it reveals how different Apple’s SoCs are compared to other Arm-based architectures.
Loads of Proprietary Technologies
It's no secret that Apple has focused on building its own Arm-based microarchitectures to offer unbeatable performance with its iPhones and iPads for quite a while now. Unlike its rivals, the company did not throw in more cores, instead improving its cores' single-core/single-thread performance. In addition to custom cores, Apple apparently uses a highly custom system architecture too, according to Corellium.
When virtually all 64-bit Arm-based systems bootup, they call firmware through an interface called PSCI, but in the case of the M1, the CPU cores start at an address specified by an MMIO register and then start to run the kernel. Furthermore, Apple systems also use a proprietary Apple Interrupt Controller (AIC) that is not compatible with Arm’s standards. Meanwhile, the timer interrupts are connected to the FIQ, an obscure architectural feature primarily used on 32-bit Arm systems that is not compatible with Linux.
To make various processors in an M1-powered PC interact with each other, the OS has to provide a set of inter-processor interrupts (IPIs). Previously IPIs were handled just like traditional IRQs using MMIO accesses to the AIC, but in the case of the M1, Apple uses processor core registers to dispatch and acknowledge IPIsas they rely on FIQs.
Apple’s oddities do not end there. For example, Apple’s Wi-Fi/Bluetooth controller connects to the SoC using a non-standard PCIe-based protocol (which fortunately was supported by Corellium virtualization software). To make matters more complicated, Apple’s PCIe and the integrated Synopsys DWC3 USB controller use the company’s proprietary input–output memory management unit (IOMMU) called device address resolution table (DART). Furthermore, Apple’s I2C has a custom firmware that uses an exclusive protocol, which thwarted using the USB Type-A ports.
Complications
Using a proprietary system architecture is not something new for Apple, but it will make it much harder to port other operating systems to its platforms as well as running those OSes in virtualization mode. Recently a developer managed to make Microsoft’s upcoming Windows 10X run on an Apple M1-based system using QEMU virtualization, but this OS is not yet final, and it is unclear how stable it is. Furthermore, Windows 10X does not run Win32 apps, making it less valuable for some users.
Stay On the Cutting Edge: Get the Tom's Hardware Newsletter
Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.
Running Windows 10 or Linux on an Apple Mac may not be crucially important for most Mac owners. But a complicated system architecture featuring multiple proprietary technologies will likely make it harder to develop certain kinds of software and hardware for Arm-based Macs.
Anton Shilov is a contributing writer at Tom’s Hardware. Over the past couple of decades, he has covered everything from CPUs and GPUs to supercomputers and from modern process technologies and latest fab tools to high-tech industry trends.
-
SSGBryan Apple doesn't want anyone running non-Apple software on their hardware.Reply
Apple dumped Intel for control, not performance. -
mitch074
There is that, but the nail in the coffin was how buggy Intel's CPUs were these past few years.SSGBryan said:Apple doesn't want anyone running non-Apple software on their hardware.
Apple dumped Intel for control, not performance. -
SSGBryan Please.Reply
Nobody at Apple cared about the quality of an Intel CPU. Just look at the CPUs that were in their products. Mostly detuned i5s. -
watzupken It is actually not surprising. Apple will not stick to standards to prevent people from using their hardware on other OSes. Whatever technology they use, as long as it provides good enough performance, I think most people won't really care.Reply -
watzupken
I think Apple stopped using Intel due to a combination of the reasons you mentioned. Consider the hype out there about the new M1 chip's performance, it is not surprising they they stopped using Intel. It certainly is not as good as an Intel processor in every aspect, but good enough for their target market and with the added benefit of better battery life.SSGBryan said:Apple doesn't want anyone running non-Apple software on their hardware.
Apple dumped Intel for control, not performance. -
SSGBryan The M1 is a 'roided out iPhone chip.Reply
There isn't anything wrong with that - it will easily cover Apple's target audience for the MacBook Air. It wasn't designed to do anything that is computing intensive.