Repository navigation
soc: apple: sep: select the platform profile by SoC - #2631
RyanTheTide wants to merge 2 commits into
Conversation
On T8122, T6040, T6041, T6050, T8132 and T8142 the SEP profile was chosen only for the boards it had been tried on (J613, J615, J614s, J616s, J614c, J616c, J714s, K116s, J716c, J713, J715, J813, J815). Every other board with the same SoC got no profile, and so no SEP and no Touch ID, although each profile holds only SoC facts: the SEP's shared memory and handshake, its DART window, and the SPI controller the SoC wires to the sensor. Select by the SoC compatible, as T8103, T8112, T6000/T6001, T6020/T6021 and T8140 already are. A board without a built-in sensor has nothing on that bus: the sensor probe finds no part and the SEP runs without biometrics, as on the M1 and M2 Mac minis. A device tree that does not describe the SEP at all (the T8142 J704 has no apple,sep node yet) now gets no profile, so module init keeps saying the SEP stays disabled instead of failing on the missing node. The KUnit selection test now checks that the board compatible does not matter, and the Touch ID list covers the boards this admits. The profiles were written by Scott Jones (T8122), Michal S. (J614s), Artyom Astafurov and Jos Dehaes (T6041), Diljit Singh (T6050), Jens Axboe (K116s), Erik Bourget (J713, J716c) and Nick (T8142). Fixes: 64ff4f1 ("soc: apple: sep: add a T8122 (MacBook Air M3) platform profile") Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…disabled With the profile picked by SoC alone, select() now also returns a profile on boards whose device tree describes no usable enclave, and the warm attach then enables the SEP node and its DART at module load. Most device trees leave both disabled for that path, so their status cannot say whether a board has an enclave. The SEP mailbox's status does: the SEP cannot be reached without it, and the device tree enables it (in the board file, or in the SoC .dtsi for every board of that SoC) where the SEP is described for the machine. enable_sep_and_dart() now leaves the SEP and its DART disabled when the mailbox is disabled. From the compiled DTBs of this tree: J773s (T6040), J575c (T6041), and J714c, J716s, J775c, J775d, J873s, K114c, K114s and K116c (T6050) keep the SEP mailbox disabled, so nothing is enabled or bound there. Every board whose mailbox is enabled attaches as before. The selection KUnit test also covers J773g, J815, K114s, J316s and J413, and checks that SoCs without a profile (T6002, T6031, T8152) are refused. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Rows on the two Touch ID Macs whose profile selection this changes: the M3 MacBook Air 15" (J615, T8122) and the M4 MacBook Air 13" (J713, T8132). Both PASS. Method. Each Air's default kernel, with only
Same profile, same behaviour as the board-list selection on both. A fingered enrolment and match was not part of this run; neither Air has a finger enrolled yet. How the module was swapped
|
|
Merge-train adversarial review (MERGETRAIN-LINUX2) at 4ae8c06: 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#2631 soc: apple: sep: select the platform profile by SoC @4ae8c061VERDICT: NO BLOCKERS The PR removes per-board gates (profile.rs:699-729), which our rules favour. I checked the mailbox status in every SoC dtsi at the head:
Nits
Missing rows
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Pre-PR checklist review (§1–§6) at 4ae8c061c84a: COMMENT (0 code/policy/attribution/naming/CI blockers; holding only for §5 hardware evidence).
Verified (§1–§4, §6, CI)
- §1 Model gating: Removes per-board gating in
drivers/soc/apple/profile.rs:710-728in favour of SoC-level profile selection + DT-driven enablement (dt::sep_node()inprofile::detect(),sep_mbox.is_available()indt::enable_sep_and_dart()). - DT & init path check:
dt::sep_node()usesof_find_compatible_node()(dt.rs:31-43), so boards with noapple,sepnode (e.g.,t8142-j704.dts) returnENODEVfromprofile::detect()and skip warm attach cleanly.dt::enable_sep_and_dart()(dt.rs:208-216) checkssep.parse_phandle(MBOXES_PROP, 0).is_some_and(|mbox| mbox.is_available())and returnsOk(())without touchingsep_dartorsepwhensep_mboxis disabled (t6040J773s,t6041J575c,t6050J714c/J716s/J775c/J775d/J873s/K114c/K114s/K116c).- Checked
t8122.dtsi(sep_mboxenabled by default) andt8132.dtsi+t8132-jxxx.dtsi(sep_mboxenabled for all T8132 boards): both describesep_dartwith the BIT(40) aperture andprofile.rssetsxart_guard: 1onT8122,T6040,T6041,T6050,T8132, andT8142.SensorProfile.controller_baseis diagnostics-only (profile.rs:89-92).
- §2 / §3 / §4 / §6: No cmdline/module params, no hardcoded safety limits, no naming violations. Both commits (
52dabe33,4ae8c061) carry human author/committer + humanSigned-off-by:only; PR body carriesAssisted-by:. - CI: 7/7 checks green (
host-tests,source,rust-build,kunit, 3xDWC3/ATC).
Holding for §5 Evidence
- The J615 (T8122) and J713 (T8132) rows ran out-of-tree
apple-sep.koon older base kernels without a fingered enrol/match, and the J616s / J316s rows were on pre-rebase0abc2f38without AVC / failed-unit / kernel-error counts. - Before approval/merge, please collect:
- At-head regression rows on J616s (with Touch ID verify, 0 AVC, 0 failed units, 0 new kernel errors) and unchanged-path sanity checks (M2 J413, Neo J700);
- At least one boot on a disabled-mailbox board exercising the new
dt.rs:208-216early-return path (confirmingsep_dart/sepstay disabled and 0 new DART errors); - Owner rows on newly reached boards where
sep_mboxis enabled (T8122J504/J433/J434;T8132J604/J773g/J623/J624), since those now actively enablesep_dart+sepand run the warm-attach handshake.
Nits (non-blocking)
drivers/soc/apple/sep.rs:3656still logs"no platform profile for this SoC"even whenprofile::detect()returnsENODEVbecauseapple,sepis absent from the DT (e.g., J704).drivers/soc/apple/profile.rs:738KUnit test namet8142_sensor_boards_require_the_matching_socno longer fully reflects what the test asserts now that any board withapple,t8142matches.drivers/soc/apple/profile.rs:706-709comment aboutdt::enable_sep_and_dartapplies toWarmRegisterprofiles (cold-boot profiles do not call it).
Assisted-by: LLM (Gemini 4 Neon)
Replaces #2311, rebased onto current integration/aurora (conflicts in drivers/soc/apple/profile.rs: the Touch ID list keeps the base's J813/J815 entries plus this PR's boards, 25 in all; the base's new
t8142_sensor_boards_require_the_matching_socKUnit case now expects T8142 on every board with the SoC (J814, J704, no board) and still refuses a T8142 board on another SoC).Problem
drivers/soc/apple/profile.rs:697-720(0abc2f3) chose the SEP platform profile on T8122, T6040, T6041, T6050, T8132 and T8142 only for the boards it had been tried on: J613, J615, J614s, J616s, J614c, J616c, J714s, K116s, J716c, J713, J715, J813 and J815. Any other board with the same SoC got no profile, so it had no SEP and no Touch ID. The profile itself holds only SoC facts: SEP shared memory and handshake, the DART window, and the SPI controller the SoC wires to the sensor. The list started in 64ff4f1 and grew one board per commit.Change
select()picks the profile by the SoC compatible alone. T8103, T8112, T6000/T6001, T6020/T6021 and T8140 already work this way.detect()returns no profile when the device tree has noapple,sepnode. Module init then logs that the SEP stays disabled, as it does today, and does not fail on the missing node. This matters for the T8142 J704, whose dts does not describe the SEP yet.enable_sep_and_dart()leaves the SEP and its DART disabled when the board keeps the SEP mailbox disabled. With the profile picked by SoC alone, boards such as J773s, J575c, J716s, J775c, J873s and K114s now get a profile, but their device trees describe no usable enclave. Most trees leave the SEP node and its DART disabled for the warm attach to enable, so only the mailbox status says whether a board has one. Without this check the module would enable the SEP and its DART at load on those boards.A board without a built-in sensor (Mac mini, Mac Studio, iMac) has nothing on the sensor's SPI bus. The sensor probe finds no part, and the SEP runs without biometrics, as on the M1 and M2 Mac minis.
The profiles were written by Scott Jones (T8122), Michal S. (J614s), Artyom Astafurov and Jos Dehaes (T6041), Diljit Singh (T6050), Jens Axboe (K116s), Erik Bourget (J713, J716c) and Nick (T8142).
Testing
Rebased head (on c3d01cb):
make ARCH=arm64 LLVM=1 drivers/soc/apple/with defconfig + asahi.config +CONFIG_APPLE_SEP_KUNIT_TEST=ybuildsapple-sep.o; no warnings in the changed files. KUnit on arm64 QEMU (kunit.py run --arch=arm64 --kunitconfig=drivers/soc/apple/sep.kunitconfig 'apple_sep*'): 307/307 pass,apple_sep_profile9/9 includingt8142_sensor_boards_require_the_matching_socandselection_follows_the_soc.tools/asahi/run-host-tests.py --only sep: 23/23 pass.Build, release config, LLVM,
CONFIG_APPLE_SEP_KUNIT_TEST=y:make drivers/soc/apple/buildsapple-sep.o, including the KUnit tests. No warnings in the changed file. The Rust warnings in bio.rs, key.rs, control.rs and store.rs were there before.KUnit on arm64 QEMU (
tools/testing/kunit/kunit.py run --arch=arm64 --kunitconfig=drivers/soc/apple/sep.kunitconfig 'apple_sep*', as in CI): 306/306 pass, includingapple_sep_profile(8 subtests:selection_follows_the_soc,unprofiled_socs_are_refused). Host tests (tools/asahi/run-host-tests.py): 427/427 pass.Compiled DTBs of this tree, SEP mailbox status per board on the SoCs that change: enabled on J614s, J616s, J614c, J616c, J714s, J716c, K116s, J433, J434, J504, J613, J615, J604, J623, J624, J713, J715, J773g, J813, J815; disabled on J773s, J575c, J714c, J716s, J775c, J775d, J873s, K114c, K114s, K116c; no SEP node on J704.
Hardware (one-shot test kernel 7.3.0-aurora-swl1 = integration 0abc2f3 + this and the other open sweep PRs, 2026-11-20):
Still to run
dmesg | grep "SEP platform profile"showsT6040/J616s, the same as before. Touch ID enrol and verify still work.dmesg | grep "SEP platform profile"shows the same profile as before.Boards newly reached (none in our lab)
apple,sepnode, so no profileEach of these boards includes the SoC dtsi with the same SEP, SEP DART and
spi2nodes as the boards on the old list. The mailbox check and the added KUnit cases come from #2439, which this PR supersedes.Assisted-by: LLM (Claude:Opus 5.5)