Skip to content

feat: implement 32-bit protected mode transition #2

Description

@FelineFantasy

Summary

Implement 32‑bit protected mode transition for CatOS.

Currently, CatOS runs in 16‑bit real mode, which limits memory access to 1 MB. This issue adds support for 32‑bit protected mode, unlocking more memory and modern CPU features.

Open questions

  • Should we keep a fallback to real mode for debugging?
  • Which GDT layout (flat or segmented) fits best for CatOS?
  • Do we need to handle interrupts (IDT) in this PR or leave it for a follow‑up?

Phase 0 (this issue)

  • Define GDT with null, code, and data descriptors
  • Load GDT using lgdt
  • Set PE (Protection Enable) bit in cr0
  • Perform a far jump to a 32‑bit code segment
  • Test boot in QEMU and log the new state

Status: exploring - not yet scheduled for a specific release.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions