Skip to content

soc: apple: rtkit: take OSLOG counter echo from the DT - #3742

Open
RyanTheTide wants to merge 4 commits into
mainfrom
gates/rtkit-syslog-ack
Open

RyanTheTide wants to merge 4 commits into
mainfrom
gates/rtkit-syslog-ack

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

What: RTKit no longer checks the machine compatibles apple,t8140 / apple,t8142 (rtkit.c apple_rtkit_oslog_unanswered() and the oslog_echo init). A per-coprocessor boolean apple,oslog-echo now says that the firmware counts its OSLog writes and waits for each counter's echo. It sets the initial echo and the no-ACK policy once a driver turns the echo off (the G17 GPU). The property is added to all 26 RTKit coprocessor node definitions of T8140 J700 and T8142 J704/J813/J815 (PMP, SMC, MTP, ANS, GPU, DCP, DCPEXT, AOP, SIO, J813 USB4 ACIOs) and documented in the 10 bindings of those nodes. The rtkit-oslog and apple-dcp host tests now model the property instead of the machine name. Audit gate: #2445, section 3 MED.

Tested: at 3c4e97f: the W=1 build of rtkit.o is clean. Host tests rtkit-oslog (base plus 5 mutations, 6/6) and the apple-dcp selftest pass. CI's scripts/dtc/apple-dt-check.sh (base aurora/main vs head) finds 0 new CHECK_DTBS warnings, and the 10 bindings pass dt_binding_check. The DT check below finds 0 differences across 997 mailbox-client nodes in 141 DTBs.

Risk: one-way door until the Stage 2 DTBs carry the property. The live DT on the Neo is its Stage 2 DTB, and a read-only check on 12-01 found no apple,oslog-echo on any coprocessor node (smc, mtp, pmp, gpu, aop, nvme). With this kernel on the current Stage 2, the Neo and the M5 Airs would stop echoing OSLog counters. That is the old behaviour where the MTP and SMC wedge after a few sleeps and the J815 MTP asserts. Affected: T8140 J700 (Neo), T8142 J704/J813/J815.

Not yet: no Neo row. It needs this kernel plus a Neo Stage 2 DTB trial with the property. The Neo is the J713's recovery host, and a failed Neo Stage 2 trial can strand it without someone at the power button, so I did not run it. T8142 rows are owed by their owners. Please hold the merge until the Neo and M5 Stage 2 DTBs carry apple,oslog-echo.

DT equivalence proof (fdt per compiled dtb)

Script proof_rtkit.py (pylibfdt), old dtbs = aurora/main b2cd21f, new = head. RTKit devices = nodes with mboxes/apple,secure-mbox (apple_rtkit_init*() takes the mailbox from the device's own node), minus apple,sep (sep.rs does not use RTKit). Old bit = root compatible has apple,t8140 or apple,t8142. New bit = the node has apple,oslog-echo. Any node with the property and no mailbox counts as a difference.

t8140-j700.dtb /soc/pmp@300500000 ['apple,t8140-pmp-v2'] old=True new=True SAME
t8140-j700.dtb /soc/smc@30c600000 ['apple,t8140-smc'] old=True new=True SAME
t8140-j700.dtb /soc/mtp@314600000 ['apple,t8140-mtp'] old=True new=True SAME
t8140-j700.dtb /soc/nvme@3cdcc0000 ['apple,t8140-nvme-ans2'] old=True new=True SAME
t8140-j700.dtb /soc/gpu@482600000 ['apple,agx-t8140'] old=True new=True SAME
t8140-j700.dtb /soc/dcp@412e00000 ['apple,t8140-dcp'] old=True new=True SAME
t8140-j700.dtb /soc/aop@310c00000 ['apple,t8140-aop'] old=True new=True SAME
t8140-j700.dtb /soc/dma-controller@385e00000 ['apple,t8140-sio'] old=True new=True SAME
t8140-j700.dtb /soc/dcp@416e00000 ['apple,t8140-dcpext'] old=True new=True SAME
t8142-j704.dtb /soc/aop@390c00000 ['apple,t8142-aop'] old=True new=True SAME
t8142-j704.dtb /soc/dcp@286e00000 ['apple,t8142-dcp'] old=True new=True SAME
t8142-j704.dtb /soc/pmp@380500000 ['apple,t8142-pmp-v2'] old=True new=True SAME
t8142-j704.dtb /soc/smc@38c600000 ['apple,t8142-smc'] old=True new=True SAME
t8142-j704.dtb /soc/mtp@394600000 ['apple,t8142-mtp'] old=True new=True SAME
t8142-j704.dtb /soc/nvme@4c5cc0000 ['apple,t8142-nvme-ans2'] old=True new=True SAME
t8142-j704.dtb /soc/dcp@3aae00000 ['apple,t8142-dcpext'] old=True new=True SAME
t8142-j813.dtb /soc/aop@390c00000 ['apple,t8142-aop'] old=True new=True SAME
t8142-j813.dtb /soc/dcp@286e00000 ['apple,t8142-dcp'] old=True new=True SAME
t8142-j813.dtb /soc/gpu@582600000 ['apple,agx-t8142'] old=True new=True SAME
t8142-j813.dtb /soc/pmp@380500000 ['apple,t8142-pmp-v2'] old=True new=True SAME
t8142-j813.dtb /soc/smc@38c600000 ['apple,t8142-smc'] old=True new=True SAME
t8142-j813.dtb /soc/mtp@394600000 ['apple,t8142-mtp'] old=True new=True SAME
t8142-j813.dtb /soc/nvme@4c5cc0000 ['apple,t8142-nvme-ans2'] old=True new=True SAME
t8142-j813.dtb /soc/dcp@506e00000 ['apple,t8142-dcpext'] old=True new=True SAME
t8142-j813.dtb /soc/dcp@3aae00000 ['apple,t8142-dcpext'] old=True new=True SAME
t8142-j813.dtb /soc/acio@401ac0000 ['apple,t8142-usb4-acio'] old=True new=True SAME
t8142-j813.dtb /soc/acio@409ac0000 ['apple,t8142-usb4-acio'] old=True new=True SAME
t8142-j815.dtb /soc/aop@390c00000 ['apple,t8142-aop'] old=True new=True SAME
t8142-j815.dtb /soc/dcp@286e00000 ['apple,t8142-dcp'] old=True new=True SAME
t8142-j815.dtb /soc/gpu@582600000 ['apple,agx-t8142'] old=True new=True SAME
t8142-j815.dtb /soc/pmp@380500000 ['apple,t8142-pmp-v2'] old=True new=True SAME
t8142-j815.dtb /soc/smc@38c600000 ['apple,t8142-smc'] old=True new=True SAME
t8142-j815.dtb /soc/mtp@394600000 ['apple,t8142-mtp'] old=True new=True SAME
t8142-j815.dtb /soc/nvme@4c5cc0000 ['apple,t8142-nvme-ans2'] old=True new=True SAME
t8142-j815.dtb /soc/dcp@506e00000 ['apple,t8142-dcpext'] old=True new=True SAME
t8142-j815.dtb /soc/dcp@3aae00000 ['apple,t8142-dcpext'] old=True new=True SAME
dtbs=141 rtkit-device nodes=997 with property=36 differences=0

All other mailbox-client nodes in the remaining 137 DTBs are old=False new=False.

The OSLOG counter echo (and the matching no-ACK policy once a driver
turns the echo off) was keyed on the machine compatibles apple,t8140
and apple,t8142. Read a per-coprocessor boolean apple,oslog-echo
instead: the firmware counts its log writes and holds the next counter
until the last one is echoed.

Add the property to every RTKit coprocessor node of the T8140 (J700) and
T8142 (J704, J813, J815) device trees: PMP, SMC, MTP, ANS, GPU, DCP,
DCPEXT, AOP, SIO and the J813 USB4 ACIOs. Update the OSLOG host tests to
model the property instead of the machine name.

For every in-tree DTB each RTKit device's initial echo and no-ACK policy
are the same as before.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The RTKit library reads apple,oslog-echo from the coprocessor's own node.
Document it in each binding of a node that carries it (SIO, AGX, MTP
helper, ANS, PMP, SMC, AOP, USB4 ACIO, DCP).

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
apple,t8152-aop.yaml: keep main's accel, gyro and devmotion6 services
next to apple,oslog-echo. t8142-j813-usb4.dtsi: main moved the J813
routers into t8142-usb4.dtsi; take main's file, the property follows in
the next commit.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…SB4 routers

Main added the T8142 SIO coprocessor and moved the J813 USB4 routers
into t8142-usb4.dtsi after this series listed every T8140/T8142 RTKit
node. Without the property they would lose the OSLog counter echo they
get today from the machine check. With these two, every RTKit node
(mboxes) in the J700, J704, J813 and J815 DTBs carries it; the SEP is
not an RTKit client.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Updated to 798c2cd, merged with main f02bd68. In apple,t8152-aop.yaml, main's accel/gyro/devmotion6 services sit next to apple,oslog-echo. Main moved the J813 routers into t8142-usb4.dtsi and added the T8142 SIO, so a follow-up commit puts apple,oslog-echo on those three nodes; without it they would have lost the echo they get today from the machine check. Check: in the J700, J704, J813 and J815 DTBs every node with mboxes carries the property except the SEP, which is not an RTKit client. dt-validate (full schema) gives 0 oslog findings on all four. drivers/soc/apple/rtkit.o builds with W=1 and no warnings, and the rtkit host tests pass 28/28. No machine check is left in rtkit.c. Marking ready. Hardware: a Neo J700 boot row is queued (OSLog echo still answered, no 'unanswered OSLog' lines, GPU/DCP/SMC/SIO up).

@RyanTheTide
RyanTheTide marked this pull request as ready for review December 5, 2026 01:55
@RyanTheTide
RyanTheTide requested review from a team and DjDeveloperr as code owners December 5, 2026 01:55
@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) blast:neo Macs affected, from Merge risk (bot) door:one-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 5, 2026
@github-actions

github-actions Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Merge readiness at 798c2cde: not ready yet

Check Detail
CI at head running running: KUnit dcp-topology macsmc
Review no needs one approving review from Core, Omarchy Mac or Aurora Maintainers (not the author)
Requested changes ok none
Hardware row at head no no line with the head SHA 798c2cde, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: one-way · until the Stage 2 DTBs carry the property. The live DT on the Neo is its Stage 2 DTB, and a read-only check on 12-01 found no apple,oslog-echo on any coprocessor node (smc, mtp, pmp, gpu, aop, nvme). With this kernel on the current Stage 2, the Neo and the M5 Airs would stop echoing OSLog counters. That is the old behaviour where the MTP and SMC wedge after a few sleeps and the J815 MTP asserts. Affected: T8140 J700 (Neo), T8142 J704/J813/J815.

Areas: area:bringup, area:gpu, area:platform

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Hardware row at exact head 798c2cded7e2 on the Neo (T8140): PARTIAL (no external display).

  • The running DT carries apple,oslog-echo on pmp, smc, mtp, nvme, gpu, both dcp, aop and the sio dma-controller. PMP, SMC, MTP, ANS (nvme), GPU, DCP, AOP and SIO RTKit all came up; 0 OSLog unanswered/stall lines over boot, 4 s2idle and 3 deep sleeps.
  • Not run: DCPEXT with an external display (none attached; DP-1 disconnected).

How: one combined test kernel for eight PRs, not this PR alone. Kernel 7.3.0-aurora-ci = main d0684a06 + merge commits of linux#2712 b6887f88, #2300 c1d351d2, #1990 83ef8b0f, #3742 798c2cde, #2350 5f18911e, #2398 75b30c6c, #1814 775f31d2, #2402 07660961 (all merged clean, test commit 03a571ef, cloud build https://github.com/aurora-silicon/linux/actions/runs/47474056726). Booted as a one-shot on the lab Neo (J700, T8140, 26.6.2 stub) with this kernel's own t8140-j700.dtb in a trial Stage 2 (live aura 1.0.0b19 + U-Boot, only the DTB swapped), default cmdline, silent (no audio playback). Boot health on the test kernel: 0 error-level kernel lines, 0 AVC, 0 failed units. Saved default restored after.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) blast:neo Macs affected, from Merge risk (bot) door:one-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant