Skip to content

crypto: apple: SIO AES revision 5 (T6040, T8140) + J616s enable - #1622

Merged
RyanTheTide merged 3 commits into
integration/aurorafrom
aesj6/apple-aes-rev5
Nov 12, 2026
Merged

RyanTheTide merged 3 commits into
integration/aurorafrom
aesj6/apple-aes-rev5

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Adds the revision 5 SIO AES engine (T6040, T8140) to the apple-aes skcipher driver and enables it on the J616s. The J700 node stays disabled in this PR.

  • crypto: apple: rev 5 takes 42-bit DMA addresses, and its SIO DART window starts above 4 GiB. The driver now fills the upper address word of the crypt command: source bits 41:32 in the upper half, destination bits 41:32 in the lower half. Each SoC entry carries its DMA width. Rev 5 uses 42 bits; rev 3 (T6000, T8112) stays on the 32-bit mask, so its upper word is still zero. Probe fails if the bounce buffer lies outside the width. The crypt length field is 24 bits.
  • soc: apple: removes the probe-only SIO AES diagnostics driver, which matched the same two compatibles.
  • arm64: dts: apple: t6040-j616s: enables crypto@42900c000 and its power state (ps_aes was disabled).

Tests used integration c6c15ac plus these three commits. The J616s ran with its live DTB plus the two status changes, which is the same delta as this branch's j616s DTB.

J616s (rev 5) M2 (rev 3)
probe rev 5, 42-bit DMA, bounce IOVA 0x3ff_fff80000 (upper word 0x03ff03ff) rev 3, 32-bit DMA, bounce IOVA 0xfff80000
boot testmgr ecb/cbc/ctr passed passed
default ecb/cbc/ctr(aes) aes-ce (300 vs 150) aes-ce (300 vs 150)
dm-crypt apple-sio <-> aes-ce, ecb/cbc/ctr x 512/4096 B sectors, 128 MiB each 6/6 6/6
traffic through the engine 2.43 GB, 2.67 M requests, 0 errors 2.43 GB, 2.67 M requests, 0 errors
DART faults / AVC / failed units 0 / 0 / 0, Enforcing 0 / 0 / 0, Enforcing
s2idle (apple-pmu-rtc), then a round trip 3/3, pass 3/3, pass
dm-crypt aes-256, 4 KiB sectors engine 44-47 MB/s (cbc encrypt 13 MB/s) vs aes-ce 0.66-2.3 GB/s engine 53-56 MB/s (cbc encrypt 16 MB/s) vs aes-ce 0.45-2.5 GB/s

checkpatch --strict is clean apart from the From/Signed-off-by address note.

🤖 Generated with Claude Code

The revision 5 SIO AES engine on T6040 and T8140 takes DMA addresses up
to 42 bits wide, and its SIO DART window starts above 4 GiB, so the
32-bit DMA mask the driver used could never be satisfied there and the
upper address word of the crypt command has to be filled in.

The upper address word carries bits 32 and up of the source address in
its upper half and of the destination address in its lower half. Build
it from the bounce buffer address once at probe and refuse a buffer the
engine cannot reach. Each SoC entry now carries its DMA width: 42 bits
on revision 5, and 32 bits on revision 3, which keeps that word at zero
as before.

The crypt length field is 24 bits wide; the 512 KiB bounce buffer stays
well inside it.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The skcipher driver now binds the T6040 and T8140 AES nodes, the only
ones this driver matched. Two drivers for one compatible would race for
the device, and the skcipher driver already reports the engine readiness
word at probe.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The skcipher driver now drives the revision 5 engine. Enable the engine
and its power state on the J616s.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide merged commit cb137ac into integration/aurora Nov 12, 2026
8 checks passed
@RyanTheTide
RyanTheTide deleted the aesj6/apple-aes-rev5 branch November 12, 2026 03:12
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