Repository navigation
Conversation
…leep The J713 radio DART loses its register state while its live page tables remain in memory. Let the PCIe host own its stop and restore transaction, with mapping writers fenced while bus mastering and the port are held. Restore translation, fault-mask and stream state before admitting DMA. Restrict the provider to the managed J713 radio DART. Reject corrupt snapshots and retain the closed DMA boundary after an incomplete restore. Add fault-injection coverage for writer exclusion, snapshots and power loss. Signed-off-by: Erik Bourget <erik@ebourget.net>
52e3c8a to
3ac93e7
Compare
RyanTheTide
left a comment
There was a problem hiding this comment.
Changes needed on 3ac93e7:
-
apple_dart_sleep_release_failed()callspanic(), and it is reached from ordinary IOMMU paths:apple_dart_unmap_pages()andapple_dart_domain_flush_tlb_range()when the writer gate is closed, andapple_dart_release_device()wheneversleep_recordis set (a PCI remove or driver unbind during the sleep window). Please replace it with aWARNplusapple_dart_managed_quarantine()and an error return, so a late unmap or unbind leaves DMA blocked without taking the system down. -
apple-dart.cdoes#include "apple-dart-sleep.c". Please build it as its own object (shared declarations inapple-dart-power.hor a private header) instead of including a.cfile. -
apple_dart_sleep_bind()identifies the radio DART by MMIO address (res.start != 0x490000000ULL || resource_size(&res) != 0x20000). Match on the DT instead (a compatible or a property ondart_apcie0), so the code does not hardcode a physical address. -
apple-dart-power.huses raw register offsets:dart_power_tunables[](0x20c,0x220,0x224,0x300,0x308,0x310),dart_power_tz[](0x500..0x548), and0x704/0x777indart_power_fault_pending(). Please give each register a named#define, and each mask named fields, with a short comment saying what it holds, as for theDART_T8110_*registers inapple-dart.c. -
CI has not run on this head.
This is stacked on stack/j713-radio-pr1314, a copy of #1314 at 00f5d3e. That PR is a draft whose commits have no Signed-off-by, so this series cannot land before it does.
|
Folded into #1314 (authorship kept), which carries the J713 radio sleep work from here on. Closing in favour of it. |
The J713 radio DART loses register state across deep sleep while its page tables remain in memory. Add a host-owned stop/restore transaction that excludes mapping writers while the PCIe link and endpoint bus mastering are held. Restore translations, fault masks and streams before permitting DMA again.
Limit this provider to the managed J713 radio DART. Invalid snapshots and incomplete restores keep DMA blocked. Include fault-injection coverage for writer exclusion, snapshot validation and power loss.
Part 1/5 of J713 native radio S2R, stacked on #1314 at
00f5d3e3f848.stack/j713-radio-pr1314mirrors that PR's head so each subsystem has a separate review diff in this repository.The base branch
stack/j713-radio-dcpis that head plus the DCP address/size declarations needed for a clean boot on it, which #1385 now proposes separately forintegration/aurora.Series order: #1378 → #1381 → #1382 → #1383 → #1384.
Validation on this base:
Qualification covers radio recovery in the minimal sleep profile. GPU, external displays and SIO/audio were excluded, SLC allocation remained off, and paired Bluetooth traffic was not tested.