Skip to content

arm: apple: carry the J713 SEP boot manifests into the OS tree - #14

Merged
RyanTheTide merged 2 commits into
aurora-silicon:aurora-wipfrom
erikwb:j713/sep-manifests
Oct 29, 2026
Merged

RyanTheTide merged 2 commits into
aurora-silicon:aurora-wipfrom
erikwb:j713/sep-manifests

Conversation

@erikwb

@erikwb erikwb commented Oct 25, 2026 •

Copy link
Copy Markdown

The SEP driver registers with the enclave using this boot's local-policy and iBoot manifests, and refuses to attach without them. m1n1 already publishes both (dt_set_sep()) on the node its sep alias names. On J713, though, the kernel gets its per-kernel tree through the J713 importer, which copies only an explicit list of properties, so the manifests never reached it.

Change

Stacked on #13, the J713 AOP import. The first commit here is #13's, and the tests keep both the AOP and SEP fixtures.

  • New import step (j713_sep): when the OS tree names an apple,sep node, copy local-policy-manifest and iboot-manifest from m1n1's tree.
    • A manifest this boot didn't publish is removed from the OS tree, so an older copy never reaches the driver. That includes a control tree without the SEP.
    • An OS tree without the SEP imports as before.
    • A sep alias that isn't apple,sep on either side refuses the import, transactionally.
  • Host regressions in test_apple_j713_fdt.py (SEP faults 40-43; arm: apple: reference m1n1's J713 AOP reservations from the OS tree #13's AOP cases are 35-39):
    • both manifests replace stale OS copies;
    • each manifest missing in turn, which removes its stale copy;
    • a mismatched OS or source node;
    • an OS tree without the SEP;
    • a source tree without the SEP.

Depends on

aurora-silicon/linux#457, which adds the J713 SEP node and sep alias.

It also depends on u-boot#15. m1n1's J713 tree with the SEP and its manifests is about 137 KB, over the importer's current 128 KiB source bound, so without #15 the import is refused and the boot stops. That happened on hardware. With it, a boot.bin built from that DTB lets m1n1 publish the manifests; without it this step is a no-op.

Testing

m1n1 now hands the J713 AOP over as on T6040: it programs the AOP DART's
DAPF, reserves the firmware segments (__ETEXT, and __OS_LOG, which iBoot
places anew at every boot) and the DAPF windows, and lists them in the
control tree AOP's memory-region, or disables the AOP. The importer
already copies those reservations; reference them from the OS tree's AOP
too, or disable the AOP there when m1n1 did not hand it over.

An OS tree whose AOP lists its own memory-region (older kernels, whose
driver programs the DAPF itself) keeps it. In an OS tree without an AOP,
the reservations have no owner, as for an omitted display.

The host test covers a handoff, an AOP m1n1 disabled or never had, a
malformed reference (refused without changes), an OS tree with its own
regions, an OS AOP at another path and an OS tree without an AOP.

Tested on J713 (MacBook Air 13" M4) with that m1n1 and a kernel taking the
T6040 AOP path: the AOP gets the 17 regions and starts, and the
microphones, headphone jack and speakers work.

Signed-off-by: Erik Bourget <[email protected]>
@erikwb
erikwb force-pushed the j713/sep-manifests branch from 05ec3b0 to 7dcfd3b Compare October 25, 2026 23:12
@RyanTheTide

RyanTheTide commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

The new step runs only inside the existing opted-in J713 importer, after both trees have passed the J713/T8132 identity checks. It uses the transaction scratch tree, requires apple,sep on both alias targets, and has an explicit list of exactly local-policy-manifest and iboot-manifest. Missing SEP on either side skips the step; a mismatched node refuses the transaction. No new execution path for Neo, M1 Pro or M2 was found. Their existing boot qualification is not a new test of this head.

Please fix the missing-property case. j713_copy_optional() returns success when the source property is absent, but does not remove a pre-existing destination property. An OS tree carrying an older manifest therefore keeps it, contrary to the stated absent-property contract. The new fault case starts with an empty destination, so it misses this. Implement the absent-manifest policy in the SEP step and test pre-populated stale targets for each property, with transactional refusal or removal as appropriate.

The per-kernel activation also needs coordination with Linux #457: its SEP and SEP DART nodes remain disabled, and this step copies no status. The board must supply the qualified activation policy. The updated hardware note now reports a boot with #15, #14 and #457 DTBs, manifest transfer and an existing-enrolment match. Please identify the exact tested per-kernel DTB/activation changes to reconcile that result with the disabled SEP/DART status in the reviewed #457 source.

The software gates are queued through an ordinary buildslot. I will update this same comment with the exact build and test results. No hardware test was performed in this review.

Merge #15 before this change; its larger source bound is required by the tree carrying SEP manifests. Rebase above #13 for the combined J713 importer and retain both AOP and SEP tests; the fixture arguments still need to retain both features. The revised 40-42 SEP fault numbers address the earlier collision with #13. Merge for deployment with corrected Linux #457, the SEP-enabled control DTB and this Mac's own installer-prepared sensor records. The bundled-tree path remains a separate route.

The SEP driver registers with the enclave using this boot's local-policy
and iBoot manifests, and refuses to attach without them. m1n1 publishes
them on the node the sep alias names. Copy both into the per-kernel tree
when it names an apple,sep node. A manifest this boot did not publish,
including from a control tree without the SEP, is removed from the OS
tree so that an older copy never reaches the driver. An OS tree without
the SEP imports as before; a sep alias that is not apple,sep on either
side refuses the transaction.

Add host regressions: both manifests replacing stale OS copies, each one
missing, mismatched nodes, and trees without the SEP on either side.

Signed-off-by: Erik Bourget <[email protected]>
@erikwb
erikwb force-pushed the j713/sep-manifests branch from 7dcfd3b to 29557f5 Compare October 25, 2026 23:52
@erikwb

erikwb commented Oct 25, 2026

Copy link
Copy Markdown
Author

Updated (29557f5), rebased on #13:

  • Stale manifests: a manifest the control tree doesn't publish is now removed from the OS tree instead of being kept, including when the control tree has no SEP at all. The OS fixture starts with stale copies of both properties. Faults 40 and 43 each drop one manifest; faults 41 and 42 are the mismatched nodes. The SEP test fails on the previous step.
  • Combined tree: arm: apple: reference m1n1's J713 AOP reservations from the OS tree #13's AOP cases (35-39) and the SEP cases (40-43) both pass, as do the other importer tests.

On activation: the SEP driver brings the SEP and SEP DART nodes out of disabled itself, with a changeset at module init (dt::enable_sep_and_dart), so the board doesn't need to enable them. The SEP mailbox is a different matter: I'll keep it disabled in t8132.dtsi and enable it in the J713 board file in #457.

On the hardware proof: that route has now run on J713. The boot.bin was m1n1 + #457's DTBs (with the sep alias) + U-Boot #13 + the previous #14 head + #15, booting a per-kernel DTB with no manifests in it:

  • both manifests arrived on the kernel's SEP node, byte-identical to copies checked against the ADT's secure-boot-hashes;
  • m1n1 reserved sep-firmware;
  • Touch ID attached, restored the enrolment and matched;
  • Wi-Fi, display, GPU and audio were unchanged.

The first attempt without #15 stopped after the logo: the control tree was 136,997 bytes, over the 128 KiB source bound. That's #15.

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