Repository navigation
soc: apple: pmp: take the T6041 data segment offset from the SRAM header - #3688
Conversation
HW_CFG_T6041 keeps 0x7d000 bytes from 0x61000 across a deep sleep, where the 26.6.2 PMP firmware has its data segment. The 27.2 firmware has it at 0x62000, as the config's comment notes. The sleep powers the PMP's SRAM off, so on the wake the driver wrote back a range a page too low and missed the top of the data segment, and the firmware didn't come back (RTKit endpoint discovery -62, then no acknowledgement of the PMP requests). Take the offset from the firmware's SRAM header, as HW_CFG_T8132 does, so both firmwares are covered; a boot loader's apple,sram-keep still wins. Signed-off-by: Allan Clempe <allan.clempe@gmail.com>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
Verdict: HOLD at f919dbba
Blockers:
- Fork
pull_requestCI workflows atf919dbba(Apple build and KUnit,Host tests,SEP source checks,pr-text) areaction_required(awaiting maintainer approval to run); onlypull_request_targetskipped/readiness ran, so no hosted build or test has executed yet. Code and J616c deep-sleep verification look clean — ready to approve once CI runs green.
Checked:
drivers/soc/apple/pmp.rs: settingHW_CFG_T6041.sram_backup_data = truereuses the existingsram_range()header-lookup path (SRAM_DATA_START, word0x234, same asHW_CFG_T8132), which rejects zero or non-4 KiB-aligned offsets (-EINVAL) and validates bounds viapmp_bootargs::word_range_valid(offset, size, io.size()), while preservingapple,sram-keepDT precedence (sram_backup_data = falsewhen DT supplies the property).- Commit
f919dbbacarries a humanSigned-off-by:trailer, clean PR metadata (Risk: two-way), zero AI attribution, and exact-head J616c (M4 Max, macOS 27.2 stub) deep-sleep verification showing clean PMP RTKit restart without-62endpoint discovery failure.
Evidence
- Diff audited:
drivers/soc/apple/pmp.rs(+3/-2), commitf919dbba5c26. - Verified
PmpData::new()(pmp.rs:218-225, DTapple,sram-keepoverride) andPmpData::sram_range()(pmp.rs:553-578, alignment +word_range_validbounds checks). - Workflow runs at review time:
Apple build and KUnit,Host tests,SEP source checks, andpr-textarepull_request completed/action_required(fork PR);pull_request_targetjobs skipped.
There was a problem hiding this comment.
Verdict: MERGE at f919dbba5c26
Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.
Checked: - drivers/soc/apple/pmp.rs: setting HW_CFG_T6041.sram_backup_data = true reuses the existing sram_range() header-lookup path (SRAM_DATA_START, word 0x234, same as HW_CFG_T8132), which rejects zero or non-4 KiB-aligned offsets (-EINVAL) and validates bounds via pmp_bootargs::word_range_valid(offset, size, io.size()), while preserving apple,sram-keep DT precedence (sram_backup_data = false when DT supplies the property).
- Commit
f919dbbacarries a humanSigned-off-by:trailer, clean PR metadata (Risk: two-way), zero AI attribution, and exact-head J616c (M4 Max, macOS 27.2 stub) deep-sleep verification showing clean PMP RTKit restart without-62endpoint discovery failure.
Follow-ups (not blocking): fork CI workflow approval
|
Merging at |
What: The T6041 PMP restarts after a deep sleep on a macOS 27.2 stub. Its SRAM keep range now starts where the firmware's header says the data segment is (0x62000 on 27.2, 0x61000 on 26.6.2) instead of at the fixed 26.6.2 offset.
Tested: J616c (M4 Max) at f919dbb (with
fix/t6041-dcp-s2r-fw27and #3670 in the same tree): deep sleep 1/1, the PMP came back after the wake; 0 failed units, no new kernel errors.Risk: two-way door · M4 Max (T6041); a plain revert undoes it. Boards whose boot loader passes
apple,sram-keepare unchanged.Not yet: a T6041 row on a 26.6.2 stub (the header gives 0x61000 there); whether 27.2's data segment outgrew 0x7d000 (the wake shows no sign of it).
Evidence
Tree: main 45d7f82 + this branch (f919dbb) +
fix/t6041-dcp-s2r-fw27(3294c96) + #3670 (0d460a7), nothing else, built as7.3.0-1-2.1-ARCH, default command line, J616c with a macOS 27.2 (26B123) stub, noapple,sram-keepin its DT.apple_pmp 500700000.pmp: RTKit: Initializing (protocol version 12), and noendpoint discovery failed,firmware did not come back from sleeporPMP did not acknowledge requests.apple_pmp: RTKit: endpoint discovery failed: -62,firmware did not come back from sleep: -62,apple-pmp-report: PMP did not acknowledge requests 0x3c00 (ack 0x0). The PMP and its SRAM power words read off on the wake and on again after the restore (pmp 0xf000300to0x1f0003ff,pms_sramthe same), so the SRAM had lost its contents.