Skip to content

J813: T8142 mailbox, PMC, CLPC (GPU input) and PMP - #808

Closed
sithglan wants to merge 5 commits into
aurora-silicon:integration/aurorafrom
sithglan:j813/feat/soc
Closed

sithglan wants to merge 5 commits into
aurora-silicon:integration/aurorafrom
sithglan:j813/feat/soc

Conversation

@sithglan

@sithglan sithglan commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

T8142 (M5) support in the SoC drivers, added to integration's versions:

  • mailbox: the GPU's two ASCWrap v6 firmware CPUs (T8140's windows moved up by 0x100000000, like T6050's role table). Without it the GPU's mailboxes never bind.
  • pmc: the T8142 table (three rails, DCS 0-7, fabric 0-4).
  • clpc: the T8142 map, and a per-SoC gpu_input flag: the CLPC only handed out the GPU input for the t6041 compatible or a gpu_dense table, so on T8142 the GPU driver waited for it forever. T6040 moves to the flag.
  • pmp: T8142 (42-bit DMA as on T8140, endpoint 7 before the IOP power state as on T6041).

Tested on the MacBook Air 13-inch M5 (J813): all seven J813 branches (nvme, platform, dts, soc, wireless, media, sound) merged onto integration/aurora 41c4055, built with the J813 config (7.3.0, no warnings) and booted once through aura's aura-try trial boot. systemd reaches running with no deferred devices; NVMe root, Wi-Fi and USB Ethernet, the AppleJ813 sound card, the camera (ISP) and the video decoder (AVD), PSCI cpuidle, the E/P states, CLPC/PMC and the PMP all come up, and integration's drm/apple drives the panel.

cc @Acelogic @DjDeveloperr @RyanTheTide @LiamRay10

The M5's two GPU firmware CPUs (GFX and GFX1) sit at T8140's wrapper and
IOP VBAR windows moved up by 0x100000000. Add their role table, the T8142
provider and the compatible; the GPU deferred forever without them.

Signed-off-by: Thomas Glanzmann <[email protected]>
The AppleT8142PMC accessors put the floors at agent << 14, the per-agent
states at 0x106000 and the static voter enables at 0x108000, as on T8140.
It has three rails, DCS, SOC and DISP (ADT voter-rail-data), and clamps a
floor to DCS 7 and SOC 4. iBoot leaves every rail enable at 0, so without
the PMC no vote is honoured and DRAM and the fabric stay at their lowest
states (CPU DRAM latency 171 ns instead of 70 ns).

Signed-off-by: Thomas Glanzmann <[email protected]>
T8142's CLPC drives DCS states 0-7 on rail 0 and fabric states 0-4 on
rail 1; the map is the one measured on J813 (four P cores copy at ~40 GB/s
with the fabric at 1 and ~110 GB/s at 4).

The M5 GPU driver reports its submissions in flight through
apple_clpc_gpu_get(), as on T6040, but the CLPC allocated that input only
for the t6041 compatible or a gpu_dense table, so on T8142 the GPU waited
for it forever. Make it a per-SoC flag, gpu_input, set for T6040 and
T8142, and let apple_clpc_gpu_get() accept the T8142 CLPC.

Signed-off-by: Thomas Glanzmann <[email protected]>
The J813 PMP runs the same registry-v2 firmware as T8140. Its DART window
starts at 1 TiB, so it takes T8140's 42-bit DMA mask, and like T6041 it
starts endpoint 7 (CoreAnalytics) and takes its 8 KiB buffer before it
acknowledges the IOP power state.

Signed-off-by: Thomas Glanzmann <[email protected]>
@sithglan

sithglan commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #997: the same work rebased onto integration/aurora 11eccbe and boot-tested on the J813.

@sithglan sithglan closed this Nov 5, 2026
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