Repository navigation
soc: apple: sep: Bring up the M5 Pro (J714s) Secure Enclave - #1325
Merged
Merged
Conversation
…ilbox node The T6050 SEP was described from the ADT with its four mailbox interrupts on its own node and had to stay disabled. Its mailbox is an ASC v4 mailbox at the SEP + 0x8000, as on the other SoCs, so describe it as its own node there and require mboxes for every SEP. T6050 keeps its second reg and its clock. Signed-off-by: Diljit Singh <hey@djdev.me>
iBoot hands over a running SEP on the M5 Pro (sepfw-booted in the J714sAP ADT). Describe what apple_sep needs to attach to it: the ASC v4 mailbox at the SEP + 0x8000, with the first four ADT interrupts in mailbox order (533 to 536: send empty, send not empty, receive empty, receive not empty), and the DMA window iBoot programmed in the SEP DART (dart-sep vm-base-0 0x10000004000, vm-size-0 0xffff0000), which T8140 has too. Everything stays disabled: a board enables the mailbox, and apple_sep enables the SEP and its DART when it loads. Signed-off-by: Diljit Singh <hey@djdev.me>
The J714sAP ADT (26A428) describes the enclave as J616s's: pre-booted (sepfw-booted), an iop-sep,ascwrap-v6 SEP behind a DART whose window starts at the BIT(40) alias (vm-base-0 0x10000004000, 0xffff0000 long), and J700's Mesa sensor (sensor-id 0x3356) on spi2, here at 0x505108000, 8 MHz, chip select 0. Take T6040's profile with that sensor bus. Signed-off-by: Diljit Singh <hey@djdev.me>
iBoot starts the enclave, and the enclave gates its own domain for a sleep (DEV_DISABLE in the state word, which macOS clears at the wake). Its state word idles at actual 0 under auto-enable while it runs, so the pwrstate driver would take it for off and write it. Mark it firmware-owned: genpd keeps it on and never touches the register, and the SEP driver reads the word itself. Signed-off-by: Diljit Singh <hey@djdev.me>
The boot loader finds the SEP by the path a board's sep alias gives. The inventory puts it in the unit-less soc node, and "/soc" names soc@200000000 first, so such a path never reaches it, and the loader could not reserve the SEP firmware or add its manifests. Move the SEP, its mailbox and its DART into die 0's soc node, whose ranges cover them. Signed-off-by: Diljit Singh <hey@djdev.me>
The boot loader finds the SEP through the sep alias: it reserves the SEP firmware (ADT memory-map SEPFW) and adds the iBoot and local policy manifests the enclave needs to open the machine's secure storage. Without them apple_sep refuses to attach. J616s has the same alias. Signed-off-by: Diljit Singh <hey@djdev.me>
DjDeveloperr
force-pushed
the
djdev/t6050-sep
branch
from
November 9, 2026 12:32
4afb408 to
c7a700e
Compare
Contributor
Author
|
Retested before merging on the M5 Pro (J714sAP, bare metal, SSD boot), kernel 7.3.0-m5-merge: the M5's integration kernel with this round's rebased heads in place of the old ones (every PR's own patch identical to what is merged; logs in work/m5-pr-merge-20261109). CI green. Before merging, this round (these 14 PRs, #1323 and the rebased #1254/#1306/#938/#1316/#1199) was test-merged in order onto integration/aurora f9cf6f9 with no conflicts:
🤖 Generated with Claude Code |
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.
Adds the M5 Pro (J714s, T6050) to apple_sep: a platform profile and the device-tree pieces the driver needs to attach to the enclave iBoot leaves running.
mboxeslike every other SoC; the "must stay disabled" branch goes.dart-sepvm-base-0 0x10000004000, vm-size-0 0xffff0000, as on T8140).ps_sepisapple,firmware-owned. The enclave idles at actual 0 under auto-enable and gates itself for a sleep, so the pwrstate driver must not take it for off and write it.soc@200000000. aura resolves thesepalias by path, and/socnamessoc@200000000first, so a node in the unit-lesssoccan't be reached.sepalias, through which aura reserves SEPFW and adds the iBoot and local-policy manifests. Without them the driver refuses to attach./arm-io/spi2).Everything stays disabled in-tree, following the T6050 inventory convention. A board or kit DT enables
sep_mboxandps_sepwith its two fabric parents.Tested on hardware (J714sAP, 2026-11-09)
RAM-booted kit kernel (these commits on the M5 kit base, with the s2r series under them), NVMe block devices read-only,
xart_writes=0 provision_keybag=0:SEP platform profile: T6050/J714sAPFS-resolved .gl extent (base 0x4df000); 170 slots, 14 live records, max revision 3067, 0 malformed ... writes disabledhwrng: registered after ready-phase survey (attempt 1)Nothing was written to xART or the macOS volumes.
Offline: dt_binding_check for apple,sep.yaml passes; all eleven T6050 board DTs compile; SEP KUnit (on the kit base) 214 of 215 pass, 1 skipped (an unrelated G17 test that needs UCLAMP_TASK).
Not covered: Touch ID on J714s (sensor node, spi2 clock and power, calibration and root-key files, keybag provisioning).
🤖 Generated with Claude Code