Skip to content

arm64: dts: apple: t6050-j714s: Add the Touch ID sensor (and read its factory seal) - #1587

Merged
DjDeveloperr merged 3 commits into
integration/aurorafrom
m5-parity/t6050-touchid
Nov 12, 2026
Merged

DjDeveloperr merged 3 commits into
integration/aurorafrom
m5-parity/t6050-touchid

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Touch ID on the MacBook Pro 14" M5 Pro (J714s). The T6050 SEP profile was already in integration (#1325). Two gaps kept the sensor from coming up:

  1. Device tree. The J714s DT didn't describe the sensor.
    • The ADT puts J616s's Mesa sensor (sensor-id 0x3356) on spi2 at 0x505108000: 8 MHz, chip select 0, power on NUB GPIO 21 (function-mesa_pwr), data ready on AP GPIO 138.
    • nub_gpio0 is now a GPIO and interrupt controller, as on T604x. Its power state comes from the always-on PMGR (ADT NUB_GPIO, 0x288300088).
    • On the J714s: that bank, spi2 and its power state are enabled, and fingerprint@0 is added with J616s's timing and SPI mode.
    • AP GPIO 138, the data-ready line, is exposed in the board's gpio-reserved-ranges, next to the pins J714s: sound through the AOP (speakers and headphone jack) #1554 exposes. While it was reserved, gpiolib refused the mapping (didn't like hwirq-0x8a ... (rc=-6)) and the sensor had no interrupt. Pin 112 and everything else stay reserved.
    • spi2 runs from the 24 MHz reference: ADT clock-ids 451 is 24 MHz in the arm-io clock table, the same as clkref. The PMGR clock provider it named has no driver.
  2. aurora-touchid-setup. It refused this Mac's factory seal, so it couldn't rebuild the calibration and the sensor root key.
    • The seal's IM4M holds its MANB objects in a SEQUENCE, not the SET image manifests use, and it names a record kind once per record (two scrt).
    • The parser now accepts a SEQUENCE. A name repeated there keeps no properties, so nothing is admitted from it; a duplicate in a SET is still refused.
    • The seal is still embedded unchanged, so the enclave checks the factory bytes as before.
    • The distro packages carry byte-identical copies of this tool and pick the fix up when they sync.

Validation on the J714s

Rebased onto integration/aurora e3fb611 (after #1554). With phandles kept symbolic, the J714s DTB differs from the base only by the Touch ID nodes, spi2 and its power state, nub-gpio0, and pin 138.

The kernel was 7.3.0-m5-intg2. A chainloaded lab boot used a DTB built from this branch: the default DTB plus exactly these nodes. apple-sep and spi-apple came from integration cdd7ccf. SEP ran as the working machines run it: xart_writes=1 provision_keybag=1, the platform's guard (level 1).

Check Result
Bring-up nub-gpio0 binds apple-gpio-pinctrl. The sensor binds at 8 MHz, mode 2, with hardware CS timing 20 ns. The SEP has 12 endpoints.
Setup aurora-touchid-setup rebuilt mesacal-j714s.bin and msrk-j714s.bin from the factory records; the second run reports "identical to the rebuild".
Enrol, first boot fprintd enrolled the right index (about 12 touches); the enclave reports 1 identity.
After a reboot "Touch ID: restored 1 enrolled identity; enrolment survived reboot".
Enrol, after the reboot The left index enrolled.
Verify, after the reboot The right index matched.
Wrong finger Another finger was rejected (verify-no-match).
Tests tests/test_touchid_setup.py passes 50/50; the new cases fail on the old parser.
DT No new dtc warnings. The other T6050 boards build, and ADT coverage for J716s and J873s is unchanged.

Capture currently polls: the driver logs "no data-ready interrupt" even with the node's interrupt described. That's a follow-up; enrol and match work either way.

SEP state written in the validation runs

  • xART. The guard was at level 1 throughout: 12 session records before and after, none created by Linux, no refusals, and the keybag creation window was never used. No existing session record was rewritten or deleted. Only the shared root records advanced (14 live records throughout).
  • Enclave. One identity keybag and the machine ref-key were created, two fingers were enrolled, and lockout records were saved.
  • Linux root. The driver's own state under /var/lib/aurora-sep*, plus fprintd's records.
  • Not touched. No xART payload was read or copied, and no macOS volume was written.
  • Default boot. The default command line still runs SEP read-only.

🤖 Generated with Claude Code

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

The source failure is integration's own, not this PR's. tools/aurora-sep/tests/test_log_ratelimit.py fails on integration/aurora 6626776 by itself. Two dev_info! calls in sbio.rs ("bringing the sensor up afresh instead of reusing it" at 2671, "the sensor reset under the capture" at 3048, both from #1536) sit on the request path that the rate-limit test (from the sep-log-ratelimit-v2 branch) checks. This PR doesn't touch sbio.rs. Its own test file, tests/test_touchid_setup.py, passes 50/50.

The J714s ADT puts the Mesa sensor J616s carries (sensor-id 0x3356) on
spi2 at 0x505108000: 8 MHz, chip select 0, power on NUB GPIO 21
(function-mesa_pwr) and data ready on AP GPIO 138. apple_sep already
has the T6050 profile for it; the device tree did not describe the
sensor, so Touch ID never came up.

Make the inventory's nub-gpio0 a GPIO and interrupt controller, as on
T604x, with its power state from the always-on PMGR (ADT NUB_GPIO,
0x288300088). On the J714s enable it, spi2 and its power state, and add
the fingerprint node with the J616s timing and SPI mode. spi2 runs from
the 24 MHz reference (ADT clock-ids 451), as on T604x; the PMGR clock
provider it names has no driver.

The board's AP GPIO bank exposes only the pins its nodes name (pin 112
takes an SError when read). Expose 138 as well: while it was reserved,
gpiolib refused the data-ready interrupt's mapping and the sensor had
no interrupt.

Signed-off-by: Diljit Singh <hey@djdev.me>
On the MacBook Pro M5 Pro (J714s) the factory seal on the Hardware
volume carries its manifest objects in a SEQUENCE under MANB, not the
SET that image manifests use, and it names a record kind once per
record of that kind: this Mac has two scrt records, so scrt appears
twice. Every object and property is otherwise as before. The parser
refused the seal ("malformed MANB", then "duplicate or malformed
manifest object"), so neither the calibration nor the sensor's root key
could be rebuilt and Touch ID could not start.

Accept a SEQUENCE. In it, a repeated object name keeps no properties,
so nothing (a digest, the serial number) is ever admitted from an
ambiguous object; a duplicate in a SET is still refused. The seal is
still embedded unchanged in the rebuilt record, so the enclave
verifies the factory bytes as before.

Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr
DjDeveloperr merged commit 554c6d1 into integration/aurora Nov 12, 2026
5 checks passed
@RyanTheTide
RyanTheTide deleted the m5-parity/t6050-touchid branch November 16, 2026 05:10
DjDeveloperr added a commit that referenced this pull request Nov 20, 2026
SEP writes are always on: apple_sep no longer has the xart_writes or
provision_keybag parameters (the previous commits of #2591), so there is
nothing for the loader to set. load-driver now runs a plain
"modprobe apple_sep". Passing the two values on its command line also
gave each of them twice next to a stale apple_sep.xart_writes= on the
kernel command line, and kernels from before #2591 then refused to load
the driver.

The aurora-sep status check and aurora-sep-ready no longer name
xart_writes=0 as a cause of disabled xART writes. They name only the
fail-closed causes: the key-store-only initrd phase or a failed writable
reopen, and a gigalocker that did not validate for writing.
aurora-sep-ready keeps the "xART writes are disabled" prefix that the
NixOS lifecycle check looks for.

README.md, XART-SAFETY.md and M1-SUPPORT.md no longer offer a read-only
setting. XART-SAFETY.md's "Current default" section becomes "SEP writes
are always on", and the m2fix5 opt-in is described as history.

The Fedora and Arch packages ship these files, so they get a new release
(1-13 and pkgrel 18).

Owner directive (2026-11-20): no machine or distro should have SEP
writes off. The write path was proven on T6050 in the 11-11 J714s
Touch ID lab boots (#1587, 554c6d1).

Signed-off-by: Diljit Singh <hey@djdev.me>
DjDeveloperr added a commit that referenced this pull request Nov 20, 2026
SEP writes are always on: apple_sep no longer has the xart_writes or
provision_keybag parameters (the previous commits of #2591), so there is
nothing for the loader to set. load-driver now runs a plain
"modprobe apple_sep". Passing the two values on its command line also
gave each of them twice next to a stale apple_sep.xart_writes= on the
kernel command line, and kernels from before #2591 then refused to load
the driver.

The aurora-sep status check and aurora-sep-ready no longer name
xart_writes=0 as a cause of disabled xART writes. They name only the
fail-closed causes: the key-store-only initrd phase or a failed writable
reopen, and a gigalocker that did not validate for writing.
aurora-sep-ready keeps the "xART writes are disabled" prefix that the
NixOS lifecycle check looks for.

README.md, XART-SAFETY.md and M1-SUPPORT.md no longer offer a read-only
setting. XART-SAFETY.md's "Current default" section becomes "SEP writes
are always on", and the m2fix5 opt-in is described as history.

The Fedora and Arch packages ship these files, so they get a new release
(1-13 and pkgrel 18).

Owner directive (2026-11-20): no machine or distro should have SEP
writes off. The write path was proven on T6050 in the 11-11 J714s
Touch ID lab boots (#1587, 554c6d1).

Signed-off-by: Diljit Singh <hey@djdev.me>
DjDeveloperr added a commit that referenced this pull request Nov 20, 2026
SEP writes are always on: apple_sep no longer has the xart_writes or
provision_keybag parameters (the previous commits of #2591), so there is
nothing for the loader to set. load-driver now runs a plain
"modprobe apple_sep". Passing the two values on its command line also
gave each of them twice next to a stale apple_sep.xart_writes= on the
kernel command line, and kernels from before #2591 then refused to load
the driver.

The aurora-sep status check and aurora-sep-ready no longer name
xart_writes=0 as a cause of disabled xART writes. They name only the
fail-closed causes: the key-store-only initrd phase or a failed writable
reopen, and a gigalocker that did not validate for writing.
aurora-sep-ready keeps the "xART writes are disabled" prefix that the
NixOS lifecycle check looks for.

README.md, XART-SAFETY.md and M1-SUPPORT.md no longer offer a read-only
setting. XART-SAFETY.md's "Current default" section becomes "SEP writes
are always on", and the m2fix5 opt-in is described as history.

The Fedora and Arch packages ship these files, so they get a new release
(1-13 and pkgrel 18).

Owner directive (2026-11-20): no machine or distro should have SEP
writes off. The write path was proven on T6050 in the 11-11 J714s
Touch ID lab boots (#1587, 554c6d1).

Signed-off-by: Diljit Singh <hey@djdev.me>
AxxzyWasTaken pushed a commit to AxxzyWasTaken/alarm-aurora that referenced this pull request Nov 21, 2026
… the read-only override

Owner directive (2026-11-20): no machine or distribution has SEP writes
off. The 11-11 J714s (M5 Pro, T6050) Touch ID boots ran with writes and
keybag provisioning on and the guard at level 1: the keybag was
provisioned, the enrolment survived a reboot, the enrolled finger
matched, a wrong finger was rejected, and nothing was refused
(aurora-silicon/linux#1587, merged as 554c6d14).

aurora-silicon/linux#2591 removes apple_sep's xart_writes and
provision_keybag parameters, so a stale value on the kernel command line
or in modprobe.d is ignored.

- Remove /usr/lib/modprobe.d/aurora-sep.conf (aurora-sep-modprobe.conf,
  "options apple_sep xart_writes=1 provision_keybag=1"): its PKGBUILD
  source, checksum and package() lines. It existed only so that
  /etc/modprobe.d/aurora-sep.conf could replace it with =0. On kernels
  before #2591 both parameters default to 1, so writes stay on.
- load-driver still runs "modprobe apple_sep" with no options; its comment
  no longer describes an override.
- aurora-sep status: "xART writes are disabled: the store is read-only this
  boot (key-store-only initrd phase, or a failed writable reopen): enrol
  and verify are refused", still a WARN. aurora-sep-ready names only the
  gigalocker that did not validate for writing, under the same "xART
  writes are disabled" prefix.
- XART-SAFETY.md: "SEP writes are always on" replaces "Current default";
  the earlier deployment policy reads as history. README.md no longer
  says aurora-xart reset-touchid refuses on a read-only install. The
  provenance adaptations follow.
- tests/test_sep_modprobe.py, which modelled the read-only override, now
  checks that nothing tracked sets xart_writes or provision_keybag (a
  modprobe.d options line, a modprobe command line or a kernel command
  line), that no PKGBUILD installs a modprobe.d file that sets one, that
  aurora-sep ships only the load-ordering blacklist in modprobe.d (kmod
  agrees), that load-driver passes no options, and that the messages name
  no off switch.

Kept: xart_guard and its xart_guard=0 opt-out, keystore_only, and the
packaged "blacklist apple_sep" in aurora-sep-load.conf (load ordering:
aurora-sep.service always loads the driver).

Signed-off-by: Diljit Singh <hey@djdev.me>
sioodmy pushed a commit to sioodmy/nixos-aurora that referenced this pull request Nov 22, 2026
…he read-only override

Owner directive (2026-11-20): no machine or distribution has SEP writes
off. The 11-11 J714s (M5 Pro, T6050) Touch ID boots ran with writes and
keybag provisioning on and the guard at level 1: the keybag was
provisioned, the enrolment survived a reboot, the enrolled finger
matched, a wrong finger was rejected, and nothing was refused
(aurora-silicon/linux#1587, merged as 554c6d14).

aurora-silicon/linux#2591 removes apple_sep's xart_writes and
provision_keybag parameters, so a stale value on the kernel command line
or in modprobe.d is ignored.

- modules/sep.nix no longer copies sep/aurora-sep-modprobe.conf ("options
  apple_sep xart_writes=1 provision_keybag=1") to
  /run/modprobe.d/aurora-sep.conf. That copy (nixos-aurora#354) existed so
  that a read-only environment.etc."modprobe.d/aurora-sep.conf" could
  replace it, which is no longer offered. The file is removed. With no
  packaged value, nothing gives a parameter twice, which stopped kernels
  before #2591 loading the driver: aurora-silicon#354's problem goes away. On those
  kernels both parameters default to 1, so writes stay on.
- CI: the step that grepped the defaults file now evaluates every profile
  (kde, gnome, minimal) and fails if a modprobe.d entry in environment.etc,
  boot.extraModprobeConfig, boot.initrd.extraModprobeConfig, a tmpfiles
  rule or a kernel parameter names xart_writes or provision_keybag.
- load-driver still runs "modprobe apple_sep" with no options; its comment
  no longer describes an override.
- aurora-sep status: "xART writes are disabled: the store is read-only this
  boot (key-store-only initrd phase, or a failed writable reopen): enrol
  and verify are refused", still a WARN. aurora-sep-ready names only the
  gigalocker that did not validate for writing, under the same "xART
  writes are disabled" prefix that checks/sep-lifecycle.py looks for.
- XART-SAFETY.md: "SEP writes are always on" replaces "Current default";
  the earlier deployment policy reads as history. README.md no longer
  says aurora-xart reset-touchid refuses on a read-only install. The
  provenance adaptations follow.
- tests/test_sep_modprobe.py, which modelled the read-only override, now
  checks that nothing tracked sets xart_writes or provision_keybag (a
  modprobe.d options line, a modprobe command line or a kernel command
  line), that no module mentions either, that the SEP module configures no
  modprobe.d file, that CI checks the evaluated profiles, that load-driver
  passes no options, and that the messages name no off switch.

Kept: xart_guard and its xart_guard=0 opt-out, keystore_only, and
boot.blacklistedKernelModules = [ "apple_sep" ] (load ordering:
aurora-sep.service always loads the driver).

Signed-off-by: Diljit Singh <hey@djdev.me>
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.

1 participant