Repository navigation
omarchy-ane-dt: a disabled kernel ANE node does not count - #23
Conversation
build() made its skip set from every kernel node, disabled ones included. aurora-silicon/linux #65 ships the five T6021 ANE nodes disabled, so the T6021 overlay was skipped and the ANE stayed disabled. Only a node with no status, "okay" or "ok" counts now (Tree.enabled), in build(), validate(), ane_nodes(), status and the m2-enable mailbox check. fdtoverlay merges the overlay into the disabled nodes of the same name, but a property the overlay does not set keeps the kernel's value, so the T6021 DARTs now set status "okay". validate() checks the references of new and changed nodes and refuses a disabled provider. The renumbered-phandle guard is unchanged. Receipt: receipts/2026-10-01-ane-dt-disabled-nodes (merge experiment with the #65 head and t6021-ane-node excerpts, dtc 1.7.2 and 1.6.1).
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba5e5b4396
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1,5 +1,19 @@ | |||
| # Changelog | |||
|
|
|||
| ## Unreleased | |||
There was a problem hiding this comment.
Recreate the commit with the mandated identity
The reviewed commit records both its author and committer as Codex <codex@openai.com>, so it cannot land under this repository's standing identity policy. Recreate it with Joshua Warren and 816217+joshuaswarren@users.noreply.github.com as both identities.
AGENTS.md reference: AGENTS.md:L252-L257
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
| for path in [p for p in result.nodes if result.nodes[p] != stock.nodes.get(p)]: | ||
| props = result.nodes[path] | ||
| plain = cells(props.get("interrupt-parent", b"")) + cells(props.get("memory-region", b"")) | ||
| if "iommu-addresses" in props: |
There was a problem hiding this comment.
Reject disabled plain-phandle providers
When an applied overlay's new or changed node has an interrupt-parent, memory-region, or iommu-addresses phandle targeting a node whose status is disabled, this validation path checks only that the phandle exists; the new availability check applies only to properties in REFS. In the newly supported case where an overlay enables a previously disabled ANE node, this can accept and install an enabled consumer backed by a disabled interrupt controller or reserved-memory provider, contrary to the validator's stated contract. Check result.enabled(result.phandles[phandle]) for these plain references as well.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 8c0ae1b: the interrupt-parent, memory-region and iommu-addresses targets of a new or changed node must be enabled too (... names /soc/interrupt-controller@..., which is disabled). tools/test_ane_dt.py has a case for a disabled AIC and for a disabled power domain; the AIC case fails on ba5e5b4 with validate accepted. test_ane_dt ok, test_ane_m2 ok, pytest -q tests tools 26 passed. The merge-experiment logs in the receipt are unchanged with the new check.
The interrupt-parent, memory-region and iommu-addresses targets of a new or changed node must be enabled too, as the power-domains, iommus, mboxes and resets targets already must. Review of PR #23.
The Unreleased entry of #23 moves into the 0.4.0 Fixed section. CHANGELOG.md only.
| live = [] | ||
| for compat in base.glob("**/compatible") if base.is_dir() else []: | ||
| st = compat.parent / "status" | ||
| if st.exists() and st.read_bytes().rstrip(b"\0") not in (b"okay", b"ok"): |
There was a problem hiding this comment.
SUGGESTION: Third, slightly different copy of the availability rule
Tree.enabled() (line 97) implements of_device_is_available() as status in ([], ["okay"], ["ok"]). This inline version diverges for a zero-length status property: b"" is not in (b"okay", b"ok"), so the node is skipped here, while strings() filters empty strings and would report the same node as enabled. The two answers then disagree inside one run of status — the live loop here versus kernel_has/copy_has from Tree(...).ane_nodes() a few lines below.
Worth routing both through one helper so the rule cannot drift.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| stock_bytes = stock_file.read_bytes() | ||
| stock = Tree(stock_bytes) | ||
| present = {c for p in stock.nodes for c in stock.strings(p, "compatible")} | ||
| present = {c for p in stock.nodes if stock.enabled(p) for c in stock.strings(p, "compatible")} |
There was a problem hiding this comment.
SUGGESTION: Broadened reference check now also reaches stock nodes the overlay only tweaks
Changing the loop from new nodes to new or changed nodes widens what validate() inspects: packaging/dt/t6001-ane.dts fragment@3 sets reg on the existing /soc/power-management@28e080000, so that stock node becomes "changed" and its own interrupt-parent/power-domains targets are reference-checked for the first time. tools/test_ane_dt.py only ever calls build() with the t8103 and t6021 overlays, so that path has no coverage at all — a refusal on a real M1 Max tree would be the first sign of it.
A fixture that builds the t6001 overlay over a stock-like tree would pin the widened rule where it can actually regress.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (22 files)
Fix these issues in Kilo Cloud Reviewed by free · Input: 0 · Output: 0 · Cached: 0 |
…boot receipts: T6021 0.4.0 release module and #23 overlay pass a disk boot
omarchy-ane-dtbuild()counted a disabled kernel node as the kernel's ANE node. aurora-silicon/linux #65 and joshuaswarren/linuxt6021-ane-nodeship the five T6021 ANE nodes disabled, so the T6021 overlay was skipped and the ANE stayed disabled. Found inreceipts/2026-10-01-t6021-aurora-dt-node(#22).Changes:
Tree.enabled(): nostatus,"okay"or"ok"(theof_device_is_available()rule).build()uses it for every overlay's skip compatibles.validate(),ane_nodes(),status(the live node'sstatusfile) and theomarchy-ane-m2-enablemailbox check ignore disabled nodes.packaging/dt/t6021-ane.dts: the three DARTs setstatus = "okay". fdtoverlay merges each overlay node into the kernel node of the same name. A property that the overlay does not set keeps the kernel's value, so without this the merged DARTs stayed disabled.validate()checks the references of new and changed nodes, and refuses a reference to a disabled provider. The renumbered-phandle guard is unchanged.Merge experiment (the real overlay over verbatim excerpts of the #65 head and
t6021-ane-nodenodes, fdtoverlay 1.7.2 and 1.6.1): fdtoverlay 1.7.2 merges with no duplicates and no phandle changes. Before this change,build()returnedNone. With only the tool fixed,build()refused (iommus names /soc/iommu@285800000, which is disabled). With both changes, all five nodes areokayandbuild()applies. On the #65 head nodes, the overlay's mailbox IRQs (884, 1833) and dart0ps_pmpreplace the kernel's. fdtoverlay 1.6.1 renumbers phandles and is refused, as before. Details are inreceipts/2026-10-01-ane-dt-disabled-nodes/README.md.Tests: the new cases in
tools/test_ane_dt.pyandtools/test_ane_m2.pyfail on main53dca89(logs in the receipt). After the change:python3 tools/test_ane_dt.pyok,python3 tools/test_ane_m2.pyok,pytest -q tests tools26 passed.Not changed: omarchy-mac-boot
dtb-overlays.sh(986486a7, draft omacom/omarchy-mac#677) has the same skip rule. No boot was run.