Skip to content

iommu: apple-dart: keep a T8142 DART that a live coprocessor uses - #1122

Merged
RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
dmitzsaz:pr/t8142-dart-live-mtp
Nov 8, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
dmitzsaz:pr/t8142-dart-live-mtp

Conversation

@dmitzsaz

@dmitzsaz dmitzsaz commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

On the J704 (MacBook Pro 14-inch, M5, T8142) U-Boot starts the MTP so the internal keyboard works in its console, and hands the running session to Linux, with the MTP DART streams in bypass and apple,rtkit-handoff = "mtp-live-v1" on the MTP node. The DART probe resets the block and cuts the MTP off:

apple-dart 394800000.iommu: translation fault: SID:0 read STE invalid at 0x1078a0f83c0
dockchannel-hid 394b30000.input: output report 0xb4 to iface 0 (comm) timed out
dockchannel-hid 394b30000.input: Failed to enable stm: -110

and the internal keyboard is dead in Linux until the next boot.

This keeps a T8142 DART as it is when an available node with apple,rtkit-handoff = "mtp-live-v1" uses it through iommus, as is already done for the J614s and J713 MTPs. The T8142 TCR bypass bits read back as zero even while the streams bypass, so apple_dart_streams_bypassed() can't confirm it; the DART trusts the handoff and refuses only a DART that cannot bypass at all.

Tested on: J704, 2026-11-07, 7.3.0-j704dt+ (aurora-wip 57222e0 + this PR, the rtkit-helper and apple-msi PRs, #1060 and the J704 DT): Retaining the live coprocessor bypass, rtkit-helper 394600000.mtp: adopted the running RTKit session (4 retained buffers), keyboard, stm and multi-touch interfaces ready; the internal keyboard works in the U-Boot console and then in Linux. Without it: the three lines above, no keyboard in Linux. The same change has run in our J704 kernel on every boot since 2026-11-05.

Prepared with Claude Opus 5.5; tested by me on the hardware.

On T8142 the boot loader may start the MTP for the internal keyboard (for
example to read a disk passphrase) and hand the running session to Linux,
with its DART streams in bypass. The MTP helper adopts that session, but
the DART probe reset the block first and cut the coprocessor off.

When an available node with apple,rtkit-handoff = "mtp-live-v1" uses a
T8142 DART through iommus, keep the DART as it is, as already done for the
J713 and J614s MTPs.

The T8142 TCR bypass bits read back as zero even while the streams
bypass, so the bypass cannot be confirmed from the registers. Trust the
handoff and refuse only a DART that cannot bypass at all.

Signed-off-by: Dmitriy <noc@pimk.in>
Assisted-by: LLM
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merge-train rows so far (MTR3, 2026-11-08). Test kernel 7.3.0-aurora-f4mtr3g = integration/aurora af6d986 + #1122 + #1123 + #1124 + #1176, built with 0 warnings. Each Mac got one silent one-shot boot. The checks were our FLEET regression suite vs the same Mac's fleet31/fleet30 rows, plus keyboard/trackpad/HID/DART/MSI error counts and gpubench, test boot vs default boot:

  • M2 (J413): PASS. No hard regressions. MTP keyboard and multi-touch present, 0 HID/MTP errors.
    • The first glmark read 3890, so I re-checked with 3 runs each: default 4614/4802/4462, test fresh boot 4253/3843/4612, and a plain-reboot control on fleet31 4636/3773/4555. The low reads are fresh-boot noise, not a regression.
    • gpubench light rows are equal.
  • Neo (J700): PASS. No hard regressions. glmark x3 2604/2700/2670 (default) vs 2634/2672/2665 (test). gpubench equal on the x3 re-check. AVD bit-exact. Keyboard and trackpad present, 0 HID errors.
  • J616s (M4 Pro): PASS. No hard regressions. glmark 6562 vs 6570. dEQP timeline semaphores 3835 pass, the same as fleet30, with 0 firmware crashes, 0 device-lost and 0 GPU faults. Keyboard and trackpad present, 0 HID/DART/PCIe errors.
  • M1 Pro (J316s): NOT RUN YET. Other lanes held it, and the swarm is handing over to a new orchestrator now.

Not merged yet: the plan was to merge after the M1 Pro row. The kit is kits/test/20261108-f4mtr3g on the S500, and the row script is work/linux/mtr3-20261108/comborow.sh (M1 Pro, TID=0).

@RyanTheTide

Copy link
Copy Markdown
Contributor

M1 Pro row done (the last of the four), 7.3.0-aurora-f4mtr3g = integration af6d986 + #1122 + #1123 + #1124 + #1176, one-shot vs the fleet31 default:

  • glmark 9861 vs 9848 (+0.1%), kernel errors 0, AVC 0 (enforcing), failed units 0.
  • Keyboard/trackpad input devices, hwmon fans and rtkit timeouts/errors: same as the default boot. 0 DART/PCIe/MSI errors.
  • Wi-Fi/BT reconnect, camera, 6+6 sleeps, ANE resume: same as the default.
  • gpubench A/B within noise (worst row copy.bw buf2img d4 +6.3%, one sample).
  • One new boot warning class, kauditd_printk_skb: N callbacks suppressed (audit printk rate limit, AVC 0). It is environmental. None of the four PRs touch audit, and the iommu: apple-dart: keep a T8142 DART that a live coprocessor uses #1122-PCI: apple-msi: program the MSI map of every listed port #1124 paths are gated to T8142, so they don't run on this T6000.

Rows passed on all four Macs (M2, Neo, J616s, M1 Pro). The trial merge onto integration d4d2678 is clean. Merging.

@RyanTheTide
RyanTheTide merged commit 74bcd4b into aurora-silicon:integration/aurora Nov 8, 2026
1 check passed
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merged, thanks @dmitzsaz. It will ride the next fleet kernel.

RyanTheTide added a commit that referenced this pull request Nov 8, 2026
Brings #1122, #1123, #1124 (T8142 DART/MTP/MSI), #1176 (G17 fw-id fence),
#1201 (J700 speaker full scale) and the rest of integration since
11943fb into aurora-wip.

Conflicts were in four device-tree binding documents only, where
aurora-wip has the T8152 versions and integration the T8142/T8152/T6050
generalisation:
- apple,admac: keep both the lone apple,t8152-admac and the
  apple,t6050-admac/apple,t8140-admac pair.
- apple,t8152-aop: take integration (it still allows a lone
  apple,t8152-aop, one or two mailboxes).
- apple,t8152-aop-audio: take integration and keep a lone
  apple,t8152-aop-audio compatible.
- apple,dwc3: keep the T8152 host-mode rules, and require resets and
  usb-role-switch on every enabled non-T8152 controller.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
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