Repository navigation
kboot_gpu: hand the T8142 (M5) GPU to Linux - #80
Merged
Acelogic merged 3 commits intoNov 6, 2026
Merged
Conversation
Generalize the T8140 raw-boot handoff to a per-SoC table. The J813 ADT has the same gfx-handoff, gfx-shared-l2-region, gfx-shared-region and gpu-region properties as the A18 Pro, with 13 perf states (12 non-off). Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Linux's M5 GPU runtime also needs the gfx-asc/gfx1-asc __DATA segments iBoot loaded (ADT sgx gfx-data/gfx1-data), and it is written for one firmware build. Reserve both regions, and publish /chosen/aurora,m5-gpu-firmware-profile only when both ASC images are RTKit-3255.160.4 (build string, __TEXT size and the GKTS/ECAP TLV layout; iBoot patches per-boot values into __TEXT, so no hash). With another build the regions are still handed over and Linux leaves the GPU alone. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Whitespace and line breaks only, as clang-format 20.1.8 (the CI's format check) wants them. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hands the MacBook Air M5 (J813, T8142) GPU from iBoot to Linux's M5 GPU runtime (aurora-silicon/linux#1003, device tree in aurora-silicon/linux#1001).
Per-SoC table for the T8140 raw-boot hand-off. The J813 ADT has the same
gfx-handoff,gfx-shared-l2-region,gfx-shared-regionandgpu-regionproperties as the A18 Pro, with 13 perf states (12 non-off).Firmware
__DATAand build profile. Also reservegfx-data/gfx1-data, the__DATAsegments iBoot loaded. Publish/chosen/aurora,m5-gpu-firmware-profileonly when both ASC images areRTKit-3255.160.4:__TEXTsize and the GKTS/ECAP TLV layout__TEXTWith another build, the regions are still handed over and Linux leaves the GPU alone.
Tested on a MacBook Air M5 (ESP boot):
/chosencarriesM5-RTKit-3255.160.4.release, the six regions are reserved, the asahi M5 runtime starts the GPU, and sway composites on it. Builds with clang 22 (USE_CLANG=1).Rebased onto main 077aabe (2026-11-05): the image builds with
USE_CLANG=1 RELEASE=1 CHAINLOADING=1 ESP_STAGE2=1andmake format-check/make rustfmt-checkpass. A new Mach-O object from this rebase has not been enrolled on the J813 yet, so the runtime testing above is from the pre-rebase build.cc @Acelogic @DjDeveloperr @RyanTheTide @LiamRay10