Repository navigation
soc: apple: sep: select the platform profile by SoC - #2311
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>
|
J604 read-only row (MacBook Pro 14", M4, Mac16,1; os-fw 26.6.2, system-fw 27.2; aura 1.0.0b13.1, U-Boot aurora11). Tested this PR's head Loaded
Not tested: Touch ID sensor/enrol/match on Linux ( |
|
Superseded by #2631: the same commits rebased onto current integration/aurora. Assisted-by: LLM (Claude:Opus 5.5) |
|
Superseded by #2631, which carries this change on a current base. Branch kept. |
|
Hardware row, Mac mini M4 (J773g, T8132), macOS 27.2 firmware: PASS (2026-11-20) Kernel 7.3.0-m4drv8 (aurora 010c3eb base, the mini's current 27.2 bring-up kernel). This PR's two commits (5088a3c, b81e61b) were cherry-picked onto it; the only conflict was in the KUnit tables, resolved to this PR's side. Built as a module against that kernel and swapped live for the stock
One cosmetic point: since the selection is by SoC now, the profile name The Magic Keyboard with Touch ID row for #1810 on this mini is pending: the keyboard was unplugged on this boot. |
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
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)