4 Commits
Author SHA1 Message Date
geramyloveless 56165a894a Installer: libmlg_drm and libdrm_mlg go to /usr/local/lib with the HSA runtime
The Linux-file client library (libmlg_drm) and the libdrm over it
(libdrm_mlg, which RADV and other DRM clients load) now ship in the app's
runtime payload, signed by the team like the HSA runtime, and the
installer puts them in /Library/MacAMDGPU/runtime and /usr/local/lib in
the same transaction (staged, backed up, restored on failure), so local
apps pick up the libraries that match the driver on every update. Both
have @rpath install names, as before. activate.sh --install-hsa builds
them (make libdrm-mlg); the DMG check and the installer's validation
accept and verify exactly these files.
2026-10-04 19:26:47 -07:00
geramyloveless d6ca8045c7 host: hand the GPU from the previous driver to the new one on upgrade
An activation request that replaces the driver does not stop the running
one, and the new driver attaches only after every old instance is gone. The
installer returned .replace and then checked attachment with a ping, which
the old driver answered. The old process stayed attached until someone
killed it.

The installer (the app's installer window and `activate`) now drives the
handover. It tells instances apart by IOUserServerCDHash against the
bundled dext's code signature:

- Before the activation request, each previous instance closes its session
  the normal way and admits no new one (Retire QUIESCE). Apps that still
  hold a session are listed.
- Once macOS has accepted the replacement, each previous instance is asked
  to terminate (Retire TERMINATE) and the installer waits for it to leave
  the registry. If it does not, it says why: the clients still attached, a
  BAR mapping, or a quarantine that needs a restart. It also gives the
  recovery steps and the systemextensionsctl state, and never kills it. A
  driver that predates Retire is named as such, with the enclosure power
  cycle (232 and later) or a restart as the way out.
- A failed or deferred replacement resumes the previous driver.
- Attachment is verified against the bundled driver only.
- When the bundled version is already enabled, a previous instance left by
  an earlier upgrade is retired as well.

New commands: `instances` lists attached driver instances with their
clients and session state. `retire-previous [--force] [--wait S]` finishes
a stuck upgrade, `resume-previous` cancels a quiesce, and `ping-bundled`
pings the bundled driver only. activate.sh retires the previous driver
after the new one is enabled and checks attachment with ping-bundled.
2026-10-03 16:43:29 -07:00
geramyloveless cd088371a9 activate: --display enables Display Core in the dext personality
--display sets MacLinuxGPUDisplay=true in every MacLinuxGPU personality
of the built dext's Info.plist before its final signature: in the local
profile path the dext is signed afterwards as before; after Xcode's
automatic signing the dext is signed again with its own identity,
entitlements and flags, then the app. The source Info.plist is not
changed. Without --display the built personality is checked to carry no
display key, so an install without the flag is compute-only.
2026-10-03 14:08:37 -07:00
geramyloveless 953cf0149c mac_linuxgpu: upstream Linux amdgpu on macOS
Runs the unmodified upstream Linux amdgpu and amdkfd drivers on Apple
Silicon Macs inside a DriverKit system extension, for AMD GPUs attached
over Thunderbolt. The Linux sources come from a pinned submodule and are
compiled against linuxu, a userspace implementation of the Linux kernel
APIs they use. Includes the HSA runtime, the host installer app, the
setup and firmware fetch scripts, and the offline test suite.
2026-10-02 18:49:17 -07:00