Skip to content

Commit af9ab33

Browse files
committed
blog: add 6.17 progress report
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
1 parent 398639e commit af9ab33

File tree

3 files changed

+265
-0
lines changed

3 files changed

+265
-0
lines changed
Lines changed: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
+++
2+
date = "2025-10-24T10:30:00+10:00"
3+
draft = false
4+
title = "Progress Report: Linux 6.17"
5+
slug = "progress-report-6-17"
6+
author = "James Calligeros"
7+
+++
8+
9+
Another upstream kernel release means it must be time for a progress report!
10+
11+
## The patches keep coming
12+
As always, upstreaming continues. The highlight of this cycle is finally landing
13+
the SMC core driver, after discussions on the mailing list going all the way back
14+
to 2022! Along with the core driver, drivers for the SMC's GPIO controller and
15+
reboot controller have also been merged. This allows devices which are already
16+
upstream to reboot gracefully, and lays the groundwork for enabling WiFi and
17+
Bluetooth upstream.
18+
19+
Also merged for 6.17 are a few Devicetree changes which lay the groundwork for
20+
upstreaming GPU support. While these are ultimately a small piece of the whole GPU
21+
puzzle, they are very important. The Devicetree schema determines how the GPU kernel
22+
driver gets the information it needs from firmware to properly control the GPU. Now
23+
that this is stable and the properties merged into the upstream Devicetrees, we
24+
can be reasonably confident that the parts of the GPU driver that interact with
25+
the Devicetree won't require substantial changes.
26+
27+
Work is also progressing on getting more SMC functionality upstream. The hardware
28+
monitoring, lid switch and power button, and RTC drivers are all close to being
29+
merged, with just a few minor issues left to address.
30+
31+
Apple Silicon SoCs place peripheral devices and IP blocks (like the display
32+
controller) behind an IOMMU called DART. These act as a sort of firewall for peripherals,
33+
preventing them from accessing memory addresses that they shouldn't. The DARTs on the
34+
M2 Pro, Max and Ultra (T602x) SoCs are *mostly* compatible with those found on
35+
the base M2, with one caveat: they support a larger address space. Supporting this
36+
required implementing four-level pagetables in the DART driver. This change, along
37+
with the Devicetrees for all M2 Pro, Max and Ultra based devices have now been merged,
38+
and are available in v6.18-rc1!
39+
40+
And of course, there are the USB patches. It seems like just about everyone's
41+
been following these on the mailing list, so it would be remiss not to mention
42+
them. Anyway, moving on.
43+
44+
## m1n1's starting to Rust
45+
Slowing down the kernel treadmill has enabled us to finally start taking a look
46+
at other parts of the stack, and we've been making some important (and long
47+
overdue) changes to m1n1.
48+
49+
For a while now, the recommended method for installing non-Fedora distros has
50+
been to use the "UEFI Only" installer option, then boot the preferred distro's
51+
Asahi installation media from USB. However, it has been quite some time since
52+
this installation option was updated, and the m1n1/U-Boot/Devicetree bundle it was
53+
installing was over two years old. A lot has changed in that time, and it turned
54+
out that this bundle was not capable of booting modern Asahi kernels. Oops.
55+
56+
To fix this, Janne has added a [CI pipeline](https://github.com/AsahiLinux/m1n1/actions/workflows/installer.yml)
57+
to the m1n1 repo that will automatically build the UEFI bundle for us. With
58+
this step automated, it is now trivial to upload the resulting artefact to our CDN
59+
and point the Asahi Installer to it. The update cadence should now be a lot more
60+
frequent than biennially!
61+
62+
We have also released [m1n1 v1.5.2](https://github.com/AsahiLinux/m1n1/releases/tag/v1.5.2).
63+
This release is fairly uncontroversial, with the main changes being adding
64+
compatibility for the now-upstream USB and GPU Devicetree schema. However, this will
65+
likely be our last m1n1 release that can be built without Rust.
66+
67+
We believe that it is important for such a critical piece of software to be as
68+
maintainable, safe and logically sound as possible, especially given that it is
69+
*supposed* to root the chain of trust in a hypothetical Secure Boot environment.
70+
Certain components of m1n1 being written in C means that we currently cannot meet
71+
any of those goals.
72+
73+
One such component was the Apple Device Tree handling code. While the ADT is
74+
implicitly trustworthy data, the original C implementation was quite haphazardly
75+
put together. This resulted in an unsound API based on libfdt that was neither
76+
ergonomic to use nor a particularly good fit for the ADT data itself.
77+
78+
I was able to develop a sound, idiomatic Rust implementation and API with a little
79+
help from our resident Rust expert chaos_princess, and bind that back to the existing
80+
C API so that all our existing C code can make use of it. After a round of bug-squashing,
81+
we found that there is no speed difference between the old and new implementations,
82+
even with the overhead of the FFI glue logic!
83+
84+
We don't have any plans to actively port *all* of m1n1 to Rust. Safety-critical
85+
components in the boot chain are our primary focus, followed closely by components
86+
which could directly benefit from a rewrite due to unsound or unergonomic C APIs.
87+
Perhaps one day we will have an all-Rust m1n1, but if it happens it will do so
88+
organically over time.
89+
90+
## WoW!
91+
Last time, we teased working 64-bit Windows applications running in WINE outside of
92+
muvm. Granted, Notepad++ is not a particularly exciting teaser, but we believe it is
93+
important to be transparent and set realisitic expectations. Anyway, here are both
94+
Hollow Knight and NieR:Automata---64-bit Windows games---running on WINE outside of muvm.
95+
96+
<figure>
97+
<a href="/img/blog/2025/10/hollowknight.jpg">
98+
<img src="/img/blog/2025/10/hollowknight.jpg" alt="Hollow Knight (2017) running outside of muvm on an M1 Pro MacBook Pro with Gentoo" />
99+
</a>
100+
<figcaption>
101+
Hollow Knight (2017) running outside of muvm on an M1 Pro MacBook Pro with Gentoo
102+
</figcaption>
103+
</figure>
104+
<br>
105+
106+
<figure>
107+
<a href="/img/blog/2025/10/nier.jpg">
108+
<img src="/img/blog/2025/10/nier.jpg" alt="NieR:Automata (2017) running outside of muvm on an M1 Pro MacBook Pro with Gentoo" />
109+
</a>
110+
<figcaption>
111+
NieR:Automata (2017) running outside of muvm on an M1 Pro MacBook Pro with Gentoo
112+
</figcaption>
113+
</figure>
114+
115+
Thanks once again to chaos_princess, the toolchain changes we were waiting for last
116+
time have now been integrated into Gentoo, and the required FEX DLLs are built
117+
automatically when installing WINE.
118+
119+
Mileage will vary to an even greater degree than 32-bit applications, however.
120+
WINE's support for ARM64X and ARM64EC (Microsoft's ABI and executable format
121+
that allow AArch64 and amd64 code to interoperate) is still incomplete, so
122+
many applications simply will not work (yet). We of course encourage folks who
123+
like to live dangerously to give it a try, but we cannot provide any support
124+
for this stack. Consider it an early alpha, a glimpse at better things to come.
125+
126+
## Helping developers
127+
When we first started the project, we created [macvdmtool](https://github.com/AsahiLinux/macvdmtool)
128+
to puppeteer a device under test using Apple's USB-PD Vendor Defined Messages.
129+
These allow the user to reboot a Mac over USB and to route the SoC's primary
130+
UART to the USB port. These features are very useful when doing early device
131+
bringup. Rebooting the machine with this method works even when the system is
132+
locked up, and having access to the UART means that we can inspect any boot logs
133+
without relying on an initialised display or USB stack. macvdmtool relies on IOKit,
134+
a macOS system library. Having to use macOS for development is painful, but what
135+
if we could achieve the same functionality with a Linux utility instead?
136+
137+
[tuxvdmtool](https://github.com/AsahiLinux/tuxvdmtool) is a reimplementation
138+
of macvdmtool on Linux, made possible by changes to the USB-C mux chip driver
139+
present in our downstream kernel. tuxvdmtool offers the same features as macvdmtool,
140+
with the added benefit of allowing the "host" system to be an Apple Silicon device
141+
running Linux! Having access to a familiar and fully-featured Linux development
142+
environment helps make early bringup work just that little bit more accessible.
143+
We hope that tuxvdmtool encourages more folks to experiment with low-level bringup
144+
on Apple Silicon devices.
145+
146+
While the kernel patches required to make this work are not upstreamable, a future
147+
release of tuxvdmtool will be rewritten to use the Linux kernel's builtin
148+
[i2c dev interface](https://docs.kernel.org/i2c/dev-interface.html), which will
149+
allow us to drop them entirely.
150+
151+
## Helping everyone
152+
We have always strived to work directly with upstream projects on Apple Silicon
153+
support where possible. This allows us to discuss ideas with those projects, get
154+
advice on the correct way to implement Apple Silicon support in their software, and
155+
in many cases even benefit the ecosystem more broadly. While this means we are
156+
beholden to the relevant upstream's release schedule, it also means that we don't
157+
have to worry about maintaining outdated forks, rebasing, backporting security
158+
patches, and any of the other software engineering things that are not directly
159+
related to supporting Apple Silicon devices. The past year has demonstrated
160+
clearly why not just an an upstream-first, but upstream-*only* approach to
161+
development is the only approach that makes sense long term.
162+
163+
But working upstream is not only for our own benefit. Sometimes, the work we
164+
do can be of benefit to other users on other platforms. Well documented examples
165+
of this include getting projects to [work properly](https://asahilinux.org/docs/sw/broken-software/#fixed-packages)
166+
on machines with 16K pages, and the PipeWire and WirePlumber enhancements that
167+
allow us to automatically apply DSP profiles to each device. These were done with
168+
the direct benefit to others front and centre of mind.
169+
170+
Sometimes, however, it can be those other users who find our work and put it to
171+
use of their own accord.
172+
173+
Geometry shaders are a type of specialised shader which can work directly on
174+
polygons rather than vertices. Although now considered a legacy technique,
175+
some applications use them for various tasks, such as culling triangles from
176+
a scene based on some sort of filter condition.
177+
178+
Similarly, tessellation is a graphical technique that allows GPUs to programmatically
179+
fill a surface with new polygons. This is used to implement adaptive LOD, highly
180+
detailed water, and increase the fidelity of models without having to ship
181+
large, high-poly assets.
182+
183+
Modern high-performance GPUs support both of these with additional hardware,
184+
however this requires engineering effort as well as room in the design's power
185+
and die area budgets. Mobile GPU designers aim to minimise all three of these
186+
and more often than not end up emulating both geometry shaders and tessellation.
187+
Apple's GPUs, being derived from PowerVR and originally designed for iDevices,
188+
are no exception.
189+
190+
While Vulkan does not mandate support for geometry shaders for this reason, OpenGL
191+
does from version 3.2 onwards, as does Direct3D 10 and up. Since we would very
192+
much like to support OpenGL as well as Direct3D translation, we need to be
193+
able to execute geometry shaders somehow.
194+
195+
We may not have explicit support for geometry shaders, we *do* have support for
196+
compute shaders. With these, we can emulate full geometry shader and tessellation
197+
support on the GPU itself and avoid a great deal of the performance penalty
198+
associated with using the CPU.
199+
200+
Of course this isn't as performant as full hardware acceleration, but it does
201+
at least allow us to advertise support for geometry and tessellation shaders to
202+
applications. This in turn allows us to claim conformance with all modern OpenGL
203+
versions, allows Vulkan applications to use geometry and tessellation shaders,
204+
*and* enables the translation of Direct3D for games running under WINE/Proton!
205+
206+
Other mobile GPUs also have this problem. Arm's GPU designs for example do not
207+
have hardware support for geometry shaders or tessellation either.
208+
Enter [`poly`](https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37914),
209+
an effort by Mary Guillemard to convert our geometry and tessellation shader emulation
210+
into shared code that any Mesa driver can use. This can then be integrated into
211+
any Mesa GPU driver, enabling geometry and tessellation shader support without
212+
duplicating the emulation code itself!
213+
214+
Be sure to keep an eye out for geometry shader, tessellation shader, and transform
215+
feedback support in Panfrost, the open source Arm GPU driver, as well as in KosmicKrisp,
216+
a conformant Vulkan 1.3 implementation for macOS layered on top of Metal.
217+
218+
## Life, the Universe, and Everything. Plus one.
219+
Keen eyes may have noticed we've started building Fedora Asahi Remix
220+
[dailies](https://fedora-asahi-remix.org/builds.html) targeting Fedora Linux 43.
221+
The new upstream Fedora release is slated to come out later this month, and
222+
you can expect the Remix to follow shortly.
223+
224+
## At the Akademy
225+
Neal and Janne attended [KDE Akademy](https://akademy.kde.org/) in Berlin this year.
226+
As the annual KDE community conference, this was an opportunity to ensure future work
227+
in KDE aligns well with Fedora Linux and Fedora Asahi Remix. Neal
228+
[gave a talk](https://youtu.be/CznIsJQQE9U?t=248) about the Fedora KDE Plasma Desktop
229+
Edition there, and prominently discussed Fedora Asahi Remix as part of it.
230+
231+
Additionally, there was a lot of discussion about the upcoming Plasma Setup application,
232+
which will provide a better integrated experience for first boot of a Fedora KDE
233+
install. Lessons learnt from Fedora Asahi Remix user feedback is being directly
234+
incorporated into Plasma Setup, and Neal is working on integrating this for Fedora
235+
Linux 44 as [a formal Change](https://fedoraproject.org/wiki/Changes/Unified_KDE_OOBE).
236+
237+
## M3? Kinda...
238+
Way back in the early days, we predicted that Apple would refrain from making
239+
sweeping architectural changes to the various functional blocks found in Apple Silicon
240+
SoCs unless absolutely necessary, and that this would enable the reuse of a
241+
lot of code and significantly cut down on the amount of reverse engineering required
242+
between generations. The example we gave was the interrupt controller, which is
243+
quite unfortunate because that was the first thing Apple ended up changing. Oops.
244+
245+
But the overall principle has held mostly true. So much so in fact that some
246+
enterprising folks on Reddit have found that with only a trivial amount of
247+
hacking, you can actually boot Asahi on M3 series devices!
248+
249+
It may be surprising to learn that very basic, low-level support for M3 has
250+
existed for quite some time now. m1n1 is capable of initialising the CPU cores,
251+
turning on some critical peripheral devices, and booting the Asahi kernel.
252+
However, the level of support right now begins and ends with being able to boot
253+
to a blinking cursor. Naturally, this level of support is not at all useful for
254+
anything but low-level reverse engineering, but we of course plan on rectifying
255+
this in due time...
256+
257+
If you're interested in helping us out and have prior experience with reverse
258+
engineering or low-level embedded software development, we'd love for you to say
259+
hi on IRC or Matrix! See [this page](https://asahilinux.org/contribute) for more
260+
information.
261+
262+
## Thanks!
263+
As always, a warm thanks to our sponsors on [OpenCollective](https://opencollective.com/asahilinux)
264+
and [GitHub Sponsors](https://github.com/sponsors/asahilinux), without whom we
265+
would not be able to keep the lights on. You're all truly wonderful!
490 KB
Loading

static/img/blog/2025/10/nier.jpg

792 KB
Loading

0 commit comments

Comments
 (0)