Repository navigation
J514s: SEP and Touch ID (T6030) - #282
adammharris wants to merge 3 commits into
Conversation
Add the SEP, its DART and mailbox, and spi2 with the Mesa sensor child, as the J514s ADT (system firmware 27.0) records them. The SEP and its DART sit at the same addresses as on T8122, with the same BIT(40) DMA window (vm-base 0x10000004000, vm-size 0xffff0000); the mailbox takes AIC 366-369 and the DART AIC 372. spi2 is at 0x289108000 on AIC 876. Everything stays disabled: apple_sep enables the SEP and its DART when it loads, and boards enable the mailbox, the bus and the sensor. Assisted-by: LLM Signed-off-by: Adam Harris <amh421@icloud.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Enable the SEP mailbox, spi2 and the Mesa sensor (0x3352) on the 14" M3 Pro. Per the J514s ADT, the sensor is powered from NUB GPIO 33, active high. As on J613, its data-ready line (AP GPIO 200) is left out and the driver polls. The calibration comes from this Mac's own iBoot system container as apple/mesacal-j514s.bin. J516s shares the SoC, but its sensor wiring is unchecked, so it stays off. Assisted-by: LLM Signed-off-by: Adam Harris <amh421@icloud.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The J514s SEP is pre-booted by iBoot and speaks the variant-5 key store, and its sensor is the same 0x3352 part T8122 carries, in SPI mode 1. So J514s takes the T8122 profile with its own spi2 base, including the wide DMA mask and xART guard level 1 from the first boot. Only J514s is matched; the other T6030 Mac (J516s) has not had its ADT read. Add a test that checks the J514s device tree against the ADT values and that J516s leaves the SEP and the sensor off. Tested on J514s, system firmware 27.0, with macOS on the same disk: - the SEP attaches warm and advertises 12 endpoints - the keybag is provisioned; the guard protects all 10 existing macOS session records and has refused nothing - the sensor answers 18 ms after power-on and registers its serial - enrolment and a match work, and a match still works after a reboot and after suspend - macOS Touch ID still works afterwards Assisted-by: LLM Signed-off-by: Adam Harris <amh421@icloud.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hi, I'm running a J514s (14" M3 Pro) on Omarchy 4.5.0rc3, and Touch ID isn't detected on the current packages. As expected, the tree has no SEP or Mesa node, and there's no Is anything blocking this PR? For example, a review concern, or more hardware results needed before merging? I can test on my J514s if that would help. Also, once this lands, My setup
Drafted with an AI assistant (Claude Code); I reviewed it before posting. |
|
Hi @adammharris, a question on the Secure Enclave bring-up for the M3 Max, since #282 is the template I'm following. I read the J516C (MacBook Pro 16" M3 Max, T6031) hardware description from the Mac, read-only, and wrote the SEP, mailbox, DART, spi2 and sensor nodes for it, built and test-booted with the driver not loaded. Two values I'd like your eyes on before anyone loads it:
Everything else (mailbox address and interrupts, power GPIO) I inferred from the M3 Air layout and marked as unverified. Happy to share the diff. |
|
@malik-na Thanks for building on this. 1. The window size matters. The SEP driver doesn't read it, but apple-dart does: it sets the aperture end from apple,dma-range, and iommu-dma allocates downward from there. On my J514s the registered shmem IOVA is 0x100fff80000, right at the top of the 0xffff0000 window. So use the J516C's own ADT value rather than mine. Your 0x3ff00000 matches t6040.dtsi, so it's worth double checking that it came from the J516C's dart-sep node.
Good luck with the M3 Max work! |
|
Tested this on a second J514s (14" M3 Pro), Omarchy 4.5.0, macOS on the same disk. It works here. Build:
iBoot1 here is One thing outside this PR: Drafted with an AI assistant (Claude Code); I reviewed it before posting. |
|
Thanks a lot for the thorough J514s test, this is really useful. Enrol, match, reboot, suspend and macOS Touch ID afterwards all working is exactly the coverage this needed. One small thing I'd like to add before I'm comfortable with it: you mention you did the read-only first load ( I'm mainly after the "IMG4 acknowledged" line and any "xART refused write" lines (there shouldn't be any on a read-only boot, and none in the guarded one either, going by what you said about 0 refusals). If you still have the journal from that first boot, that's ideal; if not and it's no trouble to redo a read-only boot from a fresh state, that works too, but don't wipe your enrolment for it. Also noted on the Thanks again for taking the time. |
|
Here is the read-only first load, from the journal of that boot (still on disk, so nothing was redone and the enrolment was not touched). The driver was loaded by hand with
|
|
A note on the suspend correction above: from the user side the Mac did look like it went to sleep (that is why I first reported the test as passing), while the journal shows Drafted with an AI assistant (Claude Code); I reviewed it before posting. |
|
Thanks for the log and for the correction. Yes, a suspend retest would be a nice extra, but only if it's no trouble: adammharris already saw a match work after suspend on his J514s, so this isn't blocking anything. On the refusal: Two questions, if you can: was a display, dock or USB-C display cable plugged in during those two attempts? If you retest, please do it with nothing attached, and grab: plus whether a fingerprint match still works after a real resume. If it still refuses with nothing attached, that's worth its own issue. Don't wipe your enrolment for it. |
|
Thanks for tracking that down. Yes: during those two attempts a display was plugged in over a USB-C cable, so the refusal matches what you describe and is unrelated to this PR. I'll redo the suspend test with nothing attached when I get a chance (the Mac is back on the stock kernel for now, so it means reinstalling the patched one; the existing enrolment stays), and post the Drafted with an AI assistant (Claude Code); I reviewed it before posting. |
|
Suspend retest done, this time with nothing attached (no USB-C display, lid close/open). Setup: same J514s, linux-aurora 7.2.11.aurora14 + this series, same keybag as on Nov 10 ( One caveat: I could not keep the original enrolment. My own cleanup on Nov 10 ran Result:
Kernel log around the resume: So suspend/resume is now tested and working here. Next I'll build the 7.3 branch from aurora-silicon/linux#1691 and report there. Drafted with an AI assistant (Claude Code); I reviewed it before posting. |
|
Retest on the current series, on top of
Test setup
Testing and write-up assisted by Claude Code. |
Touch ID on the 14" M3 Pro MacBook Pro (J514s, T6030).
Changes
t6030.dtsi: adds the SEP, its DART and mailbox, and spi2 with the Mesa sensor child, all disabled. The SEP and its DART sit at the same addresses as on T8122, with the same BIT(40) DMA window (vm-base0x10000004000,vm-size0xffff0000). The mailbox uses AIC 366–369, the DART AIC 372, and spi2 is at 0x289108000 on AIC 876.t6030-j514s.dts: enables the mailbox, spi2 and the sensor. Power is NUB GPIO 33, active high. As on J613, the data-ready line (AP GPIO 200) is left out and the driver polls. The calibration comes from the Mac's own iBoot system container asapple/mesacal-j514s.bin.soc: apple: sep: adds aT6030profile, which isT8122with J514s's spi2 base. The J514s sensor is the same 0x3352 part, in SPI mode 1, with the variant-5 key store and xART guard level 1 from the first boot. Onlyapple,t6030+apple,j514sis matched. J516s shares the SoC, but its ADT hasn't been read, so it stays off.tools/aurora-sep/tests/test_t6030_sep.py: checks the compiled J514s tree against the ADT values, checks that J516s leaves the SEP and sensor off, and checks the profile match.The values come from the J514s ADT (
ioreg -p IODeviceTree, system firmware 27.0) with the/arm-iobase of 0x210000000 added. The mailbox interrupts follow the ascending order the T6030 SIO mailbox already uses for its ADT list.Testing
J514s, system firmware 27.0, with macOS on the same disk.
xart_writes=0 provision_keybag=0): the profileT6030/J514sis selected, the SEP attaches warm and advertises 12 endpoints, and the key store opens./dev/sep-biois published and the sensor's SPI driver binds at 8 MHz, mode 1. Nothing is written.REGISTER_SERIAL,SESSION_SHAREandSESSION_COMMITcomplete.fprintd-enrollandfprintd-verifywork with Aurora's libfprint.test_t6030_sep.pyandtest_t8122_sep.pypass with the kernel'sdtc.t6030-j514s.dtbandt6030-j516s.dtbbuild withW=1and no new warnings.The hardware test ran on this change applied to an omacom-based 7.2.11 J514s tree. It is the same diff apart from the profile's doc comment.
Not tested:
The same change for the 7.3
aurora-wiptree is in aurora-silicon/linux#581.🤖 Generated with Claude Code