Skip to content

accel/ane: T8142: admit the macOS 27.2 (26B123) firmware build - #1899

Merged
DjDeveloperr merged 2 commits into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/t8142-ane-272
Nov 20, 2026
Merged

DjDeveloperr merged 2 commits into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/t8142-ane-272

Conversation

@m0d16l14n1

@m0d16l14n1 m0d16l14n1 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Admits the ANE firmware that the macOS 27.2 (26B123) stub preloads on the M5. macOS 27.2.1 (26B131) ships the same image. Follows #1883.

What differs from 27.0

  • TEXT 0xbc000 and DATA 0x2b0000, with DATA at 0x100_000b_c000. 27.0 is 0xc0000 and 0x2ac000 at 0x100_000c_0000; both end at the same IOVA.
  • iBoot fills two environment sections in TEXT: text_env (32 bytes) and a new __TEXT,ce_env (0x4000 bytes at 0xb4f80). The live TEXT can therefore never hash to the image.

Change

  • Code pin: a TEXT digest with the platform's environment sections zeroed, computed from the IPSW image. It sits beside the existing measured pin, and TEXT matching either is accepted.
  • Builds: a platform can name further builds (next_build), and the preload layout the loader handed over selects one. T8142 gets the 27.2 build pinned by code digest. 27.0 keeps its measured pin and gains a code pin.
  • Reload after sleep compares TEXT with its boot-time digest.
  • Logging: each boot logs firmware <build>, TEXT code sha256 … (code pin|not the code pin). On a miss it also logs the digest of the TEXT before the first environment section, which tells a loader write elsewhere from a new build.

Tested on J815 (MacBook Air 15" M5), 27.2 stub, loader with aurora-silicon/aura#251 (the T8142 ANE preload hand-off):

  • H17 ANE: firmware 27.2 26B123, TEXT code sha256 9b57486790ff4145… (code pin), then loader hand-off verified; starting the engine.
  • An H17 program's output (1080p frame) matches macOS's on the same input: luma 100.00% within 1, chroma kept.
  • ANE KUnit suites: 296 cases ok (the 1 known upstream case excepted).

The first boot, with text_env alone zeroed, missed the pin. That's how ce_env was found.

This base wasn't built separately. drivers/accel/ane is byte-identical to the tree that was booted (integration/aurora with #1883 merged). Not re-run on 27.0: its code pin comes from the 27.0 image, and its measured pin is unchanged. checkpatch --strict: 0 errors; the 2 warnings are the Co-Authored-By trailer.

Part of the J815 bring-up: board results are summarised in discussion #135.

Update 2026-11-19: rebased onto integration/aurora 0abc2f3. The only conflict was in struct ane_fw_platform: upstream added has_xl (H16) beside this patch's new fields, and both are kept. W=1 build clean, ANE KUnit 236/236.

🤖 Generated with Claude Code

@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr ready for review. Hardware on the macOS 27.2 stub (J815 boot 9a636e2e): firmware admitted by the code pin (9b574867); the 960x540 H17 program matches the macOS reference (luma 100% within 1), and the engine parks and comes back across s2idle. Green and mergeable.

Assisted-by: Claude Opus 5.5

DjDeveloperr pushed a commit to m0d16l14n1/aurora-installer that referenced this pull request Nov 17, 2026
List j815 in the pinned 26B123 entry and record it in
firmware-qualification.json, so a J815 on macOS 27.2 or later gets the
27.2 stub, which is the one its macOS can boot alongside.

Hardware result: J815 on the 27.2 stub boots Linux with ANE, AVE, AVD,
JPEG, ProRes, GPU, Wi-Fi and camera working (aurora-silicon/linux#1899).
It needs, in the kernel, linux#1899 and #1900 (the 27.2 ANE and AVE
builds) and #1683 (GPU and display on 27.2), and in the payload's boot
loader aura#250 (without it a b13.1 Stage 1 can't chainload on T8142)
and aura#251. The record's kernel field says so until a release ships
them; this stays a draft until then.

Signed-off-by: Nick <nekreshen@yandex.ru>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The macOS 27.2 (26B123) stub's iBoot preloads a different ANE build on
the M5: TEXT 0xbc000 and DATA 0x2b0000, DATA at 0x100_000b_c000 (27.0:
0xc0000 and 0x2ac000 at 0x100_000c_0000); both end at the same IOVA.
macOS 27.2.1 (26B131) ships the same image byte for byte.

The TEXT pin so far is the digest of TEXT as loaded, which can only be
measured: iBoot fills environment sections in TEXT, so no IPSW image
hashes to it. Add a code pin beside it, the TEXT digest with those
sections zeroed, which is computed from the image, and accept TEXT
matching either. The 27.0 build has one such section, text_env (32
bytes, a fixed 00 01 .. 07 pattern in the image). The 27.2 build adds
__TEXT,ce_env (0x4000 bytes at 0xb4f80, zero in the image but its first
byte) ahead of text_env, and iBoot fills it too, so a platform lists its
environment sections as ranges. On a code pin miss the driver logs the
digest of the TEXT before the first of them, which tells a loader write
elsewhere from a different build in one boot.

Let a platform name further builds (next_build), each with its preload
layout and pins, and select the one whose layout the loader handed
over. T8142 gets the 27.2 build, pinned by its code digest from
h17_ane_fw_theia_j73y (RTKit 3514.41.1), and 27.0 keeps its measured
pin with its code pin added. A reload after sleep now compares TEXT
with the digest it had at boot. Each boot logs the build and its code
digest.

Tested on J815 with the 27.2 stub: "firmware 27.2 26B123, TEXT code
sha256 9b574867... (code pin)", loader hand-off verified, and an H17
program's output matches macOS's (1080p frame, luma 100% within 1).
The ANE KUnit suites pass. Not re-run on 27.0: its code pin is computed
from the 27.0 image and hasn't been checked against a live preload, and
its measured pin is kept unchanged.

Signed-off-by: Nick <nekreshen@yandex.ru>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Nick. I'm reviewing this as the base of #1957, which carries this commit and is otherwise ready.

The design reads right to me:

  • Code pin. ane_fw_text_pinned() accepts TEXT that matches either the measured pin or the code pin. The code pin is a digest with the loader-filled text_env (and, from 27.2, ce_env) sections zeroed, and the sections are checked to be ascending and inside TEXT before any hashing.
  • Builds. ane_fw_platform_build() picks the build only by the preload layout the loader handed over. An unknown layout keeps the SoC's own entry, which then refuses as before.
  • Reload after sleep. ane_fw_reload_segment() compares TEXT with b->text_digest, the raw digest taken from the boot-time snapshot. So a reload must give back exactly what was admitted, environment sections included.
  • Pointer comparisons. Nothing compares b->soc to &ane_t8142_platform or &ane_t6050_platform (I grepped drivers/accel/ane), so pointing it at a next_build entry is safe.
  • Other SoCs. T8140 and H16 have no code pin or next build, so they are unchanged.

CI doesn't compile drivers/accel. Your 11-19 note covers this exact head (5bc74e4): W=1 build clean, ANE KUnit 236/236. The 27.2 J815 run (code pin 9b574867, H17 output matching macOS) is on the PR.

integration/aurora has changed ane_fw_cold.c since 0abc2f3 (0427552, 4571e04, de51a48: the sleep refusal, the PM notifier and the program DVA ranges). They touch ane_fw_staged_init() only after the new ane_fw_platform_build() call, and the three-way merge is clean. I'll update the branch and merge once host-tests is green on the merged head.

These rows come after the merge, with a revert ready:

  • a kernel build of the merged tree with the ANE KUnit suites;
  • a J815 boot on the 27.2 stub showing firmware 27.2 26B123 ... (code pin) and the hand-off;
  • one 27.0 J815 boot, so the 27.0 code pin is seen on hardware too.

@DjDeveloperr
DjDeveloperr merged commit 074a088 into aurora-silicon:integration/aurora Nov 20, 2026
1 check passed
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Merged as 074a088 (host-tests green on the updated head cc0fa39). Post-merge verification as in my review: a kernel build of the merged tree with the ANE KUnit suites, a J815 27.2 boot showing the code pin and the hand-off, and one 27.0 J815 boot. A revert is ready if they don't hold. #1957 is updated on top of it.

m0d16l14n1 added a commit to m0d16l14n1/aurora-installer that referenced this pull request Nov 22, 2026
List j815 in the pinned 26B123 entry as an experimental board, as the
T6050 boards are: firmware-qualification.json records its device tree
and BuildManifest identity (j815ap, chip 0x8142, board 0x26), and no
qualifying kernel release yet. Its device minimum moves to 27.2 and it
leaves the universal 26.6.2 entry, so a J815 on 26.6.2 through 27.1 is
asked to update macOS instead of getting the 26.6.2 stub: everything the
J815 runs on (the 27.2 ANE, AVE, GPU and display firmware) is 27.2's.

Hardware result: J815 on the 27.2 stub boots Linux with ANE, AVE, AVD,
JPEG, ProRes, GPU, Wi-Fi and camera working (aurora-silicon/linux#1899),
with the kernel and boot loader built separately. It moves to the
qualified boards with the kernel release that ships linux#1899, #1900
and the 27.2 GPU and display support.

Signed-off-by: Nick <nekreshen@yandex.ru>
m0d16l14n1 added a commit to m0d16l14n1/aurora-installer that referenced this pull request Nov 22, 2026
List j815 in the pinned 26B123 entry as an experimental board, as the
T6050 boards are: firmware-qualification.json records its device tree
and BuildManifest identity (j815ap, chip 0x8142, board 0x26), and no
qualifying kernel release yet. Its device minimum moves to 27.2 and it
leaves the universal 26.6.2 entry, so a J815 on 26.6.2 through 27.1 is
asked to update macOS instead of getting the 26.6.2 stub: everything the
J815 runs on (the 27.2 ANE, AVE, GPU and display firmware) is 27.2's.

Hardware result: J815 on the 27.2 stub boots Linux with ANE, AVE, AVD,
JPEG, ProRes, GPU, Wi-Fi and camera working (aurora-silicon/linux#1899),
with the kernel and boot loader built separately. It moves to the
qualified boards with the kernel release that ships linux#1899, #1900
and the 27.2 GPU and display support.

The owner-facing caution (Stage1Caution.swift and supported-models.json)
no longer says nobody has one: it says what has run (a private build of
this installer on the 27.2 stub, Finish Installation, a first boot with a
separately built kernel), that macOS 27.2 is required, and that a stock
install today lacks GPU acceleration, the display driver, Wi-Fi and
Bluetooth: the published distribution kernel predates the J815 27.2
support and N1 firmware collection (aurora-installer#182) is still open.

Signed-off-by: Nick <nekreshen@yandex.ru>
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