Mac OS Boot Process
From:
![]()
http://developer.apple.com/techpubs/hardware/DeviceManagers/pci_srvcs/pci_cards_drivers/PCI_BOOK.4b.html#14179
http://developer.apple.com/techpubs/hardware/DeviceManagers/pci_srvcs/pci_cards_drivers/PCI_BOOK.47.html#pgfId=3457Pre-New World Macintosh Starp Sequence on a PCI Mac - High Level View:
1. System-specific firmware performs initialization and self-testing on memory and other hardware systems.
2. The startup firmware in the Power Macintosh ROM probes each PCI bus, generates a device tree node for each device, and when it finds a device executes the FCode (if any) found in each PCI card's expansion ROM.
3. The startup firmware in the Power Macintosh ROM finds an operating system in ROM or on a mass storage device; it loads it into RAM and transfers processor control to it.
4. Mac OS completes the startup sequence.
Here is a high-level view of the execution path taken when a NewWorld-based computer starts up.
1. The POST code runs (preliminary diagnostics, boot beep, initialization, and setup), with possible intervention in the mini nub, a small debugging tool.
2. Open Firmware initializes and begins execution, including building the device tree and the interrupt trees.
3. Open Firmware loads the Mac OS ROM file, based on defaults and NVRAM settings.
4. Open Firmware executes the Forth script in the Mac OS ROM file, which contains instructions to read both the Trampoline code and the compressed Mac OS ROM image and place them into a temporary place in memory.
5. The Forth script transfers control to the Trampoline code, which functions as the transition between Open Firmware and the beginning of the Mac OS execution.
6. The Trampoline code decompresses the Mac OS ROM image, gathers information about the system from Open Firmware, creates data structures based on this information, terminates Open Firmware, and rearranges the contents of memory to an interim location in physical memory space.
7. The Trampoline code transfers control to the HardwareInit routine in the Mac OS ROM bootinfo file.
8. The HardwareInit routine copies data structures to their correct places in memory, and then calls the NanoKernel.
9. The NanoKernel fills in its data structures and then calls the 68K emulator.
10. The 68K emulator initializes itself, then transfers control to the startup initialization code.
11. The startup initialization code begins execution, initializing data structures and managers, and booting the Mac OS.
All functions found in the old Mac OS ROM are present in the NewWorld boot process, but occur at different times and places. To accomplish this, the code in the Mac OS ROM Image and POST is simplified, while the Trampoline code addresses the new functionality.