Repository navigation
soc: apple: sep: pick the platform profile by SoC; the board DT decides - #2439
Draft
RyanTheTide wants to merge 1 commit into
Draft
RyanTheTide wants to merge 1 commit into
RyanTheTide wants to merge 1 commit into
Conversation
select() matched T8122, T6040, T6041, T6050, T8132 and T8142 only together with a list of board compatibles, the boards whose ADTs had been read. Each new board on one of these SoCs needed a driver patch (J614s, J614c, J715, J716c, K116s, J813, and K114s in review), although nothing the driver reads from these profiles is board-specific: - shared-memory geometry, handoff, key-store dialect and keybag encoding follow the SoC's sepOS; - the DART window and the wide DMA mask follow the SoC's SEP DART aperture, which the SoC .dtsi also describes; - xart_guard is a safety policy; - the sensor's bus, chip select and SPI mode come from the board's apple,mesa-fingerprint node; the profile's sensor constants are not read at run time; - nonce_session follows the sensor generation, which is the same on every board of each SoC read so far. Pick these profiles by SoC alone, as T8103, T6000/T6001, T6020/T6021, T8112 and T8140 already are. The SEP node's status cannot be the board selector here: the warm-attach path enables the SEP node and its DART at module load, and the trees leave both disabled for it. The SEP mailbox's status is what the board device trees set: on T6040, T6041, T6050 and T8142 it is enabled on exactly the boards the old lists named. enable_sep_and_dart() now leaves the SEP disabled when its mailbox is disabled, and when there is no SEP node (J704) it logs and returns instead of failing module init. From compiled DTBs of all 66 Apple silicon boards in the tree: - every board that had a profile keeps it and attaches as before (J700, J616s, J316s and J413 among them); - J773s, J575c, J714c, J716s, J775c, J775d, J873s, K114c, K114s and J704 now get their SoC's profile, but their mailbox is disabled (or there is no SEP node), so nothing binds, as before; - J433, J434, J504 (T8122) and J604, J623, J624, J773g (T8132): the SoC .dtsi enables the SEP mailbox on every board, so the SEP now attaches there with the SoC's profile, as it already does on the T6020/T6021 and T8112 desktops. Update the selection KUnit test to match. Link: #2115 Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Contributor
|
J773g row (Mac mini M4, 16 GB, macOS 27.2 stub, so sepOS 27.2). This PR's commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem.
select()indrivers/soc/apple/profile.rspicks the T8122, T6040, T6041, T6050, T8132 and T8142 profiles only for a list of board compatibles, the boards whose ADTs were read. Every new board on one of these SoCs needs its own driver patch. J614s, J614c, J715, J716c, K116s and J813 each got one, and #2115 adds the K114s. Thanks to @chrisohearn for the K114s report that brought this up.Change. These profiles are now picked by SoC alone, as T8103, T6000/T6001, T6020/T6021, T8112 and T8140 already are. Nothing the driver reads from them is per board. Shared memory, handoff, key store and keybag encoding follow the SoC's sepOS. The DART window and DMA mask follow the SoC's SEP DART, which the SoC .dtsi also describes.
xart_guardis a safety policy. The sensor's bus, chip select and SPI mode come from the board'sapple,mesa-fingerprintnode, and the profile's sensor constants are not read at run time.nonce_sessionfollows the sensor generation, which is the same on every board of each SoC read so far.The SEP node's
statuscan't be what selects a board. On these SoCs the driver enables the SEP node and its DART when it loads, and the trees leave both disabled for that reason. What the board trees do set is the SEP mailbox. On T6040, T6041, T6050 and T8142 the mailbox is enabled on exactly the boards the old lists named.enable_sep_and_dart()(dt.rs) now leaves the SEP disabled when its mailbox is disabled. When a board has no SEP node at all (J704), it logs that and returns, instead of failing module init.This makes the
apple,k114sline in #2115 unnecessary. The K114s still needs its board DT to enablesep_mboxandps_septhe way the K116s does. Until then it gets the T6050 profile but nothing binds. This complements #2247 (SEP and DART enabled on every T8132 board).Testing.
.rustfmt.toml): the changed hunks are clean.selection_follows_the_soc_alone, plusunprofiled_socs_are_refused. The Touch ID sensor test covers J604, J715, K114s, J813 and J815.sep.o(release config,CONFIG_APPLE_SEP_KUNIT_TEST=y): the base builds with 12 existing warnings. The build with this change is still queued on the loaded build box; I'll post the result here.Still to run.
dmesg | grep -i 'SEP platform profile'prints the same name as before, and Touch ID enrol/match still works.apple_sepand check that the SEP binds (SEP platform profile: T8122/J613orT8132/J713/J715) and that s2idle still works. Where there is a sensor (J604), also enrol and match.Per-board table (DT status at 0abc2f3, profile and SEP binding before/after; abridged to changed boards and lab machines)
| board | SoC | DT sep | DT sep mbox | profile before | profile after | SEP bound before | SEP bound after | changed |
| t6000-j316s | t6000 | okay | okay | T6000 | T6000 | yes | yes | |
| t6040-j616s | t6040 | disabled | okay | T6040 | T6040 | yes (runtime enable) | yes (runtime enable) | |
| t6040-j773s | t6040 | disabled | disabled | - | T6040 | no (module: no profile) | no (DT mailbox disabled) | profile only |
| t6041-j575c | t6041 | disabled | disabled | - | T6041 | no (module: no profile) | no (DT mailbox disabled) | profile only |
| t6050-j714c | t6050 | disabled | disabled | - | T6050 | no (module: no profile) | no (DT mailbox disabled) | profile only |
| t6050-j716s | t6050 | disabled | disabled | - | T6050 | no (module: no profile) | no (DT mailbox disabled) | profile only |
| t6050-j775c | t6050 | disabled | disabled | - | T6050 | no (module: no profile) | no (DT mailbox disabled) | profile only |
| t6050-j775d | t6050 | disabled | disabled | - | T6050 | no (module: no profile) | no (DT mailbox disabled) | profile only |
| t6050-j873s | t6050 | disabled | disabled | - | T6050 | no (module: no profile) | no (DT mailbox disabled) | profile only |
| t6050-k114c | t6050 | disabled | disabled | - | T6050 | no (module: no profile) | no (DT mailbox disabled) | profile only |
| t6050-k114s | t6050 | disabled | disabled | - | T6050 | no (module: no profile) | no (DT mailbox disabled) | profile only |
| t6050-k116c | t6050 | disabled | disabled | - | T6050 | no (module: no profile) | no (DT mailbox disabled) | profile only |
| t8112-j413 | t8112 | disabled | okay | T8112 | T8112 | yes (runtime enable) | yes (runtime enable) | |
| t8122-j433 | t8122 | disabled | okay | - | T8122 | no (module: no profile) | yes (runtime enable) | YES |
| t8122-j434 | t8122 | disabled | okay | - | T8122 | no (module: no profile) | yes (runtime enable) | YES |
| t8122-j504 | t8122 | disabled | okay | - | T8122 | no (module: no profile) | yes (runtime enable) | YES |
| t8132-j604 | t8132 | disabled | okay | - | T8132 | no (module: no profile) | yes (runtime enable) | YES |
| t8132-j623 | t8132 | disabled | okay | - | T8132 | no (module: no profile) | yes (runtime enable) | YES |
| t8132-j624 | t8132 | disabled | okay | - | T8132 | no (module: no profile) | yes (runtime enable) | YES |
| t8132-j773g | t8132 | disabled | okay | - | T8132 | no (module: no profile) | yes (runtime enable) | YES |
| t8140-j700 | t8140 | okay | okay | T8140 | T8140 | yes | yes | |
| t8142-j704 | t8142 | absent | absent | - | T8142 | no (module: no profile) | no (no SEP node) | profile only |
The full 66-board table and the scripts that produced it are kept with the lane's evidence.
Assisted-by: LLM (Claude:Opus 5.5)