Skip to content

nvme: apple: Add resident ANS support over native APIF - #241

Closed
DjDeveloperr wants to merge 1 commit into
apif-mmiofrom
apif-nvme
Closed

DjDeveloperr wants to merge 1 commit into
apif-mmiofrom
apif-nvme

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Resident ANS cannot use raw NVMMU programming or replace queue addresses pinned by a previous boot owner. Add apple,nvme-apif with Linux-owned native table-6 call construction, TCB/page-list translation, and four validated reserved queue pages.

Preserve the public driver's recovery, quarantine, controller lifetime and synchronous post-M4 flush fixes. A lost MAP response keeps the request live; completion or cancellation must confirm native UNMAP before releasing DMA backing. Retain backing after failed SART unmaps. No per-call success logging, payload copies or GPU changes.

This is the first PR in the non-GPU integration stack, based on apif-mmio (#238). Later PCIe, PMP and guest-wiring PRs will build on it.

The new profile requires a coherent identity DMA aperture and an explicitly quiesced RTKit handoff with four 16 KiB no-map queue reservations. It deliberately rejects the internal version-1 live-session handoff: CC.EN/RDY does not prove mailbox or retained-buffer ownership. Existing raw profiles preserve their adoption path. The boot producer must supply this documented contract before hardware testing.

Validation: native AArch64 Image build with Clang and GNU ld; binding schema validation; APIF host fault tests including queue commands without payload, void MAP results, failed UNMAP, lost replies, offset DMA rejection and the 257-page boundary. The source has been reviewed for ownership, teardown and publication provenance. Hardware boot, read/write/flush durability, reset and unbind qualification remain pending.

All commits are signed off by Dj hey@djdev.me.

Forward table-6 calls through the shared version-2 transport. Build the
TCB and physical page list in Linux, validate identity DMA addresses, and
reuse four explicitly quiesced, reserved queue pages across boot owners.

Retain requests after lost MAP responses and require native invalidation
before cancellation or completion releases their backing. Keep existing
post-M4 recovery, quarantine and synchronous flush behavior. Leave raw
controller profiles on their existing register paths.

Require a stopped RTKit handoff rather than inferring live-session buffer
ownership from controller registers. Host tests cover no-payload queue
commands, void MAP results, failed UNMAP, lost replies, offset apertures
and the maximum physical page list. Local native object build passes;
hardware qualification remains pending.

Signed-off-by: Dj <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Superseded by #473, refreshed from the current T6050 source onto Linux 7.3 integration. The new shared base is #472; all feature PRs now target t6050/base. Closing this stale chained version and keeping its branch for history.

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.

1 participant