Skip to content

Remove APIF - #1363

Merged
DjDeveloperr merged 3 commits into
integration/aurorafrom
cleanup/remove-apif
Nov 9, 2026
Merged

DjDeveloperr merged 3 commits into
integration/aurorafrom
cleanup/remove-apif

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

APIF is old SPTM support that doesn't need to be in tree. This removes all of it from integration/aurora. Most of it came in with the shared T6050 APIF base (d9d9ee6, PR #472). Later additions, such as #841's 61 lines in apple-dart-apif.c, go with their files.

Removed

  • Drivers: the APIF MMIO transport (drivers/firmware/aurora-apif-mmio.c), the APIF DART (drivers/iommu/apple-dart-apif.c) and the APIF SART (drivers/soc/apple/apple-sart-apif.c), with AURORA_APIF_MMIO, APPLE_DART_APIF, APPLE_SART_APIF and their Makefile lines.
  • Headers: apple-dart-apif.h, pci-apple-apif.h and soc/aurora/apif-mmio.h. Also soc/apple/display-event-{log,debugfs}.h: nothing in tree includes them, and their only user is usb: typec: tipd: Reconcile T6050 SPMI and display events #487, part of the APIF series.
  • SART: sart-backend.h and the backend indirection in sart.c. Only the APIF SART used it. With no backend set, the existing MMIO path runs unchanged.
  • Mailbox: the apple,t6050-apif-ascwrap-v6 profile in mailbox.c. No DT uses it.
  • Config and tests: arch/arm64/configs/aurora-apif.config, and tools/testing/selftests/aurora-apif/ with its TARGETS line.
  • Bindings: aurora,apif-mmio, apple,dart-apif, apple,sart-apif, and the APIF compatible in apple,ascwrap-v6.
  • Docs and MAINTAINERS: the aurora-apif*.rst pages, their toctree entries, the "AURORA PLATFORM MMIO INTERFACE" section, and the Centauri section's link to the APIF doc.

Kept

These came with the APIF base, but native code in tree now uses them:

  • RTKit PMP registry-v2: used by pmp.rs, apple,t6050-pmp-v2.
  • T6050 CPU IDs and the delay workaround that uses them.
  • apple_mbox_ascwrap_v6_get_cpu_state(): used by g18.
  • apple_centauri_control_ready(): used by centauri/t6050, btcentauri_t6050.
  • apple_dp_phy_link_config(): used by atc-t6050-dp.
  • apple_dpxbar_link_configure(): used by apple-display-crossbar.

Grep

git grep -n -E "(^|[^A-Za-z])(apif|APIF)([^a-z]|$)" now matches only the NXP RTC register bit:

drivers/rtc/rtc-s32g.c:27:#define RTCS_APIF		BIT(13)
drivers/rtc/rtc-s32g.c:86:	if (status & RTCS_APIF) {
drivers/rtc/rtc-s32g.c:88:		writel(status | RTCS_APIF, priv->rtc_base + RTCS_OFFSET);
drivers/rtc/rtc-s32g.c:125:		alrm->pending = !(rtcs & RTCS_APIF);

Build

All builds ran on the shared host under the kbuild lock, at nice 19 with -j6.

  • M5 kernel 7.3.0-m5-apifrm: the running 7.3.0-m5-argb source with these three commits on top.
    • Built Image modules dtbs with the integration config. After olddefconfig the config differs from the running kernel's in 0 lines.
    • The build's 40 warning lines match the argb build line for line, all pre-existing.
  • This branch, arm64 defconfig + asahi.config: built drivers/{soc/apple,iommu,firmware,mailbox}/ at W=1, base vs head.
    • Base: 2 warnings, both pre-existing in display-gate.c.
    • Head recompiled only sart.o and mailbox.o: 0 warnings.
  • CI: dt-checks, host-tests, kunit, rust-build and source all pass.

Hardware (M5 Pro J714s, SSD boot)

7.3.0-m5-apifrm is the running 7.3.0-m5-argb source with these three commits. I installed it over SSH as its own release, rebooted, then rolled back and compared it with a fresh argb boot.

  • Boot: reached graphical.target with Hyprland running. ssh m5-ssd came back 10 s after the reboot.
  • NVMe: root on nvme0n1p5 (ext4 rw) through 45dcc0000.nvme. SART 41dc50000 is bound.
  • Mailboxes: six bound, including the GPU's 2302600000 and 2302e00000.
  • DCP: five DCP engines plus apple-drm bound.
  • GPU: the aurora driver is bound to 2300000000.gpu, with card0/card1.
  • Wi-Fi: joined at 5 GHz, ping 10/10. Bluetooth controller is up.
  • SEP: loaded read-only (xart_writes=0 provision_keybag=0).
  • Errors: no oops, BUG, WARN or SError.
  • Diff against argb: dmesg warnings and errors are identical (13 lines each), and so are the 53 loaded modules. The 160 bound drivers match except the phram device's address, which also changes between two boots of argb itself (10006000000 vs 10006378000).
  • Afterwards: current is back on 7.3.0-m5-argb with prev 7.3.0-m5-integration. The ESP sets and the composed Stage 2 are byte-identical to the start.

Open PRs

Once this merges, these October APIF-series PRs get closed, since they add or depend on APIF code:

The rest of that series is native and stays open for the owner to decide:

#778 puts a new test under tools/testing/selftests/aurora-apif/, so it needs to move that test.

#1208's sart.c hunks have the removed backend lines as context, so expect a small conflict there.

🤖 Generated with Claude Code

APIF is old SPTM support that doesn't need to be in tree. Drop the
APIF MMIO transport, its DART and SART providers, the APIF mailbox
profile, its config fragment and selftests, and the headers only APIF
consumers used. SART goes back to its MMIO path.

Signed-off-by: Diljit Singh <hey@djdev.me>
Remove the APIF MMIO, DART and SART bindings and the APIF ASCWrap v6
compatible, and the APIF host wording in the N1 Control binding.

Signed-off-by: Diljit Singh <hey@djdev.me>
Remove the APIF platform, driver and N1 transport pages, their index
entries and the APIF MAINTAINERS entries.

Signed-off-by: Diljit Singh <hey@djdev.me>
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