How jprx/qemu-sptm works
qemu-sptm is a QEMU-based Apple Silicon/Darwin hardware emulator. The principal workflow is to start the darwin machine with a kernelcache, device tree, and optional SPTM/TXM firmware, trustcache, and ramdisk, then boot XNU. The README documents the machine options and major emulation capabilities; source excerpts are limited, so the graph does not claim unshown implementation-level calls. The external darwin-vm scripts prepare inputs but are outside this repository.
Main entry points: darwin.c Darwin machine · arm Firmware boot · xnu_patch.c XNU patching · pauth_helper.c PAC handling
Components 20
Boot inputs
- Kernelcache
- Device tree
- SPTM firmware
- TXM firmware
- Trustcache
- APFS ramdisk
Darwin machine
- Darwin machine
hw/arm/darwin.c - Firmware boot
hw/arm - XNU patching
hw/arm/xnu_patch.c
Security emulation
- SPRR / GXF
hw/arm - SPTM / TXM
hw/arm - MIE / MTE
hw/arm - PAC handling
target/arm/tcg/pauth_helper.c
Apple devices
- Apple registers
hw/arm/apple_regs.c - AMCC emulation
hw/arm/apple_amcc.c - AIC emulation
hw/arm - SEP emulation
hw/arm - UART / FIQ
hw/arm
Other components
- VM operator
- darwin-vm tools
Connections 26
- VM operator → Darwin machine: starts
README.md - VM operator → Kernelcache: provides
README.md - VM operator → Device tree: provides
README.md - VM operator → SPTM firmware: optionally provides
README.md - VM operator → TXM firmware: optionally provides
README.md - VM operator → Trustcache: optionally provides
README.md - VM operator → APFS ramdisk: optionally provides
README.md - darwin-vm tools → Device tree: prepares
README.md - darwin-vm tools → Kernelcache: fetches
README.md - darwin-vm tools → SPTM firmware: fetches
README.md - darwin-vm tools → TXM firmware: fetches
README.md - darwin-vm tools → Trustcache: prepares
README.md - darwin-vm tools → APFS ramdisk: prepares
README.md - Darwin machine → Firmware boot: boots
README.md - Darwin machine → XNU patching: applies patch
README.md - Darwin machine → SPRR / GXF: emulates
README.md - Darwin machine → SPTM / TXM: emulates
README.md - Darwin machine → MIE / MTE: emulates
README.md - Darwin machine → PAC handling: uses
README.md - Darwin machine → Apple registers: emulates
README.md - Darwin machine → AMCC emulation: emulates
README.md - Darwin machine → AIC emulation: emulates
README.md - Darwin machine → SEP emulation: emulates
README.md - Darwin machine → UART / FIQ: supports
README.md - Darwin machine → Trustcache: loads
README.md - Darwin machine → APFS ramdisk: loads
README.md