Skip to content

kboot_gpu: hand the T8142 (M5) GPU to Linux - #80

Merged
Acelogic merged 3 commits into
aurora-silicon:mainfrom
sithglan:thomas/j813-rb-gpu-handoff
Nov 6, 2026
Merged

Acelogic merged 3 commits into
aurora-silicon:mainfrom
sithglan:thomas/j813-rb-gpu-handoff

Conversation

@sithglan

@sithglan sithglan commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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).

  1. Per-SoC table for the T8140 raw-boot hand-off. 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).

  2. Firmware __DATA and build profile. Also reserve gfx-data/gfx1-data, the __DATA segments iBoot loaded. Publish /chosen/aurora,m5-gpu-firmware-profile only when both ASC images are RTKit-3255.160.4:

    • matched by build string, __TEXT size and the GKTS/ECAP TLV layout
    • no hash, because iBoot patches per-boot values into __TEXT

    With another build, the regions are still handed over and Linux leaves the GPU alone.

Tested on a MacBook Air M5 (ESP boot): /chosen carries M5-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=1 and make format-check / make rustfmt-check pass. 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

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>
@Acelogic
Acelogic merged commit 746efc4 into aurora-silicon:main Nov 6, 2026
7 of 8 checks passed
@DjDeveloperr DjDeveloperr mentioned this pull request Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants