Skip to content

arm64: dts: apple: t8122-j615: describe the CPU memory 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

This gives the J615 (15-inch M3 MacBook Air) PMP report apple,cpu-memory-floor = <0x21 2 0x25 4>, so the floor from #2529 runs on it by default. The driver doesn't change.

The J615 boots m1n1's legacy handoff tree. Its report binds the generic apple,t8122-pmp-v2-report and names its PMP with apple,pmp. That PMP runs the 14.x image (3B18C886-4C70-349B-B1C4-70F35DE2C5CD, from OS firmware 14.7). The floor's start work waits for the report to read READY. Admission then reads the tables m1n1 fills in on the PMP node, which on this board gives 2 CPU clients with the PACC0 update alias at +0x10888.

The levels are the ones my earlier J615 floor patch used. They build the word 0x2004000200000000, which the PMP answers with DVFS-STATE 0x24. They equal the J613's because the SoC, DRAM and PMP tables are the same, but they were measured on this board.

t8122-j615-25g83.dts includes this file and binds the native J613 report, where the floor has never run on a J615. It deletes the property so that tree keeps running without the floor, as before.

The generic T8122 report doesn't set floor_confirm, so raises are published without the DVFS-STATE check, as on every report but the J613 25G83 one.

Results on a J615

A 7.3 kernel built from integration/aurora 24dc42277 with this commit, #2090, #2199 and #2203 merged, booted twice on the default command line.

membw2 read, 4 threads on the P cores GB/s
Floor on (median of 3, both boots) 69.3
enable written to 0 (3 runs) 21.6

DVFS-STATE read 0x24 in 6 of 6 reads with the floor up and 0x0 with it off. Neither boot logged a floor fault or refusal.

Not tested

  • Suspend and resume, the boot veto and policy teardown on the J615.
  • The 27.2 boot stub. aurora-installer has no J615 entry for it yet.

Assisted-by: LLM (Claude:Opus 5.5)

@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.

@RyanTheTide

Copy link
Copy Markdown
Contributor

j615_floor_eligible() in pmp-report.c keys the PACC0 floor on of_machine_is_compatible("apple,j615") and also needs the new j615_floor module parameter, which defaults to off. So no J615 gets the floor on a default boot. The code already checks the report compatible and the PMP image UUID, and those are what should select the floor, without a board check. Once the floor is qualified it should be on by default with no parameter. Until it is qualified it should stay out of the tree. Until then this should stay a draft.

@RyanTheTide
RyanTheTide marked this pull request as draft November 20, 2026 23:55
@RyanTheTide

Copy link
Copy Markdown
Contributor

@freber, a tidy-up pass over the open PRs here. These of yours need something:

If any of these are no longer needed, closing them helps; otherwise a merge or rebase onto integration/aurora is usually all they need. Thanks!

The 15-inch M3 MacBook Air (J615) has the J613's SoC, DRAM, PMP tables
and PACC0 request layout. Its device tree is a legacy handoff tree. The
report binds the generic "apple,t8122-pmp-v2-report" and names its PMP
with apple,pmp. This driver starts that PMP, which runs the 14.x
firmware (3B18C886-4C70-349B-B1C4-70F35DE2C5CD). Without a memory floor
nothing raises the DRAM or fabric state for the CPUs. A 4-thread membw2
read then reaches 19.8 GB/s.

Give its report apple,cpu-memory-floor = <0x21 2 0x25 4>. The levels
come from the J615 runs of the earlier J615 floor patch, not from the
J613 tree. That patch stored DCS 4 in bits 51:48 and fabric level 2 in
bits 35:32 of the PACC0 request, word 0x2004000200000000. Those are the
lanes of request classes 0x25 and 0x21, so these pairs build the same
word. The 14.x PMP answered it with DVFS-STATE 0x24 within 5.1 ms. That
is class 0x25 at 4 in the low nibble with class 0x21 at 2 in the high
nibble. In one boot it confirmed 39 of 39 raises and 38 of 38 releases.
With the floor the same membw2 read reached 68.2 GB/s. The levels equal
the J613's because the SoC, DRAM and PMP tables are the same, but they
were measured on this board.

The driver needs no change. pmp_floor_probe() runs for any report with
the property. pmp_floor_find_pmp() takes the report's apple,pmp without
an availability check, so it does not matter that the PMP is still
disabled when the report probes. The start work waits for the report to
read READY. It does once the PMP runs, which apple_pmp_start_init()
arranges when the display asks for it. Admission then reads the tables
m1n1 fills in on the PMP node. Run on this board's live tables, the
upstream check admits 2 CPU clients and puts the PACC0 update alias at
+0x10888, where the earlier patch wrote it. pmp_floor_word_of() builds
0x2004000200000000 from the pairs. The binding already allows the
property on apple,t8122-pmp-v2-report.

The generic T8122 report does not set floor_confirm. Raises and
releases are published without the DVFS-STATE check, as on every report
but the J613 25G83 one.

The experimental t8122-j615-25g83 tree includes this file. It binds the
native J613 report, where the floor has not run on a J615. It deletes
the property so that it stays uncovered, as it was before.

Tested by building both J615 trees. Decompiled, the J615 report carries
the property while the 25G83 report has none. pmp-report.o builds with
clang 18. The floor ran on a J615 with the 14.x firmware on a 7.2.11
kernel carrying the earlier patch. A 7.3 kernel built from this tree
with aurora-silicon#2090, aurora-silicon#2199 and aurora-silicon#2203 merged then booted on a J615 with the 14.x
firmware and the default command line. The report admitted the floor
from the property with the PACC0 update alias at +0x10888. During three 4-thread membw2 reads the floor was up,
DVFS-STATE read 0x24 each time and the read reached 69.3 GB/s. The
boot logged no floor fault or refusal. On a later boot of the same
kernel the read gave 21.6 GB/s with the floor's enable attribute at 0
and 69.3 GB/s with it at 1.

Signed-off-by: Fredrik Silfver <1684291+freber@users.noreply.github.com>
freber added a commit to freber/linux that referenced this pull request Nov 22, 2026
…mplete die key list

States 6 to 8 were reachable only with asahi.t8122_pstate_cap and
asahi.m3_thermal=on. The measured behaviour needed two more boot
parameters. A machine should not need boot options to run as intended.
The behaviour belongs to the hardware description.

Make the ceiling default to 8 on a T8122 whose device tree has a node
with apple,soc-die-keys-complete while the thermal limit is on, which is
the default. The property says that the firmware provides every key in
apple,soc-die-keys. The hwmon driver then registers the macsmc_soc_die
zone only with all of them present. In the tree only the J615 sets it.
J613 and J504 list the same keys through t8122.dtsi but are not
confirmed to provide them all, so they keep the old ceiling of 2. So
does an unset cap with asahi.m3_thermal=off or hold.
asahi.t8122_pstate_cap still sets any ceiling from 1 to 8 and is now
only an override.

The ceiling goes to the firmware in the InitData before the GPU starts,
when the hwmon driver may not have probed yet. So the default follows
the property, not whether the zone exists at that point. The runtime
cap still starts at 2 and falls back to 2. It rises only while the
limit reads a usable temperature from that zone, so a J615 whose zone
did not register stays at 2.

The limit's thresholds follow the same rule. With the property, hot
defaults to 90 C and the cool gap to 3 C. Elsewhere the old 80 C and
10 C stay, so the other M3 boards are unchanged.
asahi.m3_thermal_hot and asahi.m3_thermal_cool_gap are overrides.
Sysfs shows "default" while they are not given.

The choice of 90 C with a gap of 3 C comes from the J615 measurements.

  hot, gap   throughput   sustained 600 s   combined peak
  80, 10     218 fps      80.0 fps          95.8 C
  85, 10     272 fps      79.9 fps          not run
  90, 3      289 fps      88.1 fps          94.4 C
  92, 3      295 fps      95.2 fps          93.9 C

At 90 C with a gap of 3 C a 600 s GPU load held the hottest GPU key at
93.8 C with no missed frames. With a gap of 10 C the cap never left
state 2 under a sustained load, because the die settles a few degrees
under hot but above hot minus 10. The 85 C of the released form gave no
sustained gain while 80 C cost throughput. 92 C is a little faster, but
the GPU keys then reach 95.9 C, above the 94 C GPU die target in the
boot firmware's tree. 90 C is the highest value that stays under it in
the measurements. Critical is then 98 C, below the 110 C trip of the CPU
thermal zones. Critical or any loss of a reading returns the cap to 2.

This was measured on a J615 only, the one board that sets the property.
A 7.3 kernel built from this branch with aurora-silicon#1985, aurora-silicon#2090 and aurora-silicon#2199 merged
booted there with the default command line. The cap rose from 2 to 8
once the die reading arrived and gpubench w4 gave 322 fps. Of three
600 s w10 loads at the default, two ran to the end at 126 and 122 fps
with the hottest die key at 93.0 C. The third stopped at the test's
95 C guard after 416 s when one die reading reached 99.2 C, where the
98 C step returned the cap to 2. A half-second trace of the same jump
on a later load showed a one-second burst on every CPU core, which
lifted the CPU keys by 13 to 16 C while the GPU keys rose about 4 C.
The host tests in tools/asahi/m3-runtime-tests.rs cover the new
defaults and that the old defaults remain without the property.

Signed-off-by: Fredrik Silfver <1684291+freber@users.noreply.github.com>
freber added a commit to freber/linux that referenced this pull request Nov 22, 2026
The M3 runtime publishes one render pass at a time unless
asahi.m3_render_batch_size or the writable m3_render_batch_override
asks for more. On a J615 (15-inch M3 MacBook Air) that costs frames
while Chromium scrolls an image-heavy page. Make the boot default 2.

Measured on a J615 with the stock 7.2.11 aurora16 module, whose
next_batch() and render_batch_size() match this tree's, booted with
asahi.t8122_pstate_cap=5 and setting m3_render_batch_override at
runtime. Chromium images scene, median of three runs:

  batch   dropped frames   p99 frame interval
  1       2.2 %            33.3 ms
  2       0 %              16.7 ms
  4       0.1 %            16.7 ms

Two same-session control runs at batch 1 dropped 2.6 % and 2.4 %. With
2, a burst of eight glprobe draws retired 1.6 render commands per
retirement instead of 1.0, its median fell from 4.53 ms to 4.00 ms and
GPU mailbox interrupts per run fell from 320 to 200. gpubench
throughput and idle power stayed within noise. The kernel log had no
GPU errors.

Only T8122 is affected. This parameter exists only with
CONFIG_DRM_ASAHI_M3_T8122, its only reader is the runtime's
next_batch(), the runtime's only SoC table is T8122 and it starts only
on the J613 and J615. T6030 and T6031 keep the G15 backend or the
probe refusal. The first render draw is still published alone for
InitBM, and the T8122 pipeline depth of 2 and the 4000 us batch budget
still bound every batch. m3_render_batch_override=1 restores the old
behaviour at runtime, asahi.m3_render_batch_size=1 at boot.

A 7.3 kernel built from this head with aurora-silicon#1985, aurora-silicon#2199 and aurora-silicon#2203 merged
then booted on a J615 with the default command line. In the same
Chromium scene under the balanced profile at panel scale 1.6, median
of three runs, 11.8 % of frames dropped at the
default of 2 against 15.6 % on the same kernel booted with
asahi.m3_render_batch_size=1. The eight-draw glprobe burst retired
1.52 render commands per retirement against 1.00. The kernel log had
no GPU errors. aurora-silicon#2203 raises that build's ceiling to state 8.

The J613 runs the same runtime and gets the same default but was not
tested. Neither was a 7.3 build at the T8122 ceiling of 2 that
applies without aurora-silicon#2203.

Signed-off-by: Fredrik Silfver <1684291+freber@users.noreply.github.com>
@freber freber changed the title pmdomain: apple: admit the J615 legacy tree to the J613 PACC0 floor arm64: dts: apple: t8122-j615: describe the CPU memory floor Nov 22, 2026
@freber
freber marked this pull request as ready for review November 22, 2026 13:41
@freber

freber commented Nov 22, 2026

Copy link
Copy Markdown
Author

Claude Code wrote this up from my tests.

Thanks for #2529. With the floor selected by the device tree, this PR is down to one dts commit on integration/aurora 24dc42277, which also clears the conflict from your tidy-up pass today. The commit gives the J615 report apple,cpu-memory-floor = <0x21 2 0x25 4>, the value my earlier J615 patch used. It deletes the property again in t8122-j615-25g83.dts, since that tree binds the native J613 report and the floor has never run there on a J615. The driver doesn't change. The floor is on by default with no module parameter.

Your comment from 20 November is about j615_floor_eligible() and the j615_floor parameter. #2529 replaced that code and this PR no longer has either of them.

I booted it twice on my J615 (15-inch M3 Air). The kernel is integration/aurora 24dc42277 with this commit, #2199, #2203 and #2090 merged, plus a LOCAL TEST ONLY commit that keeps the DRM name asahi because my installed Mesa doesn't accept aurora yet. Both boots ran on the default command line with no aurora.* or pmp_report.* words. On the second boot I also wrote 0 to the floor's enable for three runs and then 1 again.

apple-pmp-report 2d03c0000.pmp_report: memory floor owner admitted: PACC0 update +0x10888, client 1, initial 0x0, DVFS-STATE 0x0/0x0/0x0/0x0; governor 0x2004000200000000 cpu>=80% gpu>=40% x2 hold 500 ms
Check Result
status admitted 1, enabled 1, faulted 0, stopped 0, confirm 0
membw2 read, 4 threads on the P cores, balanced, floor on 69.3, 69.3 and 69.4 GB/s on the first boot, 69.3 GB/s in all 3 runs on the second
the same read with enable at 0 21.6 GB/s in all 3 runs
DVFS-STATE 0x24/0x0/0x24/0x0 in 6 of 6 reads with the floor up, 0x0/0x0/0x0/0x0 with it off
floor fault or refusal lines 0 on both boots

The policy is now your fixed one with the GPU at 40 percent and a 500 ms hold, where my 7.2 tree used 20 percent and 3000 ms. The read with the floor is close to what my 7.2 floor gave (68.2 GB/s).

With confirm 0 on this report, the driver publishes raises without checking DVFS-STATE. The fault I posted on 18 November came from that check and can't stop the floor here. To see whether the PMP follows the floor anyway, the test read DVFS-STATE while each run held the floor up. All 6 reads showed 0x24, which is class 0x25 at 4 and class 0x21 at 2. With the check on, one unconfirmed raise cost the floor for the rest of that boot, so I'd keep confirm off for the J615.

HW row: J615, integration/aurora 24dc42277 with this commit, default command line, no floor parameter: floor admitted from the device tree (apple,cpu-memory-floor = <0x21 2 0x25 4>), on, not faulted; membw2 4-thread read 69.3 GB/s (median of 3) against 21.6 GB/s with enable at 0 on the same kernel; DVFS-STATE at the floor in 6 of 6 reads; 0 AVC denials, 1 failed unit, 2 new kernel errors.

The failed unit is speakersafetyd. My boot loader passes no amp levels, so the kernel turns the speakers off. The two new kernel errors were logged during boot, before the tests started. The video encoder finds no preloaded firmware and the camera firmware doesn't answer. Neither touches the PMP or the floor.

Thanks for offering M2 rows. Only the J615 dts changes now and the driver stays as #2529 left it, so I don't think they're needed.

On the 27.2 retarget, the 26B123 pin in aurora-installer's firmware-qualification.json still has no J615 entry (I checked today), so the J615 stays on the 14.7 stub for now.

The title and description now match the single commit. The commit carries only my Signed-off-by and the description ends with Assisted-by: LLM (Claude:Opus 5.5). Since the floor now comes from the device tree and is on by default, I've marked the PR ready for review. I'm glad to run anything else you'd like to see on the J615.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks, this is much simpler now.

  • The board check and the j615_floor parameter are gone. The floor now comes from apple,cpu-memory-floor on the J615 report (arch/arm64/boot/dts/apple/t8122-j615.dts:20-26) through the generic probe, on by default. Fixed.
  • The conflict is gone too. The commit applies on 24dc422.
  • The /delete-property/ in t8122-j615-25g83.dts:10-13 acts on the same report node that tree rebinds to the native J613 report. That's right: the floor has never run there.
  • The A/B on one kernel (69.3 GB/s with the floor against 21.6 GB/s with enable at 0, DVFS-STATE 0x24 in 6 of 6 reads, no fault or refusal on two boots) covers the 14.7 stub well.

Two rows are still missing:

  • 27.2 boot firmware. Nothing in this change ties it to the 14.7 stub, so a J615 that boots 27.2 firmware with this tree also starts the floor by default. With confirm off on the generic T8122 report, raises go out without DVFS-STATE feedback, so the levels need checking against the PMP image 27.2 loads. The check is the same as your 14.7 row: admitted, DVFS-STATE at the floor while it is up, and membw2 with enable at 1 and 0.
  • Suspend. One s2idle cycle with the floor on, then the floor still admitted and DVFS-STATE back at 0x24 under the membw2 load, would cover the resume path that now runs by default on the J615.

Assisted-by: LLM (Claude:Opus 5.5)

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