Skip to content

soc: apple: sep: Admit the K114s to the T6050 profile - #2115

Open
chrisohearn wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
chrisohearn:soc-apple-sep-admit-k114s
Open

chrisohearn wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
chrisohearn:soc-apple-sep-admit-k114s

Conversation

@chrisohearn

@chrisohearn chrisohearn commented Nov 17, 2026 •

Copy link
Copy Markdown

Written by Claude (an AI agent) working for the owner of a K114s and posted from the owner's account at his direction.

The K114s (MacBook Pro 14-inch, M5 Pro, OLED; Mac17,13) has the J714s's Secure Enclave and Touch ID sensor, but apple_sep's T6050 profile admits only apple,j714s and apple,k116s, so the driver refuses it with ENODEV. This adds apple,k114s the way #1649 added the K116s: the match, the profile name and a KUnit case. Three lines.

The K114s ADT (read-only, agent-run on the Mac)

Every value the J714s sensor and SEP nodes of #1587 use matches this Mac's ADT. A checker compared 19 facts with a compiled tree that switches those nodes on:

  • sensor /arm-io/spi2/mesa, sensor-id 0x3356 (V3), 8 MHz, chip select 0;
  • spi2 at 0x505108000 + 0x4000, interrupt 1369, the 24 MHz reference clock;
  • power on nub-gpio0 pin 21, data ready on AP GPIO 138;
  • SEP at 0x502600000 + 0x88000 and 0x502050000, mailbox interrupts 533 to 536;
  • dart-sep at 0x500b80000, interrupt 543, window 0x10000004000 + 0xffff0000.

Tests

  • Built on integration/aurora 677be395b9 with clang 23.1.3 and CONFIG_APPLE_SEP_KUNIT_TEST=y: exit 0, no warnings in drivers/soc/apple.
  • KUnit in QEMU (virt, TCG, modprobe apple-sep): 0 not ok across 91 suites (640 pass, 1 skip). apple_sep_profile passes 7/7, including t8132_selection_is_limited_to_the_m4_airs, which holds the new case.
  • checkpatch --strict: 0 errors. Its only warnings are about the Co-Authored-By trailer.

On the K114s (agent-run, the owner at the Mac for the touches)

These ran on a K114s kernel (v272-11 base) carrying the same patch, with a tree that enables spi2, nub_gpio0, the SEP mailbox and power domains, the sensor node and the sep alias.

Read-only first (xart_writes=0 provision_keybag=0):

  • SEP platform profile: T6050/J714s, K116s, K114s, warm bootstrap;
  • ready in 1432 ms: 13 endpoints, key store open, hwrng registered;
  • one APFS .gl extent with 11 valid records, writes disabled.

Then with writes on, the defaults:

  • Keybag: xART guard level 1: 9 session records exist, 0 created by Linux, then sks: identity keybag provisioned, and trusted keys work after 2 s. The xART record list was unchanged before and after (11 records: same slot, kind, length and revision, CRCs valid), so no record's metadata changed while the keybag was created, as on the J413. Payload bytes were not compared.
  • Calibration: aurora-touchid-setup built apple/mesacal-k114s.bin and apple/msrk-k114s.bin from the Mac's own factory data.
  • Enrolment: the sensor bound at 8 MHz, mode 2. The right index enrolled (enroll-completed).
  • Matching: verify-match with that finger, verify-no-match with another. Guard refusals: 0. After enrolment and matching, the 9 pre-Linux session records (8 of kind 4, 1 of kind 3) and the kind-2 record are unchanged in slot, length and revision; one kind-1 shared root record moved from revision 722 to 750 (a later snapshot: revision 759, rewritten to a fresh slot). A wrong finger is also refused in a later boot.
  • Reboot: Touch ID: restored 1 enrolled identity/identities; enrolment survived reboot, then verify-match again.
  • Desktop: sudo and the lock screen accept the finger (owner-observed).

Not tested

Edited 2026-11-17: the xART lines now say what the comparison shows (record metadata, not bytes), and the record counts are corrected after an independent check.

The K114s (MacBook Pro 14-inch, M5 Pro, OLED; Mac17,13) ADT describes
the J714s's SEP: iop-sep at 0x502600000 and 0x502050000 (interrupts
533 to 536), dart-sep at 0x500b80000 with vm-base-0 0x10000004000 and
vm-size-0 0xffff0000, and the Mesa sensor (sensor-id 0x3356, V3) on
spi2 at 0x505108000, 8 MHz, powered by nub-gpio0 pin 21 with data
ready on AP GPIO 138. Those are the values aurora-silicon#1587 validated on the
J714s and aurora-silicon#1649 admitted for the K116s, so the K114s takes the T6050
profile as the K116s does.

With the profile and a tree that enables the SEP and the sensor, the
driver attaches on a K114s read-only (xart_writes=0
provision_keybag=0): warm bootstrap, 13 endpoints, key store open,
hwrng registered, one APFS-resolved .gl extent with 11 valid records.

Link: aurora-silicon#1649
Assisted-by: LLM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: chrisohearn <137103567+chrisohearn@users.noreply.github.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T02:42:50.245665Z b5efdaf PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

chrisohearn added a commit to chrisohearn/omarchy-m5p-oled that referenced this pull request Nov 17, 2026
…176)

* Touch ID works on the K114s: trial, enrolment and PAM recorded (#49)

docs/r3-touchid.md records phases 3 to 7 of 2026-11-16: the unattended
trial boot, the read-only load, the backups (one off the Mac), the
promoted Touch ID Stage 2, the keybag (guard level 1, no xART write),
enrolment of the right index, match and no-match, the restore after a
reboot, and sudo, polkit and the lock screen through Omarchy's own PAM
setup. The upstream profile line is aurora-silicon/linux#2115. README
and the matrix row say working; macOS Touch ID is the owner's check at
the next macOS boot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Touch ID record: keep the macOS check open and claim only what was tested

Review of #176: phases 5 and 6 stay open for the macOS boot check, and
phase 6 says the enrolment was restored without re-enrolling. Only the
keybag creation left xART unwritten; enrolment and matching updated one
shared root record. sudo and the lock screen are owner-tested, polkit is
configured but untried. The undo runs as root and removes the new
polkit-1 file. The read-only check expects the 12 endpoints macOS lists
plus srep.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for checking the K114s ADT so carefully, and for the read-only-first test sequence.

This adds apple,k114s to a list of board names in drivers/soc/apple/profile.rs:706-708. That works, but each new T6050 board then needs another patch. We select behaviour by a hardware or device-tree property rather than by the list of machines it was tested on, and here the device tree already describes the hardware: the apple,t6050 SoC compatible, plus the SEP mailbox and the fingerprint@0 sensor node on spi2. Could select() return the T6050 profile for apple,t6050 whenever those nodes are present, and take the sensor controller address from the DT node rather than the profile? A T6050 board without the nodes would still get -ENODEV, so nothing becomes fail-open.

The branch also needs a rebase. We can run no-regression rows on our other Macs if that helps.

@RyanTheTide

Copy link
Copy Markdown
Contributor

A follow-up to the earlier note on the board list. We are changing select() so that the T6050 profile is picked by apple,t6050, and the device tree's SEP and sensor nodes decide whether anything binds. With it, adding apple,k114s to profile.rs is no longer needed, and the branch's conflict there goes away.

What the K114s still lacks at the current tip is the device tree: in t6050-k114s.dts the SEP mailbox, ps_sep and spi2 are disabled, there is no sep alias and no sensor node. So the change that brings Touch ID to the K114s is the follow-up you offered. Could this PR carry it instead of the profile line? That means the J714s block (t6050-j714s.dts:498-556: sep_mbox, ps_sep and the two firmware-owned fabric parents, ps_nub_gpio/nub_gpio0, ps_spi2, spi2 with fingerprint@0), the sep alias, pin 138 opened in gpio-reserved-ranges, and firmware-name = "apple/mesacal-k114s.bin", "apple/msrk-k114s.bin". Please rebase onto integration/aurora and drop the profile.rs hunk.

Your hardware results already cover most of the row. At the new head we would ask for:

  • cold boot: SEP ready, sensor registered;
  • fprintd-enroll, then fprintd-verify match and wrong-finger verify-no-match;
  • three deep sleeps, each followed by a first-try fprintd-verify match and no SEP, SPI or DART errors in dmesg.

Until that change is merged, keep the profile.rs line as a local commit for the test only. After that we will run no-regression rows on our A18 Pro (Neo) and M4 Pro machines.

@RyanTheTide

Copy link
Copy Markdown
Contributor

A short follow-up: the change to pick the SEP profile by SoC is now #2311. With it, the apple,k114s line in profile.rs is no longer needed, so this PR can drop that hunk and carry the K114s SEP, spi2 and sensor device tree instead, as described above. The row at the new head is the same: cold-boot SEP ready and sensor registered, fprintd-enroll then match and wrong-finger verify-no-match, and three deep sleeps each followed by a first-try match with no SEP, SPI or DART errors. Testing on top of #2311 instead of a local profile commit is fine.

One more K114s row, for thermal (PMP): the ADT board-id and dram-vendor-id from the K114s. Once the pmp0 DT lands: the PMP probe log, then stress-ng --cpu 0 for 5 minutes, showing cpufreq capping as the fast-die sensor nears its trip.

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.

2 participants