3 ms·
At a hardware level a bunch of things happen on a modern motherboard. A more simplistic example would be a cell phone or any SoC (System on a Chip) or microcon
by mbell 15y ago
At a hardware level a bunch of things happen on a modern motherboard. A more simplistic example would be a cell phone or any SoC (System on a Chip) or microcontroller device. What follows is still very simplified and generic though.
When power is applied there is a PMIC (Power Management IC). This is a hardware integrated circuit that provides various features, among them are are the timings needed to power on the device. A power on sequence consists of the PMIC first receiving its primary power from a regulator on the system board, this usually triggers a hardware timer that waits a bit for the voltage to stabilize. Then the PMIC triggers the power supplies to other components. A modern SoC may need 3 or 4 different power supplies and these need to be 'enabled' in a specific order with specific timings. All this is managed by the hardware in the PMIC and would be the "trigger" that tells the SoC to fire up or more realistically just what is required to fire it up properly.
Once the voltages are supplied to the SoC several other things take place before the CPU comes online. Usually there is a bit of circuitry on the SoC called a PLL (Phase Locked Loop) that locks onto the system clock to avoid fluctuation. This can take some time as the system clock stabilizes after boot but even a stable stock takes a bit of time to lock onto. The PLL sub system also generates the various clocks needed by the SoC. The master clock from the system board may only be ~25Mhz but the PLL needs to generate various clocks for different parts of the SoC, maybe 1Ghz for the CPU, 100Mhz for the I/O, etc. Some SoC processor may actually start at a much slower clock rate and setup the PLL for its desired clock rate as part of the initialization process. Still others may have a very slow clock on chip that the SoC starts from to initialize itself before switching to the external clock.
Once all that is done, the CPU comes online. Sometimes this is prefaced by some support circuitry or microcode. For example it may fetch some data from memories off the SoC. Either way the CPU just starts executing at a known location so it all just starts with a single instruction. Usually you'd have a bootloader at the startup location that initializes just enough of the SoC to bring online additional functions. A common action is to setup external flash / ram then chain to a much more complex bootloader from the external flash.
In a modern x86 system there is more that goes on and much of what I described is more distributed to various components on the motherboard. Much of the initial startup is handled by what amounts to a microcontroller that lives inside the northbridge. It handles initial startup tasks before bringing the CPU online.
- andyjohnson0 15y agoGreat explanation. Thank you!