Boot implementation notesDraft
These notes describe how the current boot object is put together. For the sequence of steps see the boot flow; for the map of all parts see the architecture overview.
Boot object#
The OpenBoot boot object is the only firmware image. It runs at EL2 on macOS 27.3 and later firmware, starts the OpenBoot UI automatically after platform initialization, and needs no diagnostic flags.
Main loop and debug link#
The main loop services UI input and rendering. The debug link is OBLink, a
plain-USB serial link carrying the console, monitor commands and image push
(see the OBLink overview; the wire format is in
tools/oblink/PROTOCOL.md and docs/debug-channel.md in the source tree).
Secondary CPUs#
As in the m1n1 reference, secondary CPUs are started for a kernel payload, not automatically. This keeps repeated chainloads on a cold SMP stage instead of trying to reset CPUs that already run another image. Each secondary enables the shared EL2 page tables before reporting itself online; a reset-vector mailbox alone is not treated as UEFI readiness. Cold start does not add unproven RVBAR writes. A persistent page outside the image records the main/MMU/SMP/UI/handoff/vector stages and a heartbeat.
Framebuffer and UI#
The UI uses the iBoot framebuffer directly through a Normal-NC EL2 mapping on
the supported 3456x2234 panel. Other geometries retain the legacy framebuffer
console. Rendering and mailbox work have independent per-tick bounds, so a
stalled hardware timer or MTP coprocessor cannot trap the main loop. An EL2
heartbeat continues to repaint even when CNTPCT stops advancing; terminal MTP
failure disables further input-hardware actions without disabling the UI.
Built-in input#
Built-in MTP keyboard and trackpad code uses raw DART and MMIO. The build
generates the trackpad firmware blob from MTFW_PLIST and fails when the plist
is missing; MTFW_NONE=1 builds without the trackpad (the keyboard path
remains available and firmware upload is skipped).
Storage, USB and the loader boundary#
Current subsystems also include UEFI storage protocols, xHCI and read-only USB
mass-storage and filesystem support. The UI and loader integration boundary is
ui_entry_set() plus the strong ui_boot_hook() override; the platform
does not substitute a stub for a UEFI loader.
Provenance#
The source tree is self-contained. Implementation carried from external
projects is listed in docs/upstream.md and in the
third-party notices.