Repository navigation
soc: apple: aop: start the T8122 AOP as on T6040 - #2569
Conversation
The M3 (T8122) device trees describe the AOP as "apple,t8122-aop" with the T6020 fallback. Its firmware's external code, data and log live in DRAM, which the bootloader reserves and lists in memory-region with their IOVAs. Document the compatible and the optional memory-region. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
On the M3 (T8122) iBoot leaves the AOP halted with its external code (__ETEXT), data (__EDATA) and log (__OS_LOG) in DRAM, as on the M4 Pro, and the 27.2 firmware reads its __EDATA base from the ED0p boot argument. The T8122 node fell back to the T6020 match data, which neither checks those segments nor patches ED0p, so the firmware read its data base as 0 and never said hello: apple_aop failed with -ETIME on every boot of the MacBook Air J615. Match apple,t8122-aop with the T6040 data, as T8132 already does: check the bootloader-reserved segments, patch ED0p with the __EDATA IOVA and halt the coprocessor again if its start fails. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Looks good; approve once the J615 row is re-run with the open bootloader half.
HW row: J615 and J613, fleet kernel with this commit, Stage 2 from aura#377, default cmdline, cold boot: "AOP IS READY", lid angle and ALS read, AOP mic capture (no playback), 0 AVC, 0 failed units, 0 new kernel errors. Plus the same kernel on a Stage 2 without #377 showing the clean refusal and nothing else new. Assisted-by: LLM (Claude:Opus 5.5) |
T6040 and T8132 AOP nodes carry the bootloader's firmware memory-region too. Describe the property without naming one SoC, and say what a T8122 AOP does without it. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…egions The T8122 AOP runs its external code, data and log from DRAM only when the bootloader reserved them in memory-region (aura's AOP handoff). A Stage 2 that predates that handoff reserves nothing, and the T6040 configuration then stops the probe with ENOENT, where the apple,t6020-aop fallback the node also carries started it before. Decide from the node: a block whose configuration needs firmware regions and names a configuration for their absence takes that one when the node has no reserved memory-region. T8122 names its apple,t6020-aop fallback's. With the regions present nothing changes. aop-bootargs-tests.py checks that the T8122 configuration checks its regions and names T6020's as the one without them, and that no other block names one; dropping the T8122 fallback fails it. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Pushed b3228d8..967846e (fast-forward), for the review of 11-21:
Build and tests: Still owed: the J615 row at this head, and the no-#377 Stage 2 row (queued), plus J613. |
Move the choice of configuration into AopHwConfig::for_regions() so the host test runs the code probe uses, not only the table. The test now checks that T8122 keeps its configuration with regions and takes T6020's without them, and that every other block, T8142, T8152 and T6050 included, keeps its own either way. Inverting the condition or always keeping the matched configuration fails it. Also: the doc comment of check_fw_regions() is back on it, the field comment says the segments are left in DRAM but neither reserved nor mapped, the binding describes when the property is absent rather than what the driver does, and the probe message says it starts with the fallback compatible's configuration. Before this series that start ended in -ETIME on the J615 with 27.2 firmware; it is kept as it was for any T8122 Stage 2 without the AOP handoff. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Pushed 967846e..a360e3b: an independent review found the host test only checked the table, not the choice probe makes. The choice is now |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Adversarial review at head a360e3b7c92eb1f5faa234667093caff2d00c801 against pre-pr-checklist.md.
Verdict: Code LGTM (0 code blockers); hold approval/merge pending the a360e3b7 hardware rows.
Checked
- No model gating (Rule 1):
apple,t8122-aopmatchesHW_CFG_T8122(..HW_CFG_T6040,without_fw_regions: Some(&HW_CFG_T6020)).AopData::has_fw_regions()checks!np.is_null() && of_reserved_mem_region_count(np) > 0, andAopHwConfig::for_regions()selects the fallback purely from DTmemory-regionpresence — no SoC, board, or firmware-version gate. The bootloader half (aurora-silicon/aura#377) is merged, so the chicken-and-egg ordering is satisfied. - Driver behavior & safety (Rules 2–3):
- With
memory-regionpresent (has_fw_regions == true),probe()stays onHW_CFG_T8122and runsbootargs_has_ed0p()+check_fw_regions(). Malformed or unmapped regions still fail cleanly (EINVAL/EIO/ENOENT) instead of silently falling back. - Without
memory-region(orof_reserved_mem_region_count <= 0),for_regions(false)selects&HW_CFG_T6020and logs adev_info!, preserving pre-PR behavior on older Stage 2 builds.
- With
- Regression safety across M1/M2/M3/M4/M5/Neo: Every other config (
T8103,T8112,T6000,T6020,T6040,T8132,T8140,T8152,T8142,T6050) setswithout_fw_regions: None, sofor_regions()unconditionally returnsself.tools/asahi/aop-bootargs-tests.pyexercisesAopHwConfig::for_regions()across T8122 and all 10 other configs. - DT bindings & CI:
Documentation/devicetree/bindings/soc/apple/apple,aop.yamladdsapple,t8122-aopwith itsapple,t6020-aopfallback and optionalmemory-region(1..8). Keepingselect:unchanged until the T8122 child bindings (-audio,-als,-las) land avoids spuriousdtbs_checkwarnings and is documented. All 8/8 CI checks pass (dt-checks,host-tests,source,rust-build,kunit, 3×DWC3/ATC). - Clean-room & attribution (Rule 4): All 5 commits carry human author/committer (
Ryan Murray <ryan@aurorasilicon.org>) andSigned-off-byonly; PR body ends withAssisted-by: LLM (Claude:Opus 5.5).
Remaining before approval/merge (Rule 5 — Hardware rows)
Commits 967846e2..a360e3b7 added has_fw_regions() / for_regions(), and a360e3b7 has not been booted on hardware yet:
- J615 at
a360e3b7on a default-cmdline kernel with anaura#377Stage 2: confirm"AOP IS READY", lid angle, ALS, AOP mic capture (nothing played), and regression check (0 AVC denials, 0 failed units, 0 new kernel errors). - J615 at
a360e3b7on a Stage 2 withoutaura#377: confirm the fallbackdev_info!("No firmware memory-region from the bootloader: starting with the fallback compatible's configuration") and unchanged pre-PR behavior. - Second T8122 board (e.g., J613) row if available, since
t8122.dtsienables this path for all T8122 boards.
Minor non-blocking nits
Documentation/devicetree/bindings/soc/apple/apple,aop.yaml:56: thememory-regiondescription mentions T6040 and T8132, which are covered byapple,t6041-aop.yaml(wheremaxItems: 18) rather thanapple,aop.yaml.- PR body "Still to run" quotes the older log text (
"starting as the fallback block"), whereasa360e3b7logs"starting with the fallback compatible's configuration".
Assisted-by: LLM (Google:Gemini 4 Neon)
|
J615 row at b3228d8 with the aura#377 Stage 2: J615 production default, 7.3.0-aurora-fleet79 + Stage 2 aura main 7d8e91f8, default command line. a360e3b changes nothing on this path, because the node has its memory-region.
|
|
Merge-train adversarial review (MERGETRAIN-LINUX2) at a360e3b: NO BLOCKERS. Code read only, nothing built here. Before the merge it still needs Dj's verdict at this head; the missing rows are listed below. Full review#2569 soc: apple: aop: start the T8122 AOP as on T6040 @a360e3b7VERDICT: NO BLOCKERS. The no-region fallback has no hardware proof at all (see the rows below). Checked and found OK:
Nits / risks:
Missing rows:
|
|
J615 rows at head a360e3b, both boot-loader states (warm one-shots; default command line, kernel-only, no module parameters):
So on the J615 the AOP needs the boot-loader hand-over, and the fallback fails safe. Both rows are warm boots; a true cold boot needs someone at the machine. |
|
J615 row at a360e3b with the AOP mic capture (warm one-shot, default command line, default boot chain whose Stage 2 includes aura#377; capture only, nothing played):
Together with the earlier rows (both boot-loader states), row 1 is complete at this head on warm boots. A true cold boot and a second T8122 board (J613) are still owed. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Pre-PR Checklist Re-check — Upgrading to APPROVE (head a360e3b7c92e)
All code, binding, safety, attribution, and CI checks (8/8 green) were already clear at this head, and the requested a360e3b7 J615 hardware rows are now complete:
- With
aura#377Stage 2 (default cmdline,a360e3b7):Validated external data region,AOP IS READY(0.80 s),aop-sensors-als(0.81 lux),aop-sensors-las(angle 103), 3/3 live mic channels on bothhpai(FLOAT_LE 48 kHz, ~-65 dBFS RMS room noise) andlpai(S32 16 kHz), 0 oops, 0 coprocessor crashes, 0 SELinux denials, 0 failed units, and 0 new kernel errors. - Without
aura#377Stage 2 (6affb8ec, default cmdline,a360e3b7): Logs"No firmware memory-region from the bootloader: starting with the fallback compatible's configuration", fails safe cleanly (-62), 0 oops, 0 failed units, SELinux enforcing.
(Non-blocking follow-up coverage when available: physical cold boot at a360e3b7 and a second T8122 board such as J613, which is not in the author's lab.)
Assisted-by: LLM (Gemini 4 Neon)
Problem
On the 15-inch MacBook Air M3 (J615, T8122) with the 27.2 firmware,
apple_aopfailed with-ETIME(RTKit endpoint discovery-62) on every boot, so there were no microphones, no ambient light sensor and no lid angle. The M3 AOP uses the M4 Pro layout: iBoot leaves it halted with__ETEXT,__EDATAand__OS_LOGin DRAM, and the 27.2 firmware reads its__EDATAbase from theED0pboot argument. The T8122 node fell back to the T6020 match data, which neither checks those segments nor patchesED0p, so the firmware read its data base as 0.Change
apple,t8122-aop(with itsapple,t6020-aopfallback) and the optionalmemory-regionthe bootloader adds (T6040, T8122 and T8132 nodes use it).apple,t8122-aopwith the T6040 data, as T8132 already does. It checks the bootloader-reserved segments, patchesED0pwith the__EDATAIOVA (Artyom's 60f279c/b224fde7 support, already on integration/aurora) and halts the coprocessor again if its start fails.memory-region(a Stage 2 from before the AOP handoff), the T8122 block starts as itsapple,t6020-aopfallback did before this PR. The choice comes from the node, not from the SoC or the firmware version. With the regions present nothing changes.The bootloader half is aurora-silicon/aura#377 (merged), which reserves the segments.
Testing
dt_binding_checkpasses for the schema.aop.obuilds with CLIPPY=1 on the fleet78 release config;dt_binding_checkfor apple,aop.yaml passes, anddtbs_checkon t8122-j615 adds nothing new (the three child-node warnings below were there before); the AOP host tests pass 4/4.aop-bootargs-tests.pynow runs the selection itself (AopHwConfig::for_regions(), which probe calls): T8122 keeps its configuration with regions and takes T6020's without them, and every other block keeps its own either way. Inverting the condition, always keeping the matched configuration, or dropping the T8122 fallback each fail it.Still to run
apple,t8122-aop-audiowithapple,t6030-aop-audio,-als,-las) are not in the child bindings yet. The parent schema'sselectstays as it was so that this PR adds no dtbs_check warnings; widening it is a follow-up together with those child bindings.Evidence
Lab traces (not tainted, our own logs): traces/audio/20261121-j615-aop272 (cold boot, step 6), with the batch-1 hot-reload log; segment addresses decoded from our own macOS ioreg of this J615.
Assisted-by: LLM (Claude:Opus 5.5)