What happens when you turn on computer? | Sanketh's Blog
1. Power‑On & Hardware Reset 1. Power‑Good Signal The power supply stabilizes voltages and asserts a “Power‑Good” (PWR_OK) line to the motherboard. All devices receive power and begin to initialize themselves. The Central Processing Unit (CPU) is initially held in a reset mode, meaning it’s not yet executing instructions. The memory layout is powered up, although the RAM itself has no content since it’s volatile. 2. CPU Reset Vector The reset vector is a predetermined memory address where the CPU begins execution after being powered on or reset. On x86 processors, this address is typically 0xFFFFFFF0 (near the top of the 4GB address space). When the CPU comes out of reset, its program counter (instruction pointer) is automatically set to this address. The motherboard’s memory mapping ensures that this address points to the BIOS/UEFI firmware ROM chip, so the very first instruction the CPU executes comes from the firmware.
Table of Contents 1. Power‑On & Hardware Reset 1. Power‑Good Signal 2. CPU Reset Vector 3. Microcode / Internal Init 2. Firmware Initialization 1. POST (Power‑On Self Test) 2. Core Hardware Initialization 3. Option ROMs & Plug‑In Cards 3. Boot Device Selection 1. Boot Order 2. Secure Boot (UEFI only) 4. Bootloader Stage: Master Boot Record (MBR) vs GUID Partition Table (GPT) 1. Master Boot Record (MBR) - Legacy BIOS Systems MBR Structure Breakdown: MBR Boot Process: MBR Limitations: How MBR Supports booting multiple OSes Overcoming the 4-Partition Limit: Extended and Logical Partitions GUID Pa
related reading
- The "Basics" | Putting the "You" in CPUcpu.land
- Intro - Putting the "You" in CPUcpu.land
- Brave New Trusted Boot World0pointer.net
- On rebooting: the unreasonable effectiveness of turning computers off and on again - Keunwoo Lee's Minimum Viable Homepagekeunwoo.com
- “Hello, world” from scratch on a 6502 — Part 1youtube.com
- Building a hypervisor, 2: Booting Linuxiovec.net
- Initial ramdisken.wikipedia.org
- How The Computer Works: The CPU and Memoryhomepage.cs.uri.edu
- Making an OS (x86) Chapter 1 - CPU, Assembly, Bootingyoutube.com
- A fundamental introduction to x86 assembly programmingnayuki.io
- Booting a microcontroller - Rust Embedded Coursericeman2000.github.io
- Processes and Threads — PlanetScaleplanetscale.com