Logo
Articles Compilers Libraries Books MiniBooklets Assembly C++ Rust Go Linux CPU Others Videos
Advertisement

Article by Ayman Alheraki on May 4 2026 12:09 AM

x86-64 CPU Operating Modes (Complete Overview)

x86-64 CPU Operating Modes (Complete Overview)

Modern x86-64 processors operate in several distinct modes that determine:

  • Instruction decoding

  • Register size and availability

  • Memory addressing behavior

  • Privilege and protection mechanisms

These modes exist primarily for backward compatibility and progressive feature expansion.


1. Real Mode (Real-Address Mode)

Origin: Intel 8086 Default mode after reset

Key Characteristics:

  • 16-bit execution environment

  • 20-bit address bus → max 1 MB memory

  • Segmented memory (Segment:Offset)

  • No memory protection

  • No privilege levels

Address Calculation:

Usage Today:

  • BIOS/firmware initialization

  • Early boot stages (bootloaders)


2. Virtual 8086 Mode (VM86)

Introduced in: Intel 80386 Runs inside Protected Mode

Purpose:

Allows execution of real-mode programs (like DOS applications) within a protected environment.

Key Characteristics:

  • Executes 16-bit code

  • Each VM86 task behaves like an isolated 8086 machine

  • Protected by the OS kernel

Why It Matters:

  • Critical for backward compatibility (legacy DOS software)

  • Used historically in early multitasking OSes


3. Protected Mode

Introduced in: Intel 80286 (enhanced in 80386)

Key Characteristics:

  • 32-bit environment (on 80386 and later)

  • Access to up to 4 GB memory

  • Memory protection via segmentation and paging

  • Privilege levels (Ring 0 → Ring 3)

  • Hardware-enforced isolation

Features:

  • Descriptor tables (GDT, LDT)

  • Task switching (hardware-supported, rarely used today)

  • Paging (virtual memory)

Importance:

This is the foundation of modern operating systems like:

  • Windows NT

  • Linux


4. Long Mode (x86-64 Mode)

Introduced by: AMD with AMD64 Later adopted by Intel as Intel 64

Long Mode is the modern 64-bit operating mode, and it has two sub-modes:


4.1 64-bit Mode

Key Characteristics:

  • 64-bit general-purpose registers (RAX, RBX, etc.)

  • Virtual address space up to 256 TB (current implementations)

  • Flat memory model (segmentation mostly disabled)

  • RIP-relative addressing

  • Mandatory paging

Major Enhancements:

  • More registers (R8–R15)

  • Cleaner instruction encoding (REX prefix)

  • Improved calling conventions

Usage:

  • Native 64-bit applications

  • Modern OS kernels and user-space


4.2 Compatibility Mode

Purpose:

Allows 32-bit and 16-bit applications to run under a 64-bit OS.

Key Characteristics:

  • Executes legacy code without modification

  • Uses 32-bit or 16-bit semantics

  • Still benefits from OS-level protection

Important Note:

  • No access to 64-bit registers

  • No 64-bit addressing


5. System Management Mode (SMM)

Special Mode (Often Overlooked)

Purpose:

  • Low-level system control (firmware, power management)

Key Characteristics:

  • Entered via SMI (System Management Interrupt)

  • Runs in isolated memory region (SMRAM)

  • Invisible to the operating system

Usage:

  • Power management

  • Hardware control

  • Security mechanisms


Mode Transition Summary

Typical boot flow:

  1. CPU starts in Real Mode

  2. Bootloader switches to Protected Mode

  3. OS enables Long Mode

  4. Applications run in:

    • 64-bit Mode

    • Compatibility Mode (if needed)


Conceptual Insight

The coexistence of all these modes reflects a core philosophy of x86 design:

“Never break backward compatibility.”

This is why a modern CPU can still execute code written for a processor from 1978.


Quick Comparison Table

ModeBitnessMemory ModelProtectionModern Use
Real Mode16-bitSegmentedNoneBoot only
Virtual 808616-bitSegmented (virtual)YesLegacy
Protected Mode32-bitSeg + PagingYesCore OS
64-bit Mode64-bitFlat + PagingYesMain usage
Compatibility Mode32/16Legacy inside 64-bitYesApps
SMMN/AIsolatedFirmwareHidden

Advertisements

Responsive Counter
General Counter
1286315
Daily Counter
1475