Skip to content

soc: apple: enable T8140 PMP firmware limits alongside IPA - #179

Merged
RyanTheTide merged 7 commits into
aurora-wipfrom
j700/pmp-mcc-thermal
Oct 8, 2026
Merged

RyanTheTide merged 7 commits into
aurora-wipfrom
j700/pmp-mcc-thermal

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Start the T8140 PMP through the existing Apple PMP driver with a 42-bit DMA mask, expose running-qualified fast-die effort through the existing PMP report driver, and enforce firmware ceilings through cpufreq maximum-frequency QoS. The public thermal power allocator remains the slow policy; its lower ceiling composes with the firmware limit. The DT describes and enables the J700 PMP SRAM, ASC, mailbox, DART and report resources while leaving the firmware-owned PMC state untouched.

The existing PMP base by Sasha Finkelstein and Janne Grunau is already in aurora-wip and retains its original history and attribution. The T8140 additions port Ryan Murray's ADT/Linux-derived work. Report entry 0x1c1 byte1 was observed following P-cluster load under Linux; byte0 is assigned to E from ADT order and has not been observed changing. Memory-controller support remains a separate task.

Bootloader dependency: dart-pmp DAPF preparation and enabled-device admission already exist in public m1n1 PR #2. The loader must include that behavior and copy the PMP calibration before this kernel driver can start the firmware.

Validation:

  • All seven commits pass strict checkpatch with only the required Assisted-by trailer warning.
  • Remote builds use a pinned configuration: Image/modules for the driver changes and the relevant DTB target for the final DT-only fix. Every commit has a build receipt.
  • The final J700 DTB passes targeted validation against all three touched schemas with an empty diagnostic list; an inherited ISP heap unit-address warning is unchanged.
  • The three touched binding schemas pass document validation, lint and fresh binding-example DTB validation with dtschema 2026.9.
  • The topic test-merges cleanly with the integration branch, preserving its IPA policy.

Neo qualification in progress. No fresh thermal safety PASS is claimed. The qualification owner will verify PMP boot/readiness and telemetry, fallback caps, CPU hotplug/teardown, IPA/QoS interaction and recovery, and a guarded sustained GPU+CPU load below the thermal trips without resets. Full per-boot journals, boot identity and GPU queue/submit-failure guards remain required before fanless-safety approval.

🤖 Generated with Claude Code

The T8140 PMP DART DMA window starts at 1 TiB. The default 32-bit
DMA mask leaves no usable IOVA, so the firmware's first buffer request
fails with ENOMEM and probe times out. Set the mask before allocating
any firmware buffers, using per-SoC match data. Retain the default mask
on existing SoCs.

Port Ryan Murray's Linux-observed T8140 fix onto the existing Asahi PMP
driver by Sasha Finkelstein, including Janne Grunau's fixup.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Describe the T8140 report layout from the Apple device tree and expose
its fast-die effort through the existing PMP report mapping. A stopped
PMP reads zero, so check the running bit before accepting an effort.
Report entry 0x1c1 contains byte 1 for the P cluster, observed under
Linux load, and byte 0 for E, assigned from ADT lane order. The E byte
has not yet been observed changing. Do not read entry 0x1c2 or scan the
unpopulated part of the report aperture.

Expose read-only debugfs status and lane effort values for diagnostics.

Port the original Linux-derived implementation by Ryan Murray. Retain
the Asahi report driver and use it as the sole owner of the mapping.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The PMP publishes a per-cluster effort faster than the SMC reports die
temperature. Sample the effort and enforce a maximum-frequency QoS
request. The cpufreq core combines it with thermal cooling limits and
reports reduced capacity to the scheduler. Keep the existing IPA policy.

Use the OPP power table to map increasing effort to a monotonic power
ceiling. Until the PMP is running, retain a ceiling of one third of the
maximum OPP power. Deferrable timers sample busy CPUs without waking
idle clusters; an hrtimer follows a reduced ceiling so idle capacity can
recover. Drain timers and update work before removing the QoS request.

Port Ryan Murray's original Linux-tested direct limiter. Apply the
public IPA series' removal of the obsolete SMC policy hooks while
preserving command-state transition verification. Keep the firmware-
limit lifecycle separate from the generic policy cleanup so the public
thermal-series removals merge without overlapping new hooks. No
additional thermal policy or experimental smoothing is introduced.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Document the existing PMP firmware driver resources and the report
aperture consumed by the fast-die limiter. Define a report phandle and
lane index on the cluster DVFS controller, using the measured P lane
and ADT E lane ordering. Firmware calibration properties are populated
by the bootloader from the Apple device tree.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Describe the PMP SRAM, ASC, mailbox, DART and report resources from the
Apple device tree. The DART register range includes its v2.3 exception
registers. Enable the resources on J700 and connect the cluster effort
lanes so cpufreq retains its fallback caps until the firmware runs.

Leave the firmware-owned PMC domain untouched. The PMP firmware and
fast-die maximum-frequency requests complement the existing thermal
power allocator; thermal trips and sustainable power remain unchanged.
The bootloader must initialize the PMP DAPF and copy its calibration.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The P-cluster DVFS controller provides a performance domain with no
arguments. Retain its required cell count when connecting the PMP
effort lane so the CPU performance-domain lookup remains valid.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Place the PMP driver, report interface and related bindings under the
existing J700 support entry owned by Ryan Murray. Keep project contact
information together rather than creating a separate coordination entry.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide merged commit d8ad51f into aurora-wip Oct 8, 2026
RyanTheTide added a commit that referenced this pull request Oct 8, 2026
Preserve the original review commits and retain subsequent published repairs where superseded.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide deleted the j700/pmp-mcc-thermal branch October 8, 2026 10:22
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