Skip to content

pmdomain: apple: admit the J615 legacy tree to the J613 PACC0 floor - #1985

Open
freber wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
freber:j615-pmp-floor
Open

freber wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
freber:j615-pmp-floor

Conversation

@freber

@freber freber commented Nov 15, 2026

Copy link
Copy Markdown

Claude Code prepared this patch and wrote this up from my tests on a J615 (15-inch M3 MacBook Air).

This lets the #1486 memory floor run on a J615 that boots m1n1's legacy handoff tree, which is how a J615 boots today. It's opt-in for now with pmp_report.j615_floor=1. pmp_report.j613_floor=0 still turns it off and nothing changes for the J613. The parameter, sysfs group and messages keep their j613 names.

Adding the J615 to the J613 board check wouldn't be enough. The J613 path wants the native report, a PMP that names the report with apple,pmp-report, an available PMP and the 26.6.2 firmware. On the legacy tree the report binds the generic apple,t8122-pmp-v2-report and names its PMP with apple,pmp. That PMP runs the 14.x PMP image (3B18C886-4C70-349B-B1C4-70F35DE2C5CD, from OS firmware 14.7) and is still disabled when the report probes, because the report's own driver starts it. So this patch lets a J615 report take that PMP while it's disabled. Nothing is written early, since the floor's start work already waits for the report to read READY.

A J615 only accepts that 14.x UUID. If it doesn't match, the floor warns and stays off but the report keeps probing, since on this tree it starts the PMP the display and GPU need. On a J613 the same refusal still fails the probe.

I kept the experimental t8122-j615-25g83 tree out on purpose. It binds the native J613 report and the floor has never run on that path, so a J615 on the native report is never admitted.

My J615 results are in my comment on #1486. Memory reads with 4 threads went from 19.8 to 68.2 GB/s. The governor saw each raise and release confirmed at its next 30 ms sample, about 31 ms after the write. An earlier direct poll read the new level back within 5.1 ms. In Chromium the time from scroll to screen dropped by one refresh in a layers scene, two in text and three in WebGL, though that's #1517 and the floor together. These numbers come from a 7.2.11 kernel (omacom/linux-aurora aurora16 with #1486, #1517 and an earlier version of this patch backported) where the J615 floor was on by default. This branch on integration/aurora is host-tested and compile-tested only.

  • python3 -I tools/asahi/run-host-tests.py --only pmp-j613-floor passes 17 of 17. That's the control plus 16 mutants, all caught. Six of the mutants are new for the J615.
  • make LLVM=1 W=1 drivers/pmdomain/apple/pmp-report.o with clang 18 adds no warnings. The three kernel-doc warnings at pmp-report.c:97 come from the untouched apple_pmp_report_offsets struct.

Before the J615 default goes on I'd run the checks the J613 got (disable and re-enable, the boot veto, suspend, policy teardown, sustained power). Is there anything else you'd want to see first?

The 15-inch M3 MacBook Air (J615) has the J613's SoC, DRAM, PMP tables
and PACC0 request layout. Both boards take their PMP, PMP report, PMGR,
GPU and CPU nodes from t8122.dtsi and t8122-j613-j615.dtsi. Without the
floor its memory reads 19.8 GB/s, close to the 21 GB/s the J613
measured.

The board check alone would never admit a J615 as it boots today. The
device tree that m1n1 embeds is a legacy handoff tree. Its report binds
the generic "apple,t8122-pmp-v2-report", whose driver starts the halted
14.x PMP (firmware 3B18C886-4C70-349B-B1C4-70F35DE2C5CD) and names it
with apple,pmp. That PMP is still disabled when the report probes.
apple_pmp_start_init() takes it over right after j613_floor_probe() and
enables it once the display asks for it. The J613 path needs the native
report's match data, a PMP that names the report (apple,pmp-report), an
available PMP and the 26.6.2 firmware.

On machines compatible with "apple,j615" the floor becomes eligible
only on that generic T8122 report, behind the same pmp_report.j613_floor
veto. It is also off by default. A J615 owner opts in with
pmp_report.j615_floor=1 until the floor is qualified on that board the
way the J613 was (disable and re-enable, boot veto, suspend, policy
teardown, sustained power). It takes the PMP that the report names with apple,pmp. It may
take that PMP while it is still disabled, because this report's driver
starts it (offsets->starts_pmp). It accepts only the 14.x firmware
UUID. A refused identity warns and leaves the floor off. The report
keeps probing then, because on a legacy tree it starts the PMP that the
display and GPU depend on.

The experimental t8122-j615-25g83 tree is deliberately not covered. It
binds the native J613 report, whose match data turns the floor on by
default. The floor has not run on that path. A J615 is never admitted
on the native report or with the J613 firmware UUID.

Nothing is written early. The floor's start work already waits for the
report to read READY and then for j613_floor_start_delay_ms.

The J613 path is unchanged. Its gate, PMP link, availability check, UUID
and fatal identity refusal behave as before. Every J615 branch needs the
J615 board check. The parameter, sysfs group and messages keep their
j613 names.

Tested on a J615 with the 14.x PMP firmware, running this change on a
7.2.11 kernel that carries the J613 floor and T8122 PPT patches, where
the J615 floor was still on by default. The
floor was admitted 11 s into boot. The PMP confirmed each raise to DCS4
SOC2 and each release in about 31 ms. membw2 with 4 threads read
68.2 GB/s with the floor against 19.8 GB/s without it. CPU 0 stayed at
69.2 ms with pms_c1ppt powered (302.7 ms on the stock kernel). No GPU
errors were logged.

The host test gains truth tables for J615 admission and firmware
identity, the DVFS-STATE words read back on the J615 and static checks
for the J615 branches. Six new mutants are registered in
run-host-tests.py. They make J613 accept the 14.x firmware, J615 accept
any firmware or the J613 firmware, J615 pass on the native report, the
parameter fail to veto J615 and J615 run without its opt-in. A static
check keeps pmp_report.j615_floor off by default.

Assisted-by: LLM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TqFXgsntBCgau1RkXP1KRQ
Signed-off-by: Fredrik Silfver <1684291+freber@users.noreply.github.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor

The production boot stub pins at macOS 27.2 (26B123), so please retarget this to 27.2. This admits the J615 legacy tree with the 14.x PMP image (OS firmware 14.7); please target the J615 on the 27.2 stub.

@freber

freber commented Nov 17, 2026

Copy link
Copy Markdown
Author

Claude Code wrote this up from my J615's firmware versions and the installer's pin list.

I'm fine moving this to 27.2, but I can't test it there yet. The floor in this PR was tested on my J615 with the 14.7 stub on system firmware 26.6.2 (mBoot-18000.161.10). The 27.2 stub needs system firmware 27.2 first. That update can't be rolled back. The 26B123 entry in aurora-installer's firmware-qualification.json doesn't list a J615 yet either, only the seven T6050 boards (all experimental).

Is a J615 entry for 26B123 planned? Once there is one, I can update to 27.2, check which PMP image the stub loads and redo the floor against it. Until then, would you rather keep this open for the 14.7 stub or have me close it?

@freber

freber commented Nov 18, 2026

Copy link
Copy Markdown
Author

Claude Code wrote this up from my tests.

A data point from 7.3 on my J615 (15-inch M3 Air), with this PR, #2090 and #2145 to #2157 on integration/aurora 59b02d5ef. In one of three boots the floor faulted after 47 minutes and 53 raises (the other 52 were confirmed in about 31 ms each). The messages say J613 because the J615 runs the J613 floor code.

apple-pmp-report 2d03c0000.pmp_report: J613 floor raise DCS4 SOC2 (cpu cpu=81% sum=84% gpu=0%) word 0x2004000200000000 DVFS-STATE before 0x0
apple-pmp-report 2d03c0000.pmp_report: J613 floor release (raise unconfirmed: DVFS-STATE did not reach the floor) after 1028 ms held, valid floor 0 published
apple-pmp-report 2d03c0000.pmp_report: J613 floor fault: raise unconfirmed: DVFS-STATE did not reach the floor; governor stopped, valid floor 0 published (DVFS-STATE 0x0/0x0/0x0/0x0)

The fault holds until the next boot, since enable refuses writes once faulted is set. Chromium's image scroll test went from about 8 to about 23 % dropped frames for the rest of that boot. The two later boots had 63 and 95 raises, all confirmed. On 7.2 the floor has never faulted on this Mac.

A retry, or re-arming after a minute, would limit a one-off like this to a short gap. I can add that to this PR if you want.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for getting the memory floor running on the J615, and for the bandwidth numbers.

Two parts don't match how we usually select behaviour. The path is limited to one machine by of_machine_is_compatible("apple,j615") (drivers/pmdomain/apple/pmp-report.c:2163), and it only runs with a new opt-in module parameter, j615_floor (pmp-report.c:1518-1520, default off). We try not to require a boot option to make a machine work, and we select by a hardware or device-tree property rather than a machine name.

The device tree already tells the cases apart: the legacy tree's report node (apple,t8122-pmp-v2-report, linked by its apple,pmp phandle) and the PMP firmware UUID you already check. Could the floor be enabled whenever that report shape and a known UUID are present, on by default, with the existing j613_floor veto kept? Then any board booting the legacy tree gets the same handling without being named.

We can run no-regression rows on our M2 if that would help.

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