Repository navigation
soc: apple: Add registry-v2 PMP and safe DMA ownership - #243
Closed
DjDeveloperr wants to merge 1 commit into
Closed
DjDeveloperr wants to merge 1 commit into
DjDeveloperr wants to merge 1 commit into
Conversation
Carry the matched T6050 descriptor, buffer and update protocol into the public PMP driver. Preserve the T6000 protocol and T8140 DMA-mask profile. Bound registry copies and validate the complete boot-argument table before changing it. Require an IOMMU domain before starting firmware. Own registry-v2 RTKit outside its callback context, register a drained reboot notifier, and verify the matched context-save and CPU-stop proof before releasing DMA. Probe and unbind failures stop or retain backing rather than panicking on an unconfirmed firmware transition. Port only the required auxiliary-buffer endpoint; keep newer public RTKit lifetime and inherited-buffer fixes. Expose the existing C handle and reboot declarations to the Rust owner without copying unrelated private transport features or GPU code. Native driver objects and production-parser fault tests pass. Local Rust validation uses opaque bindings for unrelated existing namespace and empty-struct bindgen layout failures, outside the published source. Hardware firmware exchange and teardown qualification remain pending. Signed-off-by: Dj <hey@djdev.me>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the matched T6050 registry-v2 PMP protocol: bounded 88-byte descriptors, firmware-assigned IDs, shared value buffers and update opcode 0x36. Preserve the existing T6000 protocol and T8140 DMA-mask profile. Calibration and boot arguments stay firmware-described; validate the whole boot-argument table before mutation.
Require an attached IOMMU before processor start. Own RTKit outside the callback context, drain the reboot notifier before releasing the owner, and verify the matched idle/context-save/CPU-stop proof before freeing DMA. Startup and unbind failures follow one stop-or-retain path instead of the internal port's panic-on-stop-failure paths. A retained context cannot cold-reprobe. Add only the required session-owned endpoint-7 auxiliary buffer support, retaining newer public RTKit lifetime fixes.
Stack:
apif-mmio#238 → NVMe #241 → PCIe #242 → this PR. No GPU changes, private implementation references or routine successful-call logs.Validation: native AArch64 PMP Rust and RTKit C objects; a full linked
Imagewith Clang/GNU ld; production Rust parser tests for truncated descriptors, invalid lengths/IDs/names, and transactional boot-argument rejection; schema validation; the preceding APIF fault tests.Local toolchain limitation: stock bindgen 0.73.2 generates incorrect Rust layouts for unchanged
ns_commonanonymous structs and aligned emptysched_statistics/slabobj_exttypes. This fails before the PMP driver is compiled. Local validation used an external bindgen wrapper adding--opaque-type 'ns_common.*' --opaque-type sched_statistics --opaque-type slabobj_ext; no generated bindings or build workaround are included in this PR. The driver and full Image build pass with that adjustment. Validation does not establish that the stock Rust build issue is fixed.Hardware cold boot, registry exchange, idle/context save, reboot and teardown qualification remain pending.