EMZETT.
Login

CPU initialization

In short: CPU initialization is the first step after power-on: the processor puts itself into a defined initial state and starts executing the firmware at a fixed address.

In more detail: As soon as the power supply reports “power good”, the chipset releases the reset. The CPU starts in the simplest operating mode, 16-bit real mode (x86), and executes the first instruction at the reset vector address (on x86 just below 4 GiB, 0xFFFFFFF0). There lies a jump into the firmware.

In Depth

  1. Reset: Registers, flags and caches have defined initial values, cache and virtual memory are still off.
  2. Reset vector: The firmware (in the flash chip, mapped in via the chipset) delivers the first instruction.
  3. Early firmware (SEC/PEI in UEFI): The CPU is prepared for operation: load microcode, use caches as temporary memory (“cache as RAM”), configure the memory controller.
  4. Setting up main memory: DRAM training – the firmware measures delays and sets timings. Afterwards there is usable RAM.
  5. Starting further cores: The first core (BSP, bootstrap processor) wakes the others (AP, application processors) with a startup signal.
  6. Mode switch: From 16-bit real mode via 32-bit protected mode to 64-bit long mode. UEFI does this early; with BIOS only the bootloader does.
  7. Handover: The firmware starts drivers, the POST and afterwards the bootloader.
  • Microcode updates for the CPU come via UEFI or the operating system and fix bugs and security holes.
  • Security: Modern CPUs check firmware signatures right at startup (Boot Guard, PSP, secure processor).
  • ARM: Starts in its own boot ROM that loads and checks the next stage.

See also: Power-good signal, POST (power-on self-test), Boot process of a Windows 11 computer