Before boot.efi: the Mac’s initial self-test routines

When you press the Power button to start your Mac up, it (apparently) doesn’t go straight into loading its EFI firmware, but appears still to perform some basic hardware checks and initialises some key parts of its hardware.

There’s some uncertainty about this, because Apple’s latest account of the early boot process hasn’t been revised for over five years, during which Mac hardware has changed a great deal. However, that refers to an initial POST (Power-On Self Test) routine which “initializes some hardware interfaces and verifies that sufficient memory is available and in a good state.”

Traditionally, the code run for POST has been stored in a Mac’s hardware, in what Apple still refers to as BootROM, although most of the rest of that, EFI, has now moved out onto local disk storage and is no longer ‘flashed’ to a ROM as such. EFI firmware is still ‘flashed’ in MacPro5,1 models, apparently, which explains why they cannot undergo EFI firmware updates in the same way as more recent models.

Intel-based Mac models from before October 2016 signal the outcome of their POST phase using sound. A normal startup chime indicates that memory (RAM) and ROM appear sound and sufficient for the boot process to continue. The following sounds are emitted when booting is abandoned or paused:

  • if no RAM is found, a single tone repeated every 5 seconds;
  • if RAM is found but fails POST, three tones followed by a 5 second pause, repeating
  • if the EFI firmware found is corrupt and is being recovered, three long, three short, and three long tones (—…—, the inverse of Morse SOS)
  • if an EFI firmware update is in progress on a Mac model prior to 2012, one long tone when you hold the Power button.

PowerPC and Classic Macs are different again, and may flash the display rather than emitting tones.

Recent MacBook Pro and some other models which have mute boots neither emit sounds nor flash their displays as a result of POST problems. If they can’t find a valid EFI firmware source, they should automatically recover the EFI firmware, but without any sounds to provide a clue that is what is taking place; instead, they display a white-on-black progress bar for the firmware recovery process.

You can check the last POST results by viewing the Diagnostics item in System Information, although as most problems detected there are likely to abort the boot process, you’re unlikely to see anything other than Passed.

At the same time, custom chips are initialising too. All recent models have a System Management Controller (SMC) which starts to control cooling fans, battery charging, and other hardware features. These have their own firmware, which doesn’t appear to be loaded from disk alongside EFI firmware, and does seem still to be ‘flashed’ to ROM.

Apple’s most recent and radical design incorporates SMC, internal SSD controller, Secure Boot management and more in the T2 chip. In addition to its SMC role which requires early activity, the role of the T2 in Secure Boot makes it clear that it loads its own firmware well before the EFI firmware, and enforces set security policy. In the unlikely event that a T2 firmware update goes wrong, a T2-equipped Mac is unable to start the normal EFI boot process, and has to undergo a special recovery procedure.

Even quite ordinary Macs have upgradable SMC firmware, detailed in the Hardware Overview of System Information. Other upgradable firmware includes that for NVMe controllers for internal SSDs, certain graphics cards including those using the AMD vbios, and Thunderbolt/USB-C interfaces which are known as Thor. Their updates are normally bundled with EFI firmware updates in macOS update packages.

Many other hardware devices in your Mac have their own firmware too, although it isn’t clear whether they are upgradable. These include:

  • Bluetooth chipset
  • Ethernet port(s)
  • Other graphics chipsets (normally ROM coupled with an EFI driver)
  • Wi-Fi chipset.

Once these early steps are successfully completed, the Mac locates the appropriate boot.efi file, and booting proceeds – which I will examine in a future article.