How does the hardware know the restart? [closed]
Solution 1:
Macs like PCs have ACPI (advanced configuration and power interface) and don’t actually turn off during a restart.
How does a computer restart itself? - Super User
tl;dr: power states in your computer are controlled by an implementation of ACPI (advanced configuration and power interface). At the end of a shutdown process, your operating system sets an ACPI command indicating that the computer should reboot. In response, the motherboard resets all components using their respective reset commands or lines, and then follows the bootstrap process. The motherboard never actually turns off, it only resets various components and then behaves as if the power button has just been pressed.