Skip to main content

UEFI BIOS Explained: Architecture and Boot Flow

·773 words·4 mins
UEFI BIOS Firmware Boot Process Computer Architecture
Table of Contents

An Introduction to UEFI BIOS

This article provides a structured introduction to UEFI (Unified Extensible Firmware Interface). By the end, you will understand:

  • What UEFI is
  • Why it replaced legacy BIOS
  • Its architectural model
  • How the UEFI boot process works

🧠 What Is UEFI?
#

To understand UEFI, we must first examine its predecessor: the traditional BIOS.

Traditional BIOS
#

Since the 1980s, PCs have relied on BIOS (Basic Input/Output System). The term “BIOS” historically referred to two things:

  1. A Standard – An interface responsible for hardware initialization and loading the operating system bootloader.
  2. An Implementation – Vendor-specific firmware developed by motherboard manufacturers.

Legacy BIOS was revolutionary in its time, but modern hardware eventually outgrew its design limitations.


⚠️ Limitations of Legacy BIOS
#

Several architectural constraints led to the transition toward UEFI:

  • 16-bit Execution Mode
    BIOS operates in 16-bit real mode, limiting memory access and performance during boot.

  • 2.2 TB Disk Size Limit
    Caused by the MBR (Master Boot Record) partition scheme.

  • Minimal User Interface
    Text-only interface with keyboard navigation.

  • Limited Extensibility
    Difficult to modularize, update, or extend functionality.


πŸš€ The Rise of UEFI
#

UEFI is the modern firmware interface that replaces legacy BIOS.

Unlike BIOS, which stores boot logic primarily in ROM, UEFI:

  • Uses modular firmware components
  • Supports 32-bit or 64-bit execution
  • Stores bootloaders as .efi applications
  • Uses a dedicated partition called the EFI System Partition (ESP)

UEFI behaves more like a lightweight pre-OS environment than a simple bootstrap loader.


πŸ“Š BIOS vs. UEFI Comparison
#

Feature UEFI BIOS
Storage Model .efi files in ESP Firmware in ROM
Max Disk Size Up to 9 ZB (GPT) 2.2 TB (MBR)
Execution Mode 32-bit / 64-bit 16-bit
Interface GUI (mouse support) Text-based
Security Secure Boot Minimal
Extensibility Modular, driver-based Limited

UEFI removes many of the structural bottlenecks imposed by legacy BIOS design.


πŸ— UEFI Architecture and Core Concepts
#

UEFI sits between platform hardware and the operating system. Its design emphasizes modularity, driver-based extensibility, and standardized interfaces.


EFI System Partition (ESP)
#

The EFI System Partition (ESP) is a FAT32-formatted partition, typically 100–512 MB in size.

It stores:

  • OS bootloaders (.efi files)
  • Firmware utilities
  • Platform tools

Each installed operating system places its bootloader in this partition. The firmware then selects which one to execute based on configuration variables.


EFI Variables
#

UEFI stores configuration data in NVRAM (Non-Volatile RAM).

These variables include:

  • Boot order
  • Bootloader file paths
  • Secure Boot keys
  • Platform configuration parameters

Unlike legacy BIOS, these variables can be modified directly from within the operating system using runtime services.


πŸ”„ The UEFI Boot Process (Platform Initialization)
#

The UEFI boot flow follows a structured model defined by Platform Initialization (PI). It consists of six major phases:


SEC (Security Phase)
#

  • Establishes temporary memory
  • Sets up the initial CPU state
  • Creates the Root of Trust for Secure Boot

This is the first executed code after reset.


PEI (Pre-EFI Initialization)
#

  • Initializes permanent memory (DRAM)
  • Prepares essential chipset resources
  • Hands control to the DXE phase

DXE (Driver Execution Environment)
#

This is the most significant phase.

  • Loads UEFI drivers
  • Discovers hardware
  • Installs Boot Services
  • Builds system tables

DXE transforms the firmware into a fully operational pre-OS environment.


BDS (Boot Device Selection)
#

  • Reads EFI variables
  • Determines boot priority
  • Loads and executes the selected OS bootloader

TSL (Transient System Load)
#

This phase transitions control from firmware to the operating system loader.

Boot Services are terminated here.


RT (Runtime Phase)
#

The operating system takes control.

However, it may still call UEFI Runtime Services, such as:

  • Reading or writing NVRAM variables
  • Accessing system time services

πŸ” UEFI Secure Boot
#

Secure Boot ensures that only trusted, digitally signed code executes during boot.

It is based on a Public Key Infrastructure (PKI) model.

Chain of Trust
#

  1. Firmware verifies the OS bootloader
  2. Bootloader verifies the kernel
  3. Kernel verifies critical drivers

This prevents:

  • Bootkits
  • Rootkits
  • Unauthorized pre-OS malware

Secure Boot protects the system before the operating system’s security mechanisms are active.


πŸ›  UEFI Development Resources
#

For engineers interested in firmware development:

  • EDK2 (EFI Development Kit II)
    The primary open-source reference implementation of the UEFI specification.

  • QEMU
    A powerful emulator with strong debugging capabilities for UEFI testing.

  • OVMF (Open Virtual Machine Firmware)
    Enables UEFI support in virtual machines and is widely used for development and validation.

These tools form the foundation of most modern firmware engineering workflows.


🎯 Final Perspective
#

UEFI represents a fundamental architectural shift from legacy BIOS:

  • From 16-bit to 64-bit execution
  • From fixed firmware to modular architecture
  • From simple bootstrapping to secure, extensible platform initialization

For system architects, OS developers, and firmware engineers, understanding UEFI is essential to mastering modern platform design.

Related

Retrieving Disk Information in UEFI Using Disk Protocols
·796 words·4 mins
UEFI EDK2 Disk Firmware
Understanding the 4 Types of PCIe Bus Resets
·589 words·3 mins
PCIe Hardware Reset Mechanisms Computer Architecture Embedded Systems
SRAM vs. DRAM Explained: How Modern Memory Cells Really Work
·595 words·3 mins
Memory SRAM DRAM Computer Architecture Semiconductors AI Hardware