Skip to content

pci: apple: Add preinitialized APIF hosts and native AIC MSI - #242

Closed
DjDeveloperr wants to merge 1 commit into
apif-nvmefrom
apif-pcie
Closed

DjDeveloperr wants to merge 1 commit into
apif-nvmefrom
apif-pcie

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Add apple,apif-pcie for an ECAM host already initialized by the boot producer, with hierarchical MSI allocation from its declared native AIC range. Linux owns vector allocation and teardown; parent IRQs are released correctly.

The optional apple,t6050-pcie-apif profile carries the known Gen3 x1 port-0 preboot sequence. Resources, tunables, MSI geometry and explicit RID-to-SID tuples are validated before mutation. Routes must match iommu-map. No board-name gate, fixed MSI doorbell/vector count, private implementation references or successful-call logging remain.

The preboot cycle API requires an isolated N1 ROM function and caller-quiesced DMA. It refuses sibling functions and DART units used by another Linux group or retained firmware streams. Partial failures leave endpoint bus mastering and bridge decoding stopped. It is not a general PCI reset implementation and adds no Wi-Fi/Bluetooth or GPU drivers.

Stack: based on apif-nvme (#241), itself based on apif-mmio (#238). This ordering keeps the eventual guest-wiring PR on one reviewable stack; PCIe does not consume the NVMe helper API.

Validation: native AArch64 PCIe/DART/core objects; host production-function fault tests for MSI geometry, write failures, locked PERST, and rejected unit-power transitions; binding schema validation. A native Image with these providers linked also builds with Clang/GNU ld. Hardware MSI delivery, link recovery and N1 firmware qualification remain pending.

Use firmware-described ECAM, MSI doorbell and AIC vector ranges rather
than raw host-controller cold initialization. Release parent IRQs when
MSI allocations are torn down.

Keep the port-0 preboot transition behind the explicit T6050 Gen3 x1
layout. Validate resources, tunables and RID-to-SID routes against the
IOMMU map before mutation. Use declared MSI geometry after reset and
refuse sibling functions, retained DART streams or other Linux groups.
Add a nonblocking PCI topology lock for removal-cancelled callers.

Strip private implementation references and routine success logs from
the imported sequence. Native objects and host fault tests pass; hardware
link and radio qualification remain pending.

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

Copy link
Copy Markdown
Contributor Author

Superseded by #474, 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