Skip to content

T8142 on macOS 27.2: GPU firmware TEXT, 27.2 firmware version, camera - #192

Merged
RyanTheTide merged 3 commits into
aurora-silicon:mainfrom
sithglan:thomas/t8142-gpu-fw-text
Nov 12, 2026
Merged

RyanTheTide merged 3 commits into
aurora-silicon:mainfrom
sithglan:thomas/t8142-gpu-fw-text

Conversation

@sithglan

@sithglan sithglan commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Base: main (ea20ced). Three commits, for the MacBook Air M5 (J813) on a macOS 27.2 (26B123) stub.

kboot: T8142: fill the GPU firmware TEXT region from the ADT

Linux identifies the M5's GPU firmware build before it starts it. It hashes both roles' __TEXT, which iBoot loads back to back (gfx-asc and gfx1-asc segment-ranges, __TEXT first). Where iBoot puts them depends on the macOS release. On the J813, 27.0 (26A428) loads them at 0x100_00e4_4000, and 27.2 (26B123) 64 KiB higher, at 0x100_00e5_4000. The data moves as well, from 0x100_0244_4000 to 0x100_0245_8000; #143 already fills fw-data.

As with fw-data, this gives /reserved-memory/fw-text the span iBoot used. The kernel side (aurora-silicon/linux, J813 on 27.2) describes the node. If the two TEXT segments are not contiguous, or the DT has no such node, the DT is left as it is.

firmware: add macOS 27.2

A J813 stub on 27.2 reports mBoot-20457.41.3 for both the system and the OS iBoot. Without an entry for it, the OS firmware is "unknown", and every node gets apple,firmware-version and apple,firmware-compat set to <0 0 0>. Linux then cannot tell which DCP interface to drive. The T8142 display driver falls back to its 26.x method table, and the 27.2 DCP firmware crashes on the first call it does not know (ap_link: rpc_callee_gated: link_rpc_lookup callback not found: 'A427').

The checks that name V27_0 refuse 27.2 just as they refused "unknown": the T8142 ISP gate, the T6050 display hand-off and the T6050 ISP. Only the version published in the device tree changes. The J873 (T8152) stack reads neither property, so a 27.2 M6 sees no difference.

isp: T8142: accept the macOS 27.2 firmware

As with 27.0 before it (#99), the T8142 ISP gate refused 27.2 ("unsupported T8142 firmware"), and the camera stayed off. 27.2's ISP firmware still ends at 0x16ec000. With 27.2 admitted, the segment-end check passes and the heap comes out at 0x16ec000..0x1800000 (1104 KiB), as on 26.6 and 27.0. The ISP host test gets V27_2 and a 27.2 case.

Testing

All three commits were tested on the J813 under the 27.2 stub, as a backport onto the J813's enrolled branch: 27av, plus #143's fw-data commit, plus these three. That object is aura-j813-272b, 1.0.0b1-g4b9d9291, chainloaded in place from the DebugUSB proxy. The fills were checked with the same branch before the ISP commit (aura-j813-272a) and the 27.2 J813 kernel series booted with its own DTB, which still has the 27.0 fw-text/fw-data addresses. Results:

  • /reserved-memory/fw-text was set to 0x100_00e5_4000 + 0x9c000 and fw-data to 0x100_0245_8000 + 0x184000, and the GPU identified and started the 26B123 firmware.
  • asahi,os-fw-version and asahi,system-fw-version are 27.2, and the DCP's apple,firmware-compat is <27 2 0>. The panel came up at 2560x1600 and sway ran on it.
  • The ISP heap is reserved at 0x16ec000..0x1800000, and the FaceTime camera streams real 1280x720 NV12 frames under Linux.
  • pytest tests/python tests/test_t8122_gpu_reader.py tests/test_t8122_gpu_resources.py with clang 22 on this branch: 705 passed, 19 skipped.

cc @Acelogic @DjDeveloperr @RyanTheTide @LiamRay10

Linux identifies the M5 GPU firmware build before it starts it, by
measuring both roles' __TEXT, which iBoot loads back to back (gfx-asc
and gfx1-asc segment-ranges, __TEXT first). Where iBoot puts it depends
on the macOS release: on the J813, 27.0 (26A428) loads it at
0x100_00e4_4000 and 27.2 (26B123) 64 KiB higher.

As with fw-data, give a /reserved-memory/fw-text node the span iBoot
used. TEXT segments placed apart, or a DT without the node, leave the
DT as it is.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
A J813 stub on macOS 27.2 (26B123) reports "mBoot-20457.41.3" for both
the system and the OS iBoot. Without an entry the OS firmware is
"unknown", so every node gets apple,firmware-version and
apple,firmware-compat <0 0 0>, and Linux cannot tell which DCP
interface to drive: the T8142 display driver falls back to its 26.x
method table, and the 27.2 DCP firmware crashes on the first call it
does not know ("link_rpc_lookup callback not found: 'A427'").

The checks that name V27_0 keep refusing 27.2 as they refused
"unknown"; only the version published in the device tree changes.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
@sithglan

Copy link
Copy Markdown
Contributor Author

Kernel side: aurora-silicon/linux#1683 (J813 GPU and display on 27.2; it reads fw-text and the DCP's apple,firmware-compat 27.2.0 that this PR provides).

Like 27.0 before it, 27.2 (26B123) left the J813 camera disabled
("unsupported T8142 firmware"). Its ISP firmware still ends at
0x16ec000: with 27.2 admitted, the segment-end check passes and the heap
comes out at 0x16ec000..0x1800000 (1104 KiB), as on 26.6 and 27.0.
Linux then streams real 1280x720 NV12 frames from the FaceTime camera.

The ISP host test gets V27_2 and a 27.2 case.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
@sithglan
sithglan force-pushed the thomas/t8142-gpu-fw-text branch from bff653e to 1db0232 Compare November 12, 2026 13:45
@sithglan sithglan changed the title kboot: T8142: fill the GPU firmware TEXT; firmware: add macOS 27.2 T8142 on macOS 27.2: GPU firmware TEXT, 27.2 firmware version, camera Nov 12, 2026
@sithglan

Copy link
Copy Markdown
Contributor Author

Added a third commit: the T8142 ISP gate admits 27.2, as #99 did for 27.0, with V27_2 and a 27.2 case in the ISP host test. Tested on the J813 under 27.2: the heap comes out at 0x16ec000..0x1800000 and the camera streams real frames.

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