3 ms·
> The purpose of the EFI phase and the boot loader boot.efi is to augment the basic facilities provided by BootROM to the point where the macOS kernel can be lo
by yjftsjthsd-h 2y ago
> The purpose of the EFI phase and the boot loader boot.efi is to augment the basic facilities provided by BootROM to the point where the macOS kernel can be loaded with its extensions. Key to this is providing access to the Mac’s hardware through the device tree, IODeviceTree, listing and relating all the devices in that Mac. This is built by boot.efi and passed to the kernel when it loads, and forms the basis for IOKit within macOS.
That's interesting; does "normal" PC UEFI pass a device tree to the OS? I thought hardware was enumerated at runtime.
- wmf 2y agoNormally UEFI creates ACPI tables that have some similarity with device trees. PowerPC OS X probably expected a device tree provided by Open Firmware so when they switched to EFI they probably added that boot.efi shim so the kernel didn't have to change much. It doesn't really matter whether the bootloader or the kernel enumerates hardware.
- jsolson 2y agoNote that "device tree" can include things like "PCIe root port" This device tree is describing fixed (per BOM/schematic) hardware. Things below that hardware are still enumerated. I really wish this had won out over ACPI. It didn't, though, so Arm Server ready is all ACPI-ified, complete with the tooling trash-fire that the ecosystem entails.