Real Macs read and write data in NVRAM during many different phases of operation. Some of them are:
- When booting the computer, NVRAM identifies the Startup Disk.
- When booting the computer, Apple's boot loader also checks if previous session had crashed. If so, it displays a message saying "Your computer was restarted because of a problem".
- When rebooting or shutting down, information is written or updated in NVRAM.
- When there's a system crash, a background process stores kernel panic information into NVRAM.
- When you're running the macOS installer (which is not MacOS), it reads and writes information to NVRAM to select the right intermediate startup disks.
- FaceTime and Messages store various "keys" in NVRAM.
- Information about paired Bluetooth devices is also stored in NVRAM. This allows Apple Magic Mouse and Magic Keyboard to connect via Bluetooth before macOS is booted.
- Lots of other little details are stored in NVRAM.
NVRAM is used by:
- Apple boot loader (boot.efi) -- this is not macOS. It's an EFI boot loader.
- macOS installer -- this is not macOS either
- macOS updater -- this is not macOS either
- macOS
When we use EmuVariableUefi to emulate NVRAM, it stores NVRAM data in a file called
nvram.plist in the EFI partition of the boot disk. But it requires Clover's "rc" scripts to read/write that file. However:
- Apple boot loader cannot read/write that file
- macOS installer cannot read/write that file
- macOS updater cannot read/write that file
So we don't get all the functionality of NVRAM with just EmuVariableUefi and RC scripts. But with native NVRAM, all components of the system can access NVRAM any time they need to.